about summary refs log tree commit diff
path: root/tests/ui/traits/trait-upcasting/issue-11515.rs
blob: 3b1f0a19cb9c4da2d5415f3e37480eeaaa0b6ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

struct Test {
    func: Box<dyn FnMut() + 'static>,
}

fn main() {
    let closure: Box<dyn Fn() + 'static> = Box::new(|| ());
    let test = Box::new(Test { func: closure });
}