resolve: Remove artificial import ambiguity errors
This commit is contained in:
parent
de22388873
commit
4dcce38cda
22 changed files with 53 additions and 230 deletions
|
@ -131,7 +131,7 @@ enum Scope<'a> {
|
|||
#[derive(Clone, Copy)]
|
||||
enum ScopeSet<'a> {
|
||||
/// All scopes with the given namespace.
|
||||
All(Namespace, /*is_import*/ bool),
|
||||
All(Namespace),
|
||||
/// Crate root, then extern prelude (used for mixed 2015-2018 mode in macros).
|
||||
AbsolutePath(Namespace),
|
||||
/// All scopes with macro namespace and the given macro kind restriction.
|
||||
|
@ -718,7 +718,6 @@ struct UseError<'a> {
|
|||
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
enum AmbiguityKind {
|
||||
Import,
|
||||
BuiltinAttr,
|
||||
DeriveHelper,
|
||||
MacroRulesVsModularized,
|
||||
|
@ -731,7 +730,6 @@ enum AmbiguityKind {
|
|||
impl AmbiguityKind {
|
||||
fn descr(self) -> &'static str {
|
||||
match self {
|
||||
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 => {
|
||||
|
@ -1557,7 +1555,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
self.visit_scopes(ScopeSet::All(TypeNS, false), parent_scope, ctxt, |this, scope, _, _| {
|
||||
self.visit_scopes(ScopeSet::All(TypeNS), parent_scope, ctxt, |this, scope, _, _| {
|
||||
match scope {
|
||||
Scope::Module(module, _) => {
|
||||
this.traits_in_module(module, assoc_item, &mut found_traits);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue