diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2024-12-02 10:56:36 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2024-12-02 11:04:57 +0000 |
| commit | da182b6d95d4b8480045756a41270e43bc496c26 (patch) | |
| tree | 335fa147b6c2f4e9cebe1c1a3864f31e34236e38 /compiler/rustc_ast/src/visit.rs | |
| parent | c0b532277b431822abb2b18aacf4adc6300e11ba (diff) | |
| download | rust-da182b6d95d4b8480045756a41270e43bc496c26.tar.gz rust-da182b6d95d4b8480045756a41270e43bc496c26.zip | |
Deduplicate some matches that always panic in one arm
Diffstat (limited to 'compiler/rustc_ast/src/visit.rs')
| -rw-r--r-- | compiler/rustc_ast/src/visit.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index e92b7ac712a..2f6998783fa 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -1273,10 +1273,7 @@ pub fn walk_attr_args<'a, V: Visitor<'a>>(visitor: &mut V, args: &'a AttrArgs) - match args { AttrArgs::Empty => {} AttrArgs::Delimited(_args) => {} - AttrArgs::Eq { value: AttrArgsEq::Ast(expr), .. } => try_visit!(visitor.visit_expr(expr)), - AttrArgs::Eq { value: AttrArgsEq::Hir(lit), .. } => { - unreachable!("in literal form when walking mac args eq: {:?}", lit) - } + AttrArgs::Eq { value, .. } => try_visit!(visitor.visit_expr(value.unwrap_ast())), } V::Result::output() } |
