]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_errors/src/lib.rs
Don't print full paths in overlap errors
[rust.git] / compiler / rustc_errors / src / lib.rs
index a8fd1a17a5110d3ae10c194881752e0e9ddce67a..170d4341ae71b4a3356a12a7c6d03b60d9021f4f 100644 (file)
@@ -1254,6 +1254,10 @@ fn emit_diagnostic(&mut self, diagnostic: &mut Diagnostic) -> Option<ErrorGuaran
         }
 
         if diagnostic.has_future_breakage() {
+            // Future breakages aren't emitted if they're Level::Allowed,
+            // but they still need to be constructed and stashed below,
+            // so they'll trigger the good-path bug check.
+            self.suppressed_expected_diag = true;
             self.future_breakage_diagnostics.push(diagnostic.clone());
         }