Check if E0530 is rustc_resolve::late::PatternSource::Match
to emit suggestion
This commit is contained in:
parent
ea46e7a47e
commit
c2436d54d0
3 changed files with 14 additions and 11 deletions
|
@ -61,7 +61,7 @@ use tracing::debug;
|
|||
|
||||
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
|
||||
use imports::{Import, ImportKind, ImportResolver, NameResolution};
|
||||
use late::{HasGenericParams, PathSource};
|
||||
use late::{HasGenericParams, PathSource, PatternSource};
|
||||
use macros::{MacroRulesBinding, MacroRulesScope, MacroRulesScopeRef};
|
||||
|
||||
use crate::access_levels::AccessLevelsVisitor;
|
||||
|
@ -230,7 +230,7 @@ enum ResolutionError<'a> {
|
|||
),
|
||||
/// Error E0530: `X` bindings cannot shadow `Y`s.
|
||||
BindingShadowsSomethingUnacceptable {
|
||||
shadowing_binding_descr: &'static str,
|
||||
shadowing_binding: PatternSource,
|
||||
name: Symbol,
|
||||
participle: &'static str,
|
||||
article: &'static str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue