Description
In the months before Rust 1.0, the stability mechanism was introduced. At first all of the standard library was marked as unstable, then features were stabilized one by one.
I was curious what remains from that time that is still unstable today. I got some data by running:
grep 'active.*1\.0\.0", Some' src/libsyntax/feature_gate.rs
To get them out of the way, I expect these feature gates to be made obsolete (deprecated and eventually removed) by procedural macros 2.0 (#38356):
-
log_syntax
Tracking issue forlog_syntax
,trace_macros
#29598 -
trace_macros
Tracking issue forlog_syntax
,trace_macros
#29598 -
macro_reexport
Tracking issue formacro_reexport
feature #29638 -
plugin
Tracking issue for plugin stabilization (plugin
,plugin_registrar
features) #29597 (removed) -
plugin_registrar
Tracking issue for plugin stabilization (plugin
,plugin_registrar
features) #29597 (removed) -
custom_attribute
Tracking issue forcustom_attribute
features #29642 -
custom_derive
Tracking issue forcustom_derive
feature #29644 -
rustc_attrs
Tracking issue forcustom_attribute
features #29642 -
quote
Tracking issue forquote
feature #29601
These have also been proposed for deprecation:
-
main
Tracking issue formain
feature #29634 -
placement_in_syntax
Tracking issue for placement new #27779 (feature removed) -
box_syntax
Tracking issue for placement new #27779Tracking issue for box_syntax #49733 (removed) -
box_patterns
Tracking issue forbox_patterns
feature #29641
These are "permanently unstable":
link_llvm_intrinsics
Tracking issue forlink_llvm_intrinsics
#29602fundamental
Tracking issue forfundamental
feature #29635
Which leaves feature flags dating from 1.0.0, that are still unstable today as of 2017-02-19, and that have some likelihood of being stabilized in the future:
-
start
Tracking issue for thestart
feature #29633 -
link_args
Tracking issue forlink_args
stabilization #29596 -
linkage
Tracking issue for thelinkage
feature #29603 -
asm
Tracking issue forasm
(inline assembly) #29722 -
simd
Tracking issue for SIMD support #27731 -
simd_ffi
Tracking issue for SIMD support #27731 -
allocator
Tracking issue for changing the global, default allocator (RFC 1974) #27389 -
thread_local
Tracking issue forthread_local
stabilization #29594 -
unboxed_closures
Tracking issue for Fn traits (unboxed_closures
&fn_traits
feature) #29625 -
concat_idents
Tracking issue forconcat_idents
#29599 -
non_ascii_idents
Tracking issue for non-ASCII identifiers (feature "non_ascii_idents") #28979Tracking issue for RFC 2457, "Allow non-ASCII identifiers" #55467 -
optin_builtin_traits
Tracking Issue for auto traits (auto_traits) -- formerly called opt-in built-in traits (optin_builtin_traits) #13231 -
on_unimplemented
Tracking issue foron_unimplemented
feature #29628 -
associated_consts
Tracking issue forassociated_consts
feature #29646 -
slice_patterns
Tracking issue for RFC #495 (featuresslice_patterns
andadvanced_slice_patterns
) #23121 -
advanced_slice_patterns
Tracking issue for RFC #495 (featuresslice_patterns
andadvanced_slice_patterns
) #23121
(Individual features should be discussed in their respective tracking issues.)
Edit: I realized that feature_gate.rs
does not include library features, so I got more data:
./x.py test src/tools/tidy | grep unstable | grep None | cut -d' ' -f2 | sort > /tmp/now
And in a checkout of the 1.0.0
git tag:
rg '#\[unstable' | grep -o 'feature *= *"[^"]*"' | cut -d\" -f2 | sort -u > /tmp/1.0.0
Got the intersection (com -12 /tmp/now /tmp/1.0.0
), and looked manually to remove deprecated features and implementation details, and add tracking issue numbers. This leaves these feature flags:
-
alloc
Tracking issue for location of facade crates #27783 -
collections
Tracking issue for location of facade crates #27783 (reexported stable inMerged intostd
, but could still be useful with#![no_std]
)alloc
. -
unicode
Tracking issue for location of facade crates #27783 (mostly reexported stable instd
) -
io
Tracking issue for Read::chars #27802 -
lookup_host
Tracking issue for DNS in std::net #27705 -
(gone)set_stdio
(No tracking issue! Despite being useful for example to external test harnesses) -
step_by
Tracking issue forstep_by
stabilization #27741 -
step_trait
Tracking issue forTracking issue forstep_by
stabilization #27741step_trait
stabilization #42168 -
nonzero
Tracking issue forNonZero
/Unique
/Shared
stabilization #27730