mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-01 06:38:16 +00:00
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 });
|
|
}
|