Add regression test
This commit is contained in:
parent
d8f5d5e9cb
commit
363eacd8d3
2 changed files with 29 additions and 0 deletions
10
src/test/ui/suggestions/issue-85347.rs
Normal file
10
src/test/ui/suggestions/issue-85347.rs
Normal file
|
|
@ -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
src/test/ui/suggestions/issue-85347.stderr
Normal file
19
src/test/ui/suggestions/issue-85347.stderr
Normal file
|
|
@ -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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue