Auto merge of #132761 - nnethercote:resolve-tweaks, r=petrochenkov
Resolve tweaks A couple of small perf improvements, and some minor refactorings, all in `rustc_resolve`. r? `@petrochenkov`
This commit is contained in:
commit
ee612c45f0
5 changed files with 54 additions and 94 deletions
|
@ -641,9 +641,10 @@ impl<'a> Parser<'a> {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Do an ASCII case-insensitive match, because all keywords are ASCII.
|
||||
if case == Case::Insensitive
|
||||
&& let Some((ident, IdentIsRaw::No)) = self.token.ident()
|
||||
&& ident.as_str().to_lowercase() == kw.as_str().to_lowercase()
|
||||
&& ident.as_str().eq_ignore_ascii_case(kw.as_str())
|
||||
{
|
||||
true
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue