@@ -11,8 +11,8 @@ use syntax::ast::{Ident, Item, ItemKind};
11
11
use syntax:: symbol:: { sym, Symbol } ;
12
12
use syntax_pos:: ExpnInfo ;
13
13
14
- declare_lint ! {
15
- pub DEFAULT_HASH_TYPES ,
14
+ declare_tool_lint ! {
15
+ pub rustc :: DEFAULT_HASH_TYPES ,
16
16
Allow ,
17
17
"forbid HashMap and HashSet and suggest the FxHash* variants"
18
18
}
@@ -23,7 +23,7 @@ pub struct DefaultHashTypes {
23
23
24
24
impl DefaultHashTypes {
25
25
// 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) ) ]
27
27
pub fn new ( ) -> Self {
28
28
let mut map = FxHashMap :: default ( ) ;
29
29
map. insert ( sym:: HashMap , sym:: FxHashMap ) ;
@@ -51,20 +51,20 @@ impl EarlyLintPass for DefaultHashTypes {
51
51
}
52
52
}
53
53
54
- declare_lint ! {
55
- pub USAGE_OF_TY_TYKIND ,
54
+ declare_tool_lint ! {
55
+ pub rustc :: USAGE_OF_TY_TYKIND ,
56
56
Allow ,
57
57
"usage of `ty::TyKind` outside of the `ty::sty` module"
58
58
}
59
59
60
- declare_lint ! {
61
- pub TY_PASS_BY_REFERENCE ,
60
+ declare_tool_lint ! {
61
+ pub rustc :: TY_PASS_BY_REFERENCE ,
62
62
Allow ,
63
63
"passing `Ty` or `TyCtxt` by reference"
64
64
}
65
65
66
- declare_lint ! {
67
- pub USAGE_OF_QUALIFIED_TY ,
66
+ declare_tool_lint ! {
67
+ pub rustc :: USAGE_OF_QUALIFIED_TY ,
68
68
Allow ,
69
69
"using `ty::{Ty,TyCtxt}` instead of importing it"
70
70
}
@@ -215,8 +215,8 @@ fn gen_args(segment: &PathSegment) -> String {
215
215
String :: new ( )
216
216
}
217
217
218
- declare_lint ! {
219
- pub LINT_PASS_IMPL_WITHOUT_MACRO ,
218
+ declare_tool_lint ! {
219
+ pub rustc :: LINT_PASS_IMPL_WITHOUT_MACRO ,
220
220
Allow ,
221
221
"`impl LintPass` without the `declare_lint_pass!` or `impl_lint_pass!` macros"
222
222
}
0 commit comments