Refactor rustc lint API
This commit is contained in:
parent
65445a571c
commit
a8f7e244b7
64 changed files with 1760 additions and 1555 deletions
|
@ -347,10 +347,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
panic: AssertKind<impl std::fmt::Debug>,
|
||||
) {
|
||||
if let Some(lint_root) = self.lint_root(source_info) {
|
||||
self.tcx.struct_span_lint_hir(lint, lint_root, source_info.span, |lint| {
|
||||
let mut err = lint.build(message);
|
||||
err.span_label(source_info.span, format!("{:?}", panic));
|
||||
err.emit();
|
||||
self.tcx.struct_span_lint_hir(lint, lint_root, source_info.span, message, |lint| {
|
||||
lint.span_label(source_info.span, format!("{:?}", panic))
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue