1
Fork 0

Rename debugging_opts to unstable_opts

This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
This commit is contained in:
Joshua Nelson 2022-07-06 07:44:47 -05:00
parent c80dde43f9
commit 3c9765cff1
125 changed files with 396 additions and 394 deletions

View file

@ -55,11 +55,11 @@ use std::io::{BufWriter, Write};
#[allow(missing_docs)]
pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
tcx.dep_graph.with_ignore(|| {
if tcx.sess.opts.debugging_opts.dump_dep_graph {
if tcx.sess.opts.unstable_opts.dump_dep_graph {
tcx.dep_graph.with_query(dump_graph);
}
if !tcx.sess.opts.debugging_opts.query_dep_graph {
if !tcx.sess.opts.unstable_opts.query_dep_graph {
return;
}
@ -81,7 +81,7 @@ pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
if !if_this_changed.is_empty() || !then_this_would_need.is_empty() {
assert!(
tcx.sess.opts.debugging_opts.query_dep_graph,
tcx.sess.opts.unstable_opts.query_dep_graph,
"cannot use the `#[{}]` or `#[{}]` annotations \
without supplying `-Z query-dep-graph`",
sym::rustc_if_this_changed,

View file

@ -76,7 +76,7 @@ impl<'tcx> AssertModuleSource<'tcx> {
return;
};
if !self.tcx.sess.opts.debugging_opts.query_dep_graph {
if !self.tcx.sess.opts.unstable_opts.query_dep_graph {
self.tcx.sess.span_fatal(
attr.span,
"found CGU-reuse attribute but `-Zquery-dep-graph` was not specified",

View file

@ -134,7 +134,7 @@ struct Assertion {
}
pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
if !tcx.sess.opts.debugging_opts.query_dep_graph {
if !tcx.sess.opts.unstable_opts.query_dep_graph {
return;
}

View file

@ -447,7 +447,7 @@ fn copy_files(sess: &Session, target_dir: &Path, source_dir: &Path) -> Result<bo
}
}
if sess.opts.debugging_opts.incremental_info {
if sess.opts.unstable_opts.incremental_info {
eprintln!(
"[incremental] session directory: \
{} files hard-linked",

View file

@ -141,7 +141,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
// Calling `sess.incr_comp_session_dir()` will panic if `sess.opts.incremental.is_none()`.
// Fortunately, we just checked that this isn't the case.
let path = dep_graph_path(&sess);
let report_incremental_info = sess.opts.debugging_opts.incremental_info;
let report_incremental_info = sess.opts.unstable_opts.incremental_info;
let expected_hash = sess.opts.dep_tracking_hash(false);
let mut prev_work_products = FxHashMap::default();
@ -163,7 +163,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
for swp in work_products {
let all_files_exist = swp.work_product.saved_files.iter().all(|(_, path)| {
let exists = in_incr_comp_dir_sess(sess, path).exists();
if !exists && sess.opts.debugging_opts.incremental_info {
if !exists && sess.opts.unstable_opts.incremental_info {
eprintln!("incremental: could not find file for work product: {path}",);
}
exists
@ -225,7 +225,7 @@ pub fn load_query_result_cache<'a, C: OnDiskCache<'a>>(sess: &'a Session) -> Opt
let _prof_timer = sess.prof.generic_activity("incr_comp_load_query_result_cache");
match load_data(
sess.opts.debugging_opts.incremental_info,
sess.opts.unstable_opts.incremental_info,
&query_cache_path(sess),
sess.is_nightly_build(),
) {

View file

@ -39,7 +39,7 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) {
sess.time("assert_dep_graph", || crate::assert_dep_graph(tcx));
sess.time("check_dirty_clean", || dirty_clean::check_dirty_clean_annotations(tcx));
if sess.opts.debugging_opts.incremental_info {
if sess.opts.unstable_opts.incremental_info {
tcx.dep_graph.print_incremental_info()
}
@ -182,7 +182,7 @@ pub fn build_dep_graph(
prev_graph,
prev_work_products,
encoder,
sess.opts.debugging_opts.query_dep_graph,
sess.opts.debugging_opts.incremental_info,
sess.opts.unstable_opts.query_dep_graph,
sess.opts.unstable_opts.incremental_info,
))
}