summaryrefslogtreecommitdiffstats
path: root/tests/ui/inline-const/const-expr-reference.rs
blob: a54d879f69d748134340cda1d6506f2072ed6848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass

#![feature(inline_const)]

const fn bar() -> i32 {
    const {
        2 + 3
    }
}

fn main() {
    let x: &'static i32 = &const{bar()};
    assert_eq!(&5, x);
}