-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add regression test for issue #138225 #151483
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
Add regression test for issue #138225 #151483
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
a7efde9 to
6eacc80
Compare
|
Thanks for the feedback @Kivooeo! Done:
The test file name still references the issue number for traceability (as is common in the test suite), but commit/PR messages are now clean. |
This comment has been minimized.
This comment has been minimized.
|
The @bors retry |
|
@ThanhNguyxn: 🔑 Insufficient privileges: not in review users |
This comment has been minimized.
This comment has been minimized.
|
This failure is also unrelated - CI failed to clone This is an infrastructure/network issue, not related to the PR changes. Will need a maintainer to retry. |
|
You can close/reopen the PR yourself to restart CI I think |
I can only close it, I aint reopen it. Im sorry I cant |
6eacc80 to
2be6948
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Sr, I forgot earlier, but I've corrected it now |
|
consider removing issue link from commit |
05ff335 to
f12641e
Compare
This comment has been minimized.
This comment has been minimized.
63c5ee1 to
f5029aa
Compare
|
I tried adding an edition directive to get the async test passing, but removed it again per your request. If the 2015 default causes CI to fail again, let me know and I can adjust the test another way. |
This comment has been minimized.
This comment has been minimized.
|
can you rebless this test? |
f5029aa to
0423285
Compare
|
Reblessed tests/ui/mir/gvn-opt-138225.rs; expected stderr now includes the Rust 2015 async fn error (E0670) along with E0425. |
| pub async fn func1() -> &'static A { | ||
| static RES: A = A { name: None }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pub async fn func1() -> &'static A { | |
| static RES: A = A { name: None }; | |
| pub async fn func1() -> &'static A { | |
| //~^ ERROR `async fn` is not permitted in Rust 2015 | |
| static RES: A = A { name: None }; |
This comment has been minimized.
This comment has been minimized.
0423285 to
565b772
Compare
|
Added inline expected error for Rust 2015 async fn (E0670) next to the async fn, per review. Expected stderr already includes E0670 + E0425. |
|
@ThanhNguyxn If you add |
|
@bors r+ rollup |
…225, r=Kivooeo Add regression test for issue rust-lang#138225 Adds a regression test for rust-lang#138225. The compiler used to ICE with `ReferencesError` when compiling code with: - An undefined type in a struct field - An async function returning a static reference to that struct - Optimizations enabled (`-C opt-level=1` or higher) The bug has been fixed and now correctly reports `E0425: cannot find type`. Test file: `tests/ui/async-await/ice-static-in-async-fn-issue-138225.rs` Closes rust-lang#138225
…uwer Rollup of 10 pull requests Successful merges: - #150428 (UnixStream/UnixListener on Windows ) - #147400 (TryFrom<integer> for bool) - #150993 (std: sys: uefi: os: Implement join_paths) - #151483 (Add regression test for issue #138225) - #151568 (Update hexagon target linker configurations) - #151725 (Fix outdated Debian Ports ISO reference) - #151895 (Move UI tests batch) - #151923 (Fix ICE when projection error reporting sees opaque alias terms) - #151947 (Include assoc const projections in CFI trait object) - #151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream)
Rollup of 11 pull requests Successful merges: - #151756 (Avoid miri error in `slice::sort` under Stacked Borrows) - #147400 (TryFrom<integer> for bool) - #150993 (std: sys: uefi: os: Implement join_paths) - #151483 (Add regression test for issue #138225) - #151568 (Update hexagon target linker configurations) - #151725 (Fix outdated Debian Ports ISO reference) - #151895 (Move UI tests batch) - #151923 (Fix ICE when projection error reporting sees opaque alias terms) - #151947 (Include assoc const projections in CFI trait object) - #151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream) - #151963 (Add regression test for negative literal in a range of unsigned type)
Rollup of 11 pull requests Successful merges: - #151756 (Avoid miri error in `slice::sort` under Stacked Borrows) - #147400 (TryFrom<integer> for bool) - #150993 (std: sys: uefi: os: Implement join_paths) - #151483 (Add regression test for issue #138225) - #151568 (Update hexagon target linker configurations) - #151725 (Fix outdated Debian Ports ISO reference) - #151895 (Move UI tests batch) - #151923 (Fix ICE when projection error reporting sees opaque alias terms) - #151947 (Include assoc const projections in CFI trait object) - #151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream) - #151963 (Add regression test for negative literal in a range of unsigned type)
Rollup merge of #151483 - ThanhNguyxn:fix/add-test-issue-138225, r=Kivooeo Add regression test for issue #138225 Adds a regression test for #138225. The compiler used to ICE with `ReferencesError` when compiling code with: - An undefined type in a struct field - An async function returning a static reference to that struct - Optimizations enabled (`-C opt-level=1` or higher) The bug has been fixed and now correctly reports `E0425: cannot find type`. Test file: `tests/ui/async-await/ice-static-in-async-fn-issue-138225.rs` Closes #138225
Adds a regression test for #138225.
The compiler used to ICE with
ReferencesErrorwhen compiling code with:-C opt-level=1or higher)The bug has been fixed and now correctly reports
E0425: cannot find type.Test file:
tests/ui/async-await/ice-static-in-async-fn-issue-138225.rsCloses #138225