Remove unused features in library

This commit is contained in:
mu001999 2026-02-12 10:35:12 +08:00
parent a07f837491
commit 0dc1556968
7 changed files with 12 additions and 35 deletions

View file

@ -1514,7 +1514,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Recreate a `Box` which was previously converted to a `NonNull` pointer
/// using [`Box::into_non_null_with_allocator`]:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
@ -1524,7 +1524,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{Allocator, Layout, System};
///
@ -1629,7 +1629,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Converting the `NonNull` pointer back into a `Box` with
/// [`Box::from_non_null_in`] for automatic cleanup:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
@ -1640,7 +1640,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Manual cleanup by explicitly running the destructor and deallocating
/// the memory:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{Allocator, Layout, System};
///

View file

@ -56,6 +56,7 @@
//! [`Rc`]: rc
//! [`RefCell`]: core::cell
#![allow(unused_features)]
#![allow(incomplete_features)]
#![allow(unused_attributes)]
#![stable(feature = "alloc", since = "1.36.0")]
@ -85,13 +86,11 @@
//
// Library features:
// tidy-alphabetical-start
#![cfg_attr(not(no_global_oom_handling), feature(string_replace_in_place))]
#![feature(allocator_api)]
#![feature(array_into_iter_constructors)]
#![feature(ascii_char)]
#![feature(async_fn_traits)]
#![feature(async_iterator)]
#![feature(box_vec_non_null)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(cast_maybe_uninit)]
@ -148,7 +147,6 @@
#![feature(slice_ptr_get)]
#![feature(slice_range)]
#![feature(std_internals)]
#![feature(str_internals)]
#![feature(temporary_niche_types)]
#![feature(transmutability)]
#![feature(trivial_clone)]
@ -158,7 +156,6 @@
#![feature(try_blocks)]
#![feature(try_trait_v2)]
#![feature(try_trait_v2_residual)]
#![feature(try_with_capacity)]
#![feature(tuple_trait)]
#![feature(ub_checks)]
#![feature(unicode_internals)]
@ -176,10 +173,8 @@
#![feature(const_trait_impl)]
#![feature(coroutine_trait)]
#![feature(decl_macro)]
#![feature(derive_const)]
#![feature(dropck_eyepatch)]
#![feature(fundamental)]
#![feature(hashmap_internals)]
#![feature(intrinsics)]
#![feature(lang_items)]
#![feature(min_specialization)]

View file

@ -1238,7 +1238,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Examples
///
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
@ -1265,7 +1265,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// Using memory that was allocated elsewhere:
///
/// ```rust
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::{AllocError, Allocator, Global, Layout};
///
@ -1365,7 +1365,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// # Examples
///
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///

View file

@ -87,6 +87,7 @@
#![allow(incomplete_features)]
#![warn(multiple_supertrait_upcastable)]
#![allow(internal_features)]
#![allow(unused_features)]
#![deny(ffi_unwind_calls)]
#![warn(unreachable_pub)]
// Do not check link redundancy on bootstrapping phase
@ -95,9 +96,7 @@
//
// Library features:
// tidy-alphabetical-start
#![feature(array_ptr_get)]
#![feature(asm_experimental_arch)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(cfg_select)]
#![feature(cfg_target_has_reliable_f16_f128)]
@ -106,31 +105,15 @@
#![feature(const_destruct)]
#![feature(const_eval_select)]
#![feature(const_select_unpredictable)]
#![feature(const_unsigned_bigint_helpers)]
#![feature(core_intrinsics)]
#![feature(coverage_attribute)]
#![feature(disjoint_bitor)]
#![feature(internal_impls_macro)]
#![feature(ip)]
#![feature(is_ascii_octdigit)]
#![feature(link_cfg)]
#![feature(offset_of_enum)]
#![feature(panic_internals)]
#![feature(pattern_type_macro)]
#![feature(ptr_alignment_type)]
#![feature(ptr_metadata)]
#![feature(set_ptr_value)]
#![feature(signed_bigint_helpers)]
#![feature(slice_ptr_get)]
#![feature(str_internals)]
#![feature(str_split_inclusive_remainder)]
#![feature(str_split_remainder)]
#![feature(type_info)]
#![feature(ub_checks)]
#![feature(unsafe_pinned)]
#![feature(utf16_extra)]
#![feature(variant_count)]
#![feature(widening_mul)]
// tidy-alphabetical-end
//
// Language features:
@ -175,7 +158,6 @@
#![feature(optimize_attribute)]
#![feature(pattern_types)]
#![feature(prelude_import)]
#![feature(reborrow)]
#![feature(repr_simd)]
#![feature(rustc_allow_const_fn_unstable)]
#![feature(rustc_attrs)]

View file

@ -17,7 +17,6 @@
#![feature(cfg_emscripten_wasm_eh)]
#![feature(cfg_select)]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(panic_unwind)]
#![feature(staged_api)]
#![feature(std_internals)]
@ -25,6 +24,7 @@
#![panic_runtime]
#![feature(panic_runtime)]
#![allow(internal_features)]
#![allow(unused_features)]
#![warn(unreachable_pub)]
#![deny(unsafe_op_in_unsafe_fn)]

View file

@ -24,7 +24,7 @@
#![feature(staged_api)]
#![feature(process_exitcode_internals)]
#![feature(panic_can_unwind)]
#![feature(test)]
#![cfg_attr(test, feature(test))]
#![feature(thread_spawn_hook)]
#![allow(internal_features)]
#![warn(rustdoc::unescaped_backticks)]

View file

@ -4,12 +4,12 @@
#![feature(cfg_select)]
#![feature(link_cfg)]
#![feature(staged_api)]
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
#![cfg_attr(
all(target_family = "wasm", any(not(target_os = "emscripten"), emscripten_wasm_eh)),
feature(link_llvm_intrinsics, simd_wasm64)
)]
#![allow(internal_features)]
#![allow(unused_features)]
#![deny(unsafe_op_in_unsafe_fn)]
// Force libc to be included even if unused. This is required by many platforms.