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.

15 lines
177 B
Rust
Raw Normal View History

2020-10-06 15:53:12 -05:00
// run-pass
#![feature(inline_const)]
const fn bar() -> i32 {
const {
2 + 3
}
}
fn main() {
let x: &'static i32 = &const{bar()};
assert_eq!(&5, x);
}