diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-10-12 14:16:24 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-10-12 14:16:24 +0000 |
| commit | c5de3ecec349f8269d35d00dd7d0c596dfc994e1 (patch) | |
| tree | b756ec742895a45c0305f4adfa392edc08fa6a2f /compiler/rustc_middle | |
| parent | b1c3e786613932f04472e7616a0dfd856cda17ad (diff) | |
| download | rust-c5de3ecec349f8269d35d00dd7d0c596dfc994e1.tar.gz rust-c5de3ecec349f8269d35d00dd7d0c596dfc994e1.zip | |
link lint function with `decorate` function param to `struct_lint_level`
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 97646003e73..99b38bcea08 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -2826,6 +2826,11 @@ impl<'tcx> TyCtxt<'tcx> { }) } + /// Emit a lint at the appropriate level for a hir node, with an associated span. + /// + /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation. + /// + /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature pub fn struct_span_lint_hir( self, lint: &'static Lint, @@ -2851,6 +2856,11 @@ impl<'tcx> TyCtxt<'tcx> { self.struct_lint_node(lint, id, decorator.msg(), |diag| decorator.decorate_lint(diag)) } + /// Emit a lint at the appropriate level for a hir node. + /// + /// Return value of the `decorate` closure is ignored, see [`struct_lint_level`] for a detailed explanation. + /// + /// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature pub fn struct_lint_node( self, lint: &'static Lint, |
