Use fewer delayed bugs.
For some cases where it's clear that an error has already occurred, e.g.: - there's a comment stating exactly that, or - things like HIR lowering, where we are lowering an error kind The commit also tweaks some comments around delayed bug sites.
This commit is contained in:
@@ -85,7 +85,7 @@ pub(super) fn check_item(
|
||||
|
||||
(_, _, Unsafety::Unsafe, Negative) => {
|
||||
// Reported in AST validation
|
||||
tcx.dcx().span_delayed_bug(tcx.def_span(def_id), "unsafe negative impl");
|
||||
assert!(tcx.dcx().has_errors().is_some(), "unsafe negative impl");
|
||||
Ok(())
|
||||
}
|
||||
(_, _, Unsafety::Normal, Negative)
|
||||
|
||||
Reference in New Issue
Block a user