]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[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() {}