diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-23 00:11:13 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-01-23 00:11:13 -0600 |
| commit | cf382de0cc268e6af8d37d31323bf36d0099ade3 (patch) | |
| tree | bef7a6bf124fdc140456da09363edb6935b0df9c /compiler/rustc_errors | |
| parent | ecf72996eda4f8af19b0ca7235c6f62e0245a313 (diff) | |
| download | rust-cf382de0cc268e6af8d37d31323bf36d0099ade3.tar.gz rust-cf382de0cc268e6af8d37d31323bf36d0099ade3.zip | |
Remove DiagnosticBuilder.quiet
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index a681298301a..06b9729a7fd 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -445,9 +445,6 @@ struct HandlerInner { deduplicated_warn_count: usize, future_breakage_diagnostics: Vec<Diagnostic>, - - /// If set to `true`, no warning or error will be emitted. - quiet: bool, } /// A key denoting where from a diagnostic was stashed. @@ -563,19 +560,10 @@ impl Handler { emitted_diagnostics: Default::default(), stashed_diagnostics: Default::default(), future_breakage_diagnostics: Vec::new(), - quiet: false, }), } } - pub fn with_disabled_diagnostic<T, F: FnOnce() -> T>(&self, f: F) -> T { - let prev = self.inner.borrow_mut().quiet; - self.inner.borrow_mut().quiet = true; - let ret = f(); - self.inner.borrow_mut().quiet = prev; - ret - } - // This is here to not allow mutation of flags; // as of this writing it's only used in tests in librustc_middle. pub fn can_emit_warnings(&self) -> bool { @@ -946,7 +934,7 @@ impl HandlerInner { } fn emit_diagnostic(&mut self, diagnostic: &Diagnostic) { - if diagnostic.cancelled() || self.quiet { + if diagnostic.cancelled() { return; } @@ -1170,9 +1158,6 @@ impl HandlerInner { } fn delay_as_bug(&mut self, diagnostic: Diagnostic) { - if self.quiet { - return; - } if self.flags.report_delayed_bugs { self.emit_diagnostic(&diagnostic); } |
