blob: 723f3a24fd4e2a0f3b6e8a57f6dc1227b7c25e7c [file] [log] [blame]
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
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]
}