link lint function with decorate function param to struct_lint_level
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user