Skip to content

Suppress unstable-trait notes under -Zforce-unstable-if-unmarked#152698

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Zalathar:zforce
Feb 17, 2026
Merged

Suppress unstable-trait notes under -Zforce-unstable-if-unmarked#152698
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Zalathar:zforce

Conversation

@Zalathar
Copy link
Member


#151036 adds extra diagnostic text (“the nightly-only, unstable trait”) to note when a not-implemented trait is unstable.

However, that extra text is usually unhelpful when building a crate graph with -Zforce-unstable-if-unmarked (such as the compiler or stdlib), because any trait not explicitly marked stable will be treated as unstable.

(For typical compiler contributors using the stage0 compiler, this fix won't take effect until the next bootstrap beta bump.)

@Zalathar Zalathar added A-diagnostics Area: Messages for errors, warnings, and lints A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust labels Feb 16, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 16, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
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 68 candidates
  • Random selection from 13 candidates

@Zalathar
Copy link
Member Author

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, this makes sense to me. Feel free to r=me unless you'd like to hear back from Esteban to double-check.

@rustbot author

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 Feb 16, 2026
@Zalathar
Copy link
Member Author

I wasn't specifically expecting feedback from Esteban (just a general courtesy cc), so I think it's fine to proceed without a double-check.

@bors r=jieyouxu rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 16, 2026

📌 Commit 125e69e has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 16, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 16, 2026
Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`

- Fixes rust-lang#152692.
---

rust-lang#151036 adds extra diagnostic text (“the nightly-only, unstable trait”) to note when a not-implemented trait is unstable.

However, that extra text is usually unhelpful when building a crate graph with `-Zforce-unstable-if-unmarked` (such as the compiler or stdlib), because *any* trait not explicitly marked stable will be treated as unstable.

(For typical compiler contributors using the stage0 compiler, this fix won't take effect until the next bootstrap beta bump.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 16, 2026
Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`

- Fixes rust-lang#152692.
---

rust-lang#151036 adds extra diagnostic text (“the nightly-only, unstable trait”) to note when a not-implemented trait is unstable.

However, that extra text is usually unhelpful when building a crate graph with `-Zforce-unstable-if-unmarked` (such as the compiler or stdlib), because *any* trait not explicitly marked stable will be treated as unstable.

(For typical compiler contributors using the stage0 compiler, this fix won't take effect until the next bootstrap beta bump.)
rust-bors bot pushed a commit that referenced this pull request Feb 16, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #152700 (miri subtree update)
 - #152715 (`rust-analyzer` subtree update)
 - #152609 (Install LLVM DLL in the right place on Windows)
 - #152206 (misc doc improvements)
 - #152664 (Fix mis-constructed `file_span` when generating scraped examples)
 - #152698 (Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`)
@estebank
Copy link
Contributor

LGTM!

rust-bors bot pushed a commit that referenced this pull request Feb 16, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #152700 (miri subtree update)
 - #152715 (`rust-analyzer` subtree update)
 - #152609 (Install LLVM DLL in the right place on Windows)
 - #152206 (misc doc improvements)
 - #152664 (Fix mis-constructed `file_span` when generating scraped examples)
 - #152698 (Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`)
rust-bors bot pushed a commit that referenced this pull request Feb 17, 2026
Rollup of 11 pull requests

Successful merges:

 - #152700 (miri subtree update)
 - #152715 (`rust-analyzer` subtree update)
 - #151783 (Implement RFC 3678: Final trait methods)
 - #152512 (core: Implement feature `float_exact_integer_constants`)
 - #152661 (Avoid ICE in From/TryFrom diagnostic under -Znext-solver)
 - #152703 (Remove `rustc_query_system`)
 - #152206 (misc doc improvements)
 - #152664 (Fix mis-constructed `file_span` when generating scraped examples)
 - #152698 (Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`)
 - #152727 (`probe_op` silence ambiguity errors if tainted)
 - #152728 (Port #![default_lib_allocator] to the new attribute parser)
@rust-bors rust-bors bot merged commit dc77672 into rust-lang:main Feb 17, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 17, 2026
rust-timer added a commit that referenced this pull request Feb 17, 2026
Rollup merge of #152698 - Zalathar:zforce, r=jieyouxu

Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`

- Fixes #152692.
---

#151036 adds extra diagnostic text (“the nightly-only, unstable trait”) to note when a not-implemented trait is unstable.

However, that extra text is usually unhelpful when building a crate graph with `-Zforce-unstable-if-unmarked` (such as the compiler or stdlib), because *any* trait not explicitly marked stable will be treated as unstable.

(For typical compiler contributors using the stage0 compiler, this fix won't take effect until the next bootstrap beta bump.)
@Zalathar Zalathar deleted the zforce branch February 17, 2026 06:29
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Feb 18, 2026
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#152700 (miri subtree update)
 - rust-lang/rust#152715 (`rust-analyzer` subtree update)
 - rust-lang/rust#151783 (Implement RFC 3678: Final trait methods)
 - rust-lang/rust#152512 (core: Implement feature `float_exact_integer_constants`)
 - rust-lang/rust#152661 (Avoid ICE in From/TryFrom diagnostic under -Znext-solver)
 - rust-lang/rust#152703 (Remove `rustc_query_system`)
 - rust-lang/rust#152206 (misc doc improvements)
 - rust-lang/rust#152664 (Fix mis-constructed `file_span` when generating scraped examples)
 - rust-lang/rust#152698 (Suppress unstable-trait notes under `-Zforce-unstable-if-unmarked`)
 - rust-lang/rust#152727 (`probe_op` silence ambiguity errors if tainted)
 - rust-lang/rust#152728 (Port #![default_lib_allocator] to the new attribute parser)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust A-diagnostics Area: Messages for errors, warnings, and lints S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Trait-not-implemented diagnostics consider all compiler-internal traits to be unstable

4 participants