We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aac288 commit a0f5431Copy full SHA for a0f5431
compiler/rustc_errors/src/lib.rs
@@ -981,6 +981,10 @@ impl DiagCtxt {
981
982
inner.emit_stashed_diagnostics();
983
984
+ if inner.treat_err_as_bug() {
985
+ return;
986
+ }
987
+
988
let warnings = match inner.deduplicated_warn_count {
989
0 => Cow::from(""),
990
1 => Cow::from("1 warning emitted"),
@@ -991,9 +995,6 @@ impl DiagCtxt {
991
995
1 => Cow::from("aborting due to 1 previous error"),
992
996
count => Cow::from(format!("aborting due to {count} previous errors")),
993
997
};
994
- if inner.treat_err_as_bug() {
- return;
- }
998
999
match (errors.len(), warnings.len()) {
1000
(0, 0) => return,
0 commit comments