]> git.lizzy.rs Git - rust.git/blob - tests/ui/box/issue-82446.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / box / issue-82446.rs
1 // https://github.com/rust-lang/rust/issues/82446
2 // Spurious 'help: store this in the heap' regression test
3 trait MyTrait {}
4
5 struct Foo {
6     val: Box<dyn MyTrait>
7 }
8
9 fn make_it(val: &Box<dyn MyTrait>) {
10     Foo {
11         val //~ ERROR [E0308]
12     };
13 }
14
15 fn main() {}