about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-04 18:51:28 +0000
committerbors <bors@rust-lang.org>2024-02-04 18:51:28 +0000
commit4e3eed48926b8b70eee8beb082e37ffa4985c0ed (patch)
treef479799179b27abe3959cf04e202d8f08f96fe90 /compiler/rustc_session
parent671eb38a4e5fadb75548841ec7ae31224eea0593 (diff)
parent326839bf7f962495b79bdd93dfb886194a5ba13c (diff)
downloadrust-4e3eed48926b8b70eee8beb082e37ffa4985c0ed.tar.gz
rust-4e3eed48926b8b70eee8beb082e37ffa4985c0ed.zip
Auto merge of #120620 - matthiaskrgr:rollup-sscmbsm, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #119543 (add avx512fp16 to x86 target features)
 - #120004 (Release notes for 1.76)
 - #120562 (Revert unsound libcore changes)
 - #120566 (coverage: Use normal `edition:` headers in coverage tests)
 - #120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position)
 - #120571 (Miscellaneous diagnostics cleanups)
 - #120573 (Remove `BorrowckErrors::tainted_by_errors`)
 - #120592 (Remove unnecessary `.to_string()`/`.as_str()`s)
 - #120610 (hir: Remove the generic type parameter from `MaybeOwned`)
 - #120616 (Fix ICE on field access on a tainted type after const-eval failure)

Failed merges:

 - #120569 (coverage: Improve handling of function/closure spans)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/parse.rs2
-rw-r--r--compiler/rustc_session/src/session.rs14
2 files changed, 3 insertions, 13 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index 1cfaa49401d..8adb0cbcc9d 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -258,7 +258,7 @@ impl ParseSess {
         }
     }
 
-    pub fn with_silent_emitter(fatal_note: Option<String>) -> Self {
+    pub fn with_silent_emitter(fatal_note: String) -> Self {
         let fallback_bundle = fallback_fluent_bundle(Vec::new(), false);
         let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
         let fatal_dcx = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 3a0ae74dd92..f6af5a4f87e 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -288,19 +288,9 @@ impl Session {
     pub fn finish_diagnostics(&self, registry: &Registry) {
         self.check_miri_unleashed_features();
         self.dcx().print_error_count(registry);
-        self.emit_future_breakage();
-    }
-
-    fn emit_future_breakage(&self) {
-        if !self.opts.json_future_incompat {
-            return;
-        }
-
-        let diags = self.dcx().take_future_breakage_diagnostics();
-        if diags.is_empty() {
-            return;
+        if self.opts.json_future_incompat {
+            self.dcx().emit_future_breakage_report();
         }
-        self.dcx().emit_future_breakage_report(diags);
     }
 
     /// Returns true if the crate is a testing one.