blob: 6d88002540c1ac43c355241244183a1ec04834fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// run-pass
#![feature(trait_upcasting)]
#![allow(incomplete_features)]
struct Test {
func: Box<dyn FnMut() + 'static>,
}
fn main() {
let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
let mut test = Box::new(Test { func: closure });
(test.func)();
}
|