mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 20:53:37 +00:00
Use an atom comparison for a keyword check.
Instead of a string comparison.
This commit is contained in:
parent
d34f2823fd
commit
e7dffeedcf
@ -1199,7 +1199,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||
// Still doesn't deal with upvars
|
||||
if let Some(span) = finalize {
|
||||
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 => {
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user