@@ -1387,6 +1387,7 @@ impl DiagCtxtInner {
1387
1387
& mut self ,
1388
1388
diagnostic : & mut Diagnostic ,
1389
1389
) -> Option < ErrorGuaranteed > {
1390
+ // njn: Level::Error { .. } | Level::Fatal
1390
1391
if matches ! ( diagnostic. level, Level :: Error { .. } | Level :: Fatal ) && self . treat_err_as_bug ( )
1391
1392
{
1392
1393
diagnostic. level = Level :: Bug ;
@@ -1396,11 +1397,13 @@ impl DiagCtxtInner {
1396
1397
// Diagnostics created before the definition of `HirId`s are unstable and can not yet
1397
1398
// be stored. Instead, they are buffered until the `LintExpectationId` is replaced by
1398
1399
// a stable one by the `LintLevelsBuilder`.
1400
+ // njn: Level::Expect(id) | Level::Warning(Some(id)) => Some(*id),
1399
1401
if let Some ( LintExpectationId :: Unstable { .. } ) = diagnostic. level . get_expectation_id ( ) {
1400
1402
self . unstable_expect_diagnostics . push ( diagnostic. clone ( ) ) ;
1401
1403
return None ;
1402
1404
}
1403
1405
1406
+ // njn: Level::DelayedBug
1404
1407
if diagnostic. level == Level :: DelayedBug {
1405
1408
// FIXME(eddyb) this should check for `has_errors` and stop pushing
1406
1409
// once *any* errors were emitted (and truncate `span_delayed_bugs`
@@ -1416,6 +1419,7 @@ impl DiagCtxtInner {
1416
1419
}
1417
1420
}
1418
1421
1422
+ // njn: self.code... Error only?
1419
1423
if diagnostic. has_future_breakage ( ) {
1420
1424
// Future breakages aren't emitted if they're Level::Allowed,
1421
1425
// but they still need to be constructed and stashed below,
0 commit comments