Skip to content

Commit 774cf08

Browse files
committed
Adjust tests as affected by contracts
Contracts can affect 1) whether we get a constant and 2) which value we are moving.
1 parent 8432f09 commit 774cf08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ fn main() {
2020
// CHECK: debug a => [[a:_.*]];
2121
// We may check other inlined functions as well...
2222

23-
// CHECK: {{_.*}} = const Box::<[bool]>(
23+
// CHECK: {{_.*}} = {{(const )?}}Box::<[bool]>(
2424
let a: A = A { foo: Box::default() };
2525
}

tests/mir-opt/pre-codegen/drop_boxed_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ pub unsafe fn generic_in_place<T: Copy>(ptr: *mut Box<[T]>) {
1313
// CHECK: [[B:_.+]] = copy [[ALIGN]] as std::ptr::Alignment (Transmute);
1414
// CHECK: [[C:_.+]] = move ([[B]].0: std::ptr::alignment::AlignmentEnum);
1515
// CHECK: [[D:_.+]] = discriminant([[C]]);
16-
// CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move [[D]]) ->
16+
// CHECK: = alloc::alloc::__rust_dealloc({{.+}}, move [[SIZE]], move {{.+}}) ->
1717
std::ptr::drop_in_place(ptr)
1818
}

0 commit comments

Comments
 (0)