use rustc::session::early_error;
-use syntax::{ast, errors, diagnostic};
-use syntax::codemap::MultiSpan;
-use syntax::parse::{self, PResult};
+use syntax::{ast, errors, diagnostics};
+use syntax::codemap::{CodeMap, FileLoader, RealFileLoader, MultiSpan};
use syntax::errors::emitter::Emitter;
use syntax::feature_gate::{GatedCfg, UnstableFeatures};
use syntax::parse::{self, PResult, token};
// If it's a typedef, give a note
if let Def::TyAlias(..) = path_res.base_def {
- err.note(trait_path.span,
- "`type` aliases cannot be used for traits");
+ err.note("`type` aliases cannot be used for traits");
let definition_site = {
let segments = &trait_path.segments;
sp, feature_gate::EXPLAIN_DERIVE_UNDERSCORE,
);
if option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_none() {
- w.fileline_help(
- sp, &format!("add #![feature(custom_derive)] to \
- the crate attributes to enable")
+ w.help(
+ &format!("add #![feature(custom_derive)] to \
+ the crate attributes to enable")
);
}
w.emit();