use rustc_expand::base::{ExtCtxt, Resolver};
use rustc_expand::expand::{AstFragment, ExpansionConfig};
+use rustc_span::hygiene::AstPass;
+use rustc_span::symbol::{kw, sym};
+use rustc_span::{Span, DUMMY_SP};
use smallvec::smallvec;
use syntax::ast::{self, Ident};
use syntax::attr;
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::sess::ParseSess;
-use syntax::symbol::{kw, sym};
use syntax::visit::{self, Visitor};
-use syntax_pos::hygiene::AstPass;
-use syntax_pos::{Span, DUMMY_SP};
struct ProcMacroDerive {
trait_name: ast::Name,
struct CollectProcMacros<'a> {
macros: Vec<ProcMacro>,
in_root: bool,
- handler: &'a errors::Handler,
+ handler: &'a rustc_errors::Handler,
is_proc_macro_crate: bool,
is_test_crate: bool,
}
has_proc_macro_decls: bool,
is_test_crate: bool,
num_crate_types: usize,
- handler: &errors::Handler,
+ handler: &rustc_errors::Handler,
) -> ast::Crate {
let ecfg = ExpansionConfig::default("proc_macro".to_string());
let mut cx = ExtCtxt::new(sess, ecfg, resolver);