diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/man/rustc.1 | 2 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/config.rs | 26 | ||||
| -rw-r--r-- | src/librustdoc/core.rs | 16 | ||||
| -rw-r--r-- | src/librustdoc/doctest.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 6 | ||||
| -rw-r--r-- | src/test/run-make/issue-88756-default-output/output-default.stdout | 3 | ||||
| -rw-r--r-- | src/test/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr | 2 | ||||
| -rw-r--r-- | src/tools/clippy/src/driver.rs | 2 |
9 files changed, 32 insertions, 31 deletions
diff --git a/src/doc/man/rustc.1 b/src/doc/man/rustc.1 index 4e7170806d4..ff41324ef26 100644 --- a/src/doc/man/rustc.1 +++ b/src/doc/man/rustc.1 @@ -143,7 +143,7 @@ Specify where an external rust library is located. These should match Override the system root. .TP \fB\-Z\fR \fIFLAG\fR -Set internal debugging options. +Set unstable / perma-unstable options. Use \fI\-Z help\fR to print available options. .TP \fB\-\-color\fR auto|always|never diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index fa2efb00416..2c98cba90d7 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1502,7 +1502,7 @@ impl<'tcx> Clean<'tcx, Type> for hir::Ty<'tcx> { /// Returns `None` if the type could not be normalized fn normalize<'tcx>(cx: &mut DocContext<'tcx>, ty: Ty<'_>) -> Option<Ty<'tcx>> { // HACK: low-churn fix for #79459 while we wait for a trait normalization fix - if !cx.tcx.sess.opts.debugging_opts.normalize_docs { + if !cx.tcx.sess.opts.unstable_opts.normalize_docs { return None; } diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 1f30c7006f5..8a8cc272e81 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -12,7 +12,7 @@ use rustc_session::config::{ }; use rustc_session::config::{get_cmd_lint_options, nightly_options}; use rustc_session::config::{ - CodegenOptions, DebuggingOptions, ErrorOutputType, Externs, JsonUnusedExterns, + CodegenOptions, ErrorOutputType, Externs, JsonUnusedExterns, UnstableOptions, }; use rustc_session::getopts; use rustc_session::lint::Level; @@ -91,10 +91,10 @@ pub(crate) struct Options { pub(crate) codegen_options: CodegenOptions, /// Codegen options strings to hand to the compiler. pub(crate) codegen_options_strs: Vec<String>, - /// Debugging (`-Z`) options to pass to the compiler. - pub(crate) debugging_opts: DebuggingOptions, - /// Debugging (`-Z`) options strings to pass to the compiler. - pub(crate) debugging_opts_strs: Vec<String>, + /// Unstable (`-Z`) options to pass to the compiler. + pub(crate) unstable_opts: UnstableOptions, + /// Unstable (`-Z`) options strings to pass to the compiler. + pub(crate) unstable_opts_strs: Vec<String>, /// The target used to compile the crate against. pub(crate) target: TargetTriple, /// Edition used when reading the crate. Defaults to "2015". Also used by default when @@ -181,7 +181,7 @@ impl fmt::Debug for Options { .field("cfgs", &self.cfgs) .field("check-cfgs", &self.check_cfgs) .field("codegen_options", &"...") - .field("debugging_options", &"...") + .field("unstable_options", &"...") .field("target", &self.target) .field("edition", &self.edition) .field("maybe_sysroot", &self.maybe_sysroot) @@ -331,7 +331,7 @@ impl Options { let z_flags = matches.opt_strs("Z"); if z_flags.iter().any(|x| *x == "help") { - print_flag_list("-Z", config::DB_OPTIONS); + print_flag_list("-Z", config::Z_OPTIONS); return Err(0); } let c_flags = matches.opt_strs("C"); @@ -347,9 +347,9 @@ impl Options { let diagnostic_width = matches.opt_get("diagnostic-width").unwrap_or_default(); let codegen_options = CodegenOptions::build(matches, error_format); - let debugging_opts = DebuggingOptions::build(matches, error_format); + let unstable_opts = UnstableOptions::build(matches, error_format); - let diag = new_handler(error_format, None, diagnostic_width, &debugging_opts); + let diag = new_handler(error_format, None, diagnostic_width, &unstable_opts); // check for deprecated options check_deprecated_options(matches, &diag); @@ -454,7 +454,7 @@ impl Options { .iter() .map(|s| SearchPath::from_cli_opt(s, error_format)) .collect(); - let externs = parse_externs(matches, &debugging_opts, error_format); + let externs = parse_externs(matches, &unstable_opts, error_format); let extern_html_root_urls = match parse_extern_html_roots(matches) { Ok(ex) => ex, Err(err) => { @@ -670,7 +670,7 @@ impl Options { let persist_doctests = matches.opt_str("persist-doctests").map(PathBuf::from); let test_builder = matches.opt_str("test-builder").map(PathBuf::from); let codegen_options_strs = matches.opt_strs("C"); - let debugging_opts_strs = matches.opt_strs("Z"); + let unstable_opts_strs = matches.opt_strs("Z"); let lib_strs = matches.opt_strs("L"); let extern_strs = matches.opt_strs("extern"); let runtool = matches.opt_str("runtool"); @@ -711,8 +711,8 @@ impl Options { check_cfgs, codegen_options, codegen_options_strs, - debugging_opts, - debugging_opts_strs, + unstable_opts, + unstable_opts_strs, target, edition, maybe_sysroot, diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 25438ff85aa..a658e78bf60 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -32,7 +32,7 @@ use crate::formats::cache::Cache; use crate::passes::collect_intra_doc_links::PreprocessedMarkdownLink; use crate::passes::{self, Condition::*}; -pub(crate) use rustc_session::config::{DebuggingOptions, Input, Options}; +pub(crate) use rustc_session::config::{Input, Options, UnstableOptions}; pub(crate) struct ResolverCaches { pub(crate) markdown_links: Option<FxHashMap<String, Vec<PreprocessedMarkdownLink>>>, @@ -155,7 +155,7 @@ pub(crate) fn new_handler( error_format: ErrorOutputType, source_map: Option<Lrc<source_map::SourceMap>>, diagnostic_width: Option<usize>, - debugging_opts: &DebuggingOptions, + unstable_opts: &UnstableOptions, ) -> rustc_errors::Handler { let fallback_bundle = rustc_errors::fallback_fluent_bundle(rustc_errors::DEFAULT_LOCALE_RESOURCES, false); @@ -169,11 +169,11 @@ pub(crate) fn new_handler( None, fallback_bundle, short, - debugging_opts.teach, + unstable_opts.teach, diagnostic_width, false, ) - .ui_testing(debugging_opts.ui_testing), + .ui_testing(unstable_opts.ui_testing), ) } ErrorOutputType::Json { pretty, json_rendered } => { @@ -191,14 +191,14 @@ pub(crate) fn new_handler( diagnostic_width, false, ) - .ui_testing(debugging_opts.ui_testing), + .ui_testing(unstable_opts.ui_testing), ) } }; rustc_errors::Handler::with_emitter_and_flags( emitter, - debugging_opts.diagnostic_handler_flags(true), + unstable_opts.diagnostic_handler_flags(true), ) } @@ -215,7 +215,7 @@ pub(crate) fn create_config( mut cfgs, check_cfgs, codegen_options, - debugging_opts, + unstable_opts, target, edition, maybe_sysroot, @@ -266,7 +266,7 @@ pub(crate) fn create_config( target_triple: target, unstable_features: UnstableFeatures::from_environment(crate_name.as_deref()), actually_rustdoc: true, - debugging_opts, + unstable_opts, error_format, diagnostic_width, edition, diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index fe26e53b963..568bad2a382 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -357,8 +357,8 @@ fn run_test( for codegen_options_str in &rustdoc_options.codegen_options_strs { compiler.arg("-C").arg(&codegen_options_str); } - for debugging_option_str in &rustdoc_options.debugging_opts_strs { - compiler.arg("-Z").arg(&debugging_option_str); + for unstable_option_str in &rustdoc_options.unstable_opts_strs { + compiler.arg("-Z").arg(&unstable_option_str); } if no_run && !lang_string.compile_fail && rustdoc_options.persist_doctests.is_none() { compiler.arg("--emit=metadata"); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 0d3ec7ecb64..f7dc91a7832 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -366,7 +366,7 @@ fn opts() -> Vec<RustcOptGroup> { ) }), unstable("Z", |o| { - o.optmulti("Z", "", "internal and debugging options (only on nightly build)", "FLAG") + o.optmulti("Z", "", "unstable / perma-unstable options (only on nightly build)", "FLAG") }), stable("sysroot", |o| o.optopt("", "sysroot", "Override the system root", "PATH")), unstable("playground-url", |o| { @@ -745,7 +745,7 @@ fn main_options(options: config::Options) -> MainResult { options.error_format, None, options.diagnostic_width, - &options.debugging_opts, + &options.unstable_opts, ); match (options.should_test, options.markdown_input()) { @@ -787,7 +787,7 @@ fn main_options(options: config::Options) -> MainResult { if sess.opts.describe_lints { let mut lint_store = rustc_lint::new_lint_store( - sess.opts.debugging_opts.no_interleave_lints, + sess.opts.unstable_opts.no_interleave_lints, sess.unstable_options(), ); let registered_lints = if let Some(register_lints) = compiler.register_lints() { diff --git a/src/test/run-make/issue-88756-default-output/output-default.stdout b/src/test/run-make/issue-88756-default-output/output-default.stdout index 08877af9286..80cd08ee167 100644 --- a/src/test/run-make/issue-88756-default-output/output-default.stdout +++ b/src/test/run-make/issue-88756-default-output/output-default.stdout @@ -68,7 +68,8 @@ Options: doc with your own theme. However, your theme might break if the rustdoc's generated HTML changes, so be careful! - -Z FLAG internal and debugging options (only on nightly build) + -Z FLAG unstable / perma-unstable options (only on nightly + build) --sysroot PATH Override the system root --playground-url URL URL to send code snippets to, may be reset by diff --git a/src/test/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr b/src/test/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr index 5528d2a0729..d0e8d4719d3 100644 --- a/src/test/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr +++ b/src/test/ui/invalid-compile-flags/branch-protection-missing-pac-ret.BADFLAGS.stderr @@ -1,2 +1,2 @@ -error: incorrect value `leaf` for debugging option `branch-protection` - a `,` separated combination of `bti`, `b-key`, `pac-ret`, or `leaf` was expected +error: incorrect value `leaf` for unstable option `branch-protection` - a `,` separated combination of `bti`, `b-key`, `pac-ret`, or `leaf` was expected diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs index 96d542cfe10..c219c7de830 100644 --- a/src/tools/clippy/src/driver.rs +++ b/src/tools/clippy/src/driver.rs @@ -117,7 +117,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks { // run on the unoptimized MIR. On the other hand this results in some false negatives. If // MIR passes can be enabled / disabled separately, we should figure out, what passes to // use for Clippy. - config.opts.debugging_opts.mir_opt_level = Some(0); + config.opts.unstable_opts.mir_opt_level = Some(0); } } |
