diff options
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 979f2d3b300..c5399282a1e 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -802,7 +802,10 @@ impl HandlerInner { self.future_breakage_diagnostics.push(diagnostic.clone()); } - if diagnostic.level == Warning && !self.flags.can_emit_warnings { + if diagnostic.level == Warning + && !self.flags.can_emit_warnings + && !diagnostic.is_force_warn() + { if diagnostic.has_future_breakage() { (*TRACK_DIAGNOSTICS)(diagnostic); } @@ -874,7 +877,7 @@ impl HandlerInner { match (errors.len(), warnings.len()) { (0, 0) => return, - (0, _) => self.emit_diagnostic(&Diagnostic::new(Level::Warning, &warnings)), + (0, _) => self.emitter.emit_diagnostic(&Diagnostic::new(Level::Warning, &warnings)), (_, 0) => { let _ = self.fatal(&errors); } |
