Fix up rpass tests missing imports
This commit is contained in:
parent
ea7ba12f0f
commit
f960f9eb92
@ -16,6 +16,7 @@
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_ext;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_ext;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
extern crate syntax;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
extern crate syntax_pos;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::ext::base::{ExtCtxt, MacResult, MacEager};
|
||||
use syntax::util::small_vector::SmallVector;
|
||||
use rustc_plugin::Registry;
|
||||
@ -28,7 +28,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
||||
reg.register_macro("multiple_items", expand)
|
||||
}
|
||||
|
||||
fn expand(cx: &mut ExtCtxt, _: codemap::Span, _: &[ast::TokenTree]) -> Box<MacResult+'static> {
|
||||
fn expand(cx: &mut ExtCtxt, _: syntax_pos::Span, _: &[ast::TokenTree]) -> Box<MacResult+'static> {
|
||||
MacEager::items(SmallVector::many(vec![
|
||||
quote_item!(cx, struct Struct1;).unwrap(),
|
||||
quote_item!(cx, struct Struct2;).unwrap()
|
||||
|
@ -14,6 +14,7 @@
|
||||
#![feature(box_syntax, rustc_private)]
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#![feature(plugin_registrar, quote, rustc_private)]
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#![feature(slice_patterns)]
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
extern crate syntax_extension_with_dll_deps_1 as other;
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate rustc;
|
||||
extern crate rustc_plugin;
|
||||
|
||||
|
@ -19,11 +19,11 @@ extern crate getopts;
|
||||
extern crate rustc;
|
||||
extern crate rustc_driver;
|
||||
extern crate syntax;
|
||||
extern crate rustc_errors as errors;
|
||||
|
||||
use rustc::session::Session;
|
||||
use rustc::session::config::{self, Input};
|
||||
use rustc_driver::{driver, CompilerCalls, Compilation};
|
||||
use syntax::{diagnostics, errors};
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
@ -35,7 +35,7 @@ impl<'a> CompilerCalls<'a> for TestCalls {
|
||||
fn early_callback(&mut self,
|
||||
_: &getopts::Matches,
|
||||
_: &config::Options,
|
||||
_: &diagnostics::registry::Registry,
|
||||
_: &errors::registry::Registry,
|
||||
_: config::ErrorOutputType)
|
||||
-> Compilation {
|
||||
self.count *= 2;
|
||||
@ -64,7 +64,7 @@ impl<'a> CompilerCalls<'a> for TestCalls {
|
||||
_: &config::Options,
|
||||
_: &Option<PathBuf>,
|
||||
_: &Option<PathBuf>,
|
||||
_: &diagnostics::registry::Registry)
|
||||
_: &errors::registry::Registry)
|
||||
-> Option<(Input, Option<PathBuf>)> {
|
||||
panic!("This shouldn't happen");
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
#![feature(quote, rustc_private)]
|
||||
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
|
||||
use syntax::print::pprust::*;
|
||||
use syntax::parse::token::intern;
|
||||
|
Loading…
Reference in New Issue
Block a user