Use an atom comparison for a keyword check.
Instead of a string comparison.
This commit is contained in:
parent
d34f2823fd
commit
e7dffeedcf
1 changed files with 3 additions and 1 deletions
|
@ -1199,7 +1199,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||||
// Still doesn't deal with upvars
|
// Still doesn't deal with upvars
|
||||||
if let Some(span) = finalize {
|
if let Some(span) = finalize {
|
||||||
let (span, resolution_error) = match item {
|
let (span, resolution_error) = match item {
|
||||||
None if rib_ident.as_str() == "self" => (span, LowercaseSelf),
|
None if rib_ident.name == kw::SelfLower => {
|
||||||
|
(span, LowercaseSelf)
|
||||||
|
}
|
||||||
None => {
|
None => {
|
||||||
// If we have a `let name = expr;`, we have the span for
|
// If we have a `let name = expr;`, we have the span for
|
||||||
// `name` and use that to see if it is followed by a type
|
// `name` and use that to see if it is followed by a type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue