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 10 pull requests #122453

Closed
wants to merge 49 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bf62d59
Give `TRACK_DIAGNOSTIC` a return value.
nnethercote Feb 9, 2024
ecd3718
Inline and remove `Level::get_diagnostic_id`.
nnethercote Feb 13, 2024
272e60b
Move `DelayedBug` handling into the `match`.
nnethercote Feb 13, 2024
c81767e
Reorder `has_future_breakage` handling.
nnethercote Feb 13, 2024
aec4bdb
Move `Expect`/`ForceWarning` handling into the `match`.
nnethercote Feb 13, 2024
a7d9262
Add comments about `TRACK_DIAGNOSTIC` use.
nnethercote Feb 13, 2024
7ef605b
Make the `match` in `emit_diagnostic` complete.
nnethercote Mar 1, 2024
2d48a3a
Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attrib…
reitermarkus Mar 2, 2024
85dfb47
Fix lint.
reitermarkus Mar 2, 2024
b5c11d1
Fix `miri` tests.
reitermarkus Mar 2, 2024
0b3a8a0
Hide implementation details for `NonZero` auto traits.
reitermarkus Mar 2, 2024
31fef34
Fix lint.
reitermarkus Mar 6, 2024
52fc093
Try fixing `debuginfo` test.
reitermarkus Mar 9, 2024
17924a0
Fix `StdNonZeroNumberSummaryProvider`.
reitermarkus Mar 10, 2024
5aeae7f
Deduplicate `lldb_commands`.
reitermarkus Mar 10, 2024
ec75906
Remove LLDB persistent results in `compiletest`.
reitermarkus Mar 10, 2024
e02cc56
Add comment about `NonZero` printing as character literal.
reitermarkus Mar 10, 2024
781ce7c
Fix `StdNonZeroNumberProvider` for `gdb`.
reitermarkus Mar 10, 2024
15b71f4
Add CStr::bytes iterator
clarfonthey Nov 13, 2022
c076509
Add methods to create constants
celinval Mar 1, 2024
893a910
Add a test to SMIR body transformation
celinval Mar 12, 2024
a38a556
Reduce unsafe code, use more NonNull APIs per @cuviper review
clarfonthey Mar 12, 2024
f2fcfe8
Various style improvements to `rustc_lint::levels`
Zalathar Mar 13, 2024
bf71825
CFI: Break tests into smaller files
rcvalle Mar 12, 2024
90acda1
Fix accidental re-addition of removed code in a previous PR
oli-obk Mar 13, 2024
f10ebfe
Generalize `eval_in_interpreter` with a helper trait
oli-obk Mar 11, 2024
44b1f8a
Move only usage of `take_static_root_alloc` to its definition and inl…
oli-obk Mar 11, 2024
31fa142
Move error handling into const_validate_mplace
oli-obk Mar 11, 2024
71ef9e2
Move InterpCx into eval_in_interpreter
oli-obk Mar 11, 2024
bd7580b
Move generate_stacktrace_from_stack away from InterpCx to avoid havin…
oli-obk Mar 11, 2024
7aee665
Directly pass in the stack instead of computing it from a machine
oli-obk Mar 11, 2024
ffaf082
Remove an argument that can be computed cheaply
oli-obk Mar 12, 2024
66a46bb
Share the `InterpCx` creation between static and const evaluation
oli-obk Mar 12, 2024
af59eec
Move validation into eval_body_using_ecx
oli-obk Mar 12, 2024
2a1a6fa
Move the entire success path into `eval_body_using_ecx`
oli-obk Mar 12, 2024
3393227
Rename some things around validation error reporting to signal that i…
oli-obk Mar 13, 2024
b6312eb
Create some minimal HIR for associated opaque types
petrochenkov Feb 11, 2024
12cd322
Make incremental sessions identity no longer depend on the crate name…
Zoxc Feb 28, 2024
514b274
const-eval: organize and extend tests for required-consts
RalfJung Mar 13, 2024
9403eb4
Rollup merge of #104353 - clarfonthey:cstr-bytes-iter, r=cuviper
matthiaskrgr Mar 13, 2024
5bf23d9
Rollup merge of #120699 - nnethercote:rm-useless-TRACK_DIAGNOSTIC-cal…
matthiaskrgr Mar 13, 2024
de9163a
Rollup merge of #120943 - petrochenkov:somehir3, r=oli-obk
matthiaskrgr Mar 13, 2024
6948dc6
Rollup merge of #121764 - Zoxc:incr-sess-no-source, r=oli-obk
matthiaskrgr Mar 13, 2024
c996d95
Rollup merge of #121885 - reitermarkus:generic-nonzero-inner, r=oli-o…
matthiaskrgr Mar 13, 2024
2a8600e
Rollup merge of #122375 - rcvalle:rust-cfi-break-tests-into-smaller-f…
matthiaskrgr Mar 13, 2024
2d61416
Rollup merge of #122397 - oli-obk:machine-read-hook2, r=RalfJung
matthiaskrgr Mar 13, 2024
e4f4e9a
Rollup merge of #122405 - celinval:smir-new-const, r=oli-obk
matthiaskrgr Mar 13, 2024
7325c2f
Rollup merge of #122416 - Zalathar:levels, r=petrochenkov
matthiaskrgr Mar 13, 2024
e8c661e
Rollup merge of #122440 - RalfJung:required-consts, r=oli-obk
matthiaskrgr Mar 13, 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
Inline and remove Level::get_diagnostic_id.
It has a single call site, and this will enable subsequent refactorings.
nnethercote committed Mar 1, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit ecd3718bc0b3f823b96d6949ba22f77cfbeff5c1
13 changes: 3 additions & 10 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1356,17 +1356,17 @@ impl DiagCtxtInner {
fn emit_diagnostic(&mut self, mut diagnostic: DiagInner) -> Option<ErrorGuaranteed> {
assert!(diagnostic.level.can_be_top_or_sub().0);

if let Some(expectation_id) = diagnostic.level.get_expectation_id() {
if let Expect(expect_id) | ForceWarning(Some(expect_id)) = diagnostic.level {
// The `LintExpectationId` can be stable or unstable depending on when it was created.
// Diagnostics created before the definition of `HirId`s are unstable and can not yet
// be stored. Instead, they are buffered until the `LintExpectationId` is replaced by
// a stable one by the `LintLevelsBuilder`.
if let LintExpectationId::Unstable { .. } = expectation_id {
if let LintExpectationId::Unstable { .. } = expect_id {
self.unstable_expect_diagnostics.push(diagnostic);
return None;
}
self.suppressed_expected_diag = true;
self.fulfilled_expectations.insert(expectation_id.normalize());
self.fulfilled_expectations.insert(expect_id.normalize());
}

if diagnostic.has_future_breakage() {
@@ -1794,13 +1794,6 @@ impl Level {
matches!(*self, FailureNote)
}

pub fn get_expectation_id(&self) -> Option<LintExpectationId> {
match self {
Expect(id) | ForceWarning(Some(id)) => Some(*id),
_ => None,
}
}

// Can this level be used in a top-level diagnostic message and/or a
// subdiagnostic message?
fn can_be_top_or_sub(&self) -> (bool, bool) {