mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
Auto merge of #126220 - ferrocene:pa-beta-1.80.0, r=pietroalbini
[beta] Prepare Rust 1.80.0 r? `@ghost`
This commit is contained in:
commit
75ac3b6331
128
RELEASES.md
128
RELEASES.md
@ -1,3 +1,131 @@
|
|||||||
|
Version 1.79.0 (2024-06-13)
|
||||||
|
==========================
|
||||||
|
|
||||||
|
<a id="1.79.0-Language"></a>
|
||||||
|
|
||||||
|
Language
|
||||||
|
--------
|
||||||
|
- [Stabilize inline `const {}` expressions.](https://github.com/rust-lang/rust/pull/104087/)
|
||||||
|
- [Prevent opaque types being instantiated twice with different regions within the same function.](https://github.com/rust-lang/rust/pull/116935/)
|
||||||
|
- [Stabilize WebAssembly target features that are in phase 4 and 5.](https://github.com/rust-lang/rust/pull/117457/)
|
||||||
|
- [Add the `redundant_lifetimes` lint to detect lifetimes which are semantically redundant.](https://github.com/rust-lang/rust/pull/118391/)
|
||||||
|
- [Stabilize the `unnameable_types` lint for public types that can't be named.](https://github.com/rust-lang/rust/pull/120144/)
|
||||||
|
- [Enable debuginfo in macros, and stabilize `-C collapse-macro-debuginfo` and `#[collapse_debuginfo]`.](https://github.com/rust-lang/rust/pull/120845/)
|
||||||
|
- [Propagate temporary lifetime extension into `if` and `match` expressions.](https://github.com/rust-lang/rust/pull/121346/)
|
||||||
|
- [Restrict promotion of `const fn` calls.](https://github.com/rust-lang/rust/pull/121557/)
|
||||||
|
- [Warn against refining impls of crate-private traits with `refining_impl_trait` lint.](https://github.com/rust-lang/rust/pull/121720/)
|
||||||
|
- [Stabilize associated type bounds (RFC 2289).](https://github.com/rust-lang/rust/pull/122055/)
|
||||||
|
- [Stabilize importing `main` from other modules or crates.](https://github.com/rust-lang/rust/pull/122060/)
|
||||||
|
- [Check return types of function types for well-formedness](https://github.com/rust-lang/rust/pull/115538)
|
||||||
|
- [Rework `impl Trait` lifetime inference](https://github.com/rust-lang/rust/pull/116891/)
|
||||||
|
- [Change inductive trait solver cycles to be ambiguous](https://github.com/rust-lang/rust/pull/122791)
|
||||||
|
|
||||||
|
<a id="1.79.0-Compiler"></a>
|
||||||
|
|
||||||
|
Compiler
|
||||||
|
--------
|
||||||
|
- [Define `-C strip` to only affect binaries, not artifacts like `.pdb`.](https://github.com/rust-lang/rust/pull/115120/)
|
||||||
|
- [Stabilize `-Crelro-level` for controlling runtime link hardening.](https://github.com/rust-lang/rust/pull/121694/)
|
||||||
|
- [Stabilize checking of `cfg` names and values at compile-time with `--check-cfg`.](https://github.com/rust-lang/rust/pull/123501/)
|
||||||
|
*Note that this only stabilizes the compiler part, the Cargo part is still unstable in this release.*
|
||||||
|
- [Add `aarch64-apple-visionos` and `aarch64-apple-visionos-sim` tier 3 targets.](https://github.com/rust-lang/rust/pull/121419/)
|
||||||
|
- [Add `riscv32ima-unknown-none-elf` tier 3 target.](https://github.com/rust-lang/rust/pull/122696/)
|
||||||
|
- [Promote several Windows targets to tier 2](https://github.com/rust-lang/rust/pull/121712): `aarch64-pc-windows-gnullvm`, `i686-pc-windows-gnullvm`, and `x86_64-pc-windows-gnullvm`.
|
||||||
|
|
||||||
|
Refer to Rust's [platform support page][platform-support-doc]
|
||||||
|
for more information on Rust's tiered platform support.
|
||||||
|
|
||||||
|
<a id="1.79.0-Libraries"></a>
|
||||||
|
|
||||||
|
Libraries
|
||||||
|
---------
|
||||||
|
|
||||||
|
- [Implement `FromIterator` for `(impl Default + Extend, impl Default + Extend)`.](https://github.com/rust-lang/rust/pull/107462/)
|
||||||
|
- [Implement `{Div,Rem}Assign<NonZero<X>>` on `X`.](https://github.com/rust-lang/rust/pull/121952/)
|
||||||
|
- [Document overrides of `clone_from()` in core/std.](https://github.com/rust-lang/rust/pull/122201/)
|
||||||
|
- [Link MSVC default lib in core.](https://github.com/rust-lang/rust/pull/122268/)
|
||||||
|
- [Caution against using `transmute` between pointers and integers.](https://github.com/rust-lang/rust/pull/122379/)
|
||||||
|
- [Enable frame pointers for the standard library.](https://github.com/rust-lang/rust/pull/122646/)
|
||||||
|
|
||||||
|
<a id="1.79.0-Stabilized-APIs"></a>
|
||||||
|
|
||||||
|
Stabilized APIs
|
||||||
|
---------------
|
||||||
|
|
||||||
|
- [`{integer}::unchecked_add`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_add)
|
||||||
|
- [`{integer}::unchecked_mul`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_mul)
|
||||||
|
- [`{integer}::unchecked_sub`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.unchecked_sub)
|
||||||
|
- [`<[T]>::split_at_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_unchecked)
|
||||||
|
- [`<[T]>::split_at_mut_unchecked`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.split_at_mut_unchecked)
|
||||||
|
- [`<[u8]>::utf8_chunks`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.utf8_chunks)
|
||||||
|
- [`str::Utf8Chunks`](https://doc.rust-lang.org/stable/core/str/struct.Utf8Chunks.html)
|
||||||
|
- [`str::Utf8Chunk`](https://doc.rust-lang.org/stable/core/str/struct.Utf8Chunk.html)
|
||||||
|
- [`<*const T>::is_aligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_aligned)
|
||||||
|
- [`<*mut T>::is_aligned`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_aligned-1)
|
||||||
|
- [`NonNull::is_aligned`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.is_aligned)
|
||||||
|
- [`<*const [T]>::len`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.len)
|
||||||
|
- [`<*mut [T]>::len`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.len-1)
|
||||||
|
- [`<*const [T]>::is_empty`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_empty)
|
||||||
|
- [`<*mut [T]>::is_empty`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_empty-1)
|
||||||
|
- [`NonNull::<[T]>::is_empty`](https://doc.rust-lang.org/stable/core/ptr/struct.NonNull.html#method.is_empty)
|
||||||
|
- [`CStr::count_bytes`](https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.count_bytes)
|
||||||
|
- [`io::Error::downcast`](https://doc.rust-lang.org/stable/std/io/struct.Error.html#method.downcast)
|
||||||
|
- [`num::NonZero<T>`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html)
|
||||||
|
- [`path::absolute`](https://doc.rust-lang.org/stable/std/path/fn.absolute.html)
|
||||||
|
- [`proc_macro::Literal::byte_character`](https://doc.rust-lang.org/stable/proc_macro/struct.Literal.html#method.byte_character)
|
||||||
|
- [`proc_macro::Literal::c_string`](https://doc.rust-lang.org/stable/proc_macro/struct.Literal.html#method.c_string)
|
||||||
|
|
||||||
|
These APIs are now stable in const contexts:
|
||||||
|
|
||||||
|
- [`Atomic*::into_inner`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.into_inner)
|
||||||
|
- [`io::Cursor::new`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.new)
|
||||||
|
- [`io::Cursor::get_ref`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.get_ref)
|
||||||
|
- [`io::Cursor::position`](https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#method.position)
|
||||||
|
- [`io::empty`](https://doc.rust-lang.org/stable/std/io/fn.empty.html)
|
||||||
|
- [`io::repeat`](https://doc.rust-lang.org/stable/std/io/fn.repeat.html)
|
||||||
|
- [`io::sink`](https://doc.rust-lang.org/stable/std/io/fn.sink.html)
|
||||||
|
- [`panic::Location::caller`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.caller)
|
||||||
|
- [`panic::Location::file`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.file)
|
||||||
|
- [`panic::Location::line`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.line)
|
||||||
|
- [`panic::Location::column`](https://doc.rust-lang.org/stable/std/panic/struct.Location.html#method.column)
|
||||||
|
|
||||||
|
<a id="1.79.0-Cargo"></a>
|
||||||
|
|
||||||
|
Cargo
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [Prevent dashes in `lib.name`, always normalizing to `_`.](https://github.com/rust-lang/cargo/pull/12783/)
|
||||||
|
- [Stabilize MSRV-aware version requirement selection in `cargo add`.](https://github.com/rust-lang/cargo/pull/13608/)
|
||||||
|
- [Switch to using `gitoxide` by default for listing files.](https://github.com/rust-lang/cargo/pull/13696/)
|
||||||
|
- [Error on `[project]` in Edition 2024; `cargo fix --edition` will change it to `[package]`.](https://github.com/rust-lang/cargo/pull/13747/)
|
||||||
|
|
||||||
|
<a id="1.79.0-Rustdoc"></a>
|
||||||
|
|
||||||
|
Rustdoc
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [Always display stability version even if it's the same as the containing item.](https://github.com/rust-lang/rust/pull/118441/)
|
||||||
|
- [Show a single search result for items with multiple paths.](https://github.com/rust-lang/rust/pull/119912/)
|
||||||
|
- [Support typing `/` in docs to begin a search.](https://github.com/rust-lang/rust/pull/123355/)
|
||||||
|
|
||||||
|
<a id="1.79.0-Misc"></a>
|
||||||
|
|
||||||
|
Misc
|
||||||
|
----
|
||||||
|
|
||||||
|
<a id="1.79.0-Compatibility-Notes"></a>
|
||||||
|
|
||||||
|
Compatibility Notes
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- [Update the minimum external LLVM to 17.](https://github.com/rust-lang/rust/pull/122649/)
|
||||||
|
- [`RustcEncodable` and `RustcDecodable` are soft-destabilized, to be removed
|
||||||
|
from the prelude in next edition.](https://github.com/rust-lang/rust/pull/116016/)
|
||||||
|
- [The `wasm_c_abi` future-incompatibility lint will warn about use of the
|
||||||
|
non-spec-compliant C ABI.](https://github.com/rust-lang/rust/pull/117918/)
|
||||||
|
Use `wasm-bindgen v0.2.88` to generate forward-compatible bindings.
|
||||||
|
- [Check return types of function types for well-formedness](https://github.com/rust-lang/rust/pull/115538)
|
||||||
|
|
||||||
Version 1.78.0 (2024-05-02)
|
Version 1.78.0 (2024-05-02)
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ declare_features! (
|
|||||||
/// Allows `crate` in paths.
|
/// Allows `crate` in paths.
|
||||||
(accepted, crate_in_paths, "1.30.0", Some(45477)),
|
(accepted, crate_in_paths, "1.30.0", Some(45477)),
|
||||||
/// Allows users to provide classes for fenced code block using `class:classname`.
|
/// Allows users to provide classes for fenced code block using `class:classname`.
|
||||||
(accepted, custom_code_classes_in_docs, "CURRENT_RUSTC_VERSION", Some(79483)),
|
(accepted, custom_code_classes_in_docs, "1.80.0", Some(79483)),
|
||||||
/// Allows using `#[debugger_visualizer]` attribute.
|
/// Allows using `#[debugger_visualizer]` attribute.
|
||||||
(accepted, debugger_visualizer, "1.71.0", Some(95939)),
|
(accepted, debugger_visualizer, "1.71.0", Some(95939)),
|
||||||
/// Allows rustc to inject a default alloc_error_handler
|
/// Allows rustc to inject a default alloc_error_handler
|
||||||
@ -165,7 +165,7 @@ declare_features! (
|
|||||||
/// Allows using `dyn Trait` as a syntax for trait objects.
|
/// Allows using `dyn Trait` as a syntax for trait objects.
|
||||||
(accepted, dyn_trait, "1.27.0", Some(44662)),
|
(accepted, dyn_trait, "1.27.0", Some(44662)),
|
||||||
/// Allows `X..Y` patterns.
|
/// Allows `X..Y` patterns.
|
||||||
(accepted, exclusive_range_pattern, "CURRENT_RUSTC_VERSION", Some(37854)),
|
(accepted, exclusive_range_pattern, "1.80.0", Some(37854)),
|
||||||
/// Allows integer match exhaustiveness checking (RFC 2591).
|
/// Allows integer match exhaustiveness checking (RFC 2591).
|
||||||
(accepted, exhaustive_integer_patterns, "1.33.0", Some(50907)),
|
(accepted, exhaustive_integer_patterns, "1.33.0", Some(50907)),
|
||||||
/// Allows explicit generic arguments specification with `impl Trait` present.
|
/// Allows explicit generic arguments specification with `impl Trait` present.
|
||||||
|
@ -457,7 +457,7 @@ declare_features! (
|
|||||||
/// Allows explicit tail calls via `become` expression.
|
/// Allows explicit tail calls via `become` expression.
|
||||||
(incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
|
(incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
|
||||||
/// Uses 2024 rules for matching `expr` fragments in macros. Also enables `expr_2021` fragment.
|
/// Uses 2024 rules for matching `expr` fragments in macros. Also enables `expr_2021` fragment.
|
||||||
(incomplete, expr_fragment_specifier_2024, "CURRENT_RUSTC_VERSION", Some(123742)),
|
(incomplete, expr_fragment_specifier_2024, "1.80.0", Some(123742)),
|
||||||
/// Allows using `efiapi`, `sysv64` and `win64` as calling convention
|
/// Allows using `efiapi`, `sysv64` and `win64` as calling convention
|
||||||
/// for functions with varargs.
|
/// for functions with varargs.
|
||||||
(unstable, extended_varargs_abi_support, "1.65.0", Some(100189)),
|
(unstable, extended_varargs_abi_support, "1.65.0", Some(100189)),
|
||||||
@ -488,7 +488,7 @@ declare_features! (
|
|||||||
/// Allows generic parameters and where-clauses on free & associated const items.
|
/// Allows generic parameters and where-clauses on free & associated const items.
|
||||||
(incomplete, generic_const_items, "1.73.0", Some(113521)),
|
(incomplete, generic_const_items, "1.73.0", Some(113521)),
|
||||||
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
|
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
|
||||||
(unstable, global_registration, "CURRENT_RUSTC_VERSION", Some(125119)),
|
(unstable, global_registration, "1.80.0", Some(125119)),
|
||||||
/// Allows using `..=X` as a patterns in slices.
|
/// Allows using `..=X` as a patterns in slices.
|
||||||
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
|
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
|
||||||
/// Allows `if let` guard in match arms.
|
/// Allows `if let` guard in match arms.
|
||||||
@ -579,7 +579,7 @@ declare_features! (
|
|||||||
(unstable, repr_simd, "1.4.0", Some(27731)),
|
(unstable, repr_simd, "1.4.0", Some(27731)),
|
||||||
/// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
|
/// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
|
||||||
/// be used to describe E or vise-versa.
|
/// be used to describe E or vise-versa.
|
||||||
(unstable, result_ffi_guarantees, "CURRENT_RUSTC_VERSION", Some(110503)),
|
(unstable, result_ffi_guarantees, "1.80.0", Some(110503)),
|
||||||
/// Allows bounding the return type of AFIT/RPITIT.
|
/// Allows bounding the return type of AFIT/RPITIT.
|
||||||
(incomplete, return_type_notation, "1.70.0", Some(109417)),
|
(incomplete, return_type_notation, "1.70.0", Some(109417)),
|
||||||
/// Allows `extern "rust-cold"`.
|
/// Allows `extern "rust-cold"`.
|
||||||
@ -621,9 +621,9 @@ declare_features! (
|
|||||||
/// Allows unnamed fields of struct and union type
|
/// Allows unnamed fields of struct and union type
|
||||||
(incomplete, unnamed_fields, "1.74.0", Some(49804)),
|
(incomplete, unnamed_fields, "1.74.0", Some(49804)),
|
||||||
/// Allows unsafe attributes.
|
/// Allows unsafe attributes.
|
||||||
(unstable, unsafe_attributes, "CURRENT_RUSTC_VERSION", Some(123757)),
|
(unstable, unsafe_attributes, "1.80.0", Some(123757)),
|
||||||
/// Allows unsafe on extern declarations and safety qualifiers over internal items.
|
/// Allows unsafe on extern declarations and safety qualifiers over internal items.
|
||||||
(unstable, unsafe_extern_blocks, "CURRENT_RUSTC_VERSION", Some(123743)),
|
(unstable, unsafe_extern_blocks, "1.80.0", Some(123743)),
|
||||||
/// Allows unsized fn parameters.
|
/// Allows unsized fn parameters.
|
||||||
(unstable, unsized_fn_params, "1.49.0", Some(48055)),
|
(unstable, unsized_fn_params, "1.49.0", Some(48055)),
|
||||||
/// Allows unsized rvalues at arguments and parameters.
|
/// Allows unsized rvalues at arguments and parameters.
|
||||||
|
@ -49,10 +49,10 @@ declare_lint! {
|
|||||||
///
|
///
|
||||||
/// ### Explanation
|
/// ### Explanation
|
||||||
///
|
///
|
||||||
/// Since Rust CURRENT_RUSTC_VERSION, boxed slices implement `IntoIterator`. However, to avoid
|
/// Since Rust 1.80.0, boxed slices implement `IntoIterator`. However, to avoid
|
||||||
/// breakage, `boxed_slice.into_iter()` in Rust 2015, 2018, and 2021 code will still
|
/// breakage, `boxed_slice.into_iter()` in Rust 2015, 2018, and 2021 code will still
|
||||||
/// behave as `(&boxed_slice).into_iter()`, returning an iterator over
|
/// behave as `(&boxed_slice).into_iter()`, returning an iterator over
|
||||||
/// references, just like in Rust CURRENT_RUSTC_VERSION and earlier.
|
/// references, just like in Rust 1.80.0 and earlier.
|
||||||
/// This only applies to the method call syntax `boxed_slice.into_iter()`, not to
|
/// This only applies to the method call syntax `boxed_slice.into_iter()`, not to
|
||||||
/// any other syntax such as `for _ in boxed_slice` or `IntoIterator::into_iter(boxed_slice)`.
|
/// any other syntax such as `for _ in boxed_slice` or `IntoIterator::into_iter(boxed_slice)`.
|
||||||
pub BOXED_SLICE_INTO_ITER,
|
pub BOXED_SLICE_INTO_ITER,
|
||||||
|
@ -2123,23 +2123,23 @@ impl<I> FromIterator<I> for Box<[I]> {
|
|||||||
|
|
||||||
/// This implementation is required to make sure that the `Box<[I]>: IntoIterator`
|
/// This implementation is required to make sure that the `Box<[I]>: IntoIterator`
|
||||||
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<I, A: Allocator> !Iterator for Box<[I], A> {}
|
impl<I, A: Allocator> !Iterator for Box<[I], A> {}
|
||||||
|
|
||||||
/// This implementation is required to make sure that the `&Box<[I]>: IntoIterator`
|
/// This implementation is required to make sure that the `&Box<[I]>: IntoIterator`
|
||||||
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<'a, I, A: Allocator> !Iterator for &'a Box<[I], A> {}
|
impl<'a, I, A: Allocator> !Iterator for &'a Box<[I], A> {}
|
||||||
|
|
||||||
/// This implementation is required to make sure that the `&mut Box<[I]>: IntoIterator`
|
/// This implementation is required to make sure that the `&mut Box<[I]>: IntoIterator`
|
||||||
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
/// implementation doesn't overlap with `IntoIterator for T where T: Iterator` blanket.
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<'a, I, A: Allocator> !Iterator for &'a mut Box<[I], A> {}
|
impl<'a, I, A: Allocator> !Iterator for &'a mut Box<[I], A> {}
|
||||||
|
|
||||||
// Note: the `#[rustc_skip_during_method_dispatch(boxed_slice)]` on `trait IntoIterator`
|
// Note: the `#[rustc_skip_during_method_dispatch(boxed_slice)]` on `trait IntoIterator`
|
||||||
// hides this implementation from explicit `.into_iter()` calls on editions < 2024,
|
// hides this implementation from explicit `.into_iter()` calls on editions < 2024,
|
||||||
// so those calls will still resolve to the slice implementation, by reference.
|
// so those calls will still resolve to the slice implementation, by reference.
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<I, A: Allocator> IntoIterator for Box<[I], A> {
|
impl<I, A: Allocator> IntoIterator for Box<[I], A> {
|
||||||
type IntoIter = vec::IntoIter<I, A>;
|
type IntoIter = vec::IntoIter<I, A>;
|
||||||
type Item = I;
|
type Item = I;
|
||||||
@ -2148,7 +2148,7 @@ impl<I, A: Allocator> IntoIterator for Box<[I], A> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<'a, I, A: Allocator> IntoIterator for &'a Box<[I], A> {
|
impl<'a, I, A: Allocator> IntoIterator for &'a Box<[I], A> {
|
||||||
type IntoIter = slice::Iter<'a, I>;
|
type IntoIter = slice::Iter<'a, I>;
|
||||||
type Item = &'a I;
|
type Item = &'a I;
|
||||||
@ -2157,7 +2157,7 @@ impl<'a, I, A: Allocator> IntoIterator for &'a Box<[I], A> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<'a, I, A: Allocator> IntoIterator for &'a mut Box<[I], A> {
|
impl<'a, I, A: Allocator> IntoIterator for &'a mut Box<[I], A> {
|
||||||
type IntoIter = slice::IterMut<'a, I>;
|
type IntoIter = slice::IterMut<'a, I>;
|
||||||
type Item = &'a mut I;
|
type Item = &'a mut I;
|
||||||
@ -2167,7 +2167,7 @@ impl<'a, I, A: Allocator> IntoIterator for &'a mut Box<[I], A> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl FromIterator<char> for Box<str> {
|
impl FromIterator<char> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
@ -2175,7 +2175,7 @@ impl FromIterator<char> for Box<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl<'a> FromIterator<&'a char> for Box<str> {
|
impl<'a> FromIterator<&'a char> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = &'a char>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = &'a char>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
@ -2183,7 +2183,7 @@ impl<'a> FromIterator<&'a char> for Box<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl<'a> FromIterator<&'a str> for Box<str> {
|
impl<'a> FromIterator<&'a str> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
@ -2191,7 +2191,7 @@ impl<'a> FromIterator<&'a str> for Box<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl FromIterator<String> for Box<str> {
|
impl FromIterator<String> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = String>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = String>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
@ -2199,7 +2199,7 @@ impl FromIterator<String> for Box<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl<A: Allocator> FromIterator<Box<str, A>> for Box<str> {
|
impl<A: Allocator> FromIterator<Box<str, A>> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = Box<str, A>>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = Box<str, A>>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
@ -2207,7 +2207,7 @@ impl<A: Allocator> FromIterator<Box<str, A>> for Box<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "boxed_str_from_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_str_from_iter", since = "1.80.0")]
|
||||||
impl<'a> FromIterator<Cow<'a, str>> for Box<str> {
|
impl<'a> FromIterator<Cow<'a, str>> for Box<str> {
|
||||||
fn from_iter<T: IntoIterator<Item = Cow<'a, str>>>(iter: T) -> Self {
|
fn from_iter<T: IntoIterator<Item = Cow<'a, str>>>(iter: T) -> Self {
|
||||||
String::from_iter(iter).into_boxed_str()
|
String::from_iter(iter).into_boxed_str()
|
||||||
|
@ -442,7 +442,7 @@ impl<T: Ord> BinaryHeap<T> {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(
|
#[rustc_const_stable(
|
||||||
feature = "const_binary_heap_constructor",
|
feature = "const_binary_heap_constructor",
|
||||||
since = "CURRENT_RUSTC_VERSION"
|
since = "1.80.0"
|
||||||
)]
|
)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn new() -> BinaryHeap<T> {
|
pub const fn new() -> BinaryHeap<T> {
|
||||||
@ -1224,7 +1224,7 @@ impl<T, A: Allocator> BinaryHeap<T, A> {
|
|||||||
/// io::sink().write(heap.as_slice()).unwrap();
|
/// io::sink().write(heap.as_slice()).unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "binary_heap_as_slice", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "binary_heap_as_slice", since = "1.80.0")]
|
||||||
pub fn as_slice(&self) -> &[T] {
|
pub fn as_slice(&self) -> &[T] {
|
||||||
self.data.as_slice()
|
self.data.as_slice()
|
||||||
}
|
}
|
||||||
|
@ -911,7 +911,7 @@ impl From<&CStr> for Rc<CStr> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl Default for Rc<CStr> {
|
impl Default for Rc<CStr> {
|
||||||
/// Creates an empty CStr inside an Rc
|
/// Creates an empty CStr inside an Rc
|
||||||
///
|
///
|
||||||
|
@ -2250,7 +2250,7 @@ impl<T: Default> Default for Rc<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl Default for Rc<str> {
|
impl Default for Rc<str> {
|
||||||
/// Creates an empty str inside an Rc
|
/// Creates an empty str inside an Rc
|
||||||
///
|
///
|
||||||
@ -2262,7 +2262,7 @@ impl Default for Rc<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl<T> Default for Rc<[T]> {
|
impl<T> Default for Rc<[T]> {
|
||||||
/// Creates an empty `[T]` inside an Rc
|
/// Creates an empty `[T]` inside an Rc
|
||||||
///
|
///
|
||||||
|
@ -3405,7 +3405,7 @@ static STATIC_INNER_SLICE: SliceArcInnerForStatic = SliceArcInnerForStatic {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl Default for Arc<str> {
|
impl Default for Arc<str> {
|
||||||
/// Creates an empty str inside an Arc
|
/// Creates an empty str inside an Arc
|
||||||
///
|
///
|
||||||
@ -3420,7 +3420,7 @@ impl Default for Arc<str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl Default for Arc<core::ffi::CStr> {
|
impl Default for Arc<core::ffi::CStr> {
|
||||||
/// Creates an empty CStr inside an Arc
|
/// Creates an empty CStr inside an Arc
|
||||||
///
|
///
|
||||||
@ -3439,7 +3439,7 @@ impl Default for Arc<core::ffi::CStr> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(no_global_oom_handling))]
|
#[cfg(not(no_global_oom_handling))]
|
||||||
#[stable(feature = "more_rc_default_impls", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "more_rc_default_impls", since = "1.80.0")]
|
||||||
impl<T> Default for Arc<[T]> {
|
impl<T> Default for Arc<[T]> {
|
||||||
/// Creates an empty `[T]` inside an Arc
|
/// Creates an empty `[T]` inside an Arc
|
||||||
///
|
///
|
||||||
|
@ -2649,7 +2649,7 @@ impl<T, A: Allocator, const N: usize> Vec<[T; N], A> {
|
|||||||
/// let mut flattened = vec.into_flattened();
|
/// let mut flattened = vec.into_flattened();
|
||||||
/// assert_eq!(flattened.pop(), Some(6));
|
/// assert_eq!(flattened.pop(), Some(6));
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_flatten", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_flatten", since = "1.80.0")]
|
||||||
pub fn into_flattened(self) -> Vec<T, A> {
|
pub fn into_flattened(self) -> Vec<T, A> {
|
||||||
let (ptr, len, cap, alloc) = self.into_raw_parts_with_alloc();
|
let (ptr, len, cap, alloc) = self.into_raw_parts_with_alloc();
|
||||||
let (new_len, new_cap) = if T::IS_ZST {
|
let (new_len, new_cap) = if T::IS_ZST {
|
||||||
|
@ -260,7 +260,7 @@ use crate::ptr::{self, NonNull};
|
|||||||
mod lazy;
|
mod lazy;
|
||||||
mod once;
|
mod once;
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub use lazy::LazyCell;
|
pub use lazy::LazyCell;
|
||||||
#[stable(feature = "once_cell", since = "1.70.0")]
|
#[stable(feature = "once_cell", since = "1.70.0")]
|
||||||
pub use once::OnceCell;
|
pub use once::OnceCell;
|
||||||
|
@ -34,7 +34,7 @@ enum State<T, F> {
|
|||||||
/// // 92
|
/// // 92
|
||||||
/// // 92
|
/// // 92
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub struct LazyCell<T, F = fn() -> T> {
|
pub struct LazyCell<T, F = fn() -> T> {
|
||||||
state: UnsafeCell<State<T, F>>,
|
state: UnsafeCell<State<T, F>>,
|
||||||
}
|
}
|
||||||
@ -54,8 +54,8 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
|
|||||||
/// assert_eq!(&*lazy, "HELLO, WORLD!");
|
/// assert_eq!(&*lazy, "HELLO, WORLD!");
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub const fn new(f: F) -> LazyCell<T, F> {
|
pub const fn new(f: F) -> LazyCell<T, F> {
|
||||||
LazyCell { state: UnsafeCell::new(State::Uninit(f)) }
|
LazyCell { state: UnsafeCell::new(State::Uninit(f)) }
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ impl<T, F: FnOnce() -> T> LazyCell<T, F> {
|
|||||||
/// assert_eq!(&*lazy, &92);
|
/// assert_eq!(&*lazy, &92);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub fn force(this: &LazyCell<T, F>) -> &T {
|
pub fn force(this: &LazyCell<T, F>) -> &T {
|
||||||
// SAFETY:
|
// SAFETY:
|
||||||
// This invalidates any mutable references to the data. The resulting
|
// This invalidates any mutable references to the data. The resulting
|
||||||
@ -167,7 +167,7 @@ impl<T, F> LazyCell<T, F> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
|
impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
|
||||||
type Target = T;
|
type Target = T;
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -176,7 +176,7 @@ impl<T, F: FnOnce() -> T> Deref for LazyCell<T, F> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: Default> Default for LazyCell<T> {
|
impl<T: Default> Default for LazyCell<T> {
|
||||||
/// Creates a new lazy value using `Default` as the initializing function.
|
/// Creates a new lazy value using `Default` as the initializing function.
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -185,7 +185,7 @@ impl<T: Default> Default for LazyCell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> {
|
impl<T: fmt::Debug, F> fmt::Debug for LazyCell<T, F> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let mut d = f.debug_tuple("LazyCell");
|
let mut d = f.debug_tuple("LazyCell");
|
||||||
|
@ -464,7 +464,7 @@ impl Ipv4Addr {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(Ipv4Addr::BITS, 32);
|
/// assert_eq!(Ipv4Addr::BITS, 32);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
pub const BITS: u32 = 32;
|
pub const BITS: u32 = 32;
|
||||||
|
|
||||||
/// Converts an IPv4 address into a `u32` representation using native byte order.
|
/// Converts an IPv4 address into a `u32` representation using native byte order.
|
||||||
@ -492,8 +492,8 @@ impl Ipv4Addr {
|
|||||||
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x00), Ipv4Addr::from_bits(addr_bits));
|
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x00), Ipv4Addr::from_bits(addr_bits));
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn to_bits(self) -> u32 {
|
pub const fn to_bits(self) -> u32 {
|
||||||
@ -512,8 +512,8 @@ impl Ipv4Addr {
|
|||||||
/// let addr = Ipv4Addr::from(0x12345678);
|
/// let addr = Ipv4Addr::from(0x12345678);
|
||||||
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);
|
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn from_bits(bits: u32) -> Ipv4Addr {
|
pub const fn from_bits(bits: u32) -> Ipv4Addr {
|
||||||
@ -1238,7 +1238,7 @@ impl Ipv6Addr {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(Ipv6Addr::BITS, 128);
|
/// assert_eq!(Ipv6Addr::BITS, 128);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
pub const BITS: u32 = 128;
|
pub const BITS: u32 = 128;
|
||||||
|
|
||||||
/// Converts an IPv6 address into a `u128` representation using native byte order.
|
/// Converts an IPv6 address into a `u128` representation using native byte order.
|
||||||
@ -1277,8 +1277,8 @@ impl Ipv6Addr {
|
|||||||
/// Ipv6Addr::from_bits(addr_bits));
|
/// Ipv6Addr::from_bits(addr_bits));
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn to_bits(self) -> u128 {
|
pub const fn to_bits(self) -> u128 {
|
||||||
@ -1302,8 +1302,8 @@ impl Ipv6Addr {
|
|||||||
/// ),
|
/// ),
|
||||||
/// addr);
|
/// addr);
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "ip_bits", since = "1.80.0")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn from_bits(bits: u128) -> Ipv6Addr {
|
pub const fn from_bits(bits: u128) -> Ipv6Addr {
|
||||||
|
@ -1724,7 +1724,7 @@ impl<T> Option<T> {
|
|||||||
/// assert_eq!(prev, Some(43));
|
/// assert_eq!(prev, Some(43));
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "option_take_if", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "option_take_if", since = "1.80.0")]
|
||||||
pub fn take_if<P>(&mut self, predicate: P) -> Option<T>
|
pub fn take_if<P>(&mut self, predicate: P) -> Option<T>
|
||||||
where
|
where
|
||||||
P: FnOnce(&mut T) -> bool,
|
P: FnOnce(&mut T) -> bool,
|
||||||
|
@ -14,7 +14,7 @@ pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
|
|||||||
#[stable(feature = "core_prelude", since = "1.4.0")]
|
#[stable(feature = "core_prelude", since = "1.4.0")]
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::mem::drop;
|
pub use crate::mem::drop;
|
||||||
#[stable(feature = "size_of_prelude", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "size_of_prelude", since = "1.80.0")]
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};
|
pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};
|
||||||
|
|
||||||
|
@ -525,8 +525,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn offset(self, count: isize) -> Self
|
pub const unsafe fn offset(self, count: isize) -> Self
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -551,8 +551,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn byte_offset(self, count: isize) -> Self {
|
pub const unsafe fn byte_offset(self, count: isize) -> Self {
|
||||||
// SAFETY: the caller must uphold the safety contract for `offset` and `byte_offset` has
|
// SAFETY: the caller must uphold the safety contract for `offset` and `byte_offset` has
|
||||||
// the same safety contract.
|
// the same safety contract.
|
||||||
@ -611,8 +611,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn add(self, count: usize) -> Self
|
pub const unsafe fn add(self, count: usize) -> Self
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -638,8 +638,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[rustc_allow_const_fn_unstable(set_ptr_value)]
|
#[rustc_allow_const_fn_unstable(set_ptr_value)]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn byte_add(self, count: usize) -> Self {
|
pub const unsafe fn byte_add(self, count: usize) -> Self {
|
||||||
// SAFETY: the caller must uphold the safety contract for `add` and `byte_add` has the same
|
// SAFETY: the caller must uphold the safety contract for `add` and `byte_add` has the same
|
||||||
// safety contract.
|
// safety contract.
|
||||||
@ -699,8 +699,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_allow_const_fn_unstable(unchecked_neg)]
|
#[rustc_allow_const_fn_unstable(unchecked_neg)]
|
||||||
pub const unsafe fn sub(self, count: usize) -> Self
|
pub const unsafe fn sub(self, count: usize) -> Self
|
||||||
where
|
where
|
||||||
@ -732,8 +732,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[rustc_allow_const_fn_unstable(set_ptr_value)]
|
#[rustc_allow_const_fn_unstable(set_ptr_value)]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn byte_sub(self, count: usize) -> Self {
|
pub const unsafe fn byte_sub(self, count: usize) -> Self {
|
||||||
// SAFETY: the caller must uphold the safety contract for `sub` and `byte_sub` has the same
|
// SAFETY: the caller must uphold the safety contract for `sub` and `byte_sub` has the same
|
||||||
// safety contract.
|
// safety contract.
|
||||||
@ -847,8 +847,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn offset_from(self, origin: NonNull<T>) -> isize
|
pub const unsafe fn offset_from(self, origin: NonNull<T>) -> isize
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -868,8 +868,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// ignoring the metadata.
|
/// ignoring the metadata.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: NonNull<U>) -> isize {
|
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: NonNull<U>) -> isize {
|
||||||
// SAFETY: the caller must uphold the safety contract for `byte_offset_from`.
|
// SAFETY: the caller must uphold the safety contract for `byte_offset_from`.
|
||||||
unsafe { self.pointer.byte_offset_from(origin.pointer) }
|
unsafe { self.pointer.byte_offset_from(origin.pointer) }
|
||||||
@ -958,8 +958,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::read`]: crate::ptr::read()
|
/// [`ptr::read`]: crate::ptr::read()
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn read(self) -> T
|
pub const unsafe fn read(self) -> T
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -980,7 +980,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
|
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub unsafe fn read_volatile(self) -> T
|
pub unsafe fn read_volatile(self) -> T
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -999,8 +999,8 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
|
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub const unsafe fn read_unaligned(self) -> T
|
pub const unsafe fn read_unaligned(self) -> T
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -1019,7 +1019,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::copy`]: crate::ptr::copy()
|
/// [`ptr::copy`]: crate::ptr::copy()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
||||||
pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize)
|
pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize)
|
||||||
where
|
where
|
||||||
@ -1039,7 +1039,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
|
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
||||||
pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize)
|
pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize)
|
||||||
where
|
where
|
||||||
@ -1059,7 +1059,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::copy`]: crate::ptr::copy()
|
/// [`ptr::copy`]: crate::ptr::copy()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
||||||
pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize)
|
pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize)
|
||||||
where
|
where
|
||||||
@ -1079,7 +1079,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
|
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
#[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
|
||||||
pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize)
|
pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize)
|
||||||
where
|
where
|
||||||
@ -1095,7 +1095,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
///
|
///
|
||||||
/// [`ptr::drop_in_place`]: crate::ptr::drop_in_place()
|
/// [`ptr::drop_in_place`]: crate::ptr::drop_in_place()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub unsafe fn drop_in_place(self) {
|
pub unsafe fn drop_in_place(self) {
|
||||||
// SAFETY: the caller must uphold the safety contract for `drop_in_place`.
|
// SAFETY: the caller must uphold the safety contract for `drop_in_place`.
|
||||||
unsafe { ptr::drop_in_place(self.as_ptr()) }
|
unsafe { ptr::drop_in_place(self.as_ptr()) }
|
||||||
@ -1109,7 +1109,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::write`]: crate::ptr::write()
|
/// [`ptr::write`]: crate::ptr::write()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||||
pub const unsafe fn write(self, val: T)
|
pub const unsafe fn write(self, val: T)
|
||||||
where
|
where
|
||||||
@ -1128,7 +1128,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[doc(alias = "memset")]
|
#[doc(alias = "memset")]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||||
pub const unsafe fn write_bytes(self, val: u8, count: usize)
|
pub const unsafe fn write_bytes(self, val: u8, count: usize)
|
||||||
where
|
where
|
||||||
@ -1150,7 +1150,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::write_volatile`]: crate::ptr::write_volatile()
|
/// [`ptr::write_volatile`]: crate::ptr::write_volatile()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub unsafe fn write_volatile(self, val: T)
|
pub unsafe fn write_volatile(self, val: T)
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -1169,7 +1169,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// [`ptr::write_unaligned`]: crate::ptr::write_unaligned()
|
/// [`ptr::write_unaligned`]: crate::ptr::write_unaligned()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||||
pub const unsafe fn write_unaligned(self, val: T)
|
pub const unsafe fn write_unaligned(self, val: T)
|
||||||
where
|
where
|
||||||
@ -1186,7 +1186,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
///
|
///
|
||||||
/// [`ptr::replace`]: crate::ptr::replace()
|
/// [`ptr::replace`]: crate::ptr::replace()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
pub unsafe fn replace(self, src: T) -> T
|
pub unsafe fn replace(self, src: T) -> T
|
||||||
where
|
where
|
||||||
T: Sized,
|
T: Sized,
|
||||||
@ -1203,7 +1203,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
///
|
///
|
||||||
/// [`ptr::swap`]: crate::ptr::swap()
|
/// [`ptr::swap`]: crate::ptr::swap()
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
|
#[rustc_const_unstable(feature = "const_swap", issue = "83163")]
|
||||||
pub const unsafe fn swap(self, with: NonNull<T>)
|
pub const unsafe fn swap(self, with: NonNull<T>)
|
||||||
where
|
where
|
||||||
@ -1255,7 +1255,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "non_null_convenience", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "non_null_convenience", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_align_offset", issue = "90962")]
|
#[rustc_const_unstable(feature = "const_align_offset", issue = "90962")]
|
||||||
pub const fn align_offset(self, align: usize) -> usize
|
pub const fn align_offset(self, align: usize) -> usize
|
||||||
where
|
where
|
||||||
|
@ -123,8 +123,8 @@ impl [u8] {
|
|||||||
/// assert_eq!(b" ".trim_ascii_start(), b"");
|
/// assert_eq!(b" ".trim_ascii_start(), b"");
|
||||||
/// assert_eq!(b"".trim_ascii_start(), b"");
|
/// assert_eq!(b"".trim_ascii_start(), b"");
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii_start(&self) -> &[u8] {
|
pub const fn trim_ascii_start(&self) -> &[u8] {
|
||||||
let mut bytes = self;
|
let mut bytes = self;
|
||||||
@ -152,8 +152,8 @@ impl [u8] {
|
|||||||
/// assert_eq!(b" ".trim_ascii_end(), b"");
|
/// assert_eq!(b" ".trim_ascii_end(), b"");
|
||||||
/// assert_eq!(b"".trim_ascii_end(), b"");
|
/// assert_eq!(b"".trim_ascii_end(), b"");
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii_end(&self) -> &[u8] {
|
pub const fn trim_ascii_end(&self) -> &[u8] {
|
||||||
let mut bytes = self;
|
let mut bytes = self;
|
||||||
@ -182,8 +182,8 @@ impl [u8] {
|
|||||||
/// assert_eq!(b" ".trim_ascii(), b"");
|
/// assert_eq!(b" ".trim_ascii(), b"");
|
||||||
/// assert_eq!(b"".trim_ascii(), b"");
|
/// assert_eq!(b"".trim_ascii(), b"");
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii(&self) -> &[u8] {
|
pub const fn trim_ascii(&self) -> &[u8] {
|
||||||
self.trim_ascii_start().trim_ascii_end()
|
self.trim_ascii_start().trim_ascii_end()
|
||||||
|
@ -16,7 +16,7 @@ use crate::ptr::{self, without_provenance, without_provenance_mut, NonNull};
|
|||||||
|
|
||||||
use super::{from_raw_parts, from_raw_parts_mut};
|
use super::{from_raw_parts, from_raw_parts_mut};
|
||||||
|
|
||||||
#[stable(feature = "boxed_slice_into_iter", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "boxed_slice_into_iter", since = "1.80.0")]
|
||||||
impl<T> !Iterator for [T] {}
|
impl<T> !Iterator for [T] {}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
@ -2082,8 +2082,8 @@ impl<T> [T] {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(None, v.split_at_checked(7));
|
/// assert_eq!(None, v.split_at_checked(7));
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "split_at_checked", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "split_at_checked", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "split_at_checked", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "split_at_checked", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn split_at_checked(&self, mid: usize) -> Option<(&[T], &[T])> {
|
pub const fn split_at_checked(&self, mid: usize) -> Option<(&[T], &[T])> {
|
||||||
@ -2121,7 +2121,7 @@ impl<T> [T] {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(None, v.split_at_mut_checked(7));
|
/// assert_eq!(None, v.split_at_mut_checked(7));
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "split_at_checked", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "split_at_checked", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
|
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
@ -4544,7 +4544,7 @@ impl<T, const N: usize> [[T; N]] {
|
|||||||
/// let empty_slice_of_arrays: &[[u32; 10]] = &[];
|
/// let empty_slice_of_arrays: &[[u32; 10]] = &[];
|
||||||
/// assert!(empty_slice_of_arrays.as_flattened().is_empty());
|
/// assert!(empty_slice_of_arrays.as_flattened().is_empty());
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_flatten", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_flatten", since = "1.80.0")]
|
||||||
#[rustc_const_unstable(feature = "const_slice_flatten", issue = "95629")]
|
#[rustc_const_unstable(feature = "const_slice_flatten", issue = "95629")]
|
||||||
pub const fn as_flattened(&self) -> &[T] {
|
pub const fn as_flattened(&self) -> &[T] {
|
||||||
let len = if T::IS_ZST {
|
let len = if T::IS_ZST {
|
||||||
@ -4581,7 +4581,7 @@ impl<T, const N: usize> [[T; N]] {
|
|||||||
/// add_5_to_all(array.as_flattened_mut());
|
/// add_5_to_all(array.as_flattened_mut());
|
||||||
/// assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
|
/// assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "slice_flatten", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "slice_flatten", since = "1.80.0")]
|
||||||
pub fn as_flattened_mut(&mut self) -> &mut [T] {
|
pub fn as_flattened_mut(&mut self) -> &mut [T] {
|
||||||
let len = if T::IS_ZST {
|
let len = if T::IS_ZST {
|
||||||
self.len().checked_mul(N).expect("slice len overflow")
|
self.len().checked_mul(N).expect("slice len overflow")
|
||||||
|
@ -732,7 +732,7 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "split_at_checked", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "split_at_checked", since = "1.80.0")]
|
||||||
pub fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> {
|
pub fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> {
|
||||||
// is_char_boundary checks that the index is in [0, .len()]
|
// is_char_boundary checks that the index is in [0, .len()]
|
||||||
if self.is_char_boundary(mid) {
|
if self.is_char_boundary(mid) {
|
||||||
@ -772,7 +772,7 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "split_at_checked", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "split_at_checked", since = "1.80.0")]
|
||||||
pub fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {
|
pub fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {
|
||||||
// is_char_boundary checks that the index is in [0, .len()]
|
// is_char_boundary checks that the index is in [0, .len()]
|
||||||
if self.is_char_boundary(mid) {
|
if self.is_char_boundary(mid) {
|
||||||
@ -2546,8 +2546,8 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[must_use = "this returns the trimmed string as a new slice, \
|
#[must_use = "this returns the trimmed string as a new slice, \
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii_start(&self) -> &str {
|
pub const fn trim_ascii_start(&self) -> &str {
|
||||||
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
||||||
@ -2571,8 +2571,8 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[must_use = "this returns the trimmed string as a new slice, \
|
#[must_use = "this returns the trimmed string as a new slice, \
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii_end(&self) -> &str {
|
pub const fn trim_ascii_end(&self) -> &str {
|
||||||
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
||||||
@ -2597,8 +2597,8 @@ impl str {
|
|||||||
/// ```
|
/// ```
|
||||||
#[must_use = "this returns the trimmed string as a new slice, \
|
#[must_use = "this returns the trimmed string as a new slice, \
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "byte_slice_trim_ascii", since = "1.80.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn trim_ascii(&self) -> &str {
|
pub const fn trim_ascii(&self) -> &str {
|
||||||
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
// SAFETY: Removing ASCII characters from a `&str` does not invalidate
|
||||||
|
@ -1090,7 +1090,7 @@ impl Duration {
|
|||||||
/// let dur2 = Duration::new(5, 400_000_000);
|
/// let dur2 = Duration::new(5, 400_000_000);
|
||||||
/// assert_eq!(dur1.div_duration_f64(dur2), 0.5);
|
/// assert_eq!(dur1.div_duration_f64(dur2), 0.5);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "div_duration", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "div_duration", since = "1.80.0")]
|
||||||
#[must_use = "this returns the result of the operation, \
|
#[must_use = "this returns the result of the operation, \
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -1111,7 +1111,7 @@ impl Duration {
|
|||||||
/// let dur2 = Duration::new(5, 400_000_000);
|
/// let dur2 = Duration::new(5, 400_000_000);
|
||||||
/// assert_eq!(dur1.div_duration_f32(dur2), 0.5);
|
/// assert_eq!(dur1.div_duration_f32(dur2), 0.5);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "div_duration", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "div_duration", since = "1.80.0")]
|
||||||
#[must_use = "this returns the result of the operation, \
|
#[must_use = "this returns the result of the operation, \
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -2058,7 +2058,7 @@ pub trait Seek {
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [`BufReader`]: crate::io::BufReader
|
/// [`BufReader`]: crate::io::BufReader
|
||||||
#[stable(feature = "seek_seek_relative", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "seek_seek_relative", since = "1.80.0")]
|
||||||
fn seek_relative(&mut self, offset: i64) -> Result<()> {
|
fn seek_relative(&mut self, offset: i64) -> Result<()> {
|
||||||
self.seek(SeekFrom::Current(offset))?;
|
self.seek(SeekFrom::Current(offset))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -14,7 +14,7 @@ pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::mem::drop;
|
pub use crate::mem::drop;
|
||||||
#[stable(feature = "size_of_prelude", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "size_of_prelude", since = "1.80.0")]
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};
|
pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ union Data<T, F> {
|
|||||||
/// println!("{}", *data.number);
|
/// println!("{}", *data.number);
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub struct LazyLock<T, F = fn() -> T> {
|
pub struct LazyLock<T, F = fn() -> T> {
|
||||||
once: Once,
|
once: Once,
|
||||||
data: UnsafeCell<Data<T, F>>,
|
data: UnsafeCell<Data<T, F>>,
|
||||||
@ -85,8 +85,8 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
|
|||||||
/// assert_eq!(&*lazy, "HELLO, WORLD!");
|
/// assert_eq!(&*lazy, "HELLO, WORLD!");
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
#[rustc_const_stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[rustc_const_stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub const fn new(f: F) -> LazyLock<T, F> {
|
pub const fn new(f: F) -> LazyLock<T, F> {
|
||||||
LazyLock { once: Once::new(), data: UnsafeCell::new(Data { f: ManuallyDrop::new(f) }) }
|
LazyLock { once: Once::new(), data: UnsafeCell::new(Data { f: ManuallyDrop::new(f) }) }
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
|
|||||||
/// assert_eq!(&*lazy, &92);
|
/// assert_eq!(&*lazy, &92);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub fn force(this: &LazyLock<T, F>) -> &T {
|
pub fn force(this: &LazyLock<T, F>) -> &T {
|
||||||
this.once.call_once(|| {
|
this.once.call_once(|| {
|
||||||
// SAFETY: `call_once` only runs this closure once, ever.
|
// SAFETY: `call_once` only runs this closure once, ever.
|
||||||
@ -188,7 +188,7 @@ impl<T, F> LazyLock<T, F> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T, F> Drop for LazyLock<T, F> {
|
impl<T, F> Drop for LazyLock<T, F> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
match self.once.state() {
|
match self.once.state() {
|
||||||
@ -201,7 +201,7 @@ impl<T, F> Drop for LazyLock<T, F> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T, F: FnOnce() -> T> Deref for LazyLock<T, F> {
|
impl<T, F: FnOnce() -> T> Deref for LazyLock<T, F> {
|
||||||
type Target = T;
|
type Target = T;
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ impl<T, F: FnOnce() -> T> Deref for LazyLock<T, F> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: Default> Default for LazyLock<T> {
|
impl<T: Default> Default for LazyLock<T> {
|
||||||
/// Creates a new lazy value using `Default` as the initializing function.
|
/// Creates a new lazy value using `Default` as the initializing function.
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -225,7 +225,7 @@ impl<T: Default> Default for LazyLock<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: fmt::Debug, F> fmt::Debug for LazyLock<T, F> {
|
impl<T: fmt::Debug, F> fmt::Debug for LazyLock<T, F> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let mut d = f.debug_tuple("LazyLock");
|
let mut d = f.debug_tuple("LazyLock");
|
||||||
@ -239,13 +239,13 @@ impl<T: fmt::Debug, F> fmt::Debug for LazyLock<T, F> {
|
|||||||
|
|
||||||
// We never create a `&F` from a `&LazyLock<T, F>` so it is fine
|
// We never create a `&F` from a `&LazyLock<T, F>` so it is fine
|
||||||
// to not impl `Sync` for `F`.
|
// to not impl `Sync` for `F`.
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
unsafe impl<T: Sync + Send, F: Send> Sync for LazyLock<T, F> {}
|
unsafe impl<T: Sync + Send, F: Send> Sync for LazyLock<T, F> {}
|
||||||
// auto-derived `Send` impl is OK.
|
// auto-derived `Send` impl is OK.
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: RefUnwindSafe + UnwindSafe, F: UnwindSafe> RefUnwindSafe for LazyLock<T, F> {}
|
impl<T: RefUnwindSafe + UnwindSafe, F: UnwindSafe> RefUnwindSafe for LazyLock<T, F> {}
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
impl<T: UnwindSafe, F: UnwindSafe> UnwindSafe for LazyLock<T, F> {}
|
impl<T: UnwindSafe, F: UnwindSafe> UnwindSafe for LazyLock<T, F> {}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -182,7 +182,7 @@ pub use self::rwlock::{MappedRwLockReadGuard, MappedRwLockWriteGuard};
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub use self::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
|
pub use self::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||||
|
|
||||||
#[stable(feature = "lazy_cell", since = "CURRENT_RUSTC_VERSION")]
|
#[stable(feature = "lazy_cell", since = "1.80.0")]
|
||||||
pub use self::lazy_lock::LazyLock;
|
pub use self::lazy_lock::LazyLock;
|
||||||
#[stable(feature = "once_cell", since = "1.70.0")]
|
#[stable(feature = "once_cell", since = "1.70.0")]
|
||||||
pub use self::once_lock::OnceLock;
|
pub use self::once_lock::OnceLock;
|
||||||
|
@ -1 +1 @@
|
|||||||
nightly
|
beta
|
||||||
|
Loading…
Reference in New Issue
Block a user