]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/promote_borrowed_field.rs
Rollup merge of #106963 - compiler-errors:scope-expr-dupe, r=michaelwoerister
[rust.git] / tests / ui / consts / promote_borrowed_field.rs
1 // run-pass
2
3 // From https://github.com/rust-lang/rust/issues/65727
4
5 const _: &i32 = {
6     let x = &(5, false).0;
7     x
8 };
9
10 fn main() {
11     let _: &'static i32 = &(5, false).0;
12 }