blob: 2072f9c47e2a65dd766fbb707d13e5eec0e44578 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#![feature(box_syntax)]
struct Test {
func: Box<dyn FnMut() + 'static>,
}
fn main() {
let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
let test = box Test { func: closure }; //~ ERROR trait upcasting coercion is experimental [E0658]
}
|