Gate #![reexport_test_harness_main] properly rust-lang/rust#152210

Merged

26 comments and reviews loaded in 0.97s

Ozzy1423 Avatar

View all comments

Address the FIXME

Removed from issue-43106-gating-of-builtin-attrs.rs since that is for stable attributes only.

This would be a breaking change, search of github shows it is mostly but not always used with #![test_runner] which is already gated correctly.

Details:
#50297

Feel free to close this issue if you think it is not worth addressing the FIXME...

rustbot Avatar

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

rustbot Avatar

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • People who recently interacted with files modified in this PR: compiler
  • compiler expanded to 20 candidates
  • Random selection from 12 candidates
fee1-dead Avatar
rust-bors Avatar
rust-bors 2026-02-17 01:17:13 UTC · hidden as outdated
rust-bors Avatar
rust-bors 2026-02-17 01:17:13 UTC · hidden as outdated
View on GitHub

⌛ Trying commit abb5229 with merge 79452e8

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/22082569936

rust-bors Avatar

☀️ Try build successful (CI)
Build commit: 79452e8 (79452e8441468c5568c20bfca2aa1fe75b645b2d, parent: 3c9faa0d037b9eecda4a440cc482ff7f960fb8a5)

JonathanBrouwer Avatar
craterbot Avatar

👌 Experiment pr-152210 created and queued.
🤖 Automatically detected try build 79452e8
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

fee1-dead Avatar
craterbot Avatar

🚧 Experiment pr-152210 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot Avatar

🎉 Experiment pr-152210 is completed!
📊 6 regressed and 8 fixed (818761 total)
📊 2503 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-152210/retry-regressed-list.txt

JonathanBrouwer Avatar

All changes in the crater run are spurious.
@rust-lang/lang are you ok with this change?
r=me if you are

rust-bors Avatar
rust-bors 2026-02-24 08:51:26 UTC · hidden as outdated
rust-bors Avatar
rust-bors 2026-02-24 08:51:26 UTC · hidden as outdated
View on GitHub

☔ The latest upstream changes (presumably #153026) made this pull request unmergeable. Please resolve the merge conflicts.

traviscross Avatar

We talked about this in the meeting today. Let's propose to do this. Some people may do some further investigation; if we find things, we'll file concerns.

@rfcbot fcp merge lang

rust-rfcbot Avatar
rust-rfcbot 2026-02-25 17:41:50 UTC · hidden as RESOLVED
View on GitHub

Error encounted:
Provided team `` is invalid

traviscross Avatar
traviscross 2026-02-25 17:41:57 UTC · hidden as DUPLICATE
traviscross Avatar
traviscross 2026-02-25 17:41:57 UTC · hidden as DUPLICATE
View on GitHub

@rfcbot fcp merge lang

rust-rfcbot Avatar

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

nikomatsakis Avatar
rust-rfcbot Avatar

🔔 This is now entering its final comment period, as per the review above. 🔔

steffahn Avatar
RalfJung Avatar

the original marker as explicitly “ungated” came in

That just made the default explicit, didn't it? Adding it ungated happened in #22364.

jackh726 Avatar

Ah, I got nerd-sniped (oh well).

This attribute has been around since pre 1.0, and when feature-gated attributes were added (#22364), this just wasn't gated. The FIXME was added in #63824 alongside general other cleanups/refactors.

jackh726 Avatar

This seems like an obvious case of "this probably wasn't a vetted stabilization", and given that it seems like this attribute shouldn't be used without test_runner, adding a feature gate seems obviously appropriate.

Ozzy1423 Avatar
rust-rfcbot Avatar

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

JonathanBrouwer Avatar
rust-bors Avatar

📌 Commit 4af572d has been approved by JonathanBrouwer

It is now in the queue for this repository.