]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-dependent-let-ref.rs
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / regions / regions-dependent-let-ref.rs
1 // run-pass
2 // Test lifetimes are linked properly when we take reference
3 // to interior.
4
5 // pretty-expanded FIXME #23616
6
7 struct Foo(isize);
8 pub fn main() {
9     // Here the lifetime of the `&` should be at least the
10     // block, since a ref binding is created to the interior.
11     let &Foo(ref _x) = &Foo(3);
12 }