rust/src/test/ui/issues/issue-27890.rs
2019-07-27 18:56:16 +03:00

8 lines
182 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);
}