Improve Self
.
This commit is contained in:
parent
754fdad4a8
commit
b13392f771
1 changed files with 5 additions and 1 deletions
|
@ -1519,7 +1519,11 @@ impl<'a> Resolver<'a> {
|
|||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue