diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-12-02 23:08:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 23:08:58 +0100 |
| commit | 6f9f17fc08d9c3b1910b1d39f76a494d7524a2cc (patch) | |
| tree | d2570dd613f0bd41349f4c3bf44ea10b7b595f6f /compiler/rustc_parse/src/parser | |
| parent | 3586e4a326e923f9cbf2b724bb638b254a76407d (diff) | |
| parent | da182b6d95d4b8480045756a41270e43bc496c26 (diff) | |
| download | rust-6f9f17fc08d9c3b1910b1d39f76a494d7524a2cc.tar.gz rust-6f9f17fc08d9c3b1910b1d39f76a494d7524a2cc.zip | |
Rollup merge of #133746 - oli-obk:push-xwyrylxmrtvq, r=jieyouxu
Change `AttrArgs::Eq` to a struct variant Cleanups for simplifying https://github.com/rust-lang/rust/pull/131808 Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 0ed8d152d2d..37556c064d8 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -1376,7 +1376,7 @@ impl<'a> Parser<'a> { AttrArgs::Delimited(args) } else if self.eat(&token::Eq) { let eq_span = self.prev_token.span; - AttrArgs::Eq(eq_span, AttrArgsEq::Ast(self.parse_expr_force_collect()?)) + AttrArgs::Eq { eq_span, value: AttrArgsEq::Ast(self.parse_expr_force_collect()?) } } else { AttrArgs::Empty }) |
