diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 28fc73923800..e139ac8b2a06 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1988,9 +1988,12 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { path_depth))); // If it's a typedef, give a note - if let Def::TyAlias(..) = path_res.base_def { + if let Def::TyAlias(did) = path_res.base_def { err.fileline_note(trait_path.span, "`type` aliases cannot be used for traits"); + if let Some(sp) = self.ast_map.span_if_local(did) { + err.span_note(sp, "type defined here"); + } } err.emit(); Err(())