about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-03-17 11:05:32 +0100
committerMara Bos <m-ou.se@m-ou.se>2022-03-31 18:43:12 +0200
commit79220247cd28bf84110976bf07e99f7b4aa9ec2b (patch)
tree45aa5c96047973118f88e46a2a8d0c3c1e1874bb /library/std/src
parente50ff9b4521234e56ff46f8ed0372d5cb5689654 (diff)
downloadrust-79220247cd28bf84110976bf07e99f7b4aa9ec2b.tar.gz
rust-79220247cd28bf84110976bf07e99f7b4aa9ec2b.zip
Categorize and sort unstable features in std.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/lib.rs137
1 files changed, 74 insertions, 63 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 133ced5f26c..819ec10a4b4 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -218,111 +218,122 @@
     feature(slice_index_methods, coerce_unsized, sgx_platform)
 )]
 #![deny(rustc::existing_doc_keyword)]
-// std is implemented with unstable features, many of which are internal
-// compiler details that will never be stable
-// NB: the following list is sorted to minimize merge conflicts.
+//
+// Language features:
 #![feature(alloc_error_handler)]
-#![feature(alloc_layout_extra)]
-#![feature(allocator_api)]
 #![feature(allocator_internals)]
 #![feature(allow_internal_unsafe)]
 #![feature(allow_internal_unstable)]
-#![feature(array_error_internals)]
-#![feature(assert_matches)]
 #![feature(associated_type_bounds)]
-#![feature(async_iterator)]
-#![feature(atomic_mut_ptr)]
-#![feature(bench_black_box)]
 #![feature(box_syntax)]
 #![feature(c_unwind)]
-#![feature(c_variadic)]
-#![feature(cfg_accessible)]
-#![feature(cfg_eval)]
 #![feature(cfg_target_thread_local)]
-#![feature(char_error_internals)]
-#![feature(char_internals)]
-#![feature(concat_bytes)]
 #![feature(concat_idents)]
 #![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
 #![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
-#![feature(const_format_args)]
-#![feature(const_io_structs)]
-#![feature(const_ip)]
-#![feature(const_ipv4)]
-#![feature(const_ipv6)]
 #![feature(const_mut_refs)]
-#![feature(const_option)]
-#![feature(const_socketaddr)]
 #![feature(const_trait_impl)]
-#![feature(c_size_t)]
-#![feature(core_ffi_c)]
-#![feature(core_intrinsics)]
-#![feature(core_panic)]
-#![feature(custom_test_frameworks)]
 #![feature(decl_macro)]
+#![cfg_attr(not(bootstrap), feature(deprecated_suggestion))]
 #![feature(doc_cfg)]
 #![feature(doc_cfg_hide)]
-#![feature(rustdoc_internals)]
-#![cfg_attr(not(bootstrap), feature(deprecated_suggestion))]
 #![feature(doc_masked)]
 #![feature(doc_notable_trait)]
 #![feature(dropck_eyepatch)]
-#![feature(duration_checked_float)]
-#![feature(duration_constants)]
-#![feature(edition_panic)]
-#![feature(exact_size_is_empty)]
 #![feature(exhaustive_patterns)]
-#![feature(extend_one)]
-#![feature(float_minimum_maximum)]
-#![feature(format_args_nl)]
-#![feature(strict_provenance)]
-#![feature(get_mut_unchecked)]
-#![feature(hashmap_internals)]
-#![feature(int_error_internals)]
 #![feature(intra_doc_pointers)]
 #![feature(lang_items)]
 #![feature(linkage)]
-#![feature(log_syntax)]
-#![feature(map_try_insert)]
-#![feature(maybe_uninit_slice)]
-#![feature(maybe_uninit_write_slice)]
 #![feature(min_specialization)]
-#![feature(mixed_integer_ops)]
 #![feature(must_not_suspend)]
 #![feature(needs_panic_runtime)]
 #![feature(negative_impls)]
 #![feature(never_type)]
-#![feature(new_uninit)]
 #![feature(nll)]
+#![feature(platform_intrinsics)]
+#![feature(prelude_import)]
+#![feature(rustc_attrs)]
+#![feature(rustdoc_internals)]
+#![feature(staged_api)]
+#![feature(thread_local)]
+#![feature(try_blocks)]
+//
+// Library features (core):
+#![feature(array_error_internals)]
+#![feature(atomic_mut_ptr)]
+#![feature(char_error_internals)]
+#![feature(char_internals)]
+#![feature(core_intrinsics)]
+#![feature(duration_checked_float)]
+#![feature(duration_constants)]
+#![feature(exact_size_is_empty)]
+#![feature(extend_one)]
+#![feature(float_minimum_maximum)]
+#![feature(hashmap_internals)]
+#![feature(int_error_internals)]
+#![feature(maybe_uninit_slice)]
+#![feature(maybe_uninit_write_slice)]
+#![feature(mixed_integer_ops)]
 #![feature(nonnull_slice_from_raw_parts)]
-#![feature(once_cell)]
+#![feature(panic_can_unwind)]
 #![feature(panic_info_message)]
 #![feature(panic_internals)]
-#![feature(panic_can_unwind)]
-#![feature(panic_unwind)]
-#![feature(platform_intrinsics)]
 #![feature(portable_simd)]
-#![feature(prelude_import)]
 #![feature(ptr_as_uninit)]
 #![feature(raw_os_nonzero)]
-#![feature(rustc_attrs)]
-#![feature(saturating_int_impl)]
 #![feature(slice_internals)]
 #![feature(slice_ptr_get)]
-#![feature(staged_api)]
 #![feature(std_internals)]
-#![feature(stdsimd)]
 #![feature(str_internals)]
-#![feature(test)]
-#![feature(thread_local)]
-#![feature(thread_local_internals)]
-#![feature(toowned_clone_into)]
+#![feature(strict_provenance)]
 #![feature(total_cmp)]
-#![feature(trace_macros)]
-#![feature(try_blocks)]
+//
+// Library features (alloc):
+#![feature(alloc_layout_extra)]
+#![feature(allocator_api)]
+#![feature(get_mut_unchecked)]
+#![feature(map_try_insert)]
+#![feature(new_uninit)]
+#![feature(toowned_clone_into)]
 #![feature(try_reserve_kind)]
 #![feature(vec_into_raw_parts)]
-// NB: the above list is sorted to minimize merge conflicts.
+//
+// Library features (unwind):
+#![feature(panic_unwind)]
+//
+// Only for re-exporting:
+#![feature(assert_matches)]
+#![feature(async_iterator)]
+#![feature(c_size_t)]
+#![feature(c_variadic)]
+#![feature(cfg_accessible)]
+#![feature(cfg_eval)]
+#![feature(concat_bytes)]
+#![feature(const_format_args)]
+#![feature(core_ffi_c)]
+#![feature(core_panic)]
+#![feature(custom_test_frameworks)]
+#![feature(edition_panic)]
+#![feature(format_args_nl)]
+#![feature(log_syntax)]
+#![feature(once_cell)]
+#![feature(saturating_int_impl)]
+#![feature(stdsimd)]
+#![feature(test)]
+#![feature(trace_macros)]
+//
+// Only used in tests/benchmarks:
+#![feature(bench_black_box)]
+//
+// Only for const-ness:
+#![feature(const_io_structs)]
+#![feature(const_ip)]
+#![feature(const_ipv4)]
+#![feature(const_ipv6)]
+#![feature(const_option)]
+#![feature(const_socketaddr)]
+#![feature(thread_local_internals)]
+//
 #![default_lib_allocator]
 
 // Explicitly import the prelude. The compiler uses this same unstable attribute