summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-11515.rs
blob: b5c942f96a7023fd545073c1a1957f88d4b31722 (plain)
1
2
3
4
5
6
7
8
9
10
struct Test {
    func: Box<dyn FnMut() + 'static>,
}



fn main() {
    let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
    let test = Box::new(Test { func: closure }); //~ ERROR trait upcasting coercion is experimental [E0658]
}