summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-27890.rs
blob: 9f85473380f828d0a6b400f9539ce4c673c75db8 (plain)
1
2
3
4
5
6
7
// 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);
}