mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 05:14:27 +00:00
12 lines
303 B
Rust
12 lines
303 B
Rust
// revisions: current next
|
|
//[next] compile-flags: -Znext-solver
|
|
|
|
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]
|
|
}
|