Edit error messages for rustc_resolve::AmbiguityKind variants
Emit description of the ambiguity as a note. Co-authored-by: Noah Lev <camelidcamel@gmail.com> Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
This commit is contained in:
@@ -728,23 +728,21 @@ enum AmbiguityKind {
|
||||
impl AmbiguityKind {
|
||||
fn descr(self) -> &'static str {
|
||||
match self {
|
||||
AmbiguityKind::Import => "name vs any other name during import resolution",
|
||||
AmbiguityKind::BuiltinAttr => "built-in attribute vs any other name",
|
||||
AmbiguityKind::DeriveHelper => "derive helper attribute vs any other name",
|
||||
AmbiguityKind::Import => "multiple potential import sources",
|
||||
AmbiguityKind::BuiltinAttr => "a name conflict with a builtin attribute",
|
||||
AmbiguityKind::DeriveHelper => "a name conflict with a derive helper attribute",
|
||||
AmbiguityKind::MacroRulesVsModularized => {
|
||||
"`macro_rules` vs non-`macro_rules` from other module"
|
||||
"a conflict between a `macro_rules` name and a non-`macro_rules` name from another module"
|
||||
}
|
||||
AmbiguityKind::GlobVsOuter => {
|
||||
"glob import vs any other name from outer scope during import/macro resolution"
|
||||
"a conflict between a name from a glob import and an outer scope during import or macro resolution"
|
||||
}
|
||||
AmbiguityKind::GlobVsGlob => "glob import vs glob import in the same module",
|
||||
AmbiguityKind::GlobVsGlob => "multiple glob imports of a name in the same module",
|
||||
AmbiguityKind::GlobVsExpanded => {
|
||||
"glob import vs macro-expanded name in the same \
|
||||
module during import/macro resolution"
|
||||
"a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution"
|
||||
}
|
||||
AmbiguityKind::MoreExpandedVsOuter => {
|
||||
"macro-expanded name vs less macro-expanded name \
|
||||
from outer scope during import/macro resolution"
|
||||
"a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user