@@ -11,8 +11,8 @@ use syntax::ast::{Ident, Item, ItemKind};
1111use syntax:: symbol:: { sym, Symbol } ;
1212use syntax_pos:: ExpnInfo ;
1313
14- declare_lint ! {
15- pub DEFAULT_HASH_TYPES ,
14+ declare_tool_lint ! {
15+ pub rustc :: DEFAULT_HASH_TYPES ,
1616 Allow ,
1717 "forbid HashMap and HashSet and suggest the FxHash* variants"
1818}
@@ -23,7 +23,7 @@ pub struct DefaultHashTypes {
2323
2424impl DefaultHashTypes {
2525 // we are allowed to use `HashMap` and `HashSet` as identifiers for implementing the lint itself
26- #[ allow( default_hash_types) ]
26+ #[ cfg_attr ( not ( bootstrap ) , allow( rustc :: default_hash_types) ) ]
2727 pub fn new ( ) -> Self {
2828 let mut map = FxHashMap :: default ( ) ;
2929 map. insert ( sym:: HashMap , sym:: FxHashMap ) ;
@@ -51,20 +51,20 @@ impl EarlyLintPass for DefaultHashTypes {
5151 }
5252}
5353
54- declare_lint ! {
55- pub USAGE_OF_TY_TYKIND ,
54+ declare_tool_lint ! {
55+ pub rustc :: USAGE_OF_TY_TYKIND ,
5656 Allow ,
5757 "usage of `ty::TyKind` outside of the `ty::sty` module"
5858}
5959
60- declare_lint ! {
61- pub TY_PASS_BY_REFERENCE ,
60+ declare_tool_lint ! {
61+ pub rustc :: TY_PASS_BY_REFERENCE ,
6262 Allow ,
6363 "passing `Ty` or `TyCtxt` by reference"
6464}
6565
66- declare_lint ! {
67- pub USAGE_OF_QUALIFIED_TY ,
66+ declare_tool_lint ! {
67+ pub rustc :: USAGE_OF_QUALIFIED_TY ,
6868 Allow ,
6969 "using `ty::{Ty,TyCtxt}` instead of importing it"
7070}
@@ -215,8 +215,8 @@ fn gen_args(segment: &PathSegment) -> String {
215215 String :: new ( )
216216}
217217
218- declare_lint ! {
219- pub LINT_PASS_IMPL_WITHOUT_MACRO ,
218+ declare_tool_lint ! {
219+ pub rustc :: LINT_PASS_IMPL_WITHOUT_MACRO ,
220220 Allow ,
221221 "`impl LintPass` without the `declare_lint_pass!` or `impl_lint_pass!` macros"
222222}
0 commit comments