]> git.lizzy.rs Git - rust.git/blob - src/test/ui/late-bound-lifetimes/issue-47511.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / late-bound-lifetimes / issue-47511.rs
1 // check-pass
2
3 fn f(_: X) -> X {
4     unimplemented!()
5 }
6
7 fn g<'a>(_: X<'a>) -> X<'a> {
8     unimplemented!()
9 }
10
11 type X<'a> = <&'a () as Trait>::Value;
12
13 trait Trait {
14     type Value;
15 }
16
17 impl<'a> Trait for &'a () {
18     type Value = ();
19 }
20
21 fn main() {}