mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
11 lines
239 B
Rust
11 lines
239 B
Rust
struct Test {
|
|
func: Box<dyn FnMut() + 'static>,
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
|
|
let test = Box::new(Test { func: closure }); //~ ERROR trait upcasting coercion is experimental [E0658]
|
|
}
|