We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9005a8 commit b44e5dcCopy full SHA for b44e5dc
1 file changed
compiler/rustc_parse/src/parser/item.rs
@@ -2911,8 +2911,8 @@ impl<'a> Parser<'a> {
2911
&& !self.is_unsafe_foreign_mod()
2912
// Rule out `async gen {` and `async gen move {`
2913
&& !self.is_async_gen_block()
2914
- // Rule out `const unsafe auto` and `const unsafe trait`.
2915
- && !self.is_keyword_ahead(2, &[kw::Auto, kw::Trait])
+ // Rule out `const unsafe auto` and `const unsafe trait` and `const unsafe impl`.
+ && !self.is_keyword_ahead(2, &[kw::Auto, kw::Trait, kw::Impl])
2916
)
2917
})
2918
// `extern ABI fn`
0 commit comments