Skip to content

Commit d374620

Browse files
committed
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.
1 parent d8fc819 commit d374620

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)]
@@ -257,8 +258,8 @@
257258
#![feature(is_terminal)]
258259
#![feature(lang_items)]
259260
#![feature(let_chains)]
260-
#![feature(linkage)]
261261
#![feature(link_cfg)]
262+
#![feature(linkage)]
262263
#![feature(min_specialization)]
263264
#![feature(must_not_suspend)]
264265
#![feature(needs_panic_runtime)]
@@ -272,8 +273,10 @@
272273
#![feature(thread_local)]
273274
#![feature(try_blocks)]
274275
#![feature(utf8_chunks)]
276+
// tidy-alphabetical-end
275277
//
276278
// Library features (core):
279+
// tidy-alphabetical-start
277280
#![feature(char_internals)]
278281
#![feature(core_intrinsics)]
279282
#![feature(duration_constants)]
@@ -290,6 +293,7 @@
290293
#![feature(ip)]
291294
#![feature(ip_in_core)]
292295
#![feature(maybe_uninit_slice)]
296+
#![feature(maybe_uninit_uninit_array)]
293297
#![feature(maybe_uninit_write_slice)]
294298
#![feature(panic_can_unwind)]
295299
#![feature(panic_info_message)]
@@ -307,25 +311,28 @@
307311
#![feature(std_internals)]
308312
#![feature(str_internals)]
309313
#![feature(strict_provenance)]
310-
#![feature(maybe_uninit_uninit_array)]
311-
#![feature(const_maybe_uninit_uninit_array)]
312-
#![feature(const_waker)]
314+
// tidy-alphabetical-end
313315
//
314316
// Library features (alloc):
317+
// tidy-alphabetical-start
315318
#![feature(alloc_layout_extra)]
316319
#![feature(allocator_api)]
317320
#![feature(get_mut_unchecked)]
318321
#![feature(map_try_insert)]
319322
#![feature(new_uninit)]
323+
#![feature(slice_concat_trait)]
320324
#![feature(thin_box)]
321325
#![feature(try_reserve_kind)]
322326
#![feature(vec_into_raw_parts)]
323-
#![feature(slice_concat_trait)]
327+
// tidy-alphabetical-end
324328
//
325329
// Library features (unwind):
330+
// tidy-alphabetical-start
326331
#![feature(panic_unwind)]
332+
// tidy-alphabetical-end
327333
//
328334
// Only for re-exporting:
335+
// tidy-alphabetical-start
329336
#![feature(assert_matches)]
330337
#![feature(async_iterator)]
331338
#![feature(c_variadic)]
@@ -337,24 +344,29 @@
337344
#![feature(custom_test_frameworks)]
338345
#![feature(edition_panic)]
339346
#![feature(format_args_nl)]
340-
#![feature(log_syntax)]
347+
#![feature(get_many_mut)]
341348
#![feature(lazy_cell)]
349+
#![feature(log_syntax)]
342350
#![feature(saturating_int_impl)]
343351
#![feature(stdsimd)]
344352
#![feature(test)]
345353
#![feature(trace_macros)]
346-
#![feature(get_many_mut)]
354+
// tidy-alphabetical-end
347355
//
348356
// Only used in tests/benchmarks:
349357
//
350358
// Only for const-ness:
359+
// tidy-alphabetical-start
351360
#![feature(const_collections_with_hasher)]
352361
#![feature(const_hash)]
353362
#![feature(const_io_structs)]
354363
#![feature(const_ip)]
355364
#![feature(const_ipv4)]
356365
#![feature(const_ipv6)]
366+
#![feature(const_maybe_uninit_uninit_array)]
367+
#![feature(const_waker)]
357368
#![feature(thread_local_internals)]
369+
// tidy-alphabetical-end
358370
//
359371
#![default_lib_allocator]
360372

0 commit comments

Comments
 (0)