Open
Description
Given the following code:
#![feature(generic_associated_types)]
trait Trait {
type Assoc<'a>;
}
impl<'b> Trait for &'b () {
type Assoc<'a>
= &'a &'b ()
where
Self: 'a;
}
The current output is:
error: `impl` associated type signature for `Assoc` doesn't match `trait` associated type signature
--> src/lib.rs:8:5
|
4 | type Assoc<'a>;
| -------------- expected
...
8 | type Assoc<'a>
| ^^^^^^^^^^^^^^ found
Ideally the output should look like:
error: `impl` associated type signature for `Assoc` doesn't match `trait` associated type signature
--> src/lib.rs:8:5
|
4 | type Assoc<'a>;
| -------------- expected no where clause
...
8 | type Assoc<'a>
| ...
| where
| Self: 'a;
| ^^^^^^^^ found where clause not present on trait definition
note: consider adding where clause to trait definition
|
4 | type Assoc<'a>
| where
| Self: 'a;
| +++++++++++++