Rollup merge of #104229 - compiler-errors:overlap-full-path, r=davidtwco

Don't print full paths in overlap errors

We don't print the full path in other diagnostics -- I don't think it particularly helps with the error message. I also delayed the printing until actually needing to render the error message.

r? diagnostics
This commit is contained in:
Matthias Krüger 2022-11-14 19:26:16 +01:00 committed by GitHub
commit abda584a5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 157 additions and 156 deletions

View file

@ -1254,6 +1254,10 @@ impl HandlerInner {
}
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());
}