Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #121859

Merged
merged 28 commits into from
Mar 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
75da582
Fix incorrect suggestion for uninitialize binding in destructuring pa…
clubby789 Feb 4, 2024
748c615
make unused_imports less assertive in test modules
Suya1671 Feb 25, 2024
a9907b1
remove Mutex::unlock
HTGAzureX1212 Feb 28, 2024
4996194
Improve error messages for generics with default parameters
veera-sivarajan Feb 21, 2024
3ba50b3
Avoid code duplication
veera-sivarajan Feb 23, 2024
cc13f82
Update item order in test
veera-sivarajan Feb 23, 2024
a7832b1
Make the success arms of `if lhs || rhs` meet up in a separate block
Zalathar Feb 28, 2024
f11713b
Error on stray .stderr/.stdout files for (un-)revisioned tests
jieyouxu Feb 22, 2024
19ee457
Remove stray stdout/stderr files
jieyouxu Feb 22, 2024
721c741
Remove unnecessary `Level::` qualifiers.
nnethercote Feb 29, 2024
7e64163
CFI: Remove unused `typeid_for_fnsig`
rcvalle Feb 29, 2024
44f0043
Handle stashing of delayed bugs.
nnethercote Feb 29, 2024
2064c19
Remove unused fluent messages
mu001999 Mar 1, 2024
beac5b1
Fix typo in comment
gurry Mar 1, 2024
f6d2607
Make `ZeroablePrimitive` trait unsafe.
reitermarkus Mar 1, 2024
0700ec0
normalizes-to: handle negative impls
lcnr Mar 1, 2024
80549a8
Rollup merge of #120646 - clubby789:uninit-destructuring-sugg, r=mich…
matthiaskrgr Mar 1, 2024
f23c6dd
Rollup merge of #121416 - veera-sivarajan:bugfix-120785, r=nnethercote
matthiaskrgr Mar 1, 2024
dcde08f
Rollup merge of #121475 - jieyouxu:tidy-stderr-check, r=the8472,compi…
matthiaskrgr Mar 1, 2024
58825b4
Rollup merge of #121580 - Suyashtnt:issue-121502-fix, r=michaelwoerister
matthiaskrgr Mar 1, 2024
90ca049
Rollup merge of #121736 - HTGAzureX1212:HTGAzureX1212/remove-mutex-un…
matthiaskrgr Mar 1, 2024
1a4c93e
Rollup merge of #121784 - Zalathar:if-or-converge, r=Nadrieril
matthiaskrgr Mar 1, 2024
b5ef517
Rollup merge of #121818 - rcvalle:rust-cfi-remove-unused-typeid-for-f…
matthiaskrgr Mar 1, 2024
47a491d
Rollup merge of #121819 - nnethercote:fix-121812, r=oli-obk
matthiaskrgr Mar 1, 2024
01b58bd
Rollup merge of #121828 - mu001999:clean, r=Nilstrieb
matthiaskrgr Mar 1, 2024
96e3777
Rollup merge of #121831 - gurry:fix-typo, r=oli-obk
matthiaskrgr Mar 1, 2024
68dd5e6
Rollup merge of #121850 - reitermarkus:generic-nonzero-unsafe-trait, …
matthiaskrgr Mar 1, 2024
ff22925
Rollup merge of #121853 - lcnr:normalizes_to-polarity, r=compiler-errors
matthiaskrgr Mar 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary Level:: qualifiers.
We have `use Level::*;` in this file.
  • Loading branch information
nnethercote committed Feb 29, 2024
commit 721c741756a023f13064a232280a72fceba0b813
14 changes: 7 additions & 7 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,11 @@ impl DiagCtxt {
let err = self.inner.borrow_mut().stashed_diagnostics.swap_remove(&key);
err.map(|(err, guar)| {
// The use of `::<ErrorGuaranteed>` is safe because level is `Level::Error`.
assert_eq!(err.level, Level::Error);
assert_eq!(err.level, Error);
assert!(guar.is_some());
let mut err = Diag::<ErrorGuaranteed>::new_diagnostic(self, err);
modify_err(&mut err);
assert_eq!(err.level, Level::Error);
assert_eq!(err.level, Error);
err.emit()
})
}
Expand All @@ -803,7 +803,7 @@ impl DiagCtxt {
let old_err = self.inner.borrow_mut().stashed_diagnostics.swap_remove(&key);
match old_err {
Some((old_err, guar)) => {
assert_eq!(old_err.level, Level::Error);
assert_eq!(old_err.level, Error);
assert!(guar.is_some());
// Because `old_err` has already been counted, it can only be
// safely cancelled because the `new_err` supplants it.
Expand Down Expand Up @@ -1367,7 +1367,7 @@ impl DiagCtxtInner {
}

if diagnostic.has_future_breakage() {
// Future breakages aren't emitted if they're Level::Allow,
// Future breakages aren't emitted if they're `Level::Allow`,
// but they still need to be constructed and stashed below,
// so they'll trigger the must_produce_diag check.
self.suppressed_expected_diag = true;
Expand Down Expand Up @@ -1453,7 +1453,7 @@ impl DiagCtxtInner {
diagnostic.children.extract_if(already_emitted_sub).for_each(|_| {});
if already_emitted {
let msg = "duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`";
diagnostic.sub(Level::Note, msg, MultiSpan::new());
diagnostic.sub(Note, msg, MultiSpan::new());
}

if is_error {
Expand Down Expand Up @@ -1623,7 +1623,7 @@ impl DiagCtxtInner {
bug.arg("level", bug.level);
let msg = crate::fluent_generated::errors_invalid_flushed_delayed_diagnostic_level;
let msg = self.eagerly_translate_for_subdiag(&bug, msg); // after the `arg` call
bug.sub(Level::Note, msg, bug.span.primary_span().unwrap().into());
bug.sub(Note, msg, bug.span.primary_span().unwrap().into());
}
bug.level = Bug;

Expand Down Expand Up @@ -1671,7 +1671,7 @@ impl DelayedDiagInner {
diag.arg("emitted_at", diag.emitted_at.clone());
diag.arg("note", self.note);
let msg = dcx.eagerly_translate_for_subdiag(&diag, msg); // after the `arg` calls
diag.sub(Level::Note, msg, diag.span.primary_span().unwrap_or(DUMMY_SP).into());
diag.sub(Note, msg, diag.span.primary_span().unwrap_or(DUMMY_SP).into());
diag
}
}
Expand Down