Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
SkiFire13 committed May 16, 2021
1 parent d8f5d5e commit 363eacd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/ui/suggestions/issue-85347.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![allow(incomplete_features)]
#![feature(generic_associated_types)]
use std::ops::Deref;
trait Foo {
type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
//~| HELP add missing
}

fn main() {}
19 changes: 19 additions & 0 deletions src/test/ui/suggestions/issue-85347.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/issue-85347.rs:5:42
|
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
| ^^^ expected 1 lifetime argument
|
note: associated type defined here, with 1 lifetime parameter: `'a`
--> $DIR/issue-85347.rs:5:10
|
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
| ^^^ --
help: add missing lifetime argument
|
LL | type Bar<'a>: Deref<Target = <Self>::Bar<'a, Target = Self>>;
| ^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0107`.

0 comments on commit 363eacd

Please sign in to comment.