Closed
Description
Found while triaging the NLL-enabled crater run, and extracted from specs-0.10
.
#![feature(nll)]
#![allow(unused_variables)]
struct Drain<'a, T: 'a> {
_marker: ::std::marker::PhantomData<&'a T>,
}
trait Join {
type Value;
fn get(value: &mut Self::Value);
}
impl<'a, T> Join for Drain<'a, T> {
type Value = &'a mut Option<T>;
fn get<'b>(value: &'b mut Self::Value) {
}
}
fn main() {
}
Note: the added 'b
is to make the error message clearer, about a the missed relationship between 'a
and 'b
from the argument type (maybe because it is going through the associated type).
Otherwise fn get(value: &mut Self::Value)
yields this more obscure free region "'a" does not outlive free region ""
.