Do not suggest foo.Bar
This commit is contained in:
parent
cbbc7becc8
commit
1549af29c3
2 changed files with 6 additions and 11 deletions
|
@ -746,7 +746,12 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
fn recover_missing_dot(&mut self, err: &mut Diag<'_>) {
|
||||
if !self.token.is_ident() {
|
||||
let Some((ident, _)) = self.token.ident() else {
|
||||
return;
|
||||
};
|
||||
if let Some(c) = ident.name.as_str().chars().next()
|
||||
&& c.is_uppercase()
|
||||
{
|
||||
return;
|
||||
}
|
||||
if self.token.is_reserved_ident() && !self.token.is_ident_named(kw::Await) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue