useless_attribute: allow ambiguous_glob_exports
Closes https://github.com/rust-lang/rust-clippy/issues/10878
This commit is contained in:
parent
96e69d9b43
commit
db0cbbacb7
@ -28,6 +28,7 @@ pub(super) fn check(cx: &LateContext<'_>, item: &Item<'_>, attrs: &[Attribute])
|
||||
|| is_word(lint, sym!(unused_braces))
|
||||
|| is_word(lint, sym::dead_code)
|
||||
|| is_word(lint, sym!(hidden_glob_reexports))
|
||||
|| is_word(lint, sym!(ambiguous_glob_reexports))
|
||||
|| extract_clippy_lint(lint).map_or(false, |s| {
|
||||
matches!(
|
||||
s.as_str(),
|
||||
|
@ -117,3 +117,20 @@ pub mod hidden_glob_reexports {
|
||||
#[allow(hidden_glob_reexports)]
|
||||
use my_uncool_type::MyUncoolType as MyCoolType;
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/rust-lang/rust-clippy/issues/10878
|
||||
pub mod ambiguous_glob_exports {
|
||||
#![allow(unreachable_pub)]
|
||||
|
||||
mod my_prelude {
|
||||
pub struct MyType;
|
||||
}
|
||||
|
||||
mod my_type {
|
||||
pub struct MyType;
|
||||
}
|
||||
|
||||
#[allow(ambiguous_glob_reexports)]
|
||||
pub use my_prelude::*;
|
||||
pub use my_type::*;
|
||||
}
|
||||
|
@ -117,3 +117,20 @@ mod my_uncool_type {
|
||||
#[allow(hidden_glob_reexports)]
|
||||
use my_uncool_type::MyUncoolType as MyCoolType;
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/rust-lang/rust-clippy/issues/10878
|
||||
pub mod ambiguous_glob_exports {
|
||||
#![allow(unreachable_pub)]
|
||||
|
||||
mod my_prelude {
|
||||
pub struct MyType;
|
||||
}
|
||||
|
||||
mod my_type {
|
||||
pub struct MyType;
|
||||
}
|
||||
|
||||
#[allow(ambiguous_glob_reexports)]
|
||||
pub use my_prelude::*;
|
||||
pub use my_type::*;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user