@@ -29,28 +29,28 @@ use crate::errors::{
29
29
} ;
30
30
31
31
#[ derive( Debug ) ]
32
- pub struct LintLevelSets {
33
- pub list : IndexVec < LintStackIndex , LintSet > ,
32
+ struct LintLevelSets {
33
+ list : IndexVec < LintStackIndex , LintSet > ,
34
34
}
35
35
36
36
rustc_index:: newtype_index! {
37
- pub struct LintStackIndex {
37
+ struct LintStackIndex {
38
38
ENCODABLE = custom, // we don't need encoding
39
39
const COMMAND_LINE = 0 ,
40
40
}
41
41
}
42
42
43
43
#[ derive( Debug ) ]
44
- pub struct LintSet {
44
+ struct LintSet {
45
45
// -A,-W,-D flags, a `Symbol` for the flag itself and `Level` for which
46
46
// flag.
47
- pub specs : FxHashMap < LintId , LevelAndSource > ,
47
+ specs : FxHashMap < LintId , LevelAndSource > ,
48
48
49
- pub parent : LintStackIndex ,
49
+ parent : LintStackIndex ,
50
50
}
51
51
52
52
impl LintLevelSets {
53
- pub fn new ( ) -> Self {
53
+ fn new ( ) -> Self {
54
54
LintLevelSets { list : IndexVec :: new ( ) }
55
55
}
56
56
@@ -62,15 +62,14 @@ impl LintLevelSets {
62
62
sess : & Session ,
63
63
) -> LevelAndSource {
64
64
let lint = LintId :: of ( lint) ;
65
- let ( level, mut src) = self . get_lint_id_level ( lint, idx, aux) ;
65
+ let ( level, mut src) = self . raw_lint_id_level ( lint, idx, aux) ;
66
66
let level = reveal_actual_level ( level, & mut src, sess, lint, |id| {
67
- self . get_lint_id_level ( id, idx, aux)
67
+ self . raw_lint_id_level ( id, idx, aux)
68
68
} ) ;
69
-
70
69
( level, src)
71
70
}
72
71
73
- pub fn get_lint_id_level (
72
+ fn raw_lint_id_level (
74
73
& self ,
75
74
id : LintId ,
76
75
mut idx : LintStackIndex ,
@@ -292,13 +291,12 @@ pub struct LintLevelsBuilder<'s, P> {
292
291
registered_tools : & ' s RegisteredTools ,
293
292
}
294
293
295
- pub struct BuilderPush {
294
+ pub ( crate ) struct BuilderPush {
296
295
prev : LintStackIndex ,
297
- pub changed : bool ,
298
296
}
299
297
300
298
impl < ' s > LintLevelsBuilder < ' s , TopDown > {
301
- pub fn new (
299
+ pub ( crate ) fn new (
302
300
sess : & ' s Session ,
303
301
warn_about_weird_lints : bool ,
304
302
store : & ' s LintStore ,
@@ -356,11 +354,11 @@ impl<'s> LintLevelsBuilder<'s, TopDown> {
356
354
self . provider . cur = prev;
357
355
}
358
356
359
- BuilderPush { prev, changed : prev != self . provider . cur }
357
+ BuilderPush { prev }
360
358
}
361
359
362
360
/// Called after `push` when the scope of a set of attributes are exited.
363
- pub fn pop ( & mut self , push : BuilderPush ) {
361
+ pub ( crate ) fn pop ( & mut self , push : BuilderPush ) {
364
362
self . provider . cur = push. prev ;
365
363
}
366
364
}
@@ -929,7 +927,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
929
927
930
928
/// Used to emit a lint-related diagnostic based on the current state of
931
929
/// this lint context.
932
- pub fn struct_lint (
930
+ pub ( crate ) fn struct_lint (
933
931
& self ,
934
932
lint : & ' static Lint ,
935
933
span : Option < MultiSpan > ,
0 commit comments