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

@ -1625,7 +1625,7 @@ impl CheckAttrVisitor<'_> {
/// Checks that the dep-graph debugging attributes are only present when the query-dep-graph
/// option is passed to the compiler.
fn check_rustc_dirty_clean(&self, attr: &Attribute) -> bool {
if self.tcx.sess.opts.debugging_opts.query_dep_graph {
if self.tcx.sess.opts.unstable_opts.query_dep_graph {
true
} else {
self.tcx

View file

@ -122,7 +122,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
// `-Zunleash-the-miri-inside-of-you` only works for expressions that don't have a
// corresponding feature gate. This encourages nightly users to use feature gates when
// possible.
None if tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you => {
None if tcx.sess.opts.unstable_opts.unleash_the_miri_inside_of_you => {
tcx.sess.span_warn(span, "skipping const checks");
return;
}

View file

@ -11,7 +11,7 @@ use rustc_middle::ty::TyCtxt;
pub fn check_crate(tcx: TyCtxt<'_>) {
tcx.dep_graph.assert_ignored();
if tcx.sess.opts.debugging_opts.hir_stats {
if tcx.sess.opts.unstable_opts.hir_stats {
crate::hir_stats::print_hir_stats(tcx);
}

View file

@ -628,7 +628,7 @@ fn stability_index(tcx: TyCtxt<'_>, (): ()) -> Index {
// compiling `librustc_*` crates themselves so we can leverage crates.io
// while maintaining the invariant that all sysroot crates are unstable
// by default and are unable to be used.
if tcx.sess.opts.debugging_opts.force_unstable_if_unmarked {
if tcx.sess.opts.unstable_opts.force_unstable_if_unmarked {
let reason = "this crate is being loaded from the sysroot, an \
unstable location; did you mean to load this crate \
from crates.io via `Cargo.toml` instead?";
@ -884,7 +884,7 @@ impl<'tcx> Visitor<'tcx> for CheckTraitImplStable<'tcx> {
/// libraries, identify activated features that don't exist and error about them.
pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) {
let is_staged_api =
tcx.sess.opts.debugging_opts.force_unstable_if_unmarked || tcx.features().staged_api;
tcx.sess.opts.unstable_opts.force_unstable_if_unmarked || tcx.features().staged_api;
if is_staged_api {
let access_levels = &tcx.privacy_access_levels(());
let mut missing = MissingStabilityAnnotations { tcx, access_levels };