Skip to content

Commit 870b9e8

Browse files
committed
nursery group -> style
1 parent de90924 commit 870b9e8

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

clippy_lints/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub mod zero_div_zero;
323323
pub use crate::utils::conf::Conf;
324324

325325
mod reexport {
326-
crate use rustc_ast::ast::Name;
326+
pub use rustc_ast::ast::Name;
327327
}
328328

329329
/// Register all pre expansion lints
@@ -1324,6 +1324,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13241324
LintId::of(&redundant_clone::REDUNDANT_CLONE),
13251325
LintId::of(&redundant_field_names::REDUNDANT_FIELD_NAMES),
13261326
LintId::of(&redundant_pattern_matching::REDUNDANT_PATTERN_MATCHING),
1327+
LintId::of(&redundant_pub_crate::REDUNDANT_PUB_CRATE),
13271328
LintId::of(&redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES),
13281329
LintId::of(&reference::DEREF_ADDROF),
13291330
LintId::of(&reference::REF_IN_DEREF),
@@ -1465,6 +1466,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14651466
LintId::of(&question_mark::QUESTION_MARK),
14661467
LintId::of(&redundant_field_names::REDUNDANT_FIELD_NAMES),
14671468
LintId::of(&redundant_pattern_matching::REDUNDANT_PATTERN_MATCHING),
1469+
LintId::of(&redundant_pub_crate::REDUNDANT_PUB_CRATE),
14681470
LintId::of(&redundant_static_lifetimes::REDUNDANT_STATIC_LIFETIMES),
14691471
LintId::of(&regex::REGEX_MACRO),
14701472
LintId::of(&regex::TRIVIAL_REGEX),
@@ -1672,7 +1674,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16721674
LintId::of(&mutex_atomic::MUTEX_INTEGER),
16731675
LintId::of(&needless_borrow::NEEDLESS_BORROW),
16741676
LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),
1675-
LintId::of(&redundant_pub_crate::REDUNDANT_PUB_CRATE),
16761677
LintId::of(&use_self::USE_SELF),
16771678
]);
16781679
}

clippy_lints/src/redundant_pub_crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declare_clippy_lint! {
2828
/// }
2929
/// ```
3030
pub REDUNDANT_PUB_CRATE,
31-
nursery,
31+
style,
3232
"Using `pub(crate)` visibility on items that are not crate visible due to the visibility of the module that contains them."
3333
}
3434

clippy_lints/src/utils/conf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ macro_rules! define_Conf {
8080
$(
8181
mod $config {
8282
use serde::Deserialize;
83-
crate fn deserialize<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result<$Ty, D::Error> {
83+
pub fn deserialize<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result<$Ty, D::Error> {
8484
use super::super::{ERRORS, Error};
8585
Ok(
8686
<$Ty>::deserialize(deserializer).unwrap_or_else(|e| {

clippy_lints/src/utils/numeric_literal.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc_ast::ast::{Lit, LitFloatType, LitIntType, LitKind};
22

33
#[derive(Debug, PartialEq)]
4-
pub(crate) enum Radix {
4+
pub enum Radix {
55
Binary,
66
Octal,
77
Decimal,
@@ -26,7 +26,7 @@ pub fn format(lit: &str, type_suffix: Option<&str>, float: bool) -> String {
2626
}
2727

2828
#[derive(Debug)]
29-
pub(crate) struct NumericLiteral<'a> {
29+
pub struct NumericLiteral<'a> {
3030
/// Which radix the literal was represented in.
3131
pub radix: Radix,
3232
/// The radix prefix, if present.

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@ pub const ALL_LINTS: [Lint; 362] = [
17661766
},
17671767
Lint {
17681768
name: "redundant_pub_crate",
1769-
group: "nursery",
1769+
group: "style",
17701770
desc: "Using `pub(crate)` visibility on items that are not crate visible due to the visibility of the module that contains them.",
17711771
deprecation: None,
17721772
module: "redundant_pub_crate",

tests/ui/wildcard_imports.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// aux-build:wildcard_imports_helper.rs
33

44
#![warn(clippy::wildcard_imports)]
5+
#![allow(clippy::redundant_pub_crate)]
56
#![allow(unused)]
67
#![warn(unused_imports)]
78

tests/ui/wildcard_imports.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// aux-build:wildcard_imports_helper.rs
33

44
#![warn(clippy::wildcard_imports)]
5+
#![allow(clippy::redundant_pub_crate)]
56
#![allow(unused)]
67
#![warn(unused_imports)]
78

tests/ui/wildcard_imports.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
11
error: usage of wildcard import
2-
--> $DIR/wildcard_imports.rs:10:5
2+
--> $DIR/wildcard_imports.rs:11:5
33
|
44
LL | use crate::fn_mod::*;
55
| ^^^^^^^^^^^^^^^^ help: try: `crate::fn_mod::foo`
66
|
77
= note: `-D clippy::wildcard-imports` implied by `-D warnings`
88

99
error: usage of wildcard import
10-
--> $DIR/wildcard_imports.rs:11:5
10+
--> $DIR/wildcard_imports.rs:12:5
1111
|
1212
LL | use crate::mod_mod::*;
1313
| ^^^^^^^^^^^^^^^^^ help: try: `crate::mod_mod::inner_mod`
1414

1515
error: usage of wildcard import
16-
--> $DIR/wildcard_imports.rs:12:5
16+
--> $DIR/wildcard_imports.rs:13:5
1717
|
1818
LL | use crate::multi_fn_mod::*;
1919
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::multi_fn_mod::{multi_bar, multi_foo, multi_inner_mod}`
2020

2121
error: usage of wildcard import
22-
--> $DIR/wildcard_imports.rs:14:5
22+
--> $DIR/wildcard_imports.rs:15:5
2323
|
2424
LL | use crate::struct_mod::*;
2525
| ^^^^^^^^^^^^^^^^^^^^ help: try: `crate::struct_mod::{A, inner_struct_mod}`
2626

2727
error: usage of wildcard import
28-
--> $DIR/wildcard_imports.rs:18:5
28+
--> $DIR/wildcard_imports.rs:19:5
2929
|
3030
LL | use wildcard_imports_helper::inner::inner_for_self_import::*;
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::inner::inner_for_self_import::inner_extern_bar`
3232

3333
error: usage of wildcard import
34-
--> $DIR/wildcard_imports.rs:19:5
34+
--> $DIR/wildcard_imports.rs:20:5
3535
|
3636
LL | use wildcard_imports_helper::*;
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternA, extern_foo}`
3838

3939
error: usage of wildcard import
40-
--> $DIR/wildcard_imports.rs:88:13
40+
--> $DIR/wildcard_imports.rs:89:13
4141
|
4242
LL | use crate::fn_mod::*;
4343
| ^^^^^^^^^^^^^^^^ help: try: `crate::fn_mod::foo`
4444

4545
error: usage of wildcard import
46-
--> $DIR/wildcard_imports.rs:94:75
46+
--> $DIR/wildcard_imports.rs:95:75
4747
|
4848
LL | use wildcard_imports_helper::inner::inner_for_self_import::{self, *};
4949
| ^ help: try: `inner_extern_foo`
5050

5151
error: usage of wildcard import
52-
--> $DIR/wildcard_imports.rs:95:13
52+
--> $DIR/wildcard_imports.rs:96:13
5353
|
5454
LL | use wildcard_imports_helper::*;
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternA, extern_foo}`
5656

5757
error: usage of wildcard import
58-
--> $DIR/wildcard_imports.rs:106:20
58+
--> $DIR/wildcard_imports.rs:107:20
5959
|
6060
LL | use self::{inner::*, inner2::*};
6161
| ^^^^^^^^ help: try: `inner::inner_foo`
6262

6363
error: usage of wildcard import
64-
--> $DIR/wildcard_imports.rs:106:30
64+
--> $DIR/wildcard_imports.rs:107:30
6565
|
6666
LL | use self::{inner::*, inner2::*};
6767
| ^^^^^^^^^ help: try: `inner2::inner_bar`
6868

6969
error: usage of wildcard import
70-
--> $DIR/wildcard_imports.rs:113:13
70+
--> $DIR/wildcard_imports.rs:114:13
7171
|
7272
LL | use wildcard_imports_helper::*;
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternExportedEnum, ExternExportedStruct, extern_exported}`
7474

7575
error: usage of wildcard import
76-
--> $DIR/wildcard_imports.rs:142:9
76+
--> $DIR/wildcard_imports.rs:143:9
7777
|
7878
LL | use crate::in_fn_test::*;
7979
| ^^^^^^^^^^^^^^^^^^^^ help: try: `crate::in_fn_test::{ExportedEnum, ExportedStruct, exported}`
8080

8181
error: usage of wildcard import
82-
--> $DIR/wildcard_imports.rs:151:9
82+
--> $DIR/wildcard_imports.rs:152:9
8383
|
8484
LL | use crate:: in_fn_test:: * ;
8585
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate:: in_fn_test::exported`
8686

8787
error: usage of wildcard import
88-
--> $DIR/wildcard_imports.rs:152:9
88+
--> $DIR/wildcard_imports.rs:153:9
8989
|
9090
LL | use crate:: fn_mod::
9191
| _________^

0 commit comments

Comments
 (0)