rust/tests/ui/inline-const/const-expr-reference.rs

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

13 lines
151 B
Rust
Raw Normal View History

2020-10-06 20:53:12 +00:00
//@ run-pass
const fn bar() -> i32 {
const {
2 + 3
}
}
fn main() {
let x: &'static i32 = &const{bar()};
assert_eq!(&5, x);
}