Skip to content

Commit 1703f14

Browse files
committed
delete more useless pub
1 parent fdaff05 commit 1703f14

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

library/core/tests/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@
121121
#![deny(unsafe_op_in_unsafe_fn)]
122122
#![deny(fuzzy_provenance_casts)]
123123

124-
extern crate test;
125-
126124
mod alloc;
127125
mod any;
128126
mod array;

library/core/tests/num/flt2dec/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use core::num::flt2dec::{
88
};
99
use core::num::fmt::{Formatted, Part};
1010

11-
pub use test::Bencher;
12-
1311
mod estimator;
1412
mod strategy {
1513
mod dragon;

library/std/src/sys/common/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Progress on this is tracked in #84187.
1010

1111
#![allow(dead_code)]
12+
#![allow(unused_imports)]
1213

1314
pub mod alloc;
1415
pub mod small_c_string;

src/tools/clippy/tests/ui/enum_glob_use.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod in_fn_test {
1919
}
2020

2121
mod blurg {
22-
pub use std::cmp::Ordering::*; // ok, re-export
22+
// ok, re-export
2323
}
2424

2525
fn main() {

src/tools/clippy/tests/ui/enum_glob_use.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
error: unused import: `std::cmp::Ordering::*`
2+
--> $DIR/enum_glob_use.rs:22:13
3+
|
4+
LL | pub use std::cmp::Ordering::*; // ok, re-export
5+
| ^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: `-D unused-imports` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(unused_imports)]`
9+
110
error: usage of wildcard import for enum variants
211
--> $DIR/enum_glob_use.rs:5:5
312
|
@@ -19,5 +28,5 @@ error: usage of wildcard import for enum variants
1928
LL | use crate::Enum::*;
2029
| ^^^^^^^^^^^^^^ help: try: `crate::Enum::Foo`
2130

22-
error: aborting due to 3 previous errors
31+
error: aborting due to 4 previous errors
2332

src/tools/miri/tests/utils/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(dead_code)]
2+
#![allow(unused_imports)]
23

34
#[macro_use]
45
mod macros;

src/tools/rust-analyzer/crates/syntax/src/tests/sourcegen_ast.rs

-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> String {
450450
[ident] => { $crate::SyntaxKind::IDENT };
451451
[shebang] => { $crate::SyntaxKind::SHEBANG };
452452
}
453-
pub use T;
454453
};
455454

456455
sourcegen::add_preamble("sourcegen_ast", sourcegen::reformat(ast.to_string()))

src/tools/rustfmt/src/config/options.rs

-7
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ pub enum HexLiteralCase {
142142
Lower,
143143
}
144144

145-
#[config_type]
146-
pub enum ReportTactic {
147-
Always,
148-
Unnumbered,
149-
Never,
150-
}
151-
152145
/// What Rustfmt should emit. Mostly corresponds to the `--emit` command line
153146
/// option.
154147
#[config_type]

0 commit comments

Comments
 (0)