Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

require trait impls to have matching const stabilities as the traits #136688

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

Merged
bors merged 1 commit into rust-lang:master from fee1-dead-contrib:push-nppsusmpokqo
Feb 28, 2025

Conversation

Copy link
Member

@fee1-dead fee1-dead commented Feb 7, 2025

This resolves rust-lang/project-const-traits#5 by implementing the suggested solution in the given thread

r? @RalfJung
cc @rust-lang/project-const-traits

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 7, 2025
Copy link
Collaborator

rustbot commented Feb 7, 2025

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

This comment has been minimized.

Copy link
Member

RalfJung commented Feb 7, 2025

The corresponding check for regular stability seems to work very differently -- do we have any idea why? I get

error: an `#[unstable]` annotation here has no effect
 --> library/alloc/src/slice.rs:836:1
 |
836 | #[unstable(feature = "rust2", issue = "none")]
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 |
 = note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
 = note: `#[deny(ineffective_unstable_trait_impl)]` on by default

Copy link
Member

RalfJung commented Feb 7, 2025

Anyway I agree with the goal but would prefer if someone else could review the implementation -- @compiler-errors or @oli-obk , could one of you take this?

Copy link
Member

Can do

RalfJung reacted with heart emoji

Copy link
Member

RalfJung commented Feb 7, 2025

Copy link
Member Author

Copy link
Collaborator

bors commented Feb 25, 2025

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

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me after rebasing

Copy link
Member Author

@bors r=compiler-errors

Copy link
Collaborator

bors commented Feb 27, 2025

📌 Commit ef66cbb has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 27, 2025
...o, r=compiler-errors
require trait impls to have matching const stabilities as the traits
This resolves rust-lang/project-const-traits#5 by implementing the suggested solution in the given thread
r? `@RalfJung`
cc `@rust-lang/project-const-traits`
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2025
...iaskrgr
Rollup of 8 pull requests
Successful merges:
 - rust-lang#136542 ([`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing)
 - rust-lang#136579 (Fix UB in ThinVec::flat_map_in_place)
 - rust-lang#136688 (require trait impls to have matching const stabilities as the traits)
 - rust-lang#136846 (Make `AssocOp` more like `ExprKind`)
 - rust-lang#137304 (add `IntoBounds::intersect` and `RangeBounds::is_empty`)
 - rust-lang#137455 (Reuse machinery from `tail_expr_drop_order` for `if_let_rescope`)
 - rust-lang#137480 (Return unexpected termination error instead of panicing in `Thread::join`)
 - rust-lang#137694 (Spruce up `AttributeKind` docs)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 27, 2025
...o, r=compiler-errors
require trait impls to have matching const stabilities as the traits
This resolves rust-lang/project-const-traits#5 by implementing the suggested solution in the given thread
r? ```@RalfJung```
cc ```@rust-lang/project-const-traits```
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2025
Rollup of 4 pull requests
Successful merges:
 - rust-lang#136542 ([`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing)
 - rust-lang#136688 (require trait impls to have matching const stabilities as the traits)
 - rust-lang#136846 (Make `AssocOp` more like `ExprKind`)
 - rust-lang#137304 (add `IntoBounds::intersect` and `RangeBounds::is_empty`)
r? `@ghost`
`@rustbot` modify labels: rollup
try-job: i686-msvc-1
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2025
...iaskrgr
Rollup of 8 pull requests
Successful merges:
 - rust-lang#136542 ([`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing)
 - rust-lang#136579 (Fix UB in ThinVec::flat_map_in_place)
 - rust-lang#136688 (require trait impls to have matching const stabilities as the traits)
 - rust-lang#136846 (Make `AssocOp` more like `ExprKind`)
 - rust-lang#137304 (add `IntoBounds::intersect` and `RangeBounds::is_empty`)
 - rust-lang#137455 (Reuse machinery from `tail_expr_drop_order` for `if_let_rescope`)
 - rust-lang#137480 (Return unexpected termination error instead of panicing in `Thread::join`)
 - rust-lang#137694 (Spruce up `AttributeKind` docs)
r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2025
...iaskrgr
Rollup of 8 pull requests
Successful merges:
 - rust-lang#136542 ([`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing)
 - rust-lang#136579 (Fix UB in ThinVec::flat_map_in_place)
 - rust-lang#136688 (require trait impls to have matching const stabilities as the traits)
 - rust-lang#136846 (Make `AssocOp` more like `ExprKind`)
 - rust-lang#137304 (add `IntoBounds::intersect` and `RangeBounds::is_empty`)
 - rust-lang#137455 (Reuse machinery from `tail_expr_drop_order` for `if_let_rescope`)
 - rust-lang#137480 (Return unexpected termination error instead of panicing in `Thread::join`)
 - rust-lang#137694 (Spruce up `AttributeKind` docs)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 88dcab7 into rust-lang:master Feb 28, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 28, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2025
Rollup merge of rust-lang#136688 - fee1-dead-contrib:push-nppsusmpokqo, r=compiler-errors
require trait impls to have matching const stabilities as the traits
This resolves rust-lang/project-const-traits#5 by implementing the suggested solution in the given thread
r? ``@RalfJung``
cc ``@rust-lang/project-const-traits``
@fee1-dead fee1-dead deleted the push-nppsusmpokqo branch February 28, 2025 09:45
@fee1-dead fee1-dead added the F-const_trait_impl `#![feature(const_trait_impl)]` label Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@compiler-errors compiler-errors compiler-errors approved these changes

Labels
F-const_trait_impl `#![feature(const_trait_impl)]` 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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
1.87.0
Development

Successfully merging this pull request may close these issues.

Const stability on impls doesn't make sense

AltStyle によって変換されたページ (->オリジナル) /