]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs
Auto merge of #97437 - jyn514:impl-asrawfd-arc, r=dtolnay
[rust.git] / src / test / ui / lifetimes / elided-lifetime-in-path-in-pat.rs
1 // check-pass
2
3 struct Foo<'a> {
4     x: &'a (),
5 }
6
7 // The lifetime in pattern-position `Foo` is elided.
8 // Verify that lowering does not create an independent lifetime parameter for it.
9 fn foo<'a>(Foo { x }: Foo<'a>) {
10     *x
11 }
12
13 fn main() {}