]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52078.rs
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
[rust.git] / src / test / ui / nll / issue-52078.rs
1 // Regression test for #52078: we were failing to infer a relationship
2 // between `'a` and `'b` below due to inference variables introduced
3 // during the normalization process.
4 //
5 // check-pass
6
7 struct Drain<'a, T: 'a> {
8     _marker: ::std::marker::PhantomData<&'a T>,
9 }
10
11 trait Join {
12     type Value;
13     fn get(value: &mut Self::Value);
14 }
15
16 impl<'a, T> Join for Drain<'a, T> {
17     type Value = &'a mut Option<T>;
18
19     fn get<'b>(value: &'b mut Self::Value) {
20     }
21 }
22
23 fn main() {
24 }