1
Fork 0

rename to verbose-internals

This commit is contained in:
jyn 2023-12-19 12:39:58 -05:00
parent 558ac1cfb7
commit b5d8361909
65 changed files with 91 additions and 80 deletions

View file

@ -627,7 +627,11 @@ where
w,
"{:A$} // {}{}",
indented_body,
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() },
if tcx.sess.verbose_internals() {
format!("{current_location:?}: ")
} else {
String::new()
},
comment(tcx, statement.source_info),
A = ALIGN,
)?;
@ -652,7 +656,11 @@ where
w,
"{:A$} // {}{}",
indented_terminator,
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() },
if tcx.sess.verbose_internals() {
format!("{current_location:?}: ")
} else {
String::new()
},
comment(tcx, data.terminator().source_info),
A = ALIGN,
)?;
@ -943,7 +951,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
// When printing regions, add trailing space if necessary.
let print_region = ty::tls::with(|tcx| {
tcx.sess.verbose() || tcx.sess.opts.unstable_opts.identify_regions
tcx.sess.verbose_internals() || tcx.sess.opts.unstable_opts.identify_regions
});
let region = if print_region {
let mut region = region.to_string();
@ -1668,7 +1676,7 @@ fn pretty_print_const_value_tcx<'tcx>(
) -> fmt::Result {
use crate::ty::print::PrettyPrinter;
if tcx.sess.verbose() {
if tcx.sess.verbose_internals() {
fmt.write_str(&format!("ConstValue({ct:?}: {ty})"))?;
return Ok(());
}

View file

@ -177,7 +177,7 @@ impl<'tcx> ObligationCause<'tcx> {
// NOTE(flaper87): As of now, it keeps track of the whole error
// chain. Ideally, we should have a way to configure this either
// by using -Z verbose or just a CLI argument.
// by using -Z verbose-internals or just a CLI argument.
self.code =
variant(DerivedObligationCause { parent_trait_pred, parent_code: self.code }).into();
self

View file

@ -326,7 +326,7 @@ impl<'tcx> Generics {
own_params.start = 1;
}
let verbose = tcx.sess.verbose();
let verbose = tcx.sess.verbose_internals();
// Filter the default arguments.
//
@ -342,7 +342,7 @@ impl<'tcx> Generics {
param.default_value(tcx).is_some_and(|default| {
default.instantiate(tcx, args) == args[param.index as usize]
})
// filter out trailing effect params, if we're not in `-Zverbose`.
// filter out trailing effect params, if we're not in `-Zverbose-internals`.
|| (!verbose && matches!(param.kind, GenericParamDefKind::Const { is_host_effect: true, .. }))
})
.count();

View file

@ -744,7 +744,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
// only affect certain debug messages (e.g. messages printed
// from `rustc_middle::ty` during the computation of `tcx.predicates_of`),
// and should have no effect on any compiler output.
// [Unless `-Zverbose` is used, e.g. in the output of
// [Unless `-Zverbose-internals` is used, e.g. in the output of
// `tests/ui/nll/ty-outlives/impl-trait-captures.rs`, for
// example.]
if self.should_print_verbose() {
@ -829,7 +829,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
}
ty::CoroutineWitness(did, args) => {
p!(write("{{"));
if !self.tcx().sess.verbose() {
if !self.tcx().sess.verbose_internals() {
p!("coroutine witness");
// FIXME(eddyb) should use `def_span`.
if let Some(did) = did.as_local() {
@ -1698,7 +1698,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
}
fn should_print_verbose(&self) -> bool {
self.tcx().sess.verbose()
self.tcx().sess.verbose_internals()
}
}