4c2d6de70e
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
13 lines
264 B
Rust
13 lines
264 B
Rust
// check-pass
|
|
// 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 });
|
|
}
|