@@ -558,7 +558,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
558558 // not to add such values here.
559559 let is_covering_range = |test_case : & TestCase < ' tcx > | {
560560 test_case. as_range ( ) . is_some_and ( |range| {
561- matches ! ( range. contains( value, self . tcx) , None | Some ( true ) )
561+ matches ! ( range. contains( value. valtree , self . tcx) , None | Some ( true ) )
562562 } )
563563 } ;
564564 let is_conflicting_candidate = |candidate : & & mut Candidate < ' tcx > | {
@@ -576,7 +576,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
576576 } else {
577577 fully_matched = true ;
578578 let bits = value. try_to_scalar_int ( ) . unwrap ( ) . to_bits_unchecked ( ) ;
579- Some ( TestBranch :: Constant ( value, bits) )
579+ Some ( TestBranch :: Constant ( value. valtree , bits) )
580580 }
581581 }
582582 ( TestKind :: SwitchInt , TestCase :: Range ( range) ) => {
@@ -684,7 +684,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
684684 }
685685 ( TestKind :: Range ( range) , & TestCase :: Constant { value } ) => {
686686 fully_matched = false ;
687- if !range. contains ( value, self . tcx ) ? {
687+ if !range. contains ( value. valtree , self . tcx ) ? {
688688 // `value` is not contained in the testing range,
689689 // so `value` can be matched only if this test fails.
690690 Some ( TestBranch :: Failure )
0 commit comments