• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![feature(rustc_attrs)]
2 #![allow(dead_code)]
3 
4 trait Trait<'a, T> {
5     type Out;
6 }
7 
8 impl<'a, T> Trait<'a, T> for usize {
9     type Out = &'a fn(T); //~ ERROR `T` may not live long enough
10 }
11 
12 struct Foo<'a,T> {
13     f: &'a fn(T),
14 }
15 
16 trait Baz<T> { }
17 
18 impl<'a, T> Trait<'a, T> for u32 {
19     type Out = &'a dyn Baz<T>; //~ ERROR `T` may not live long enough
20 }
21 
main()22 fn main() { }
23