Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (21 sloc) 599 Bytes
// build-pass (FIXME(62277): could be check-pass?)
// A case where we can't infer the outlives requirement. Example copied from
// RFC 2093.
// (
// #where-explicit-annotations-would-still-be-required)
trait MakeRef<'a> {
type Type;
impl<'a, T> MakeRef<'a> for Vec<T>
where T: 'a // still required
type Type = &'a T;
struct Foo<'a, T>
where T: 'a // still required, not inferred from `field`
field: <Vec<T> as MakeRef<'a>>::Type
fn main() {}
You can’t perform that action at this time.