2 // aux-build:wildcard_imports_helper.rs
4 #![warn(clippy::wildcard_imports)]
5 //#![allow(clippy::redundant_pub_crate)]
7 #![warn(unused_imports)]
9 extern crate wildcard_imports_helper;
12 use crate::mod_mod::*;
13 use crate::multi_fn_mod::*;
15 use crate::struct_mod::*;
17 #[allow(unused_imports)]
18 use wildcard_imports_helper::inner::inner_for_self_import;
19 use wildcard_imports_helper::inner::inner_for_self_import::*;
20 use wildcard_imports_helper::*;
22 use std::io::prelude::*;
26 impl Read for ReadFoo {
27 fn read(&mut self, _buf: &mut [u8]) -> std::io::Result<usize> {
46 pub mod multi_inner_mod {
54 pub mod inner_struct_mod {
59 macro_rules! double_struct_import_test {
70 multi_inner_mod::foo();
76 let _ = inner_struct_mod::C;
79 double_struct_import_test!();
80 double_struct_import_test!();
84 pub use self::inner_exported::*;
85 #[allow(unused_imports)]
86 pub(crate) use self::inner_exported2::*;
95 use wildcard_imports_helper::inner::inner_for_self_import::{self, *};
96 use wildcard_imports_helper::*;
98 inner_for_self_import::inner_extern_foo();
106 fn test_inner_nested() {
107 use self::{inner::*, inner2::*};
113 fn test_extern_reexported() {
114 use wildcard_imports_helper::*;
117 let _ = ExternExportedStruct;
118 let _ = ExternExportedEnum::A;
123 pub struct ExportedStruct;
124 pub enum ExportedEnum {
129 mod inner_exported2 {
130 pub(crate) fn exported2() {}
134 pub fn inner_foo() {}
138 pub fn inner_bar() {}
142 fn test_reexported() {
143 use crate::in_fn_test::*;
146 let _ = ExportedStruct;
147 let _ = ExportedEnum::A;
151 fn test_weird_formatting() {
152 use crate:: in_fn_test:: * ;