mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
13 lines
258 B
Rust
13 lines
258 B
Rust
// check-pass
|
|
// revisions: current next
|
|
//[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 });
|
|
}
|