1
Fork 0

Lint ambiguous glob re-exports

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-03-20 03:11:28 +08:00
parent ab9bb3ea36
commit 1f67949f0e
No known key found for this signature in database
GPG key ID: C5FD5D32014FDB47
11 changed files with 228 additions and 26 deletions

View file

@ -910,6 +910,10 @@ pub trait LintContext: Sized {
Applicability::MachineApplicable,
);
}
BuiltinLintDiagnostics::AmbiguousGlobReexports { name, namespace, first_reexport_span, duplicate_reexport_span } => {
db.span_label(first_reexport_span, format!("the name `{}` in the {} namespace is first re-exported here", name, namespace));
db.span_label(duplicate_reexport_span, format!("but the name `{}` in the {} namespace is also re-exported here", name, namespace));
}
}
// Rewrap `db`, and pass control to the user.
decorate(db)