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