2 // compile-flags: -Z mir-opt-level=4
4 // Checks that the compiler does not ICE when passing references to field of by-value struct
5 // with -Z mir-opt-level=4
7 fn do_nothing(_: &()) {}
13 pub fn by_value_1(foo: Foo) {
17 pub fn by_value_2<T>(foo: Foo) {
22 by_value_1(Foo { bar: () });
23 by_value_2::<()>(Foo { bar: () });