Skip to content

Incorrect clippy::useless_attribute for ambiguous_glob_reexports #10878

Closed
@SamRodri

Description

@SamRodri

Summary

The new stable (rust 1.70) ambiguous_glob_reexports is valid in use items.

Lint Name

useless_attribute

Reproducer

I tried this code:

mod foo1 {
    pub struct Foo;
}

mod foo2 {
    pub struct Foo;
}

// #[allow(clippy::useless_attribute)]
#[allow(ambiguous_glob_reexports)]
pub use foo1::*;
pub use foo2::*;

I saw this happen:

Deny error in #[allow(ambiguous_glob_reexports)].

I expected to see this happen:

No error

Version

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-pc-windows-msvc
release: 1.70.0
LLVM version: 16.0.2

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions