@@ -574,6 +574,11 @@ pub trait LintContext: Sized {
574574 fn sess ( & self ) -> & Session ;
575575 fn lints ( & self ) -> & LintStore ;
576576
577+ /// Emit a lint at the appropriate level, with an optional associated span and an existing diagnostic.
578+ ///
579+ /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
580+ ///
581+ /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
577582 fn lookup_with_diagnostics (
578583 & self ,
579584 lint : & ' static Lint ,
@@ -872,6 +877,11 @@ pub trait LintContext: Sized {
872877
873878 // FIXME: These methods should not take an Into<MultiSpan> -- instead, callers should need to
874879 // set the span in their `decorate` function (preferably using set_span).
880+ /// Emit a lint at the appropriate level, with an optional associated span.
881+ ///
882+ /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
883+ ///
884+ /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
875885 fn lookup < S : Into < MultiSpan > > (
876886 & self ,
877887 lint : & ' static Lint ,
@@ -893,6 +903,11 @@ pub trait LintContext: Sized {
893903 self . lookup ( lint, Some ( span) , decorator. msg ( ) , |diag| decorator. decorate_lint ( diag) ) ;
894904 }
895905
906+ /// Emit a lint at the appropriate level, with an associated span.
907+ ///
908+ /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
909+ ///
910+ /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
896911 fn struct_span_lint < S : Into < MultiSpan > > (
897912 & self ,
898913 lint : & ' static Lint ,
@@ -914,6 +929,10 @@ pub trait LintContext: Sized {
914929 }
915930
916931 /// Emit a lint at the appropriate level, with no associated span.
932+ ///
933+ /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation.
934+ ///
935+ /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
917936 fn lint (
918937 & self ,
919938 lint : & ' static Lint ,
0 commit comments