Skip to content

Make Clone a const_trait #142756

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
Jun 21, 2025
Merged

Conversation

Daniel-Aaron-Bloom
Copy link
Contributor

@Daniel-Aaron-Bloom Daniel-Aaron-Bloom commented Jun 19, 2025

See tracking issue for justification.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jun 19, 2025
@Daniel-Aaron-Bloom Daniel-Aaron-Bloom marked this pull request as ready for review June 19, 2025 23:30
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

r? @tgross35

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2025
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor

Cc @rust-lang/wg-const-eval

@fmease
Copy link
Member

fmease commented Jun 19, 2025

cc @rust-lang/project-const-traits

@@ -157,6 +157,8 @@ mod uninit;
#[lang = "clone"]
#[rustc_diagnostic_item = "Clone"]
#[rustc_trivial_field_reads]
#[rustc_const_unstable(feature = "const_clone", issue = "142757")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think we need per trait gates? Seems like it could cause ppl to add lots of feature gates. And we can stabilize individual const traits without stabilizing the full set either way. Library feature gates are funny this way

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah looks like this is how we did it before, too. Let's keep doing that

@oli-obk
Copy link
Contributor

oli-obk commented Jun 20, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 20, 2025

📌 Commit 9185143 has been approved by oli-obk

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 Jun 20, 2025
bors added a commit that referenced this pull request Jun 21, 2025
Rollup of 8 pull requests

Successful merges:

 - #142384 (Bringing `rustc_rayon_core` in tree as `rustc_thread_pool`)
 - #142476 (Insert parentheses around binary operation with attribute)
 - #142485 (Marks ADT live if it appears in pattern)
 - #142571 (Reason about borrowed classes in CopyProp.)
 - #142677 (Add CI check to ensure that rustdoc JSON `FORMAT_VERSION` is correctly updated)
 - #142716 (Adjust `with_generic_param_rib`.)
 - #142756 (Make `Clone` a `const_trait`)
 - #142765 (rustc_target: document public AbiMap-related fn and variants)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c386ffb into rust-lang:master Jun 21, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 21, 2025
rust-timer added a commit that referenced this pull request Jun 21, 2025
Rollup merge of #142756 - Daniel-Aaron-Bloom:const-clone, r=oli-obk

Make `Clone` a `const_trait`

See [tracking issue](#142757) for justification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants