@@ -497,9 +497,6 @@ pub struct LateContext<'tcx> {
497497 /// Items accessible from the crate being checked.
498498 pub effective_visibilities : & ' tcx EffectiveVisibilities ,
499499
500- /// The store of registered lints and the lint levels.
501- pub lint_store : & ' tcx LintStore ,
502-
503500 pub last_node_with_lint_attrs : hir:: HirId ,
504501
505502 /// Generic type parameters in scope for the item we are in.
@@ -515,21 +512,14 @@ pub struct EarlyContext<'a> {
515512 pub buffered : LintBuffer ,
516513}
517514
518- pub trait LintPassObject : Sized { }
519-
520- impl LintPassObject for EarlyLintPassObject { }
521-
522- impl LintPassObject for LateLintPassObject < ' _ > { }
523-
524- pub trait LintContext : Sized {
525- type PassObject : LintPassObject ;
526-
515+ pub trait LintContext {
527516 fn sess ( & self ) -> & Session ;
528- fn lints ( & self ) -> & LintStore ;
529517
530- /// Emit a lint at the appropriate level, with an optional associated span and an existing diagnostic.
518+ /// Emit a lint at the appropriate level, with an optional associated span and an existing
519+ /// diagnostic.
531520 ///
532- /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
521+ /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed
522+ /// explanation.
533523 ///
534524 /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
535525 #[ rustc_lint_diagnostics]
@@ -1059,17 +1049,11 @@ impl<'a> EarlyContext<'a> {
10591049}
10601050
10611051impl < ' tcx > LintContext for LateContext < ' tcx > {
1062- type PassObject = LateLintPassObject < ' tcx > ;
1063-
10641052 /// Gets the overall compiler `Session` object.
10651053 fn sess ( & self ) -> & Session {
10661054 & self . tcx . sess
10671055 }
10681056
1069- fn lints ( & self ) -> & LintStore {
1070- & * self . lint_store
1071- }
1072-
10731057 #[ rustc_lint_diagnostics]
10741058 fn lookup < S : Into < MultiSpan > > (
10751059 & self ,
@@ -1094,17 +1078,11 @@ impl<'tcx> LintContext for LateContext<'tcx> {
10941078}
10951079
10961080impl LintContext for EarlyContext < ' _ > {
1097- type PassObject = EarlyLintPassObject ;
1098-
10991081 /// Gets the overall compiler `Session` object.
11001082 fn sess ( & self ) -> & Session {
11011083 & self . builder . sess ( )
11021084 }
11031085
1104- fn lints ( & self ) -> & LintStore {
1105- self . builder . lint_store ( )
1106- }
1107-
11081086 #[ rustc_lint_diagnostics]
11091087 fn lookup < S : Into < MultiSpan > > (
11101088 & self ,
0 commit comments