mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-26 07:25:48 +00:00
Added all active features to the list in reference.md.
Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :) Ensured that the feature gate list in reference.md is kept in alphabetical order.
This commit is contained in:
parent
cca1cf613b
commit
a7d5c3f682
@ -2377,21 +2377,33 @@ considered off, and using the features will result in a compiler error.
|
||||
|
||||
The currently implemented features of the reference compiler are:
|
||||
|
||||
* `advanced_slice_patterns` - see the [match expressions](#match-expressions)
|
||||
section for discussion; the exact semantics of
|
||||
slice patterns are subject to change.
|
||||
|
||||
* `asm` - The `asm!` macro provides a means for inline assembly. This is often
|
||||
useful, but the exact syntax for this feature along with its
|
||||
semantics are likely to change, so this macro usage must be opted
|
||||
into.
|
||||
|
||||
* `associated_types` - Allows type aliases in traits. Experimental.
|
||||
|
||||
* `box_patterns` - Allows `box` patterns, the exact semantics of which
|
||||
is subject to change.
|
||||
|
||||
* `box_syntax` - Allows use of `box` expressions, the exact semantics of which
|
||||
is subject to change.
|
||||
|
||||
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many
|
||||
ways insufficient for concatenating identifiers, and may be
|
||||
removed entirely for something more wholesome.
|
||||
|
||||
* `default_type_params` - Allows use of default type parameters. The future of
|
||||
this feature is uncertain.
|
||||
|
||||
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
|
||||
are inherently unstable and no promise about them is made.
|
||||
|
||||
* `int_uint` - Allows the use of the `int` and `uint` types, which are deprecated.
|
||||
Use `isize` and `usize` instead.
|
||||
|
||||
* `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`,
|
||||
lang items are inherently unstable and no promise about them
|
||||
is made.
|
||||
@ -2410,12 +2422,33 @@ The currently implemented features of the reference compiler are:
|
||||
* `log_syntax` - Allows use of the `log_syntax` macro attribute, which is a
|
||||
nasty hack that will certainly be removed.
|
||||
|
||||
* `main` - Allows use of the `#[main]` attribute, which changes the entry point
|
||||
into a Rust program. This capabiilty is subject to change.
|
||||
|
||||
* `macro_reexport` - Allows macros to be re-exported from one crate after being imported
|
||||
from another. This feature was originally designed with the sole
|
||||
use case of the Rust standard library in mind, and is subject to
|
||||
change.
|
||||
|
||||
* `non_ascii_idents` - The compiler supports the use of non-ascii identifiers,
|
||||
but the implementation is a little rough around the
|
||||
edges, so this can be seen as an experimental feature
|
||||
for now until the specification of identifiers is fully
|
||||
fleshed out.
|
||||
|
||||
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
|
||||
`extern crate std`. This typically requires use of the unstable APIs
|
||||
behind the libstd "facade", such as libcore and libcollections. It
|
||||
may also cause problems when using syntax extensions, including
|
||||
`#[derive]`.
|
||||
|
||||
* `on_unimplemented` - Allows the `#[rustc_on_unimplemented]` attribute, which allows
|
||||
trait definitions to add specialized notes to error messages
|
||||
when an implementation was expected but not found.
|
||||
|
||||
* `optin_builtin_traits` - Allows the definition of default and negative trait
|
||||
implementations. Experimental.
|
||||
|
||||
* `plugin` - Usage of [compiler plugins][plugin] for custom lints or syntax extensions.
|
||||
These depend on compiler internals and are subject to change.
|
||||
|
||||
@ -2431,8 +2464,15 @@ The currently implemented features of the reference compiler are:
|
||||
* `simd` - Allows use of the `#[simd]` attribute, which is overly simple and
|
||||
not the SIMD interface we want to expose in the long term.
|
||||
|
||||
* `simd_ffi` - Allows use of SIMD vectors in signatures for foreign functions.
|
||||
The SIMD interface is subject to change.
|
||||
|
||||
* `staged_api` - Allows usage of stability markers and `#![staged_api]` in a crate
|
||||
|
||||
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
|
||||
into a Rust program. This capabiilty, especially the signature for the
|
||||
annotated function, is subject to change.
|
||||
|
||||
* `struct_inherit` - Allows using struct inheritance, which is barely
|
||||
implemented and will probably be removed. Don't use this.
|
||||
|
||||
@ -2460,18 +2500,20 @@ The currently implemented features of the reference compiler are:
|
||||
which is considered wildly unsafe and will be
|
||||
obsoleted by language improvements.
|
||||
|
||||
* `unsafe_no_drop_flag` - Allows use of the `#[unsafe_no_drop_flag]` attribute,
|
||||
which removes hidden flag added to a type that
|
||||
implements the `Drop` trait. The design for the
|
||||
`Drop` flag is subject to change, and this feature
|
||||
may be removed in the future.
|
||||
|
||||
* `unmarked_api` - Allows use of items within a `#![staged_api]` crate
|
||||
which have not been marked with a stability marker.
|
||||
Such items should not be allowed by the compiler to exist,
|
||||
so if you need this there probably is a compiler bug.
|
||||
|
||||
* `associated_types` - Allows type aliases in traits. Experimental.
|
||||
|
||||
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
|
||||
`extern crate std`. This typically requires use of the unstable APIs
|
||||
behind the libstd "facade", such as libcore and libcollections. It
|
||||
may also cause problems when using syntax extensions, including
|
||||
`#[derive]`.
|
||||
* `visible_private_types` - Allows public APIs to expose otherwise private
|
||||
types, e.g. as the return type of a public function.
|
||||
This capability may be removed in the future.
|
||||
|
||||
If a feature is promoted to a language feature, then all existing programs will
|
||||
start to receive compilation warnings about #[feature] directives which enabled
|
||||
|
@ -134,6 +134,7 @@ static KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
|
||||
// switch to Accepted; see RFC 320)
|
||||
("unsafe_no_drop_flag", "1.0.0", Active),
|
||||
];
|
||||
// (changing above list without updating src/doc/reference.md makes @cmr sad)
|
||||
|
||||
enum Status {
|
||||
/// Represents an active feature that is currently being implemented or
|
||||
|
Loading…
Reference in New Issue
Block a user