@@ -29,28 +29,28 @@ use crate::errors::{
2929} ;
3030
3131#[ derive( Debug ) ]
32- pub struct LintLevelSets {
33- pub list : IndexVec < LintStackIndex , LintSet > ,
32+ struct LintLevelSets {
33+ list : IndexVec < LintStackIndex , LintSet > ,
3434}
3535
3636rustc_index:: newtype_index! {
37- pub struct LintStackIndex {
37+ struct LintStackIndex {
3838 ENCODABLE = custom, // we don't need encoding
3939 const COMMAND_LINE = 0 ,
4040 }
4141}
4242
4343#[ derive( Debug ) ]
44- pub struct LintSet {
44+ struct LintSet {
4545 // -A,-W,-D flags, a `Symbol` for the flag itself and `Level` for which
4646 // flag.
47- pub specs : FxHashMap < LintId , LevelAndSource > ,
47+ specs : FxHashMap < LintId , LevelAndSource > ,
4848
49- pub parent : LintStackIndex ,
49+ parent : LintStackIndex ,
5050}
5151
5252impl LintLevelSets {
53- pub fn new ( ) -> Self {
53+ fn new ( ) -> Self {
5454 LintLevelSets { list : IndexVec :: new ( ) }
5555 }
5656
@@ -62,15 +62,14 @@ impl LintLevelSets {
6262 sess : & Session ,
6363 ) -> LevelAndSource {
6464 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) ;
6666 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)
6868 } ) ;
69-
7069 ( level, src)
7170 }
7271
73- pub fn get_lint_id_level (
72+ fn raw_lint_id_level (
7473 & self ,
7574 id : LintId ,
7675 mut idx : LintStackIndex ,
@@ -292,13 +291,12 @@ pub struct LintLevelsBuilder<'s, P> {
292291 registered_tools : & ' s RegisteredTools ,
293292}
294293
295- pub struct BuilderPush {
294+ pub ( crate ) struct BuilderPush {
296295 prev : LintStackIndex ,
297- pub changed : bool ,
298296}
299297
300298impl < ' s > LintLevelsBuilder < ' s , TopDown > {
301- pub fn new (
299+ pub ( crate ) fn new (
302300 sess : & ' s Session ,
303301 warn_about_weird_lints : bool ,
304302 store : & ' s LintStore ,
@@ -356,11 +354,11 @@ impl<'s> LintLevelsBuilder<'s, TopDown> {
356354 self . provider . cur = prev;
357355 }
358356
359- BuilderPush { prev, changed : prev != self . provider . cur }
357+ BuilderPush { prev }
360358 }
361359
362360 /// 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 ) {
364362 self . provider . cur = push. prev ;
365363 }
366364}
@@ -929,7 +927,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
929927
930928 /// Used to emit a lint-related diagnostic based on the current state of
931929 /// this lint context.
932- pub fn struct_lint (
930+ pub ( crate ) fn struct_lint (
933931 & self ,
934932 lint : & ' static Lint ,
935933 span : Option < MultiSpan > ,
0 commit comments