Skip to content

Commit a9adb67

Browse files
committed
Auto merge of rust-lang#126815 - matthiaskrgr:rollup-yulic2r, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - rust-lang#116113 ( Generalize `{Rc,Arc}::make_mut()` to unsized types.) - rust-lang#126722 (Add method to get `FnAbi` of function pointer) - rust-lang#126787 (Add direct accessors for memory addresses in `Machine` (for Miri)) - rust-lang#126798 ([fuchsia-test-runner] Remove usage of kw_only) - rust-lang#126809 (Remove stray `.` from error message) - rust-lang#126811 (Add a tidy rule to check that fluent messages and attrs don't end in `.`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents fcae626 + 05be7e0 commit a9adb67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+735
-132
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -5700,6 +5700,7 @@ name = "tidy"
57005700
version = "0.1.0"
57015701
dependencies = [
57025702
"cargo_metadata 0.15.4",
5703+
"fluent-syntax",
57035704
"ignore",
57045705
"miropt-test-tools",
57055706
"regex",

compiler/rustc_ast_lowering/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ast_lowering_inline_asm_unsupported_target =
7878
ast_lowering_invalid_abi =
7979
invalid ABI: found `{$abi}`
8080
.label = invalid ABI
81-
.note = invoke `{$command}` for a full list of supported calling conventions.
81+
.note = invoke `{$command}` for a full list of supported calling conventions
8282
8383
ast_lowering_invalid_abi_clobber_abi =
8484
invalid ABI for `clobber_abi`

compiler/rustc_const_eval/messages.ftl

+1-2
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,7 @@ const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in
341341
const_eval_unallowed_heap_allocations =
342342
allocations are not allowed in {const_eval_const_context}s
343343
.label = allocation not allowed in {const_eval_const_context}s
344-
.teach_note =
345-
The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
344+
.teach_note = The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time.
346345
347346
const_eval_unallowed_inline_asm =
348347
inline assembly is not allowed in {const_eval_const_context}s

compiler/rustc_const_eval/src/interpret/memory.rs

+17
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
630630
}
631631
}
632632

633+
/// Gives raw, immutable access to the `Allocation` address, without bounds or alignment checks.
634+
/// The caller is responsible for calling the access hooks!
635+
pub fn get_alloc_bytes_unchecked_raw(&self, id: AllocId) -> InterpResult<'tcx, *const u8> {
636+
let alloc = self.get_alloc_raw(id)?;
637+
Ok(alloc.get_bytes_unchecked_raw())
638+
}
639+
633640
/// Bounds-checked *but not align-checked* allocation access.
634641
pub fn get_ptr_alloc<'a>(
635642
&'a self,
@@ -713,6 +720,16 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
713720
Ok((alloc, &mut self.machine))
714721
}
715722

723+
/// Gives raw, mutable access to the `Allocation` address, without bounds or alignment checks.
724+
/// The caller is responsible for calling the access hooks!
725+
pub fn get_alloc_bytes_unchecked_raw_mut(
726+
&mut self,
727+
id: AllocId,
728+
) -> InterpResult<'tcx, *mut u8> {
729+
let alloc = self.get_alloc_raw_mut(id)?.0;
730+
Ok(alloc.get_bytes_unchecked_raw_mut())
731+
}
732+
716733
/// Bounds-checked *but not align-checked* allocation access.
717734
pub fn get_ptr_alloc_mut<'a>(
718735
&'a mut self,

compiler/rustc_hir_analysis/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ hir_analysis_inherent_ty_outside = cannot define inherent `impl` for a type outs
194194
.span_help = alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
195195
196196
hir_analysis_inherent_ty_outside_new = cannot define inherent `impl` for a type outside of the crate where the type is defined
197-
.label = impl for type defined outside of crate.
197+
.label = impl for type defined outside of crate
198198
.note = define and implement a trait or new type instead
199199
200200
hir_analysis_inherent_ty_outside_primitive = cannot define inherent `impl` for primitive types outside of `core`
@@ -544,7 +544,7 @@ hir_analysis_unrecognized_intrinsic_function =
544544
545545
hir_analysis_unused_associated_type_bounds =
546546
unnecessary associated type bound for not object safe associated type
547-
.note = this associated type has a `where Self: Sized` bound. Thus, while the associated type can be specified, it cannot be used in any way, because trait objects are not `Sized`.
547+
.note = this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
548548
.suggestion = remove this bound
549549
550550
hir_analysis_unused_generic_parameter =

compiler/rustc_lint/messages.ftl

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ lint_builtin_deprecated_attr_default_suggestion = remove this attribute
7575
lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$reason}. See {$link}
7676
.msg_suggestion = {$msg}
7777
.default_suggestion = remove this attribute
78-
lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used.
78+
lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used
7979
lint_builtin_deref_nullptr = dereferencing a null pointer
8080
.label = this code causes undefined behavior when executed
8181
@@ -213,7 +213,7 @@ lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better pe
213213
lint_default_source = `forbid` lint level is the default for {$id}
214214
215215
lint_deprecated_lint_name =
216-
lint name `{$name}` is deprecated and may not have an effect in the future.
216+
lint name `{$name}` is deprecated and may not have an effect in the future
217217
.suggestion = change it to
218218
.help = change it to {$replace}
219219
@@ -244,11 +244,11 @@ lint_duplicate_matcher_binding = duplicate matcher binding
244244
245245
lint_enum_intrinsics_mem_discriminant =
246246
the return value of `mem::discriminant` is unspecified when called with a non-enum type
247-
.note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum.
247+
.note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum
248248
249249
lint_enum_intrinsics_mem_variant =
250250
the return value of `mem::variant_count` is unspecified when called with a non-enum type
251-
.note = the type parameter of `variant_count` should be an enum, but it was instantiated with the type `{$ty_param}`, which is not an enum.
251+
.note = the type parameter of `variant_count` should be an enum, but it was instantiated with the type `{$ty_param}`, which is not an enum
252252
253253
lint_expectation = this lint expectation is unfulfilled
254254
.note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message

compiler/rustc_metadata/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ metadata_rustc_lib_required =
248248
.help = try adding `extern crate rustc_driver;` at the top level of this crate
249249
250250
metadata_stable_crate_id_collision =
251-
found crates (`{$crate_name0}` and `{$crate_name1}`) with colliding StableCrateId values.
251+
found crates (`{$crate_name0}` and `{$crate_name1}`) with colliding StableCrateId values
252252
253253
metadata_std_required =
254254
`std` is required by `{$current_crate}` because it does not declare `#![no_std]`
255255
256256
metadata_symbol_conflicts_current =
257-
the current crate is indistinguishable from one of its dependencies: it has the same crate-name `{$crate_name}` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two.
257+
the current crate is indistinguishable from one of its dependencies: it has the same crate-name `{$crate_name}` and was compiled with the same `-C metadata` arguments, so this will result in symbol conflicts between the two
258258
259259
metadata_target_no_std_support =
260260
the `{$locator_triple}` target may not support the standard library

compiler/rustc_middle/src/mir/interpret/allocation.rs

+23-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,16 @@ pub trait AllocBytes: Clone + fmt::Debug + Deref<Target = [u8]> + DerefMut<Targe
4040
/// Gives direct access to the raw underlying storage.
4141
///
4242
/// Crucially this pointer is compatible with:
43-
/// - other pointers retunred by this method, and
43+
/// - other pointers returned by this method, and
4444
/// - references returned from `deref()`, as long as there was no write.
4545
fn as_mut_ptr(&mut self) -> *mut u8;
46+
47+
/// Gives direct access to the raw underlying storage.
48+
///
49+
/// Crucially this pointer is compatible with:
50+
/// - other pointers returned by this method, and
51+
/// - references returned from `deref()`, as long as there was no write.
52+
fn as_ptr(&self) -> *const u8;
4653
}
4754

4855
/// Default `bytes` for `Allocation` is a `Box<u8>`.
@@ -62,6 +69,11 @@ impl AllocBytes for Box<[u8]> {
6269
// Carefully avoiding any intermediate references.
6370
ptr::addr_of_mut!(**self).cast()
6471
}
72+
73+
fn as_ptr(&self) -> *const u8 {
74+
// Carefully avoiding any intermediate references.
75+
ptr::addr_of!(**self).cast()
76+
}
6577
}
6678

6779
/// This type represents an Allocation in the Miri/CTFE core engine.
@@ -490,19 +502,27 @@ impl<Prov: Provenance, Extra, Bytes: AllocBytes> Allocation<Prov, Extra, Bytes>
490502
self.provenance.clear(range, cx)?;
491503

492504
assert!(range.end().bytes_usize() <= self.bytes.len()); // need to do our own bounds-check
493-
// Cruciall, we go via `AllocBytes::as_mut_ptr`, not `AllocBytes::deref_mut`.
505+
// Crucially, we go via `AllocBytes::as_mut_ptr`, not `AllocBytes::deref_mut`.
494506
let begin_ptr = self.bytes.as_mut_ptr().wrapping_add(range.start.bytes_usize());
495507
let len = range.end().bytes_usize() - range.start.bytes_usize();
496508
Ok(ptr::slice_from_raw_parts_mut(begin_ptr, len))
497509
}
498510

499511
/// This gives direct mutable access to the entire buffer, just exposing their internal state
500-
/// without reseting anything. Directly exposes `AllocBytes::as_mut_ptr`. Only works if
512+
/// without resetting anything. Directly exposes `AllocBytes::as_mut_ptr`. Only works if
501513
/// `OFFSET_IS_ADDR` is true.
502514
pub fn get_bytes_unchecked_raw_mut(&mut self) -> *mut u8 {
503515
assert!(Prov::OFFSET_IS_ADDR);
504516
self.bytes.as_mut_ptr()
505517
}
518+
519+
/// This gives direct immutable access to the entire buffer, just exposing their internal state
520+
/// without resetting anything. Directly exposes `AllocBytes::as_ptr`. Only works if
521+
/// `OFFSET_IS_ADDR` is true.
522+
pub fn get_bytes_unchecked_raw(&self) -> *const u8 {
523+
assert!(Prov::OFFSET_IS_ADDR);
524+
self.bytes.as_ptr()
525+
}
506526
}
507527

508528
/// Reading and writing.

compiler/rustc_mir_build/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ mir_build_deref_raw_pointer_requires_unsafe_unsafe_op_in_unsafe_fn_allowed =
103103
.note = raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
104104
.label = dereference of raw pointer
105105
106-
mir_build_exceeds_mcdc_condition_limit = Number of conditions in decision ({$num_conditions}) exceeds limit ({$max_conditions}). MC/DC analysis will not count this expression.
106+
mir_build_exceeds_mcdc_condition_limit = number of conditions in decision ({$num_conditions}) exceeds limit ({$max_conditions}), so MC/DC analysis will not count this expression
107107
108108
mir_build_extern_static_requires_unsafe =
109109
use of extern static is unsafe and requires unsafe block

compiler/rustc_passes/messages.ftl

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ passes_abi_of =
1414
fn_abi_of({$fn_name}) = {$fn_abi}
1515
1616
passes_allow_incoherent_impl =
17-
`rustc_allow_incoherent_impl` attribute should be applied to impl items.
17+
`rustc_allow_incoherent_impl` attribute should be applied to impl items
1818
.label = the only currently supported targets are inherent methods
1919
2020
passes_allow_internal_unstable =
@@ -253,8 +253,8 @@ passes_doc_test_unknown_spotlight =
253253
.no_op_note = `doc(spotlight)` is now a no-op
254254
255255
passes_duplicate_diagnostic_item_in_crate =
256-
duplicate diagnostic item in crate `{$crate_name}`: `{$name}`.
257-
.note = the diagnostic item is first defined in crate `{$orig_crate_name}`.
256+
duplicate diagnostic item in crate `{$crate_name}`: `{$name}`
257+
.note = the diagnostic item is first defined in crate `{$orig_crate_name}`
258258
259259
passes_duplicate_feature_err =
260260
the feature `{$feature}` has already been declared
@@ -263,27 +263,27 @@ passes_duplicate_lang_item =
263263
found duplicate lang item `{$lang_item_name}`
264264
.first_defined_span = the lang item is first defined here
265265
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
266-
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`.
266+
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
267267
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
268268
.second_definition_local = second definition in the local crate (`{$crate_name}`)
269269
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
270270
.second_definition_path = second definition in `{$crate_name}` loaded from {$path}
271271
272272
passes_duplicate_lang_item_crate =
273-
duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`.
273+
duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`
274274
.first_defined_span = the lang item is first defined here
275275
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
276-
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`.
276+
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
277277
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
278278
.second_definition_local = second definition in the local crate (`{$crate_name}`)
279279
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
280280
.second_definition_path = second definition in `{$crate_name}` loaded from {$path}
281281
282282
passes_duplicate_lang_item_crate_depends =
283-
duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`.
283+
duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`
284284
.first_defined_span = the lang item is first defined here
285285
.first_defined_crate_depends = the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)
286-
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`.
286+
.first_defined_crate = the lang item is first defined in crate `{$orig_crate_name}`
287287
.first_definition_local = first definition in the local crate (`{$orig_crate_name}`)
288288
.second_definition_local = second definition in the local crate (`{$crate_name}`)
289289
.first_definition_path = first definition in `{$orig_crate_name}` loaded from {$orig_path}
@@ -315,7 +315,7 @@ passes_ffi_pure_invalid_target =
315315
`#[ffi_pure]` may only be used on foreign functions
316316
317317
passes_has_incoherent_inherent_impl =
318-
`rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits.
318+
`rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits
319319
.label = only adts, extern types and traits are supported
320320
321321
passes_ignored_attr =

compiler/rustc_resolve/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ resolve_label_with_similar_name_reachable =
240240
241241
resolve_lending_iterator_report_error =
242242
associated type `Iterator::Item` is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
243-
.note = you can't create an `Iterator` that borrows each `Item` from itself, but you can instead create a new type that borrows your existing type and implement `Iterator` for that new type.
243+
.note = you can't create an `Iterator` that borrows each `Item` from itself, but you can instead create a new type that borrows your existing type and implement `Iterator` for that new type
244244
245245
resolve_lifetime_param_in_enum_discriminant =
246246
lifetime parameters may not be used in enum discriminant values

compiler/rustc_session/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ session_octal_float_literal_not_supported = octal float literal is not supported
8282
8383
session_optimization_fuel_exhausted = optimization-fuel-exhausted: {$msg}
8484
85-
session_profile_sample_use_file_does_not_exist = file `{$path}` passed to `-C profile-sample-use` does not exist.
85+
session_profile_sample_use_file_does_not_exist = file `{$path}` passed to `-C profile-sample-use` does not exist
8686
87-
session_profile_use_file_does_not_exist = file `{$path}` passed to `-C profile-use` does not exist.
87+
session_profile_use_file_does_not_exist = file `{$path}` passed to `-C profile-use` does not exist
8888
8989
session_sanitizer_cfi_canonical_jump_tables_requires_cfi = `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`
9090

compiler/rustc_smir/src/rustc_smir/context.rs

+7
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,13 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
533533
Ok(tables.fn_abi_of_instance(instance, List::empty())?.stable(&mut *tables))
534534
}
535535

536+
fn fn_ptr_abi(&self, fn_ptr: PolyFnSig) -> Result<FnAbi, Error> {
537+
let mut tables = self.0.borrow_mut();
538+
let tcx = tables.tcx;
539+
let sig = fn_ptr.internal(&mut *tables, tcx);
540+
Ok(tables.fn_abi_of_fn_ptr(sig, List::empty())?.stable(&mut *tables))
541+
}
542+
536543
fn instance_def_id(&self, def: InstanceDef) -> stable_mir::DefId {
537544
let mut tables = self.0.borrow_mut();
538545
let def_id = tables.instances[def].def_id();

compiler/stable_mir/src/compiler_interface.rs

+3
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ pub trait Context {
215215
/// Get an instance ABI.
216216
fn instance_abi(&self, def: InstanceDef) -> Result<FnAbi, Error>;
217217

218+
/// Get the ABI of a function pointer.
219+
fn fn_ptr_abi(&self, fn_ptr: PolyFnSig) -> Result<FnAbi, Error>;
220+
218221
/// Get the layout of a type.
219222
fn ty_layout(&self, ty: Ty) -> Result<Layout, Error>;
220223

compiler/stable_mir/src/ty.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::{
22
mir::{Body, Mutability, Safety},
33
with, DefId, Error, Symbol,
44
};
5-
use crate::abi::Layout;
5+
use crate::abi::{FnAbi, Layout};
66
use crate::crate_def::{CrateDef, CrateDefType};
77
use crate::mir::alloc::{read_target_int, read_target_uint, AllocId};
88
use crate::mir::mono::StaticDef;
@@ -996,6 +996,16 @@ pub struct AliasTerm {
996996

997997
pub type PolyFnSig = Binder<FnSig>;
998998

999+
impl PolyFnSig {
1000+
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
1001+
///
1002+
/// NB: this doesn't handle virtual calls - those should use `Instance::fn_abi`
1003+
/// instead, where the instance is an `InstanceKind::Virtual`.
1004+
pub fn fn_ptr_abi(self) -> Result<FnAbi, Error> {
1005+
with(|cx| cx.fn_ptr_abi(self))
1006+
}
1007+
}
1008+
9991009
#[derive(Clone, Debug, Eq, PartialEq)]
10001010
pub struct FnSig {
10011011
pub inputs_and_output: Vec<Ty>,

library/alloc/src/alloc.rs

-26
Original file line numberDiff line numberDiff line change
@@ -424,29 +424,3 @@ pub mod __alloc_error_handler {
424424
}
425425
}
426426
}
427-
428-
#[cfg(not(no_global_oom_handling))]
429-
/// Specialize clones into pre-allocated, uninitialized memory.
430-
/// Used by `Box::clone` and `Rc`/`Arc::make_mut`.
431-
pub(crate) trait WriteCloneIntoRaw: Sized {
432-
unsafe fn write_clone_into_raw(&self, target: *mut Self);
433-
}
434-
435-
#[cfg(not(no_global_oom_handling))]
436-
impl<T: Clone> WriteCloneIntoRaw for T {
437-
#[inline]
438-
default unsafe fn write_clone_into_raw(&self, target: *mut Self) {
439-
// Having allocated *first* may allow the optimizer to create
440-
// the cloned value in-place, skipping the local and move.
441-
unsafe { target.write(self.clone()) };
442-
}
443-
}
444-
445-
#[cfg(not(no_global_oom_handling))]
446-
impl<T: Copy> WriteCloneIntoRaw for T {
447-
#[inline]
448-
unsafe fn write_clone_into_raw(&self, target: *mut Self) {
449-
// We can always copy in-place, without ever involving a local value.
450-
unsafe { target.copy_from_nonoverlapping(self, 1) };
451-
}
452-
}

library/alloc/src/boxed.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@
188188
use core::any::Any;
189189
use core::async_iter::AsyncIterator;
190190
use core::borrow;
191+
#[cfg(not(no_global_oom_handling))]
192+
use core::clone::CloneToUninit;
191193
use core::cmp::Ordering;
192194
use core::error::Error;
193195
use core::fmt;
@@ -207,7 +209,7 @@ use core::slice;
207209
use core::task::{Context, Poll};
208210

209211
#[cfg(not(no_global_oom_handling))]
210-
use crate::alloc::{handle_alloc_error, WriteCloneIntoRaw};
212+
use crate::alloc::handle_alloc_error;
211213
use crate::alloc::{AllocError, Allocator, Global, Layout};
212214
#[cfg(not(no_global_oom_handling))]
213215
use crate::borrow::Cow;
@@ -1346,7 +1348,7 @@ impl<T: Clone, A: Allocator + Clone> Clone for Box<T, A> {
13461348
// Pre-allocate memory to allow writing the cloned value directly.
13471349
let mut boxed = Self::new_uninit_in(self.1.clone());
13481350
unsafe {
1349-
(**self).write_clone_into_raw(boxed.as_mut_ptr());
1351+
(**self).clone_to_uninit(boxed.as_mut_ptr());
13501352
boxed.assume_init()
13511353
}
13521354
}

library/alloc/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
#![feature(assert_matches)]
104104
#![feature(async_fn_traits)]
105105
#![feature(async_iterator)]
106+
#![feature(clone_to_uninit)]
106107
#![feature(coerce_unsized)]
107108
#![feature(const_align_of_val)]
108109
#![feature(const_box)]

0 commit comments

Comments
 (0)