Skip to content

update issue number for const_trait_impl #143875

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
merged 1 commit into from
Jul 14, 2025

Conversation

fee1-dead
Copy link
Member

@fee1-dead fee1-dead commented Jul 13, 2025

r? project-const-traits

cc #67792 #143874

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

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

This PR modifies run-make tests.

cc @jieyouxu

@fee1-dead fee1-dead added the F-const_trait_impl `#![feature(const_trait_impl)]` label Jul 13, 2025
@bors
Copy link
Collaborator

bors commented Jul 13, 2025

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

@compiler-errors
Copy link
Member

@RalfJung moved some of the const ops to their own issue in #143803 -- I think I prefer if we do that, rather than using a mega issue for everything, at least for the library side.

@rustbot author

@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 13, 2025
@RalfJung
Copy link
Member

Cc @oli-obk

I concur with what @clarfonthey wrote

I think that at least some traits that are kind of fundamental and require extra compiler support (like Fn*) should be tracked here

But everything that's not such a fundamental trait should get its own tracking issue. Those can be large, e.g. we have const_ops for all the arithmetic ops traits.

@fee1-dead fee1-dead force-pushed the push-zvqrmzrprpzt branch from ff4ad24 to 77b6f1e Compare July 13, 2025 15:46
@fee1-dead
Copy link
Member Author

I moved const_default to its own tracking issue (#143894) but left Fn traits as is

@rust-log-analyzer

This comment has been minimized.

@fee1-dead fee1-dead force-pushed the push-zvqrmzrprpzt branch from 77b6f1e to 6b02597 Compare July 13, 2025 15:55
@compiler-errors
Copy link
Member

I think it's probably reasonable to give the Fn traits a tracking issue too, since users should be able to write const Fn() bounds and so we may want to stabilize those too eventually after we have stabilized const traits, but that can be done later.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 13, 2025

📌 Commit 6b02597 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 13, 2025
@clarfonthey
Copy link
Contributor

I think it's probably reasonable to give the Fn traits a tracking issue too, since users should be able to write const Fn() bounds and so we may want to stabilize those too eventually after we have stabilized const traits, but that can be done later.

My reasoning for saying that const Fn() traits should be part of the const traits tracking issue is that they're inherently tied to the const trait machinery: not only are const fns able to be used as const Fns, but the methods of const traits are themselves const Fns. Sure, this could be stabilised later, but I personally think it's an important aspect of const traits to consider, and it shouldn't get a separate tracking issue unless we get to the point where things are ready without it and want to consider stabilising without it.

@compiler-errors
Copy link
Member

compiler-errors commented Jul 13, 2025

Sure, this could be stabilised later, but I personally think it's an important aspect of const traits to consider, and it shouldn't get a separate tracking issue unless we get to the point where things are ready without it and want to consider stabilising without it.

Frankly, I don't understand this logic at all.

The operation of the const Fn* traits really has no more to do with const traits than any other built-in const trait, fundamentally. The way we perform what we call "overloaded Fn trait" call dispatch in HIR typeck is not particularly interesting IMO, and the fact that normal function call dispatch worked at all in const contexts before we constified Fn* should be enough to demonstrate that we don't need to (e.g.) expose const Fn trait bounds to users for them to use const traits or other const where clauses.

[...] but the methods of const traits are themselves const Fns.

I don't see anything special or fundamentally interesting here. The methods of const traits are just ZST fn items that behave analogously to methods in non-const contexts. They don't really work that specially; all they have is an additional Self: [const] Trait where clause, just like methods normally have an additional implicit Self: Trait where clause on them.


But again I have no idea what this has to do with feature gates. Splitting out the Fn* traits into a separate feature gate means that we wouldn't need to worry about users writing or utilizing const Fn* trait bounds when we stabilize const traits, which is the whole point of the feature gate.

(edit:)

That being said, I don't see any reason why we wouldn't want to stabilize a const_fn_trait feature gate at the same time as stabilizing const traits, since users can't really do much with them other than writing them in bounds, but that's the same reasoning I have about stabilizing const_ops or const_cmp. Their purpose here at least in my understanding is to make the feature gating more granular just for easier handling in the future, since having a mega feature gate is a bit unwieldy.

fmease added a commit to fmease/rust that referenced this pull request Jul 14, 2025
…t, r=compiler-errors

update issue number for `const_trait_impl`

r? project-const-traits

cc rust-lang#67792 rust-lang#143874
bors added a commit that referenced this pull request Jul 14, 2025
Rollup of 16 pull requests

Successful merges:

 - #142885 (core: Add `BorrowedCursor::with_unfilled_buf`)
 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143355 (wrapping shift: remove first bitmask and table)
 - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`)
 - #143592 (UWP: link ntdll functions using raw-dylib)
 - #143681 (bootstrap/miri: avoid rebuilds for test builds)
 - #143710 (Updates to random number generation APIs)
 - #143724 (Tidy cleanup)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
 - #143868 (warn on align on fields to avoid breaking changes)
 - #143875 (update issue number for `const_trait_impl`)
 - #143881 (Use zero for initialized Once state)
 - #143887 (Run bootstrap tests sooner in the `x test` pipeline)
 - #143893 (Don't require `eh_personality` lang item on targets that have a personality)

Failed merges:

 - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
 - #143891 (Port `#[coverage]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 14, 2025
…t, r=compiler-errors

update issue number for `const_trait_impl`

r? project-const-traits

cc rust-lang#67792 rust-lang#143874
bors added a commit that referenced this pull request Jul 14, 2025
Rollup of 17 pull requests

Successful merges:

 - #142885 (core: Add `BorrowedCursor::with_unfilled_buf`)
 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143355 (wrapping shift: remove first bitmask and table)
 - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`)
 - #143681 (bootstrap/miri: avoid rebuilds for test builds)
 - #143710 (Updates to random number generation APIs)
 - #143724 (Tidy cleanup)
 - #143738 (Move several float tests to floats/mod.rs)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
 - #143868 (warn on align on fields to avoid breaking changes)
 - #143875 (update issue number for `const_trait_impl`)
 - #143881 (Use zero for initialized Once state)
 - #143887 (Run bootstrap tests sooner in the `x test` pipeline)
 - #143893 (Don't require `eh_personality` lang item on targets that have a personality)
 - #143901 (Region constraint nits)

Failed merges:

 - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
 - #143891 (Port `#[coverage]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 14, 2025
Rollup of 10 pull requests

Successful merges:

 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143681 (bootstrap/miri: avoid rebuilds for test builds)
 - #143724 (Tidy cleanup)
 - #143733 (Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143875 (update issue number for `const_trait_impl`)
 - #143881 (Use zero for initialized Once state)
 - #143887 (Run bootstrap tests sooner in the `x test` pipeline)
 - #143917 (Change "allocated object" to "allocation".)
 - #143918 (Tier check cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a7ad680 into rust-lang:master Jul 14, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 14, 2025
rust-timer added a commit that referenced this pull request Jul 14, 2025
Rollup merge of #143875 - fee1-dead-contrib:push-zvqrmzrprpzt, r=compiler-errors

update issue number for `const_trait_impl`

r? project-const-traits

cc #67792 #143874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants