Skip to content

Commit 363eacd

Browse files
committed
Add regression test
1 parent d8f5d5e commit 363eacd

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![allow(incomplete_features)]
2+
#![feature(generic_associated_types)]
3+
use std::ops::Deref;
4+
trait Foo {
5+
type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
6+
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
7+
//~| HELP add missing
8+
}
9+
10+
fn main() {}
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
2+
--> $DIR/issue-85347.rs:5:42
3+
|
4+
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
5+
| ^^^ expected 1 lifetime argument
6+
|
7+
note: associated type defined here, with 1 lifetime parameter: `'a`
8+
--> $DIR/issue-85347.rs:5:10
9+
|
10+
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
11+
| ^^^ --
12+
help: add missing lifetime argument
13+
|
14+
LL | type Bar<'a>: Deref<Target = <Self>::Bar<'a, Target = Self>>;
15+
| ^^^
16+
17+
error: aborting due to previous error
18+
19+
For more information about this error, try `rustc --explain E0107`.

0 commit comments

Comments
 (0)