Open
Description
openedon Mar 15, 2022
std
uses a lot of unstable language features. While core
will most likely always have to use language features because it defines things that are part of the core of the language, we can strive for std
to eventually be free of unstable language features.
Some of these we'll need to stabilize, but some others we might be able to simply remove with some small changes to the code.
(See also #94971 for the library features used by std
.)
These are the language features we currently use in std
: (This does not include core
or alloc
.)
- Macro related:
- allow_internal_unsafe
- allow_internal_unstable
- concat_idents
- decl_macro
- rustc_attrs: rustc_macro_transparency
- Const eval:
- const_mut_refs
- const_trait_impl
- Panic related:
- rustc_attrs: rustc_builtin_macro(std_panic)
- lang_items: begin_panic
- rustc_attrs: rustc_do_not_const_check
- needs_panic_runtime
- Global allocator: (RFC 2492 might be of help here)
- alloc_error_handler
- allocator_internals
- Diagnostics:
- deprecated_suggestion
- must_not_suspend
- rustc_attrs: rustc_conversion_suggestion
- rustc_attrs: rustc_diagnostic_item
- rustc_attrs: rustc_insignificant_dtor
- rustc_attrs: rustc_lint_query_instability
- Rustdoc:
- doc_cfg
- doc_cfg_hide
- rustdoc_internals
- doc_masked
- doc_notable_trait
- intra_doc_pointers
- Other language features:
- lang_items: start
- lang_items: termination
- lang_items: f32_runtime, f64_runtime
- Fixed if we move all f32 and f64 methods to core. Libm -> compiler_builtins?
- associated_type_bounds: Remove need for associated_type_bounds in std. #95587
- box_syntax
- try_blocks
- c_unwind: Stabilise
c_unwind
#116088 - dropck_eyepatch
- exhaustive_patterns
- linkage
- min_specialization
- negative_impls
- We can remove this if we switch to just using
PhantomData
everywhere.
- We can remove this if we switch to just using
- never_type
- nll
- platform_intrinsics: remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics #121516
- prelude_import
- staged_api
- thread_local
- cfg_target_thread_local
- rustc_attrs: rustc_std_internal_symbol
- rustc_attrs: rustc_specialization_trait
- rustc_attrs: rustc_layout_scalar_valid_range_start, rustc_layout_scalar_valid_range_end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment