rust/tests/ui/consts/promote_borrowed_field.rs

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

13 lines
179 B
Rust
Raw Normal View History

// run-pass
// From https://github.com/rust-lang/rust/issues/65727
const _: &i32 = {
let x = &(5, false).0;
x
};
fn main() {
let _: &'static i32 = &(5, false).0;
}