Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
35c5144
Move rayon-core to rustc_thread_pool files as is
celinval Jun 11, 2025
0b9b1df
Fix format and tidy for code moved from rayon
celinval Jun 11, 2025
4aa62ea
Use `rustc_thread_pool` instead of `rustc-rayon-core`
celinval Jun 11, 2025
f52c6ee
Another round of tidy / warning fixes
celinval Jun 11, 2025
52167e0
Marks ADT live if it appears in pattern
mu001999 Jun 14, 2025
71afc6f
Add test.
cjgillot Jun 16, 2025
c4b67c6
Reason about borrowed classes in CopyProp.
cjgillot Jun 16, 2025
6da3bf8
Apply suggestions from code review
celinval Jun 16, 2025
41ca0cb
Adjust `with_generic_param_rib`.
nnethercote Jun 19, 2025
1ed0cbf
Preserve Paren expression's attributes during Unparenthesize
dtolnay Jun 13, 2025
9185143
Make `Clone` a `const_trait`
Daniel-Aaron-Bloom Jun 19, 2025
867d001
rustc_target: document public AbiMap-related fn and variants
workingjubilee Jun 17, 2025
2180503
Add CI check to ensure that rustdoc JSON `FORMAT_VERSION` is correctl…
GuillaumeGomez Jun 18, 2025
bbe8a2a
Generate base commit in rustdoc_json tidy checks
GuillaumeGomez Jun 19, 2025
6367694
Pass `src_path` to rustdoc_json tidy check
GuillaumeGomez Jun 20, 2025
0fc9507
Improve error message for rustdoc_json_types tidy check
GuillaumeGomez Jun 20, 2025
cbef8f6
Add AST pretty-printer tests involving attr on binary operation
dtolnay Jun 13, 2025
12a855d
Insert parentheses around binary operation with attribute
dtolnay Jun 13, 2025
535e11f
Add an attribute-related parenthesization edge case
dtolnay Jun 13, 2025
7b35511
Rollup merge of #142384 - celinval:chores-rayon-mv, r=oli-obk
tgross35 Jun 21, 2025
8751016
Rollup merge of #142476 - dtolnay:attrbinop, r=fmease
tgross35 Jun 21, 2025
c93fac7
Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=p…
tgross35 Jun 21, 2025
4455d1e
Rollup merge of #142571 - cjgillot:borrowed-classes, r=oli-obk
tgross35 Jun 21, 2025
cd85b9d
Rollup merge of #142677 - GuillaumeGomez:check-format-version-update,…
tgross35 Jun 21, 2025
44d50f9
Rollup merge of #142716 - nnethercote:adjust-with_generic_param_rib, …
tgross35 Jun 21, 2025
c386ffb
Rollup merge of #142756 - Daniel-Aaron-Bloom:const-clone, r=oli-obk
tgross35 Jun 21, 2025
432c7d0
Rollup merge of #142765 - workingjubilee:more-abimap-docs, r=compiler…
tgross35 Jun 21, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions library/core/src/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#![stable(feature = "rust1", since = "1.0.0")]

use crate::marker::PointeeSized;
use crate::marker::{Destruct, PointeeSized};

mod uninit;

Expand Down Expand Up @@ -157,6 +157,8 @@ mod uninit;
#[lang = "clone"]
#[rustc_diagnostic_item = "Clone"]
#[rustc_trivial_field_reads]
#[rustc_const_unstable(feature = "const_clone", issue = "142757")]
#[const_trait]
pub trait Clone: Sized {
/// Returns a duplicate of the value.
///
Expand Down Expand Up @@ -208,7 +210,10 @@ pub trait Clone: Sized {
/// allocations.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn clone_from(&mut self, source: &Self) {
fn clone_from(&mut self, source: &Self)
where
Self: ~const Destruct,
{
*self = source.clone()
}
}
Expand Down
1 change: 1 addition & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
#![feature(cfg_select)]
#![feature(cfg_target_has_reliable_f16_f128)]
#![feature(const_carrying_mul_add)]
#![feature(const_destruct)]
#![feature(const_eval_select)]
#![feature(core_intrinsics)]
#![feature(coverage_attribute)]
Expand Down