Skip to content

Don't special-case ! in stability checks anymore - #162162

Open
GrigorenkoPV wants to merge 2 commits into
rust-lang:mainfrom
GrigorenkoPV:never-is-now
Open

Don't special-case ! in stability checks anymore#162162
GrigorenkoPV wants to merge 2 commits into
rust-lang:mainfrom
GrigorenkoPV:never-is-now

Conversation

@GrigorenkoPV

@GrigorenkoPV GrigorenkoPV commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Two instances of special-casing:

Since then, in #103239 (just a week ago, on track to be part of Rust v1.100), ! was stabilized, so the first check became wrong and the second became redundant. Let's remove them.

Fixes #162116.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 1, 2026
@rustbot

rustbot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
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:

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

@GrigorenkoPV GrigorenkoPV changed the title Don't special-case ! in stability checks Don't special-case ! in stability checks anymore Sep 1, 2026

@WaffleLapkin WaffleLapkin 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.

r=me with green ci

View changes since this review

@WaffleLapkin WaffleLapkin self-assigned this Sep 1, 2026

@mejrs mejrs 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 now realize impls for function pointers

#[unstable(feature = "b", issue = "none")]
impl Trait for fn(!) {}

also emit no diagnostic, can you add a test for it?

I think this works correctly but it's untested, can you add one as well?

#[unstable(feature = "b", issue = "none")]
impl Trait for fn(UnstableType) {}

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 Sep 1, 2026
@rustbot

rustbot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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

@GrigorenkoPV

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 1, 2026
@GrigorenkoPV
GrigorenkoPV requested a review from mejrs September 1, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

stability attribute checking assumes that ! is unstable

4 participants