diff options
| author | bors <bors@rust-lang.org> | 2023-10-04 03:38:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-04 03:38:42 +0000 |
| commit | a7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b (patch) | |
| tree | af6ce8fabe74dcb1c7cd3ab3ad2afb8301acd305 /compiler/rustc_parse/src | |
| parent | 4910642aab5c6230dfbf0cafb382700ed3001dab (diff) | |
| parent | d4940488a6ae450aef6691e596c2bb102f8cb1fd (diff) | |
| download | rust-a7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b.tar.gz rust-a7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b.zip | |
Auto merge of #116408 - matthiaskrgr:rollup-hmolg4m, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #115961 (Replace 'mutex' with 'lock' in RwLock documentation) - #116146 (Clarify `arg` and `args` documentation) - #116363 (Adapt `todo!` documentation to mention displaying custom values) - #116365 (bootstrap: make copying linker binaries conditional) - #116388 (rustdoc: fix & clean up handling of cross-crate higher-ranked parameters) - #116393 (Emit feature gate *warning* for `auto` traits pre-expansion) - #116395 (Mark myself as vacation or whatever) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index aad4edaba90..cc54cc5bebb 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -813,7 +813,12 @@ impl<'a> Parser<'a> { fn parse_item_trait(&mut self, attrs: &mut AttrVec, lo: Span) -> PResult<'a, ItemInfo> { let unsafety = self.parse_unsafety(Case::Sensitive); // Parse optional `auto` prefix. - let is_auto = if self.eat_keyword(kw::Auto) { IsAuto::Yes } else { IsAuto::No }; + let is_auto = if self.eat_keyword(kw::Auto) { + self.sess.gated_spans.gate(sym::auto_traits, self.prev_token.span); + IsAuto::Yes + } else { + IsAuto::No + }; self.expect_keyword(kw::Trait)?; let ident = self.parse_ident()?; |
