]> git.lizzy.rs Git - rust.git/blob - tests/ui/inline-const/const-expr-basic.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / inline-const / const-expr-basic.rs
1 // run-pass
2
3 #![feature(inline_const)]
4
5 fn foo() -> i32 {
6     const {
7         let x = 5 + 10;
8         x / 3
9     }
10 }
11
12 fn main() {
13     assert_eq!(5, foo());
14 }