rust/tests/ui/issues/issue-11515.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
239 B
Rust
Raw Normal View History

struct Test {
func: Box<dyn FnMut() + 'static>,
}
fn main() {
2019-05-28 18:46:13 +00:00
let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
let test = Box::new(Test { func: closure }); //~ ERROR trait upcasting coercion is experimental [E0658]
}