Skip to content

Remove more static mut refs from UI tests#159144

Open
NotPppp1116 wants to merge 1 commit into
rust-lang:mainfrom
NotPppp1116:agent-remove-static-mut-refs-more-tests
Open

Remove more static mut refs from UI tests#159144
NotPppp1116 wants to merge 1 commit into
rust-lang:mainfrom
NotPppp1116:agent-remove-static-mut-refs-more-tests

Conversation

@NotPppp1116

Copy link
Copy Markdown

Replace additional static mut counters and order logs in UI tests with atomic values.

This removes 11 more stale #![allow(static_mut_refs)] allowances from tests that only need simple observable counters or drop-order logs. The tests intentionally exercising static mut semantics are left unchanged.

Validation:

./x test tests/ui/binding/order-drop-with-match.rs tests/ui/drop/issue-48962.rs tests/ui/array-slice-vec/slice.rs tests/ui/array-slice-vec/slice-panic-1.rs tests/ui/array-slice-vec/slice-panic-2.rs tests/ui/drop/generic-drop-trait-bound-15858.rs tests/ui/drop/drop-struct-as-object.rs tests/ui/methods/method-self-arg.rs tests/ui/methods/method-self-arg-trait.rs tests/ui/self/where-for-self.rs tests/ui/traits/impl.rs --force-rerun

Result: 11 passed, 0 failed.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 11, 2026
@NotPppp1116 NotPppp1116 marked this pull request as ready for review July 11, 2026 18:40
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 11, 2026
@rustbot

rustbot commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @fee1-dead (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 18 candidates

@fee1-dead fee1-dead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of using atomics in some of these tests that don't have threading. Some of our targets don't have atomics and this makes some tests that are otherwise applicable fail on those targets. Raw pointers could just work. Also for some threaded examples consider using thread scope.

View changes since this review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2026
@rustbot

rustbot commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants