Use pre-interned symbols in import recovery
This commit is contained in:
parent
f6484fa9b5
commit
de57dbcefd
@ -271,8 +271,7 @@ impl<'a> Parser<'a> {
|
||||
// MACRO_RULES ITEM
|
||||
self.parse_item_macro_rules(vis, has_bang)?
|
||||
} else if self.isnt_macro_invocation()
|
||||
&& (self.token.is_ident_named(Symbol::intern("import"))
|
||||
|| self.token.is_ident_named(Symbol::intern("using")))
|
||||
&& (self.token.is_ident_named(sym::import) || self.token.is_ident_named(sym::using))
|
||||
{
|
||||
return self.recover_import_as_use();
|
||||
} else if self.isnt_macro_invocation() && vis.kind.is_pub() {
|
||||
|
@ -782,6 +782,7 @@ symbols! {
|
||||
impl_lint_pass,
|
||||
impl_macros,
|
||||
impl_trait_in_bindings,
|
||||
import,
|
||||
import_shadowing,
|
||||
imported_main,
|
||||
in_band_lifetimes,
|
||||
@ -1519,6 +1520,7 @@ symbols! {
|
||||
use_nested_groups,
|
||||
used,
|
||||
used_with_arg,
|
||||
using,
|
||||
usize,
|
||||
v1,
|
||||
va_arg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user