Rename TestKind::Len to SliceLen
This commit is contained in:
parent
2d5b31af80
commit
197b5efb03
3 changed files with 6 additions and 6 deletions
|
|
@ -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 { .. },
|
||||
|
|
|
|||
|
|
@ -1382,7 +1382,7 @@ enum TestKind<'tcx> {
|
|||
Range(Arc<PatRange<'tcx>>),
|
||||
|
||||
/// 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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue