Skip to content

Commit 3c46293

Browse files
committed
Merge with more recent updates
2 parents e030480 + d924309 commit 3c46293

18 files changed

+594
-262
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto eol=lf

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ before_script:
88

99
script:
1010
- export PATH=$PATH:/home/travis/.cargo/bin && mdbook test
11+
- cd stable-check && cargo run -- ../src

src/SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
- [Macros](macros.md)
1818
- [Macros By Example](macros-by-example.md)
19-
- [Procedrual Macros](procedural-macros.md)
19+
- [Procedural Macros](procedural-macros.md)
2020

2121
- [Crates and source files](crates-and-source-files.md)
2222

@@ -56,3 +56,5 @@
5656
- [Behavior not considered unsafe](behavior-not-considered-unsafe.md)
5757

5858
[Appendix: Influences](influences.md)
59+
60+
[Appendix: As-yet-undocumented Features](undocumented.md)

src/attributes.md

Lines changed: 18 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ type int8_t = i8;
6464
infinitely-recursive compile-time operations like
6565
auto-dereference or macro expansion. The default is
6666
`#![recursion_limit="64"]`.
67+
- `windows_subsystem` - Indicates that when this crate is linked for a Windows
68+
target it will configure the resulting binary's
69+
[subsystem] via the linker. Valid values for this
70+
attribute are `console` and `windows`, corresponding to
71+
those two respective subsystems. More subsystems may be
72+
allowed in the future, and this attribute is ignored on
73+
non-Windows targets.
74+
75+
[subsystem]: https://msdn.microsoft.com/en-us/library/fcc1zstk.aspx
6776

6877
### Module-only attributes
6978

@@ -84,6 +93,7 @@ type int8_t = i8;
8493
item](#language-items) for more details.
8594
- `test` - indicates that this function is a test function, to only be compiled
8695
in case of `--test`.
96+
- `ignore` - indicates that this test function is disabled.
8797
- `should_panic` - indicates that this test function should panic, inverting the success condition.
8898
- `cold` - The function is unlikely to be executed, so optimize it (and calls
8999
to it) differently.
@@ -149,7 +159,7 @@ On `struct`s:
149159
list of names `#[macro_use(foo, bar)]` restricts the import to just those
150160
macros named. The `extern crate` must appear at the crate root, not inside
151161
`mod`, which ensures proper function of the [`$crate` macro
152-
variable](../book/macros.html#the-variable-crate).
162+
variable](../book/first-edition/macros.html#the-variable-crate).
153163

154164
- `macro_reexport` on an `extern crate` — re-export the named macros.
155165

@@ -159,7 +169,7 @@ On `struct`s:
159169
link it into the output.
160170

161171
See the [macros section of the
162-
book](../book/macros.html#scoping-and-macro-importexport) for more information on
172+
book](../book/first-edition/macros.html#scoping-and-macro-importexport) for more information on
163173
macro scope.
164174

165175
## Miscellaneous attributes
@@ -317,8 +327,7 @@ For any lint check `C`:
317327

318328
The lint checks supported by the compiler can be found via `rustc -W help`,
319329
along with their default settings. [Compiler
320-
plugins](../unstable-book/plugin.html#lint-plugins) can provide additional
321-
lint checks.
330+
plugins][unstable book plugin] can provide additional lint checks.
322331

323332
```rust,ignore
324333
pub mod m1 {
@@ -463,160 +472,8 @@ This directive informs the compiler that the feature list: `feature1`,
463472
crate-level, not at a module-level. Without this directive, all features are
464473
considered off, and using the features will result in a compiler error.
465474

466-
The currently implemented features of the reference compiler are:
467-
468-
* `advanced_slice_patterns` - See the [match
469-
expressions](expressions.html#match-expressions)
470-
section for discussion; the exact semantics of
471-
slice patterns are subject to change, so some types are still unstable.
472-
473-
* `slice_patterns` - OK, actually, slice patterns are just scary and
474-
completely unstable.
475-
476-
* `asm` - The `asm!` macro provides a means for inline assembly. This is often
477-
useful, but the exact syntax for this feature along with its
478-
semantics are likely to change, so this macro usage must be opted
479-
into.
480-
481-
* `associated_consts` - Allows constants to be defined in `impl` and `trait`
482-
blocks, so that they can be associated with a type or
483-
trait in a similar manner to methods and associated
484-
types.
485-
486-
* `box_patterns` - Allows `box` patterns, the exact semantics of which
487-
is subject to change.
488-
489-
* `box_syntax` - Allows use of `box` expressions, the exact semantics of which
490-
is subject to change.
491-
492-
* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
493-
matcher which is subject to change.
494-
495-
* `cfg_target_has_atomic` - Allows conditional compilation using the `target_has_atomic`
496-
matcher which is subject to change.
497-
498-
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many
499-
ways insufficient for concatenating identifiers, and may be
500-
removed entirely for something more wholesome.
501-
502-
* `custom_attribute` - Allows the usage of attributes unknown to the compiler
503-
so that new attributes can be added in a backwards compatible
504-
manner (RFC 572).
505-
506-
* `custom_derive` - Allows the use of `#[derive(Foo,Bar)]` as sugar for
507-
`#[derive_Foo] #[derive_Bar]`, which can be user-defined syntax
508-
extensions.
509-
510-
* `inclusive_range_syntax` - Allows use of the `a...b` and `...b` syntax for inclusive ranges.
511-
512-
* `inclusive_range` - Allows use of the types that represent desugared inclusive ranges.
513-
514-
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
515-
are inherently unstable and no promise about them is made.
516-
517-
* `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`,
518-
lang items are inherently unstable and no promise about them
519-
is made.
520-
521-
* `link_args` - This attribute is used to specify custom flags to the linker,
522-
but usage is strongly discouraged. The compiler's usage of the
523-
system linker is not guaranteed to continue in the future, and
524-
if the system linker is not used then specifying custom flags
525-
doesn't have much meaning.
526-
527-
* `link_llvm_intrinsics` - Allows linking to LLVM intrinsics via
528-
`#[link_name="llvm.*"]`.
529-
530-
* `linkage` - Allows use of the `linkage` attribute, which is not portable.
531-
532-
* `log_syntax` - Allows use of the `log_syntax` macro attribute, which is a
533-
nasty hack that will certainly be removed.
534-
535-
* `main` - Allows use of the `#[main]` attribute, which changes the entry point
536-
into a Rust program. This capability is subject to change.
537-
538-
* `macro_reexport` - Allows macros to be re-exported from one crate after being imported
539-
from another. This feature was originally designed with the sole
540-
use case of the Rust standard library in mind, and is subject to
541-
change.
542-
543-
* `non_ascii_idents` - The compiler supports the use of non-ascii identifiers,
544-
but the implementation is a little rough around the
545-
edges, so this can be seen as an experimental feature
546-
for now until the specification of identifiers is fully
547-
fleshed out.
548-
549-
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
550-
`extern crate std`. This typically requires use of the unstable APIs
551-
behind the libstd "facade", such as libcore and libcollections. It
552-
may also cause problems when using syntax extensions, including
553-
`#[derive]`.
554-
555-
* `on_unimplemented` - Allows the `#[rustc_on_unimplemented]` attribute, which allows
556-
trait definitions to add specialized notes to error messages
557-
when an implementation was expected but not found.
558-
559-
* `optin_builtin_traits` - Allows the definition of default and negative trait
560-
implementations. Experimental.
561-
562-
* `plugin` - Usage of [compiler plugins][plugin] for custom lints or syntax extensions.
563-
These depend on compiler internals and are subject to change.
564-
565-
* `plugin_registrar` - Indicates that a crate provides [compiler plugins][plugin].
566-
567-
* `quote` - Allows use of the `quote_*!` family of macros, which are
568-
implemented very poorly and will likely change significantly
569-
with a proper implementation.
570-
571-
* `rustc_attrs` - Gates internal `#[rustc_*]` attributes which may be
572-
for internal use only or have meaning added to them in the future.
573-
574-
* `rustc_diagnostic_macros`- A mysterious feature, used in the implementation
575-
of rustc, not meant for mortals.
576-
577-
* `simd` - Allows use of the `#[simd]` attribute, which is overly simple and
578-
not the SIMD interface we want to expose in the long term.
579-
580-
* `simd_ffi` - Allows use of SIMD vectors in signatures for foreign functions.
581-
The SIMD interface is subject to change.
582-
583-
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
584-
into a Rust program. This capability, especially the signature for the
585-
annotated function, is subject to change.
586-
587-
* `thread_local` - The usage of the `#[thread_local]` attribute is experimental
588-
and should be seen as unstable. This attribute is used to
589-
declare a `static` as being unique per-thread leveraging
590-
LLVM's implementation which works in concert with the kernel
591-
loader and dynamic linker. This is not necessarily available
592-
on all platforms, and usage of it is discouraged.
593-
594-
* `trace_macros` - Allows use of the `trace_macros` macro, which is a nasty
595-
hack that will certainly be removed.
596-
597-
* `unboxed_closures` - Rust's new closure design, which is currently a work in
598-
progress feature with many known bugs.
599-
600-
* `allow_internal_unstable` - Allows `macro_rules!` macros to be tagged with the
601-
`#[allow_internal_unstable]` attribute, designed
602-
to allow `std` macros to call
603-
`#[unstable]`/feature-gated functionality
604-
internally without imposing on callers
605-
(i.e. making them behave like function calls in
606-
terms of encapsulation).
607-
608-
* `default_type_parameter_fallback` - Allows type parameter defaults to
609-
influence type inference.
610-
611-
* `stmt_expr_attributes` - Allows attributes on expressions.
612-
613-
* `type_ascription` - Allows type ascription expressions `expr: Type`.
614-
615-
* `abi_vectorcall` - Allows the usage of the vectorcall calling convention
616-
(e.g. `extern "vectorcall" func fn_();`)
617-
618-
* `abi_sysv64` - Allows the usage of the system V AMD64 calling convention
619-
(e.g. `extern "sysv64" func fn_();`)
475+
The currently implemented features of the reference compiler are documented in
476+
[The Unstable Book].
620477

621478
If a feature is promoted to a language feature, then all existing programs will
622479
start to receive compilation warnings about `#![feature]` directives which enabled
@@ -628,3 +485,6 @@ removed.
628485

629486
If an unknown feature is found in a directive, it results in a compiler error.
630487
An unknown feature is one which has never been recognized by the compiler.
488+
489+
[The Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/
490+
[unstable book plugin]: ../unstable-book/language-features/plugin.html#lint-plugins

0 commit comments

Comments
 (0)