Skip to content

Commit

Permalink
Merge pull request rust-lang#32 from frewsxcv/frewsxcv-the-unstable-book
Browse files Browse the repository at this point in the history
Replace unstable feature list with link to The Unstable Book.
  • Loading branch information
steveklabnik authored Apr 1, 2017
2 parents fdb0090 + 1e5b1a7 commit 511448f
Showing 1 changed file with 4 additions and 154 deletions.
158 changes: 4 additions & 154 deletions src/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,160 +472,8 @@ This directive informs the compiler that the feature list: `feature1`,
crate-level, not at a module-level. Without this directive, all features are
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](expressions.html#match-expressions)
section for discussion; the exact semantics of
slice patterns are subject to change, so some types are still unstable.

* `slice_patterns` - OK, actually, slice patterns are just scary and
completely unstable.

* `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_consts` - Allows constants to be defined in `impl` and `trait`
blocks, so that they can be associated with a type or
trait in a similar manner to methods and associated
types.

* `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.

* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
matcher which is subject to change.

* `cfg_target_has_atomic` - Allows conditional compilation using the `target_has_atomic`
matcher 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.

* `custom_attribute` - Allows the usage of attributes unknown to the compiler
so that new attributes can be added in a backwards compatible
manner (RFC 572).

* `custom_derive` - Allows the use of `#[derive(Foo,Bar)]` as sugar for
`#[derive_Foo] #[derive_Bar]`, which can be user-defined syntax
extensions.

* `inclusive_range_syntax` - Allows use of the `a...b` and `...b` syntax for inclusive ranges.

* `inclusive_range` - Allows use of the types that represent desugared inclusive ranges.

* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
are inherently unstable and no promise about them is made.

* `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`,
lang items are inherently unstable and no promise about them
is made.

* `link_args` - This attribute is used to specify custom flags to the linker,
but usage is strongly discouraged. The compiler's usage of the
system linker is not guaranteed to continue in the future, and
if the system linker is not used then specifying custom flags
doesn't have much meaning.

* `link_llvm_intrinsics` - Allows linking to LLVM intrinsics via
`#[link_name="llvm.*"]`.

* `linkage` - Allows use of the `linkage` attribute, which is not portable.

* `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 capability 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.

* `plugin_registrar` - Indicates that a crate provides [compiler plugins][plugin].

* `quote` - Allows use of the `quote_*!` family of macros, which are
implemented very poorly and will likely change significantly
with a proper implementation.

* `rustc_attrs` - Gates internal `#[rustc_*]` attributes which may be
for internal use only or have meaning added to them in the future.

* `rustc_diagnostic_macros`- A mysterious feature, used in the implementation
of rustc, not meant for mortals.

* `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.

* `start` - Allows use of the `#[start]` attribute, which changes the entry point
into a Rust program. This capability, especially the signature for the
annotated function, is subject to change.

* `thread_local` - The usage of the `#[thread_local]` attribute is experimental
and should be seen as unstable. This attribute is used to
declare a `static` as being unique per-thread leveraging
LLVM's implementation which works in concert with the kernel
loader and dynamic linker. This is not necessarily available
on all platforms, and usage of it is discouraged.

* `trace_macros` - Allows use of the `trace_macros` macro, which is a nasty
hack that will certainly be removed.

* `unboxed_closures` - Rust's new closure design, which is currently a work in
progress feature with many known bugs.

* `allow_internal_unstable` - Allows `macro_rules!` macros to be tagged with the
`#[allow_internal_unstable]` attribute, designed
to allow `std` macros to call
`#[unstable]`/feature-gated functionality
internally without imposing on callers
(i.e. making them behave like function calls in
terms of encapsulation).

* `default_type_parameter_fallback` - Allows type parameter defaults to
influence type inference.

* `stmt_expr_attributes` - Allows attributes on expressions.

* `type_ascription` - Allows type ascription expressions `expr: Type`.

* `abi_vectorcall` - Allows the usage of the vectorcall calling convention
(e.g. `extern "vectorcall" func fn_();`)

* `abi_sysv64` - Allows the usage of the system V AMD64 calling convention
(e.g. `extern "sysv64" func fn_();`)
The currently implemented features of the reference compiler are documented in
[The Unstable Book].

If a feature is promoted to a language feature, then all existing programs will
start to receive compilation warnings about `#![feature]` directives which enabled
Expand All @@ -637,3 +485,5 @@ removed.

If an unknown feature is found in a directive, it results in a compiler error.
An unknown feature is one which has never been recognized by the compiler.

[The Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/

0 comments on commit 511448f

Please sign in to comment.