Skip to content

Commit 0dc1556

Browse files
committed
Remove unused features in library
1 parent a07f837 commit 0dc1556

7 files changed

Lines changed: 12 additions & 35 deletions

File tree

library/alloc/src/boxed.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15141514
/// Recreate a `Box` which was previously converted to a `NonNull` pointer
15151515
/// using [`Box::into_non_null_with_allocator`]:
15161516
/// ```
1517-
/// #![feature(allocator_api, box_vec_non_null)]
1517+
/// #![feature(allocator_api)]
15181518
///
15191519
/// use std::alloc::System;
15201520
///
@@ -1524,7 +1524,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15241524
/// ```
15251525
/// Manually create a `Box` from scratch by using the system allocator:
15261526
/// ```
1527-
/// #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
1527+
/// #![feature(allocator_api)]
15281528
///
15291529
/// use std::alloc::{Allocator, Layout, System};
15301530
///
@@ -1629,7 +1629,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
16291629
/// Converting the `NonNull` pointer back into a `Box` with
16301630
/// [`Box::from_non_null_in`] for automatic cleanup:
16311631
/// ```
1632-
/// #![feature(allocator_api, box_vec_non_null)]
1632+
/// #![feature(allocator_api)]
16331633
///
16341634
/// use std::alloc::System;
16351635
///
@@ -1640,7 +1640,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
16401640
/// Manual cleanup by explicitly running the destructor and deallocating
16411641
/// the memory:
16421642
/// ```
1643-
/// #![feature(allocator_api, box_vec_non_null)]
1643+
/// #![feature(allocator_api)]
16441644
///
16451645
/// use std::alloc::{Allocator, Layout, System};
16461646
///

library/alloc/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
//! [`Rc`]: rc
5757
//! [`RefCell`]: core::cell
5858
59+
#![allow(unused_features)]
5960
#![allow(incomplete_features)]
6061
#![allow(unused_attributes)]
6162
#![stable(feature = "alloc", since = "1.36.0")]
@@ -85,13 +86,11 @@
8586
//
8687
// Library features:
8788
// tidy-alphabetical-start
88-
#![cfg_attr(not(no_global_oom_handling), feature(string_replace_in_place))]
8989
#![feature(allocator_api)]
9090
#![feature(array_into_iter_constructors)]
9191
#![feature(ascii_char)]
9292
#![feature(async_fn_traits)]
9393
#![feature(async_iterator)]
94-
#![feature(box_vec_non_null)]
9594
#![feature(bstr)]
9695
#![feature(bstr_internals)]
9796
#![feature(cast_maybe_uninit)]
@@ -148,7 +147,6 @@
148147
#![feature(slice_ptr_get)]
149148
#![feature(slice_range)]
150149
#![feature(std_internals)]
151-
#![feature(str_internals)]
152150
#![feature(temporary_niche_types)]
153151
#![feature(transmutability)]
154152
#![feature(trivial_clone)]
@@ -158,7 +156,6 @@
158156
#![feature(try_blocks)]
159157
#![feature(try_trait_v2)]
160158
#![feature(try_trait_v2_residual)]
161-
#![feature(try_with_capacity)]
162159
#![feature(tuple_trait)]
163160
#![feature(ub_checks)]
164161
#![feature(unicode_internals)]
@@ -176,10 +173,8 @@
176173
#![feature(const_trait_impl)]
177174
#![feature(coroutine_trait)]
178175
#![feature(decl_macro)]
179-
#![feature(derive_const)]
180176
#![feature(dropck_eyepatch)]
181177
#![feature(fundamental)]
182-
#![feature(hashmap_internals)]
183178
#![feature(intrinsics)]
184179
#![feature(lang_items)]
185180
#![feature(min_specialization)]

library/alloc/src/vec/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ impl<T, A: Allocator> Vec<T, A> {
12381238
/// # Examples
12391239
///
12401240
/// ```
1241-
/// #![feature(allocator_api, box_vec_non_null)]
1241+
/// #![feature(allocator_api)]
12421242
///
12431243
/// use std::alloc::System;
12441244
///
@@ -1265,7 +1265,7 @@ impl<T, A: Allocator> Vec<T, A> {
12651265
/// Using memory that was allocated elsewhere:
12661266
///
12671267
/// ```rust
1268-
/// #![feature(allocator_api, box_vec_non_null)]
1268+
/// #![feature(allocator_api)]
12691269
///
12701270
/// use std::alloc::{AllocError, Allocator, Global, Layout};
12711271
///
@@ -1365,7 +1365,7 @@ impl<T, A: Allocator> Vec<T, A> {
13651365
/// # Examples
13661366
///
13671367
/// ```
1368-
/// #![feature(allocator_api, box_vec_non_null)]
1368+
/// #![feature(allocator_api)]
13691369
///
13701370
/// use std::alloc::System;
13711371
///

library/core/src/lib.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#![allow(incomplete_features)]
8888
#![warn(multiple_supertrait_upcastable)]
8989
#![allow(internal_features)]
90+
#![allow(unused_features)]
9091
#![deny(ffi_unwind_calls)]
9192
#![warn(unreachable_pub)]
9293
// Do not check link redundancy on bootstrapping phase
@@ -95,9 +96,7 @@
9596
//
9697
// Library features:
9798
// tidy-alphabetical-start
98-
#![feature(array_ptr_get)]
9999
#![feature(asm_experimental_arch)]
100-
#![feature(bstr)]
101100
#![feature(bstr_internals)]
102101
#![feature(cfg_select)]
103102
#![feature(cfg_target_has_reliable_f16_f128)]
@@ -106,31 +105,15 @@
106105
#![feature(const_destruct)]
107106
#![feature(const_eval_select)]
108107
#![feature(const_select_unpredictable)]
109-
#![feature(const_unsigned_bigint_helpers)]
110108
#![feature(core_intrinsics)]
111109
#![feature(coverage_attribute)]
112110
#![feature(disjoint_bitor)]
113111
#![feature(internal_impls_macro)]
114-
#![feature(ip)]
115-
#![feature(is_ascii_octdigit)]
116112
#![feature(link_cfg)]
117113
#![feature(offset_of_enum)]
118114
#![feature(panic_internals)]
119115
#![feature(pattern_type_macro)]
120-
#![feature(ptr_alignment_type)]
121-
#![feature(ptr_metadata)]
122-
#![feature(set_ptr_value)]
123-
#![feature(signed_bigint_helpers)]
124-
#![feature(slice_ptr_get)]
125-
#![feature(str_internals)]
126-
#![feature(str_split_inclusive_remainder)]
127-
#![feature(str_split_remainder)]
128-
#![feature(type_info)]
129116
#![feature(ub_checks)]
130-
#![feature(unsafe_pinned)]
131-
#![feature(utf16_extra)]
132-
#![feature(variant_count)]
133-
#![feature(widening_mul)]
134117
// tidy-alphabetical-end
135118
//
136119
// Language features:
@@ -175,7 +158,6 @@
175158
#![feature(optimize_attribute)]
176159
#![feature(pattern_types)]
177160
#![feature(prelude_import)]
178-
#![feature(reborrow)]
179161
#![feature(repr_simd)]
180162
#![feature(rustc_allow_const_fn_unstable)]
181163
#![feature(rustc_attrs)]

library/panic_unwind/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#![feature(cfg_emscripten_wasm_eh)]
1818
#![feature(cfg_select)]
1919
#![feature(core_intrinsics)]
20-
#![feature(lang_items)]
2120
#![feature(panic_unwind)]
2221
#![feature(staged_api)]
2322
#![feature(std_internals)]
2423
#![feature(rustc_attrs)]
2524
#![panic_runtime]
2625
#![feature(panic_runtime)]
2726
#![allow(internal_features)]
27+
#![allow(unused_features)]
2828
#![warn(unreachable_pub)]
2929
#![deny(unsafe_op_in_unsafe_fn)]
3030

library/test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#![feature(staged_api)]
2525
#![feature(process_exitcode_internals)]
2626
#![feature(panic_can_unwind)]
27-
#![feature(test)]
27+
#![cfg_attr(test, feature(test))]
2828
#![feature(thread_spawn_hook)]
2929
#![allow(internal_features)]
3030
#![warn(rustdoc::unescaped_backticks)]

library/unwind/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#![feature(cfg_select)]
55
#![feature(link_cfg)]
66
#![feature(staged_api)]
7-
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
87
#![cfg_attr(
98
all(target_family = "wasm", any(not(target_os = "emscripten"), emscripten_wasm_eh)),
109
feature(link_llvm_intrinsics, simd_wasm64)
1110
)]
1211
#![allow(internal_features)]
12+
#![allow(unused_features)]
1313
#![deny(unsafe_op_in_unsafe_fn)]
1414

1515
// Force libc to be included even if unused. This is required by many platforms.

0 commit comments

Comments
 (0)