diff options
| author | sfzhu93 <zhushuofei@gmail.com> | 2024-01-14 22:35:00 -0800 |
|---|---|---|
| committer | sfzhu93 <zhushuofei@gmail.com> | 2024-01-14 22:35:00 -0800 |
| commit | 5747eceef859c6e1ac74c04723ac9e2b5e039e1f (patch) | |
| tree | ff093c452601825e94a6250f873b9071a87e1424 | |
| parent | cd77d59f97cba2909b457b2ebb36f201b9dcb532 (diff) | |
| download | rust-5747eceef859c6e1ac74c04723ac9e2b5e039e1f.tar.gz rust-5747eceef859c6e1ac74c04723ac9e2b5e039e1f.zip | |
add FIXME for default_boxed_slice.rs
| -rw-r--r-- | tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs index b15809f2510..bfa52b694d0 100644 --- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs +++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs @@ -4,6 +4,8 @@ // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR_FOR_EACH_PANIC_STRATEGY +// This test is to check ICE in issue [#115789](https://github.com/rust-lang/rust/issues/115789). + struct A { foo: Box<[bool]>, } @@ -14,13 +16,14 @@ struct A { // CHECK-LABEL: fn main( fn main() { // ConstProp will create a constant of type `Box<[bool]>`. + // FIXME: it is not yet a constant. + // Verify that `DataflowConstProp` does not ICE trying to dereference it directly. // CHECK: debug a => [[a:_.*]]; // We may check other inlined functions as well... - // CHECK: [[box_obj:_.*]] = Box::<[bool]>(_3, const std::alloc::Global); - // CHECK: [[a]] = A { foo: move [[box_obj]] }; - // FIXME: we do not have `const Box::<[bool]>` after constprop right now. + // CHECK-LABEL: _.* = Box::<[bool]>( + // FIXME: should be `_.* = const Box::<[bool]>` let a: A = A { foo: Box::default() }; } |
