1
Fork 0

Rollup merge of #63425 - Mark-Simulacrum:clean-stability-doc, r=eddyb

Cleanup historical stability comments

These weren't removed by ccbcc720a6 most likely by accident,
let's clean them up now.
This commit is contained in:
Mazdak Farrokhzad 2019-08-10 15:27:33 +02:00 committed by GitHub
commit ad8b0a0b8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -957,14 +957,11 @@ fn print_flag_list<T>(cmdline_opt: &str,
/// otherwise returns `None`. /// otherwise returns `None`.
/// ///
/// The compiler's handling of options is a little complicated as it ties into /// The compiler's handling of options is a little complicated as it ties into
/// our stability story, and it's even *more* complicated by historical /// our stability story. The current intention of each compiler option is to
/// accidents. The current intention of each compiler option is to have one of /// have one of two modes:
/// three modes:
/// ///
/// 1. An option is stable and can be used everywhere. /// 1. An option is stable and can be used everywhere.
/// 2. An option is unstable, but was historically allowed on the stable /// 2. An option is unstable, and can only be used on nightly.
/// channel.
/// 3. An option is unstable, and can only be used on nightly.
/// ///
/// Like unstable library and language features, however, unstable options have /// Like unstable library and language features, however, unstable options have
/// always required a form of "opt in" to indicate that you're using them. This /// always required a form of "opt in" to indicate that you're using them. This
@ -1007,19 +1004,13 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
// this option that was passed. // this option that was passed.
// * If we're a nightly compiler, then unstable options are now unlocked, so // * If we're a nightly compiler, then unstable options are now unlocked, so
// we're good to go. // we're good to go.
// * Otherwise, if we're a truly unstable option then we generate an error // * Otherwise, if we're an unstable option then we generate an error
// (unstable option being used on stable) // (unstable option being used on stable)
// * If we're a historically stable-but-should-be-unstable option then we
// emit a warning that we're going to turn this into an error soon.
nightly_options::check_nightly_options(&matches, &config::rustc_optgroups()); nightly_options::check_nightly_options(&matches, &config::rustc_optgroups());
if matches.opt_present("h") || matches.opt_present("help") { if matches.opt_present("h") || matches.opt_present("help") {
// Only show unstable options in --help if we *really* accept unstable // Only show unstable options in --help if we accept unstable options.
// options, which catches the case where we got `-Z unstable-options` on usage(matches.opt_present("verbose"), nightly_options::is_unstable_enabled(&matches));
// the stable channel of Rust which was accidentally allowed
// historically.
usage(matches.opt_present("verbose"),
nightly_options::is_unstable_enabled(&matches));
return None; return None;
} }