提交 b13392f7 编写于 作者: J Jeffrey Seyfried

Improve `Self`.

上级 754fdad4
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册