]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-29861.rs
Make `output_filenames` a real query
[rust.git] / tests / ui / issues / issue-29861.rs
1 pub trait MakeRef<'a> {
2     type Ref;
3 }
4 impl<'a, T: 'a> MakeRef<'a> for T {
5     type Ref = &'a T;
6 }
7
8 pub trait MakeRef2 {
9     type Ref2;
10 }
11 impl<'a, T: 'a> MakeRef2 for T {
12 //~^ ERROR the lifetime parameter `'a` is not constrained
13     type Ref2 = <T as MakeRef<'a>>::Ref;
14 }
15
16 fn foo() -> <String as MakeRef2>::Ref2 { &String::from("foo") }
17
18 fn main() {
19     println!("{}", foo());
20 }