diff --git a/compiler/rustc_mir_build/src/builder/matches/buckets.rs b/compiler/rustc_mir_build/src/builder/matches/buckets.rs index f8af50ee52fe..9a227486a4f1 100644 --- a/compiler/rustc_mir_build/src/builder/matches/buckets.rs +++ b/compiler/rustc_mir_build/src/builder/matches/buckets.rs @@ -213,7 +213,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } ( - &TestKind::Len { len: test_len, op: BinOp::Eq }, + &TestKind::SliceLen { len: test_len, op: BinOp::Eq }, &TestableCase::Slice { len, variable_length }, ) => { match (test_len.cmp(&len), variable_length) { @@ -245,7 +245,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } } ( - &TestKind::Len { len: test_len, op: BinOp::Ge }, + &TestKind::SliceLen { len: test_len, op: BinOp::Ge }, &TestableCase::Slice { len, variable_length }, ) => { // the test is `$actual_len >= test_len` @@ -338,7 +338,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { TestKind::Switch { .. } | TestKind::SwitchInt { .. } | TestKind::If - | TestKind::Len { .. } + | TestKind::SliceLen { .. } | TestKind::Range { .. } | TestKind::Eq { .. } | TestKind::Deref { .. }, diff --git a/compiler/rustc_mir_build/src/builder/matches/mod.rs b/compiler/rustc_mir_build/src/builder/matches/mod.rs index 424ff515ca5f..492a01aa27f1 100644 --- a/compiler/rustc_mir_build/src/builder/matches/mod.rs +++ b/compiler/rustc_mir_build/src/builder/matches/mod.rs @@ -1382,7 +1382,7 @@ enum TestKind<'tcx> { Range(Arc>), /// Test that the length of the slice is `== len` or `>= len`. - Len { len: u64, op: BinOp }, + SliceLen { len: u64, op: BinOp }, /// Call `Deref::deref[_mut]` on the value. Deref { diff --git a/compiler/rustc_mir_build/src/builder/matches/test.rs b/compiler/rustc_mir_build/src/builder/matches/test.rs index 4a2823bf5d6b..853a7fafc728 100644 --- a/compiler/rustc_mir_build/src/builder/matches/test.rs +++ b/compiler/rustc_mir_build/src/builder/matches/test.rs @@ -52,7 +52,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { TestableCase::Slice { len, variable_length } => { let op = if variable_length { BinOp::Ge } else { BinOp::Eq }; - TestKind::Len { len, op } + TestKind::SliceLen { len, op } } TestableCase::Deref { temp, mutability } => TestKind::Deref { temp, mutability }, @@ -312,7 +312,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } } - TestKind::Len { len, op } => { + TestKind::SliceLen { len, op } => { let usize_ty = self.tcx.types.usize; let actual = self.temp(usize_ty, test.span);