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