update misuse of check-label

This commit is contained in:
sfzhu93 2024-01-20 08:09:14 -08:00
parent 5747eceef8
commit edba94907d
6 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@ fn main() {
// CHECK-NOT: assert(move _
// CHECK: {{_.*}} = const 4_usize;
// CHECK: {{_.*}} = const true;
// CHECK-LABEL: assert(const true
// CHECK: assert(const true
// CHECK: [[x]] = [[array_lit]][2 of 3];
let x: u32 = [0, 1, 2, 3][2];
}

View File

@ -19,14 +19,14 @@ fn main() {
// CHECK: [[b]] = const 2_i32;
let b = 2;
// CHECK-LABEL: assert(!const false,
// CHECK: assert(!const false,
// CHECK: [[c]] = const 3_i32;
let c = a + b;
// CHECK: [[d]] = const _;
let d = i32::MAX;
// CHECK-LABEL: assert(!const true,
// CHECK: assert(!const true,
// CHECK: [[e]] = const i32::MIN;
let e = d + 1;
}

View File

@ -23,7 +23,7 @@ fn main() {
// CHECK: debug a => [[a:_.*]];
// We may check other inlined functions as well...
// CHECK-LABEL: _.* = Box::<[bool]>(
// FIXME: should be `_.* = const Box::<[bool]>`
// CHECK: {{_.*}} = Box::<[bool]>(
// FIXME: should be `{{_.*}} = const Box::<[bool]>`
let a: A = A { foo: Box::default() };
}

View File

@ -9,6 +9,6 @@ fn main() {
// Propagating the overflow is ok as codegen will just skip emitting the panic.
// CHECK: {{_.*}} = const (0_u8, true);
// CHECK-LABEL: assert(!const true,
// CHECK: assert(!const true,
let _ = <u8 as std::ops::Add>::add(255, 1);
}

View File

@ -12,7 +12,7 @@ fn main() {
// CHECK: [[array_lit:_.*]] = [const 0_u8; 5000];
// CHECK: {{_.*}} = const 5000_usize;
// CHECK: {{_.*}} = const true;
// CHECK-LABEL: assert(const true
// CHECK: assert(const true
// CHECK: [[x]] = [[array_lit]][2 of 3];
let x: u8 = [0_u8; 5000][2];
}

View File

@ -12,7 +12,7 @@ fn main() {
// CHECK-NOT: {{_.*}} = Lt(
// CHECK: {{_.*}} = const 8_usize;
// CHECK: {{_.*}} = const true;
// CHECK-LABEL: assert(const true
// CHECK: assert(const true
// CHECK-NOT: [[t:_.*]] = [[array_lit]][_
// CHECK: [[t:_.*]] = [[array_lit]][2 of 3];