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

@ -1141,8 +1141,7 @@ fn create_fn_mono_item<'tcx>(
debug!("create_fn_mono_item(instance={})", instance);
let def_id = instance.def_id();
if tcx.sess.opts.debugging_opts.profile_closures && def_id.is_local() && tcx.is_closure(def_id)
{
if tcx.sess.opts.unstable_opts.profile_closures && def_id.is_local() && tcx.is_closure(def_id) {
crate::util::dump_closure_profile(tcx, instance);
}

View file

@ -303,7 +303,7 @@ fn characteristic_def_id_of_mono_item<'tcx>(
// When polymorphization is enabled, methods which do not depend on their generic
// parameters, but the self-type of their impl block do will fail to normalize.
if !tcx.sess.opts.debugging_opts.polymorphize || !instance.needs_subst() {
if !tcx.sess.opts.unstable_opts.polymorphize || !instance.needs_subst() {
// This is a method within an impl, find out what the self-type is:
let impl_self_ty = tcx.subst_and_normalize_erasing_regions(
instance.substs,

View file

@ -83,7 +83,7 @@ pub fn merge_codegen_units<'tcx>(
for cgu in codegen_units.iter_mut() {
if let Some(new_cgu_name) = new_cgu_names.get(&cgu.name()) {
if cx.tcx.sess.opts.debugging_opts.human_readable_cgu_names {
if cx.tcx.sess.opts.unstable_opts.human_readable_cgu_names {
cgu.set_name(Symbol::intern(&new_cgu_name));
} else {
// If we don't require CGU names to be human-readable, we

View file

@ -141,7 +141,7 @@ trait Partitioner<'tcx> {
}
fn get_partitioner<'tcx>(tcx: TyCtxt<'tcx>) -> Box<dyn Partitioner<'tcx>> {
let strategy = match &tcx.sess.opts.debugging_opts.cgu_partitioning_strategy {
let strategy = match &tcx.sess.opts.unstable_opts.cgu_partitioning_strategy {
None => "default",
Some(s) => &s[..],
};
@ -345,7 +345,7 @@ fn collect_and_partition_mono_items<'tcx>(
tcx: TyCtxt<'tcx>,
(): (),
) -> (&'tcx DefIdSet, &'tcx [CodegenUnit<'tcx>]) {
let collection_mode = match tcx.sess.opts.debugging_opts.print_mono_items {
let collection_mode = match tcx.sess.opts.unstable_opts.print_mono_items {
Some(ref s) => {
let mode_string = s.to_lowercase();
let mode_string = mode_string.trim();
@ -413,7 +413,7 @@ fn collect_and_partition_mono_items<'tcx>(
})
.collect();
if tcx.sess.opts.debugging_opts.print_mono_items.is_some() {
if tcx.sess.opts.unstable_opts.print_mono_items.is_some() {
let mut item_to_cgus: FxHashMap<_, Vec<_>> = Default::default();
for cgu in codegen_units {

View file

@ -36,7 +36,7 @@ fn unused_generic_params<'tcx>(
tcx: TyCtxt<'tcx>,
instance: ty::InstanceDef<'tcx>,
) -> FiniteBitSet<u32> {
if !tcx.sess.opts.debugging_opts.polymorphize {
if !tcx.sess.opts.unstable_opts.polymorphize {
// If polymorphization disabled, then all parameters are used.
return FiniteBitSet::new_empty();
}