mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
replace placeholder version
This commit is contained in:
parent
d6c8169c18
commit
3dca90946f
@ -61,7 +61,7 @@ declare_features! (
|
||||
/// Allows explicit discriminants on non-unit enum variants.
|
||||
(accepted, arbitrary_enum_discriminant, "1.66.0", Some(60553)),
|
||||
/// Allows using `const` operands in inline assembly.
|
||||
(accepted, asm_const, "CURRENT_RUSTC_VERSION", Some(93332)),
|
||||
(accepted, asm_const, "1.82.0", Some(93332)),
|
||||
/// Allows using `sym` operands in inline assembly.
|
||||
(accepted, asm_sym, "1.66.0", Some(93333)),
|
||||
/// Allows the definition of associated constants in `trait` or `impl` blocks.
|
||||
@ -116,7 +116,7 @@ declare_features! (
|
||||
/// Allows calling constructor functions in `const fn`.
|
||||
(accepted, const_constructor, "1.40.0", Some(61456)),
|
||||
/// Allows basic arithmetic on floating point types in a `const fn`.
|
||||
(accepted, const_fn_floating_point_arithmetic, "CURRENT_RUSTC_VERSION", Some(57241)),
|
||||
(accepted, const_fn_floating_point_arithmetic, "1.82.0", Some(57241)),
|
||||
/// Allows using and casting function pointers in a `const fn`.
|
||||
(accepted, const_fn_fn_ptr_basics, "1.61.0", Some(57563)),
|
||||
/// Allows trait bounds in `const fn`.
|
||||
@ -272,7 +272,7 @@ declare_features! (
|
||||
/// Allows calling `const unsafe fn` inside `unsafe` blocks in `const fn` functions.
|
||||
(accepted, min_const_unsafe_fn, "1.33.0", Some(55607)),
|
||||
/// Allows exhaustive pattern matching on uninhabited types when matched by value.
|
||||
(accepted, min_exhaustive_patterns, "CURRENT_RUSTC_VERSION", Some(119612)),
|
||||
(accepted, min_exhaustive_patterns, "1.82.0", Some(119612)),
|
||||
/// Allows using `Self` and associated types in struct expressions and patterns.
|
||||
(accepted, more_struct_aliases, "1.16.0", Some(37544)),
|
||||
/// Allows using the MOVBE target feature.
|
||||
@ -299,7 +299,7 @@ declare_features! (
|
||||
/// Allows `foo.rs` as an alternative to `foo/mod.rs`.
|
||||
(accepted, non_modrs_mods, "1.30.0", Some(44660)),
|
||||
/// Allows using multiple nested field accesses in offset_of!
|
||||
(accepted, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(120140)),
|
||||
(accepted, offset_of_nested, "1.82.0", Some(120140)),
|
||||
/// Allows the use of or-patterns (e.g., `0 | 1`).
|
||||
(accepted, or_patterns, "1.53.0", Some(54883)),
|
||||
/// Allows using `+bundle,+whole-archive` link modifiers with native libs.
|
||||
@ -312,7 +312,7 @@ declare_features! (
|
||||
/// Allows parentheses in patterns.
|
||||
(accepted, pattern_parentheses, "1.31.0", Some(51087)),
|
||||
/// Allows `use<'a, 'b, A, B>` in `impl Trait + use<...>` for precise capture of generic args.
|
||||
(accepted, precise_capturing, "CURRENT_RUSTC_VERSION", Some(123432)),
|
||||
(accepted, precise_capturing, "1.82.0", Some(123432)),
|
||||
/// Allows procedural macros in `proc-macro` crates.
|
||||
(accepted, proc_macro, "1.29.0", Some(38356)),
|
||||
/// Allows multi-segment paths in attributes and derives.
|
||||
@ -326,7 +326,7 @@ declare_features! (
|
||||
/// Allows keywords to be escaped for use as identifiers.
|
||||
(accepted, raw_identifiers, "1.30.0", Some(48589)),
|
||||
/// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions.
|
||||
(accepted, raw_ref_op, "CURRENT_RUSTC_VERSION", Some(64490)),
|
||||
(accepted, raw_ref_op, "1.82.0", Some(64490)),
|
||||
/// Allows relaxing the coherence rules such that
|
||||
/// `impl<T> ForeignTrait<LocalType> for ForeignType<T>` is permitted.
|
||||
(accepted, re_rebalance_coherence, "1.41.0", Some(55437)),
|
||||
@ -399,11 +399,11 @@ declare_features! (
|
||||
/// Allows arbitrary delimited token streams in non-macro attributes.
|
||||
(accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208)),
|
||||
/// Allows unsafe attributes.
|
||||
(accepted, unsafe_attributes, "CURRENT_RUSTC_VERSION", Some(123757)),
|
||||
(accepted, unsafe_attributes, "1.82.0", Some(123757)),
|
||||
/// The `unsafe_op_in_unsafe_fn` lint (allowed by default): no longer treat an unsafe function as an unsafe block.
|
||||
(accepted, unsafe_block_in_unsafe_fn, "1.52.0", Some(71668)),
|
||||
/// Allows unsafe on extern declarations and safety qualifiers over internal items.
|
||||
(accepted, unsafe_extern_blocks, "CURRENT_RUSTC_VERSION", Some(123743)),
|
||||
(accepted, unsafe_extern_blocks, "1.82.0", Some(123743)),
|
||||
/// Allows importing and reexporting macros with `use`,
|
||||
/// enables macro modularization in general.
|
||||
(accepted, use_extern_macros, "1.30.0", Some(35896)),
|
||||
|
@ -83,7 +83,7 @@ declare_features! (
|
||||
(removed, custom_derive, "1.32.0", Some(29644),
|
||||
Some("subsumed by `#[proc_macro_derive]`")),
|
||||
/// Allows default type parameters to influence type inference.
|
||||
(removed, default_type_parameter_fallback, "CURRENT_RUSTC_VERSION", Some(27336),
|
||||
(removed, default_type_parameter_fallback, "1.82.0", Some(27336),
|
||||
Some("never properly implemented; requires significant design work")),
|
||||
/// Allows using `#[doc(keyword = "...")]`.
|
||||
(removed, doc_keyword, "1.28.0", Some(51315),
|
||||
|
@ -208,7 +208,7 @@ declare_features! (
|
||||
/// Allows `#[link(..., cfg(..))]`; perma-unstable per #37406
|
||||
(unstable, link_cfg, "1.14.0", None),
|
||||
/// Allows using `?Trait` trait bounds in more contexts.
|
||||
(internal, more_maybe_bounds, "CURRENT_RUSTC_VERSION", None),
|
||||
(internal, more_maybe_bounds, "1.82.0", None),
|
||||
/// Allows the `multiple_supertrait_upcastable` lint.
|
||||
(unstable, multiple_supertrait_upcastable, "1.69.0", None),
|
||||
/// Allow negative trait bounds. This is an internal-only feature for testing the trait solver!
|
||||
@ -302,7 +302,7 @@ declare_features! (
|
||||
// FIXME: Document these and merge with the list below.
|
||||
|
||||
// Unstable `#[target_feature]` directives.
|
||||
(unstable, aarch64_unstable_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
|
||||
(unstable, aarch64_unstable_target_feature, "1.82.0", Some(44839)),
|
||||
(unstable, aarch64_ver_target_feature, "1.27.0", Some(44839)),
|
||||
(unstable, arm_target_feature, "1.27.0", Some(44839)),
|
||||
(unstable, avx512_target_feature, "1.27.0", Some(44839)),
|
||||
@ -317,7 +317,7 @@ declare_features! (
|
||||
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
|
||||
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
|
||||
(unstable, rtm_target_feature, "1.35.0", Some(44839)),
|
||||
(unstable, s390x_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
|
||||
(unstable, s390x_target_feature, "1.82.0", Some(44839)),
|
||||
(unstable, sse4a_target_feature, "1.27.0", Some(44839)),
|
||||
(unstable, tbm_target_feature, "1.27.0", Some(44839)),
|
||||
(unstable, wasm_target_feature, "1.30.0", Some(44839)),
|
||||
@ -472,7 +472,7 @@ declare_features! (
|
||||
/// Allows the use of `#[ffi_pure]` on foreign functions.
|
||||
(unstable, ffi_pure, "1.45.0", Some(58329)),
|
||||
/// Controlling the behavior of fmt::Debug
|
||||
(unstable, fmt_debug, "CURRENT_RUSTC_VERSION", Some(129709)),
|
||||
(unstable, fmt_debug, "1.82.0", Some(129709)),
|
||||
/// Allows using `#[repr(align(...))]` on function items
|
||||
(unstable, fn_align, "1.53.0", Some(82232)),
|
||||
/// Support delegating implementation of functions to other already implemented functions.
|
||||
@ -584,8 +584,8 @@ declare_features! (
|
||||
/// Allows `extern "rust-cold"`.
|
||||
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
|
||||
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
|
||||
(unstable, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)),
|
||||
/// Shorten the tail expression lifetime
|
||||
(unstable, sha512_sm_x86, "1.82.0", Some(126624)),
|
||||
/// Shortern the tail expression lifetime
|
||||
(unstable, shorter_tail_lifetimes, "1.79.0", Some(123739)),
|
||||
/// Allows the use of SIMD types in functions declared in `extern` blocks.
|
||||
(unstable, simd_ffi, "1.0.0", Some(27731)),
|
||||
@ -623,7 +623,7 @@ declare_features! (
|
||||
(incomplete, unnamed_fields, "1.74.0", Some(49804)),
|
||||
/// Allows const generic parameters to be defined with types that
|
||||
/// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
|
||||
(incomplete, unsized_const_params, "CURRENT_RUSTC_VERSION", Some(95174)),
|
||||
(incomplete, unsized_const_params, "1.82.0", Some(95174)),
|
||||
/// Allows unsized fn parameters.
|
||||
(internal, unsized_fn_params, "1.49.0", Some(48055)),
|
||||
/// Allows unsized rvalues at arguments and parameters.
|
||||
|
@ -272,7 +272,7 @@ impl<T> Box<T> {
|
||||
/// assert_eq!(*five, 5)
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn new_uninit() -> Box<mem::MaybeUninit<T>> {
|
||||
@ -663,7 +663,7 @@ impl<T> Box<[T]> {
|
||||
/// assert_eq!(*values, [1, 2, 3])
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
|
||||
unsafe { RawVec::with_capacity(len).into_box(len) }
|
||||
@ -930,7 +930,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
|
||||
///
|
||||
/// assert_eq!(*five, 5)
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Box<T, A> {
|
||||
let (raw, alloc) = Box::into_raw_with_allocator(self);
|
||||
@ -1003,7 +1003,7 @@ impl<T, A: Allocator> Box<[mem::MaybeUninit<T>], A> {
|
||||
///
|
||||
/// assert_eq!(*values, [1, 2, 3])
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Box<[T], A> {
|
||||
let (raw, alloc) = Box::into_raw_with_allocator(self);
|
||||
|
@ -1433,7 +1433,7 @@ pub struct Iter<'a, T: 'a> {
|
||||
iter: slice::Iter<'a, T>,
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
|
||||
impl<T> Default for Iter<'_, T> {
|
||||
/// Creates an empty `binary_heap::Iter`.
|
||||
///
|
||||
|
@ -2016,7 +2016,7 @@ impl<K, V> Default for Range<'_, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
|
||||
impl<K, V> Default for RangeMut<'_, K, V> {
|
||||
/// Creates an empty `btree_map::RangeMut`.
|
||||
///
|
||||
@ -2064,7 +2064,7 @@ impl<K, V> ExactSizeIterator for ValuesMut<'_, K, V> {
|
||||
#[stable(feature = "fused", since = "1.26.0")]
|
||||
impl<K, V> FusedIterator for ValuesMut<'_, K, V> {}
|
||||
|
||||
#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
|
||||
impl<K, V> Default for ValuesMut<'_, K, V> {
|
||||
/// Creates an empty `btree_map::ValuesMut`.
|
||||
///
|
||||
|
@ -28,7 +28,7 @@ impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
|
||||
impl<T> Default for Iter<'_, T> {
|
||||
/// Creates an empty `vec_deque::Iter`.
|
||||
///
|
||||
|
@ -28,7 +28,7 @@ impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
|
||||
impl<T> Default for IterMut<'_, T> {
|
||||
/// Creates an empty `vec_deque::IterMut`.
|
||||
///
|
||||
|
@ -517,7 +517,7 @@ impl<T> Rc<T> {
|
||||
/// assert_eq!(*five, 5)
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn new_uninit() -> Rc<mem::MaybeUninit<T>> {
|
||||
unsafe {
|
||||
@ -980,7 +980,7 @@ impl<T> Rc<[T]> {
|
||||
/// assert_eq!(*values, [1, 2, 3])
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn new_uninit_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
|
||||
unsafe { Rc::from_ptr(Rc::allocate_for_slice(len)) }
|
||||
@ -1127,7 +1127,7 @@ impl<T, A: Allocator> Rc<mem::MaybeUninit<T>, A> {
|
||||
///
|
||||
/// assert_eq!(*five, 5)
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Rc<T, A> {
|
||||
let (ptr, alloc) = Rc::into_inner_with_allocator(self);
|
||||
@ -1167,7 +1167,7 @@ impl<T, A: Allocator> Rc<[mem::MaybeUninit<T>], A> {
|
||||
///
|
||||
/// assert_eq!(*values, [1, 2, 3])
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Rc<[T], A> {
|
||||
let (ptr, alloc) = Rc::into_inner_with_allocator(self);
|
||||
|
@ -520,7 +520,7 @@ impl<T> Arc<T> {
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[inline]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn new_uninit() -> Arc<mem::MaybeUninit<T>> {
|
||||
unsafe {
|
||||
@ -1115,7 +1115,7 @@ impl<T> Arc<[T]> {
|
||||
/// ```
|
||||
#[cfg(not(no_global_oom_handling))]
|
||||
#[inline]
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn new_uninit_slice(len: usize) -> Arc<[mem::MaybeUninit<T>]> {
|
||||
unsafe { Arc::from_ptr(Arc::allocate_for_slice(len)) }
|
||||
@ -1262,7 +1262,7 @@ impl<T, A: Allocator> Arc<mem::MaybeUninit<T>, A> {
|
||||
///
|
||||
/// assert_eq!(*five, 5)
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Arc<T, A> {
|
||||
@ -1303,7 +1303,7 @@ impl<T, A: Allocator> Arc<[mem::MaybeUninit<T>], A> {
|
||||
///
|
||||
/// assert_eq!(*values, [1, 2, 3])
|
||||
/// ```
|
||||
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "new_uninit", since = "1.82.0")]
|
||||
#[must_use = "`self` will be dropped if the result is not used"]
|
||||
#[inline]
|
||||
pub unsafe fn assume_init(self) -> Arc<[T], A> {
|
||||
|
@ -39,7 +39,7 @@ impl<T> Ready<T> {
|
||||
/// let a = future::ready(1);
|
||||
/// assert_eq!(a.into_inner(), 1);
|
||||
/// ```
|
||||
#[stable(feature = "ready_into_inner", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "ready_into_inner", since = "1.82.0")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn into_inner(self) -> T {
|
||||
|
@ -318,7 +318,7 @@ impl<I: Iterator + TrustedRandomAccess> SpecTake for Take<I> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
|
||||
impl<T: Clone> DoubleEndedIterator for Take<crate::iter::Repeat<T>> {
|
||||
#[inline]
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
@ -361,14 +361,14 @@ impl<T: Clone> DoubleEndedIterator for Take<crate::iter::Repeat<T>> {
|
||||
// because we have no way to return value of nth invocation of repeater followed
|
||||
// by n-1st without remembering all results.
|
||||
|
||||
#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
|
||||
impl<T: Clone> ExactSizeIterator for Take<crate::iter::Repeat<T>> {
|
||||
fn len(&self) -> usize {
|
||||
self.n
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
|
||||
impl<F: FnMut() -> A, A> ExactSizeIterator for Take<crate::iter::RepeatWith<F>> {
|
||||
fn len(&self) -> usize {
|
||||
self.n
|
||||
|
@ -436,7 +436,7 @@ pub use self::sources::{once, Once};
|
||||
pub use self::sources::{once_with, OnceWith};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use self::sources::{repeat, Repeat};
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
pub use self::sources::{repeat_n, RepeatN};
|
||||
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
|
||||
pub use self::sources::{repeat_with, RepeatWith};
|
||||
|
@ -24,7 +24,7 @@ pub use self::once::{once, Once};
|
||||
pub use self::once_with::{once_with, OnceWith};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use self::repeat::{repeat, Repeat};
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
pub use self::repeat_n::{repeat_n, RepeatN};
|
||||
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
|
||||
pub use self::repeat_with::{repeat_with, RepeatWith};
|
||||
|
@ -56,7 +56,7 @@ use crate::num::NonZero;
|
||||
/// assert_eq!(None, it.next());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
|
||||
let mut element = ManuallyDrop::new(element);
|
||||
|
||||
@ -75,7 +75,7 @@ pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
|
||||
/// This `struct` is created by the [`repeat_n()`] function.
|
||||
/// See its documentation for more.
|
||||
#[derive(Clone, Debug)]
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
pub struct RepeatN<A> {
|
||||
count: usize,
|
||||
// Invariant: has been dropped iff count == 0.
|
||||
@ -99,14 +99,14 @@ impl<A> RepeatN<A> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A> Drop for RepeatN<A> {
|
||||
fn drop(&mut self) {
|
||||
self.take_element();
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A: Clone> Iterator for RepeatN<A> {
|
||||
type Item = A;
|
||||
|
||||
@ -154,14 +154,14 @@ impl<A: Clone> Iterator for RepeatN<A> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A: Clone> ExactSizeIterator for RepeatN<A> {
|
||||
fn len(&self) -> usize {
|
||||
self.count
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
|
||||
#[inline]
|
||||
fn next_back(&mut self) -> Option<A> {
|
||||
@ -179,12 +179,12 @@ impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A: Clone> FusedIterator for RepeatN<A> {}
|
||||
|
||||
#[unstable(feature = "trusted_len", issue = "37572")]
|
||||
unsafe impl<A: Clone> TrustedLen for RepeatN<A> {}
|
||||
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
|
||||
impl<A: Clone> UncheckedIterator for RepeatN<A> {
|
||||
#[inline]
|
||||
unsafe fn next_unchecked(&mut self) -> Self::Item {
|
||||
|
@ -3953,7 +3953,7 @@ pub trait Iterator {
|
||||
/// assert!(![0.0, 1.0, f32::NAN].iter().is_sorted());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[rustc_do_not_const_check]
|
||||
fn is_sorted(self) -> bool
|
||||
where
|
||||
@ -3980,7 +3980,7 @@ pub trait Iterator {
|
||||
/// assert!(std::iter::empty::<i32>().is_sorted_by(|a, b| false));
|
||||
/// assert!(std::iter::empty::<i32>().is_sorted_by(|a, b| true));
|
||||
/// ```
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[rustc_do_not_const_check]
|
||||
fn is_sorted_by<F>(mut self, compare: F) -> bool
|
||||
where
|
||||
@ -4025,7 +4025,7 @@ pub trait Iterator {
|
||||
/// assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs()));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[rustc_do_not_const_check]
|
||||
fn is_sorted_by_key<F, K>(self, f: F) -> bool
|
||||
where
|
||||
|
@ -113,7 +113,7 @@ pub enum IntErrorKind {
|
||||
impl ParseIntError {
|
||||
/// Outputs the detailed cause of parsing an integer failing.
|
||||
#[must_use]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")]
|
||||
#[stable(feature = "int_error_matching", since = "1.55.0")]
|
||||
pub const fn kind(&self) -> &IntErrorKind {
|
||||
&self.kind
|
||||
|
@ -1385,7 +1385,7 @@ from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
|
||||
#[doc(hidden)]
|
||||
#[inline(always)]
|
||||
#[unstable(issue = "none", feature = "std_internals")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")]
|
||||
pub const fn can_not_overflow<T>(radix: u32, is_signed_ty: bool, digits: &[u8]) -> bool {
|
||||
radix <= 16 && digits.len() <= mem::size_of::<T>() * 2 - is_signed_ty as usize
|
||||
}
|
||||
@ -1435,7 +1435,7 @@ macro_rules! from_str_radix {
|
||||
#[doc = concat!("assert_eq!(", stringify!($int_ty), "::from_str_radix(\"A\", 16), Ok(10));")]
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")]
|
||||
pub const fn from_str_radix(src: &str, radix: u32) -> Result<$int_ty, ParseIntError> {
|
||||
use self::IntErrorKind::*;
|
||||
use self::ParseIntError as PIE;
|
||||
@ -1565,7 +1565,7 @@ macro_rules! from_str_radix_size_impl {
|
||||
#[doc = concat!("assert_eq!(", stringify!($size), "::from_str_radix(\"A\", 16), Ok(10));")]
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_int_from_str", since = "1.82.0")]
|
||||
pub const fn from_str_radix(src: &str, radix: u32) -> Result<$size, ParseIntError> {
|
||||
match <$t>::from_str_radix(src, radix) {
|
||||
Ok(x) => Ok(x as $size),
|
||||
|
@ -667,7 +667,7 @@ impl<T> Option<T> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[stable(feature = "is_none_or", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_none_or", since = "1.82.0")]
|
||||
pub fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool {
|
||||
match self {
|
||||
None => true,
|
||||
|
@ -4088,7 +4088,7 @@ impl<T> [T] {
|
||||
/// assert!(![0.0, 1.0, f32::NAN].is_sorted());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn is_sorted(&self) -> bool
|
||||
where
|
||||
@ -4115,7 +4115,7 @@ impl<T> [T] {
|
||||
/// assert!(empty.is_sorted_by(|a, b| false));
|
||||
/// assert!(empty.is_sorted_by(|a, b| true));
|
||||
/// ```
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn is_sorted_by<'a, F>(&'a self, mut compare: F) -> bool
|
||||
where
|
||||
@ -4139,7 +4139,7 @@ impl<T> [T] {
|
||||
/// assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "is_sorted", since = "1.82.0")]
|
||||
#[must_use]
|
||||
pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool
|
||||
where
|
||||
|
@ -269,7 +269,7 @@ impl<'a> CharIndices<'a> {
|
||||
/// ```
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[stable(feature = "char_indices_offset", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "char_indices_offset", since = "1.82.0")]
|
||||
pub fn offset(&self) -> usize {
|
||||
self.front_offset
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ pub struct Context<'a> {
|
||||
impl<'a> Context<'a> {
|
||||
/// Creates a new `Context` from a [`&Waker`](Waker).
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "1.82.0")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub const fn from_waker(waker: &'a Waker) -> Self {
|
||||
@ -261,7 +261,7 @@ impl<'a> Context<'a> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "1.82.0")]
|
||||
pub const fn waker(&self) -> &'a Waker {
|
||||
&self.waker
|
||||
}
|
||||
@ -337,7 +337,7 @@ impl<'a> ContextBuilder<'a> {
|
||||
/// Creates a ContextBuilder from a Waker.
|
||||
#[inline]
|
||||
#[unstable(feature = "local_waker", issue = "118959")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "1.82.0")]
|
||||
pub const fn from_waker(waker: &'a Waker) -> Self {
|
||||
// SAFETY: LocalWaker is just Waker without thread safety
|
||||
let local_waker = unsafe { transmute(waker) };
|
||||
@ -395,7 +395,7 @@ impl<'a> ContextBuilder<'a> {
|
||||
/// Builds the `Context`.
|
||||
#[inline]
|
||||
#[unstable(feature = "local_waker", issue = "118959")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "1.82.0")]
|
||||
pub const fn build(self) -> Context<'a> {
|
||||
let ContextBuilder { waker, local_waker, ext, _marker, _marker2 } = self;
|
||||
Context { waker, local_waker, ext: AssertUnwindSafe(ext), _marker, _marker2 }
|
||||
@ -523,7 +523,7 @@ impl Waker {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[rustc_const_stable(feature = "const_waker", since = "1.82.0")]
|
||||
pub const unsafe fn from_raw(waker: RawWaker) -> Waker {
|
||||
Waker { waker }
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ impl Builder {
|
||||
/// ```
|
||||
///
|
||||
/// [`io::Result`]: crate::io::Result
|
||||
#[stable(feature = "thread_spawn_unchecked", since = "CURRENT_RUSTC_VERSION")]
|
||||
#[stable(feature = "thread_spawn_unchecked", since = "1.82.0")]
|
||||
pub unsafe fn spawn_unchecked<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
|
||||
where
|
||||
F: FnOnce() -> T,
|
||||
|
Loading…
Reference in New Issue
Block a user