rust/tests/ui/consts/issue-27890.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
182 B
Rust
Raw Normal View History

// run-pass
2019-05-28 18:47:21 +00:00
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);
}