2023-07-05 07:16:28 +00:00
|
|
|
// revisions: current next
|
|
|
|
//[next] compile-flags: -Ztrait-solver=next
|
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
struct Test {
|
2021-07-25 18:43:48 +08:00
|
|
|
func: Box<dyn FnMut() + 'static>,
|
2014-04-27 20:27:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 14:46:13 -04:00
|
|
|
let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
|
2022-07-07 04:36:10 +02:00
|
|
|
let test = Box::new(Test { func: closure }); //~ ERROR trait upcasting coercion is experimental [E0658]
|
2014-04-27 20:27:20 -07:00
|
|
|
}
|