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 8 pull requests #126781

Merged
merged 19 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9b22110
Add powerpc-unknown-openbsd maintaince status
ChrisDenton Jun 14, 2024
c4ddc86
Print the tested value in int_log tests
tgross35 Jun 18, 2024
d51b446
Improve conflict marker recovery
dev-ardi Jun 7, 2024
9f63712
make this comment correct
dev-ardi Jun 10, 2024
b6d20d1
Add the target-features
sayantn Jun 18, 2024
1e1b3fc
Fix stderr cases
sayantn Jun 18, 2024
50d1efa
Add a test demonstrating the problem
compiler-errors Jun 19, 2024
3e8898a
Allow naming expr_2021 in all editions
compiler-errors Jun 19, 2024
a656bb6
Specify target for inaccessible-temp-dir rmake test
Hoverbear Jun 19, 2024
3e59f0c
StaticForeignItem and StaticItem are the same
compiler-errors Jun 20, 2024
d6efcbb
Fix another assertion failure for some Expect diagnostics.
nnethercote Jun 21, 2024
73cc4ec
Rollup merge of #126125 - dev-ardi:conflict-markers, r=estebank
matthiaskrgr Jun 21, 2024
0c1d396
Rollup merge of #126481 - ChrisDenton:powerpc-unkown-openbsd, r=ehuss
matthiaskrgr Jun 21, 2024
7a827d3
Rollup merge of #126613 - tgross35:log-test-update, r=cuviper
matthiaskrgr Jun 21, 2024
2b7f6e2
Rollup merge of #126617 - sayantn:veorq, r=workingjubilee
matthiaskrgr Jun 21, 2024
3bd84f1
Rollup merge of #126700 - compiler-errors:fragment, r=fmease
matthiaskrgr Jun 21, 2024
520118b
Rollup merge of #126707 - ferrocene:hoverbear/fix-inaccessible-temp-d…
matthiaskrgr Jun 21, 2024
f577d80
Rollup merge of #126767 - compiler-errors:static-foreign-item, r=spas…
matthiaskrgr Jun 21, 2024
d86736c
Rollup merge of #126774 - nnethercote:fix-126751, r=oli-obk
matthiaskrgr Jun 21, 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
8 changes: 4 additions & 4 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1456,10 +1456,10 @@ impl DiagCtxtInner {
}

if diagnostic.has_future_breakage() {
// 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.
assert!(matches!(diagnostic.level, Error | Warning | Allow));
// Future breakages aren't emitted if they're `Level::Allow` or
// `Level::Expect`, but they still need to be constructed and
// stashed below, so they'll trigger the must_produce_diag check.
assert!(matches!(diagnostic.level, Error | Warning | Allow | Expect(_)));
self.future_breakage_diagnostics.push(diagnostic.clone());
}

Expand Down
12 changes: 12 additions & 0 deletions tests/ui/lint/expect-future_breakage-crash-issue-126521.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
// This test covers similar crashes from both #126521 and #126751.

macro_rules! foo {
($val:ident) => {
true;
};
}

macro_rules! bar {
($val:ident) => {
(5_i32.overflowing_sub(3));
};
}

fn main() {
#[expect(semicolon_in_expressions_from_macros)]
//~^ ERROR the `#[expect]` attribute is an experimental feature
let _ = foo!(x);

#[expect(semicolon_in_expressions_from_macros)]
//~^ ERROR the `#[expect]` attribute is an experimental feature
let _ = bar!(x);
}
14 changes: 12 additions & 2 deletions tests/ui/lint/expect-future_breakage-crash-issue-126521.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: the `#[expect]` attribute is an experimental feature
--> $DIR/expect-future_breakage-crash-issue-126521.rs:8:5
--> $DIR/expect-future_breakage-crash-issue-126521.rs:16:5
|
LL | #[expect(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -8,6 +8,16 @@ LL | #[expect(semicolon_in_expressions_from_macros)]
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 1 previous error
error[E0658]: the `#[expect]` attribute is an experimental feature
--> $DIR/expect-future_breakage-crash-issue-126521.rs:20:5
|
LL | #[expect(semicolon_in_expressions_from_macros)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0658`.
Loading