]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs
Rollup merge of #98814 - fmease:minimal-fix-for-issue-97933, r=GuillaumeGomez
[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() {}