@@ -34,6 +34,8 @@ extern crate rustc_errors;
3434#[ allow( unused_extern_crates) ]
3535extern crate rustc_hir;
3636#[ allow( unused_extern_crates) ]
37+ extern crate rustc_hir_pretty;
38+ #[ allow( unused_extern_crates) ]
3739extern crate rustc_index;
3840#[ allow( unused_extern_crates) ]
3941extern crate rustc_infer;
@@ -285,6 +287,7 @@ pub mod ranges;
285287pub mod redundant_clone;
286288pub mod redundant_field_names;
287289pub mod redundant_pattern_matching;
290+ pub mod redundant_pub_crate;
288291pub mod redundant_static_lifetimes;
289292pub mod reference;
290293pub mod regex;
@@ -323,7 +326,7 @@ pub mod zero_div_zero;
323326pub use crate :: utils:: conf:: Conf ;
324327
325328mod reexport {
326- crate use rustc_ast:: ast:: Name ;
329+ pub use rustc_ast:: ast:: Name ;
327330}
328331
329332/// Register all pre expansion lints
@@ -745,6 +748,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
745748 & redundant_clone:: REDUNDANT_CLONE ,
746749 & redundant_field_names:: REDUNDANT_FIELD_NAMES ,
747750 & redundant_pattern_matching:: REDUNDANT_PATTERN_MATCHING ,
751+ & redundant_pub_crate:: REDUNDANT_PUB_CRATE ,
748752 & redundant_static_lifetimes:: REDUNDANT_STATIC_LIFETIMES ,
749753 & reference:: DEREF_ADDROF ,
750754 & reference:: REF_IN_DEREF ,
@@ -1021,6 +1025,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10211025 store. register_late_pass ( || box wildcard_imports:: WildcardImports ) ;
10221026 store. register_early_pass ( || box macro_use:: MacroUseImports ) ;
10231027 store. register_late_pass ( || box verbose_file_reads:: VerboseFileReads ) ;
1028+ store. register_late_pass ( || box redundant_pub_crate:: RedundantPubCrate :: default ( ) ) ;
10241029
10251030 store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
10261031 LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
@@ -1059,6 +1064,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10591064 LintId :: of( & shadow:: SHADOW_REUSE ) ,
10601065 LintId :: of( & shadow:: SHADOW_SAME ) ,
10611066 LintId :: of( & strings:: STRING_ADD ) ,
1067+ LintId :: of( & verbose_file_reads:: VERBOSE_FILE_READS ) ,
10621068 LintId :: of( & write:: PRINT_STDOUT ) ,
10631069 LintId :: of( & write:: USE_DEBUG ) ,
10641070 ] ) ;
@@ -1351,7 +1357,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13511357 LintId :: of( & transmute:: TRANSMUTE_PTR_TO_PTR ) ,
13521358 LintId :: of( & transmute:: TRANSMUTE_PTR_TO_REF ) ,
13531359 LintId :: of( & transmute:: UNSOUND_COLLECTION_TRANSMUTE ) ,
1354- LintId :: of( & transmute:: USELESS_TRANSMUTE ) ,
13551360 LintId :: of( & transmute:: WRONG_TRANSMUTE ) ,
13561361 LintId :: of( & transmuting_null:: TRANSMUTING_NULL ) ,
13571362 LintId :: of( & trivially_copy_pass_by_ref:: TRIVIALLY_COPY_PASS_BY_REF ) ,
@@ -1378,7 +1383,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13781383 LintId :: of( & unwrap:: PANICKING_UNWRAP ) ,
13791384 LintId :: of( & unwrap:: UNNECESSARY_UNWRAP ) ,
13801385 LintId :: of( & vec:: USELESS_VEC ) ,
1381- LintId :: of( & verbose_file_reads:: VERBOSE_FILE_READS ) ,
13821386 LintId :: of( & write:: PRINTLN_EMPTY_STRING ) ,
13831387 LintId :: of( & write:: PRINT_LITERAL ) ,
13841388 LintId :: of( & write:: PRINT_WITH_NEWLINE ) ,
@@ -1553,7 +1557,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15531557 LintId :: of( & transmute:: TRANSMUTE_INT_TO_FLOAT ) ,
15541558 LintId :: of( & transmute:: TRANSMUTE_PTR_TO_PTR ) ,
15551559 LintId :: of( & transmute:: TRANSMUTE_PTR_TO_REF ) ,
1556- LintId :: of( & transmute:: USELESS_TRANSMUTE ) ,
15571560 LintId :: of( & types:: BORROWED_BOX ) ,
15581561 LintId :: of( & types:: CHAR_LIT_AS_U8 ) ,
15591562 LintId :: of( & types:: OPTION_OPTION ) ,
@@ -1562,7 +1565,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15621565 LintId :: of( & types:: UNNECESSARY_CAST ) ,
15631566 LintId :: of( & types:: VEC_BOX ) ,
15641567 LintId :: of( & unwrap:: UNNECESSARY_UNWRAP ) ,
1565- LintId :: of( & verbose_file_reads:: VERBOSE_FILE_READS ) ,
15661568 LintId :: of( & zero_div_zero:: ZERO_DIVIDED_BY_ZERO ) ,
15671569 ] ) ;
15681570
@@ -1670,6 +1672,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16701672 LintId :: of( & mutex_atomic:: MUTEX_INTEGER ) ,
16711673 LintId :: of( & needless_borrow:: NEEDLESS_BORROW ) ,
16721674 LintId :: of( & path_buf_push_overwrite:: PATH_BUF_PUSH_OVERWRITE ) ,
1675+ LintId :: of( & redundant_pub_crate:: REDUNDANT_PUB_CRATE ) ,
1676+ LintId :: of( & transmute:: USELESS_TRANSMUTE ) ,
16731677 LintId :: of( & use_self:: USE_SELF ) ,
16741678 ] ) ;
16751679}
0 commit comments