Enable lifetimes SROA MIR-opt test

This commit is contained in:
Jarl Evanson 2024-01-28 16:04:07 -06:00
parent d1edc9d0db
commit 103159809a
No known key found for this signature in database
GPG Key ID: 869ACDBC4A3AB2CD

View File

@ -1,4 +1,3 @@
// skip-filecheck
// unit-test: ScalarReplacementOfAggregates // unit-test: ScalarReplacementOfAggregates
// compile-flags: -Cpanic=abort // compile-flags: -Cpanic=abort
// no-prefer-dynamic // no-prefer-dynamic
@ -16,6 +15,10 @@ struct Foo<T: Err> {
// EMIT_MIR lifetimes.foo.ScalarReplacementOfAggregates.diff // EMIT_MIR lifetimes.foo.ScalarReplacementOfAggregates.diff
fn foo<T: Err>() { fn foo<T: Err>() {
// CHECK-LABEL: fn foo(
// CHECK-NOT: [foo:_.*]: Foo
// CHECK-NOT: Box<dyn std::fmt::Display + 'static>
let foo: Foo<T> = Foo { let foo: Foo<T> = Foo {
x: Ok(Box::new(5_u32)), x: Ok(Box::new(5_u32)),
y: 7_u32, y: 7_u32,