Closed
Description
Currently, when an undeclared associated type is used in a function signature within a trait body, like:
trait Foo {
type Bar;
//error: Baz is used but not declared
fn return_bool(&self, &Self::Bar, &Self::Baz) -> bool;
}
it throws E0220, which isn't really helpful in this situation. Also, I found E0406 to be the more appropriate error here. This error is thrown for some feature which hasn't been implemented yet( and probably won't be), so it can be repurposed. See #34230 for more.
We could modify the error message for E0220
to include the above erroneous code, but I think it would be better to throw E0406
instead of E0220
in this situation.
/cc @GuillaumeGomez