mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
add inline-const test for elided lifetimes being infer vars
This commit is contained in:
parent
ad8304a0d5
commit
e8c831a03b
11
tests/ui/inline-const/elided-lifetime-being-infer-vars.rs
Normal file
11
tests/ui/inline-const/elided-lifetime-being-infer-vars.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// check-pass
|
||||
|
||||
#![feature(inline_const)]
|
||||
|
||||
fn main() {
|
||||
let _my_usize = const {
|
||||
let a = 10_usize;
|
||||
let b: &'_ usize = &a;
|
||||
*b
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user