Rename DiagnosticMessage
as DiagMessage
.
This commit is contained in:
parent
b74b4b09d1
commit
dc37dddeb5
@ -5,12 +5,17 @@ extern crate rustc_hir;
|
|||||||
extern crate rustc_lint;
|
extern crate rustc_lint;
|
||||||
extern crate rustc_middle;
|
extern crate rustc_middle;
|
||||||
|
|
||||||
use rustc_errors::{DiagnosticMessage, MultiSpan};
|
use rustc_errors::{DiagMessage, MultiSpan};
|
||||||
use rustc_hir::hir_id::HirId;
|
use rustc_hir::hir_id::HirId;
|
||||||
use rustc_lint::{Lint, LintContext};
|
use rustc_lint::{Lint, LintContext};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
||||||
pub fn a(cx: impl LintContext, lint: &'static Lint, span: impl Into<MultiSpan>, msg: impl Into<DiagnosticMessage>) {
|
pub fn a(
|
||||||
|
cx: impl LintContext,
|
||||||
|
lint: &'static Lint,
|
||||||
|
span: impl Into<MultiSpan>,
|
||||||
|
msg: impl Into<DiagMessage>)
|
||||||
|
{
|
||||||
cx.span_lint(lint, span, msg, |_| {});
|
cx.span_lint(lint, span, msg, |_| {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +24,7 @@ pub fn b(
|
|||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
hir_id: HirId,
|
hir_id: HirId,
|
||||||
span: impl Into<MultiSpan>,
|
span: impl Into<MultiSpan>,
|
||||||
msg: impl Into<DiagnosticMessage>,
|
msg: impl Into<DiagMessage>,
|
||||||
) {
|
) {
|
||||||
tcx.node_span_lint(lint, hir_id, span, msg, |_| {});
|
tcx.node_span_lint(lint, hir_id, span, msg, |_| {});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user