exclude unexported macro bindings from extern crate
This commit is contained in:
parent
cb25c5bc3d
commit
9c3091e9cf
12 changed files with 149 additions and 17 deletions
|
@ -290,7 +290,7 @@ impl Resolver<'_, '_> {
|
|||
|| import.expect_vis().is_public()
|
||||
|| import.span.is_dummy() =>
|
||||
{
|
||||
if let ImportKind::MacroUse = import.kind {
|
||||
if let ImportKind::MacroUse { .. } = import.kind {
|
||||
if !import.span.is_dummy() {
|
||||
self.lint_buffer.buffer_lint(
|
||||
MACRO_USE_EXTERN_CRATE,
|
||||
|
@ -315,7 +315,7 @@ impl Resolver<'_, '_> {
|
|||
maybe_unused_extern_crates.insert(id, import.span);
|
||||
}
|
||||
}
|
||||
ImportKind::MacroUse => {
|
||||
ImportKind::MacroUse { .. } => {
|
||||
let msg = "unused `#[macro_use]` import";
|
||||
self.lint_buffer.buffer_lint(UNUSED_IMPORTS, import.root_id, import.span, msg);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue