diff options
| author | bors <bors@rust-lang.org> | 2022-01-23 23:09:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-23 23:09:23 +0000 |
| commit | 42313dd29b3edb0ab453a0d43d12876ec7e48ce0 (patch) | |
| tree | 94efb537a260c94c6fcd5f45d2583dc8cad8e719 /compiler/rustc_errors/src | |
| parent | 84322efad553c7a79c80189f2d1b9197c1aa005f (diff) | |
| parent | eea833f5f1d0de940c0759cc365cef7624a732df (diff) | |
| download | rust-42313dd29b3edb0ab453a0d43d12876ec7e48ce0.tar.gz rust-42313dd29b3edb0ab453a0d43d12876ec7e48ce0.zip | |
Auto merge of #93245 - matthiaskrgr:rollup-djsi6jr, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #91526 (rustc_lint: Some early linting refactorings) - #92555 (Implement RFC 3151: Scoped threads.) - #93213 (Fix `let_chains` and `if_let_guard` feature flags) - #93219 (Add preliminary support for inline assembly for msp430.) - #93226 (Normalize field access types during borrowck) - #93227 (Liberate late bound regions when collecting GAT substs in wfcheck) - #93229 (Remove DiagnosticBuilder.quiet) - #93234 (rustc_mir_itertools: Avoid needless `collect` with itertools) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -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 dbacbba2ce0..16e9b265d69 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); } |
