Skip to content

Commit ad0a935

Browse files
authored
Rollup merge of #110292 - scottmcm:sort-features-2, r=jyn514
Add `tidy-alphabetical` to features in `alloc` & `std` So that people have to keep them sorted in future, rather than just sticking them on the end where they conflict more often. Follow-up to #110269 cc `@jyn514`
2 parents e79fc5b + d374620 commit ad0a935

File tree

2 files changed

+44
-28
lines changed

2 files changed

+44
-28
lines changed

library/alloc/src/lib.rs

+25-21
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@
9090
#![warn(multiple_supertrait_upcastable)]
9191
//
9292
// Library features:
93+
// tidy-alphabetical-start
94+
#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
95+
#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
96+
#![cfg_attr(test, feature(is_sorted))]
97+
#![cfg_attr(test, feature(new_uninit))]
9398
#![feature(alloc_layout_extra)]
9499
#![feature(allocator_api)]
95100
#![feature(array_chunks)]
@@ -99,23 +104,21 @@
99104
#![feature(assert_matches)]
100105
#![feature(async_iterator)]
101106
#![feature(coerce_unsized)]
102-
#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
107+
#![feature(const_align_of_val)]
103108
#![feature(const_box)]
104-
#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
105-
#![feature(const_cow_is_borrowed)]
106109
#![feature(const_convert)]
107-
#![feature(const_size_of_val)]
108-
#![feature(const_align_of_val)]
109-
#![feature(const_ptr_read)]
110-
#![feature(const_maybe_uninit_zeroed)]
111-
#![feature(const_maybe_uninit_write)]
110+
#![feature(const_cow_is_borrowed)]
111+
#![feature(const_eval_select)]
112112
#![feature(const_maybe_uninit_as_mut_ptr)]
113+
#![feature(const_maybe_uninit_write)]
114+
#![feature(const_maybe_uninit_zeroed)]
115+
#![feature(const_pin)]
116+
#![feature(const_ptr_read)]
113117
#![feature(const_refs_to_cell)]
118+
#![feature(const_size_of_val)]
119+
#![feature(const_waker)]
114120
#![feature(core_intrinsics)]
115121
#![feature(core_panic)]
116-
#![feature(const_eval_select)]
117-
#![feature(const_pin)]
118-
#![feature(const_waker)]
119122
#![feature(dispatch_from_dyn)]
120123
#![feature(error_generic_member_access)]
121124
#![feature(error_in_core)]
@@ -126,15 +129,13 @@
126129
#![feature(hasher_prefixfree_extras)]
127130
#![feature(inline_const)]
128131
#![feature(inplace_iteration)]
129-
#![cfg_attr(test, feature(is_sorted))]
130132
#![feature(iter_advance_by)]
131133
#![feature(iter_next_chunk)]
132134
#![feature(iter_repeat_n)]
133135
#![feature(layout_for_ptr)]
134136
#![feature(maybe_uninit_slice)]
135137
#![feature(maybe_uninit_uninit_array)]
136138
#![feature(maybe_uninit_uninit_array_transpose)]
137-
#![cfg_attr(test, feature(new_uninit))]
138139
#![feature(pattern)]
139140
#![feature(pointer_byte_offsets)]
140141
#![feature(provide_any)]
@@ -150,6 +151,7 @@
150151
#![feature(slice_ptr_get)]
151152
#![feature(slice_ptr_len)]
152153
#![feature(slice_range)]
154+
#![feature(std_internals)]
153155
#![feature(str_internals)]
154156
#![feature(strict_provenance)]
155157
#![feature(trusted_len)]
@@ -160,41 +162,43 @@
160162
#![feature(unicode_internals)]
161163
#![feature(unsize)]
162164
#![feature(utf8_chunks)]
163-
#![feature(std_internals)]
165+
// tidy-alphabetical-end
164166
//
165167
// Language features:
168+
// tidy-alphabetical-start
169+
#![cfg_attr(not(test), feature(generator_trait))]
170+
#![cfg_attr(test, feature(panic_update_hook))]
171+
#![cfg_attr(test, feature(test))]
166172
#![feature(allocator_internals)]
167173
#![feature(allow_internal_unstable)]
168174
#![feature(associated_type_bounds)]
175+
#![feature(c_unwind)]
169176
#![feature(cfg_sanitize)]
170177
#![feature(const_deref)]
171178
#![feature(const_mut_refs)]
172-
#![feature(const_ptr_write)]
173179
#![feature(const_precise_live_drops)]
180+
#![feature(const_ptr_write)]
174181
#![feature(const_trait_impl)]
175182
#![feature(const_try)]
176183
#![feature(dropck_eyepatch)]
177184
#![feature(exclusive_range_pattern)]
178185
#![feature(fundamental)]
179-
#![cfg_attr(not(test), feature(generator_trait))]
180186
#![feature(hashmap_internals)]
181187
#![feature(lang_items)]
182188
#![feature(min_specialization)]
189+
#![feature(multiple_supertrait_upcastable)]
183190
#![feature(negative_impls)]
184191
#![feature(never_type)]
192+
#![feature(pointer_is_aligned)]
185193
#![feature(rustc_allow_const_fn_unstable)]
186194
#![feature(rustc_attrs)]
187-
#![feature(pointer_is_aligned)]
188195
#![feature(slice_internals)]
189196
#![feature(staged_api)]
190197
#![feature(stmt_expr_attributes)]
191-
#![cfg_attr(test, feature(test))]
192198
#![feature(unboxed_closures)]
193199
#![feature(unsized_fn_params)]
194-
#![feature(c_unwind)]
195200
#![feature(with_negative_coherence)]
196-
#![cfg_attr(test, feature(panic_update_hook))]
197-
#![feature(multiple_supertrait_upcastable)]
201+
// tidy-alphabetical-end
198202
//
199203
// Rustdoc features:
200204
#![feature(doc_cfg)]

library/std/src/lib.rs

+19-7
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
#![cfg_attr(windows, feature(round_char_boundary))]
236236
//
237237
// Language features:
238+
// tidy-alphabetical-start
238239
#![feature(alloc_error_handler)]
239240
#![feature(allocator_internals)]
240241
#![feature(allow_internal_unsafe)]
@@ -256,8 +257,8 @@
256257
#![feature(intra_doc_pointers)]
257258
#![feature(lang_items)]
258259
#![feature(let_chains)]
259-
#![feature(linkage)]
260260
#![feature(link_cfg)]
261+
#![feature(linkage)]
261262
#![feature(min_specialization)]
262263
#![feature(must_not_suspend)]
263264
#![feature(needs_panic_runtime)]
@@ -271,8 +272,10 @@
271272
#![feature(thread_local)]
272273
#![feature(try_blocks)]
273274
#![feature(utf8_chunks)]
275+
// tidy-alphabetical-end
274276
//
275277
// Library features (core):
278+
// tidy-alphabetical-start
276279
#![feature(char_internals)]
277280
#![feature(core_intrinsics)]
278281
#![feature(duration_constants)]
@@ -289,6 +292,7 @@
289292
#![feature(ip)]
290293
#![feature(ip_in_core)]
291294
#![feature(maybe_uninit_slice)]
295+
#![feature(maybe_uninit_uninit_array)]
292296
#![feature(maybe_uninit_write_slice)]
293297
#![feature(panic_can_unwind)]
294298
#![feature(panic_info_message)]
@@ -306,25 +310,28 @@
306310
#![feature(std_internals)]
307311
#![feature(str_internals)]
308312
#![feature(strict_provenance)]
309-
#![feature(maybe_uninit_uninit_array)]
310-
#![feature(const_maybe_uninit_uninit_array)]
311-
#![feature(const_waker)]
313+
// tidy-alphabetical-end
312314
//
313315
// Library features (alloc):
316+
// tidy-alphabetical-start
314317
#![feature(alloc_layout_extra)]
315318
#![feature(allocator_api)]
316319
#![feature(get_mut_unchecked)]
317320
#![feature(map_try_insert)]
318321
#![feature(new_uninit)]
322+
#![feature(slice_concat_trait)]
319323
#![feature(thin_box)]
320324
#![feature(try_reserve_kind)]
321325
#![feature(vec_into_raw_parts)]
322-
#![feature(slice_concat_trait)]
326+
// tidy-alphabetical-end
323327
//
324328
// Library features (unwind):
329+
// tidy-alphabetical-start
325330
#![feature(panic_unwind)]
331+
// tidy-alphabetical-end
326332
//
327333
// Only for re-exporting:
334+
// tidy-alphabetical-start
328335
#![feature(assert_matches)]
329336
#![feature(async_iterator)]
330337
#![feature(c_variadic)]
@@ -336,24 +343,29 @@
336343
#![feature(custom_test_frameworks)]
337344
#![feature(edition_panic)]
338345
#![feature(format_args_nl)]
339-
#![feature(log_syntax)]
346+
#![feature(get_many_mut)]
340347
#![feature(lazy_cell)]
348+
#![feature(log_syntax)]
341349
#![feature(saturating_int_impl)]
342350
#![feature(stdsimd)]
343351
#![feature(test)]
344352
#![feature(trace_macros)]
345-
#![feature(get_many_mut)]
353+
// tidy-alphabetical-end
346354
//
347355
// Only used in tests/benchmarks:
348356
//
349357
// Only for const-ness:
358+
// tidy-alphabetical-start
350359
#![feature(const_collections_with_hasher)]
351360
#![feature(const_hash)]
352361
#![feature(const_io_structs)]
353362
#![feature(const_ip)]
354363
#![feature(const_ipv4)]
355364
#![feature(const_ipv6)]
365+
#![feature(const_maybe_uninit_uninit_array)]
366+
#![feature(const_waker)]
356367
#![feature(thread_local_internals)]
368+
// tidy-alphabetical-end
357369
//
358370
#![default_lib_allocator]
359371

0 commit comments

Comments
 (0)