Rename TyCtxt::struct_lint_node
as TyCtxt::node_lint
.
This commit is contained in:
parent
36e6514606
commit
681b9aa363
@ -677,7 +677,7 @@ impl<'tcx> LintContext for LateContext<'tcx> {
|
|||||||
|
|
||||||
match span {
|
match span {
|
||||||
Some(s) => self.tcx.struct_span_lint_hir(lint, hir_id, s, msg, decorate),
|
Some(s) => self.tcx.struct_span_lint_hir(lint, hir_id, s, msg, decorate),
|
||||||
None => self.tcx.struct_lint_node(lint, hir_id, msg, decorate),
|
None => self.tcx.node_lint(lint, hir_id, msg, decorate),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ pub fn explain_lint_level_source(
|
|||||||
/// - [`TyCtxt::emit_spanned_lint`]
|
/// - [`TyCtxt::emit_spanned_lint`]
|
||||||
/// - [`TyCtxt::struct_span_lint_hir`]
|
/// - [`TyCtxt::struct_span_lint_hir`]
|
||||||
/// - [`TyCtxt::emit_lint`]
|
/// - [`TyCtxt::emit_lint`]
|
||||||
/// - [`TyCtxt::struct_lint_node`]
|
/// - [`TyCtxt::node_lint`]
|
||||||
/// - `LintContext::opt_span_lint`
|
/// - `LintContext::opt_span_lint`
|
||||||
///
|
///
|
||||||
/// ## `decorate`
|
/// ## `decorate`
|
||||||
|
@ -2117,7 +2117,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
id: HirId,
|
id: HirId,
|
||||||
decorator: impl for<'a> DecorateLint<'a, ()>,
|
decorator: impl for<'a> DecorateLint<'a, ()>,
|
||||||
) {
|
) {
|
||||||
self.struct_lint_node(lint, id, decorator.msg(), |diag| {
|
self.node_lint(lint, id, decorator.msg(), |diag| {
|
||||||
decorator.decorate_lint(diag);
|
decorator.decorate_lint(diag);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2127,7 +2127,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
#[rustc_lint_diagnostics]
|
#[rustc_lint_diagnostics]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn struct_lint_node(
|
pub fn node_lint(
|
||||||
self,
|
self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
id: HirId,
|
id: HirId,
|
||||||
|
@ -377,7 +377,7 @@ pub(crate) fn run_global_ctxt(
|
|||||||
{}/rustdoc/how-to-write-documentation.html",
|
{}/rustdoc/how-to-write-documentation.html",
|
||||||
crate::DOC_RUST_LANG_ORG_CHANNEL
|
crate::DOC_RUST_LANG_ORG_CHANNEL
|
||||||
);
|
);
|
||||||
tcx.struct_lint_node(
|
tcx.node_lint(
|
||||||
crate::lint::MISSING_CRATE_LEVEL_DOCS,
|
crate::lint::MISSING_CRATE_LEVEL_DOCS,
|
||||||
DocContext::as_local_hir_id(tcx, krate.module.item_id).unwrap(),
|
DocContext::as_local_hir_id(tcx, krate.module.item_id).unwrap(),
|
||||||
"no documentation found for this crate's top-level module",
|
"no documentation found for this crate's top-level module",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user