Suggest similarly named assoc items in trait impls
Previously, the compiler didn't suggest similarly named associated items unlike we do in many situations. This patch adds such diagnostics for associated functions, types and constants.
This commit is contained in:
@@ -202,11 +202,11 @@ enum ResolutionError<'a> {
|
||||
/// parameter list.
|
||||
NameAlreadyUsedInParameterList(Symbol, Span),
|
||||
/// Error E0407: method is not a member of trait.
|
||||
MethodNotMemberOfTrait(Symbol, &'a str),
|
||||
MethodNotMemberOfTrait(Ident, &'a str, Option<Symbol>),
|
||||
/// Error E0437: type is not a member of trait.
|
||||
TypeNotMemberOfTrait(Symbol, &'a str),
|
||||
TypeNotMemberOfTrait(Ident, &'a str, Option<Symbol>),
|
||||
/// Error E0438: const is not a member of trait.
|
||||
ConstNotMemberOfTrait(Symbol, &'a str),
|
||||
ConstNotMemberOfTrait(Ident, &'a str, Option<Symbol>),
|
||||
/// Error E0408: variable `{}` is not bound in all patterns.
|
||||
VariableNotBoundInPattern(&'a BindingError),
|
||||
/// Error E0409: variable `{}` is bound in inconsistent ways within the same match arm.
|
||||
|
||||
Reference in New Issue
Block a user