about summary refs log tree commit diff
path: root/tests/ui/regions/regions-dependent-let-ref.rs
blob: 23b46abc91d259cb377bff1f14262487158ea7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ run-pass
// Test lifetimes are linked properly when we take reference
// to interior.


struct Foo(isize);
pub fn main() {
    // Here the lifetime of the `&` should be at least the
    // block, since a ref binding is created to the interior.
    let &Foo(ref _x) = &Foo(3);
}