blob: 2960f7fbc2121836992a2a05976735d3f4b9dfda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// https://github.com/rust-lang/rust/issues/82446
// Spurious 'help: store this in the heap' regression test
trait MyTrait {}
struct Foo {
val: Box<dyn MyTrait>
}
fn make_it(val: &Box<dyn MyTrait>) {
Foo {
val //~ ERROR [E0308]
};
}
fn main() {}
|