mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
8 lines
183 B
Rust
8 lines
183 B
Rust
//@ run-pass
|
|
static PLUS_ONE: &'static (dyn Fn(i32) -> i32 + Sync) = (&|x: i32| { x + 1 })
|
|
as &'static (dyn Fn(i32) -> i32 + Sync);
|
|
|
|
fn main() {
|
|
assert_eq!(PLUS_ONE(2), 3);
|
|
}
|