mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
Improve Self.
This commit is contained in:
@@ -1519,7 +1519,11 @@ fn resolve_ident_in_lexical_scope(&mut self,
|
||||
path_span: Span)
|
||||
-> Option<LexicalScopeBinding<'a>> {
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user