diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 552023d022f..f1be821d526 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1519,7 +1519,11 @@ impl<'a> Resolver<'a> { path_span: Span) -> Option> { if ns == TypeNS { - ident.ctxt = ident.ctxt.modern(); + ident.ctxt = if ident.name == keywords::SelfType.name() { + SyntaxContext::empty() // FIXME(jseyfried) improve `Self` hygiene + } else { + ident.ctxt.modern() + } } // Walk backwards up the ribs in scope.