fix(resolve): update the ambiguity glob binding as warning recursively

This commit is contained in:
bohan
2023-07-26 22:46:49 +08:00
parent 317ec04d18
commit cac0bd0bef
65 changed files with 1532 additions and 56 deletions

View File

@@ -467,6 +467,21 @@ impl<HCX> ToStableHashKey<HCX> for LintId {
}
}
#[derive(Debug)]
pub struct AmbiguityErrorDiag {
pub msg: String,
pub span: Span,
pub label_span: Span,
pub label_msg: String,
pub note_msg: String,
pub b1_span: Span,
pub b1_note_msg: String,
pub b1_help_msgs: Vec<String>,
pub b2_span: Span,
pub b2_note_msg: String,
pub b2_help_msgs: Vec<String>,
}
// This could be a closure, but then implementing derive trait
// becomes hacky (and it gets allocated).
#[derive(Debug)]
@@ -530,6 +545,9 @@ pub enum BuiltinLintDiagnostics {
vis_span: Span,
ident_span: Span,
},
AmbiguousGlobImports {
diag: AmbiguityErrorDiag,
},
AmbiguousGlobReexports {
/// The name for which collision(s) have occurred.
name: String,