about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/intravisit.rs
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-02-05 15:22:10 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-03-06 10:47:40 +0000
commite8f7a382be12a812b7d73f58967f740a0cf9d9af (patch)
tree81db85c4e7c42a85898967fe3b8601f9377d15e7 /compiler/rustc_hir/src/intravisit.rs
parent0e7b2835735fc7fee08505fa6c14670bc7ee7601 (diff)
downloadrust-e8f7a382be12a812b7d73f58967f740a0cf9d9af.tar.gz
rust-e8f7a382be12a812b7d73f58967f740a0cf9d9af.zip
Remove the `Option` part of range ends in the HIR
Diffstat (limited to 'compiler/rustc_hir/src/intravisit.rs')
-rw-r--r--compiler/rustc_hir/src/intravisit.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs
index e349e23f7dc..41eb5b45bd1 100644
--- a/compiler/rustc_hir/src/intravisit.rs
+++ b/compiler/rustc_hir/src/intravisit.rs
@@ -708,9 +708,9 @@ pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm<'v>) -> V::Res
 pub fn walk_ty_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v TyPat<'v>) -> V::Result {
     try_visit!(visitor.visit_id(pattern.hir_id));
     match pattern.kind {
-        TyPatKind::Range(lower_bound, upper_bound, _) => {
-            visit_opt!(visitor, visit_const_arg_unambig, lower_bound);
-            visit_opt!(visitor, visit_const_arg_unambig, upper_bound);
+        TyPatKind::Range(lower_bound, upper_bound) => {
+            try_visit!(visitor.visit_const_arg_unambig(lower_bound));
+            try_visit!(visitor.visit_const_arg_unambig(upper_bound));
         }
         TyPatKind::Err(_) => (),
     }