rust/mk
Brian Anderson c27133e2ce Preliminary feature staging
This partially implements the feature staging described in the
[release channel RFC][rc]. It does not yet fully conform to the RFC as
written, but does accomplish its goals sufficiently for the 1.0 alpha
release.

It has three primary user-visible effects:

* On the nightly channel, use of unstable APIs generates a warning.
* On the beta channel, use of unstable APIs generates a warning.
* On the beta channel, use of feature gates generates a warning.

Code that does not trigger these warnings is considered 'stable',
modulo pre-1.0 bugs.

Disabling the warnings for unstable APIs continues to be done in the
existing (i.e. old) style, via `#[allow(...)]`, not that specified in
the RFC. I deem this marginally acceptable since any code that must do
this is not using the stable dialect of Rust.

Use of feature gates is itself gated with the new 'unstable_features'
lint, on nightly set to 'allow', and on beta 'warn'.

The attribute scheme used here corresponds to an older version of the
RFC, with the `#[staged_api]` crate attribute toggling the staging
behavior of the stability attributes, but the user impact is only
in-tree so I'm not concerned about having to make design changes later
(and I may ultimately prefer the scheme here after all, with the
`#[staged_api]` crate attribute).

Since the Rust codebase itself makes use of unstable features the
compiler and build system to a midly elaborate dance to allow it to
bootstrap while disobeying these lints (which would otherwise be
errors because Rust builds with `-D warnings`).

This patch includes one significant hack that causes a
regression. Because the `format_args!` macro emits calls to unstable
APIs it would trigger the lint.  I added a hack to the lint to make it
not trigger, but this in turn causes arguments to `println!` not to be
checked for feature gates. I don't presently understand macro
expansion well enough to fix. This is bug #20661.

Closes #16678

[rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2015-01-07 15:34:56 -08:00
..
cfg Initial version of AArch64 support. 2015-01-03 15:16:10 +00:00
clean.mk debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
crates.mk Remove deprecated functionality 2015-01-03 23:43:57 -08:00
ctags.mk Fix make TAGS.emacs. 2014-12-16 17:08:49 +01:00
debuggers.mk debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
dist.mk auto merge of #20456 : brson/rust/packaging2, r=alexcrichton 2015-01-03 05:35:17 +00:00
docs.mk rollup merge of #19998: th0114nd/unicode-bottom 2015-01-05 18:36:20 -08:00
grammar.mk Remove deprecated functionality 2015-01-03 23:43:57 -08:00
host.mk mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
install.mk Fix make install dependencies 2015-01-03 09:49:51 +01:00
llvm.mk Don't use the same llvmdeps.rs for every host. 2014-11-25 17:28:49 -06:00
main.mk Preliminary feature staging 2015-01-07 15:34:56 -08:00
perf.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
platform.mk Initial version of AArch64 support. 2015-01-03 15:16:10 +00:00
prepare.mk debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
reconfig.mk Correct building documenation with Pandoc and TeX on Windows. 2014-11-06 18:08:33 +03:00
rt.mk mk: Build jemalloc with -ffunction-sections 2014-12-24 20:20:01 -08:00
rustllvm.mk Add LLVM ExecutionEngine API 2014-12-11 15:33:27 -07:00
snap.mk mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
stage0.mk mk/stage0: complain instead of creating an empty file 2014-11-20 16:00:12 -05:00
target.mk mk: Use host llvm linkage paths, not target ones 2014-11-30 00:01:19 -08:00
tests.mk Remove deprecated functionality 2015-01-03 23:43:57 -08:00
util.mk mk: Address review feedback 2014-02-14 19:17:50 -08:00