Skip to content

Commit b5d8361

Browse files
committed
rename to verbose-internals
1 parent 558ac1c commit b5d8361

File tree

65 files changed

+91
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+91
-80
lines changed

compiler/rustc_driver_impl/src/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<'a> pprust_ast::PpAnn for AstHygieneAnn<'a> {
146146
}
147147
pprust_ast::AnnNode::Crate(_) => {
148148
s.s.hardbreak();
149-
let verbose = self.sess.verbose();
149+
let verbose = self.sess.verbose_internals();
150150
s.synth_comment(rustc_span::hygiene::debug_hygiene_data(verbose));
151151
s.s.hardbreak_if_not_bol();
152152
}

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
187187
expected: Expectation<'tcx>,
188188
args: &'tcx [hir::Expr<'tcx>],
189189
) -> Ty<'tcx> {
190-
if self.tcx().sess.verbose() {
191-
// make this code only run with -Zverbose because it is probably slow
190+
if self.tcx().sess.verbose_internals() {
191+
// make this code only run with -Zverbose-internals because it is probably slow
192192
if let Ok(lint_str) = self.tcx.sess.source_map().span_to_snippet(expr.span) {
193193
if !lint_str.contains('\n') {
194194
debug!("expr text: {lint_str}");

compiler/rustc_infer/src/infer/error_reporting/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
13231323
let num_display_types = consts_offset - regions_len;
13241324
for (i, (ta1, ta2)) in type_arguments.take(num_display_types).enumerate() {
13251325
let i = i + regions_len;
1326-
if ta1 == ta2 && !self.tcx.sess.verbose() {
1326+
if ta1 == ta2 && !self.tcx.sess.verbose_internals() {
13271327
values.0.push_normal("_");
13281328
values.1.push_normal("_");
13291329
} else {
@@ -1337,7 +1337,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
13371337
let const_arguments = sub1.consts().zip(sub2.consts());
13381338
for (i, (ca1, ca2)) in const_arguments.enumerate() {
13391339
let i = i + consts_offset;
1340-
if ca1 == ca2 && !self.tcx.sess.verbose() {
1340+
if ca1 == ca2 && !self.tcx.sess.verbose_internals() {
13411341
values.0.push_normal("_");
13421342
values.1.push_normal("_");
13431343
} else {
@@ -1507,7 +1507,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
15071507
(ty::FnPtr(sig1), ty::FnPtr(sig2)) => self.cmp_fn_sig(sig1, sig2),
15081508

15091509
_ => {
1510-
if t1 == t2 && !self.tcx.sess.verbose() {
1510+
if t1 == t2 && !self.tcx.sess.verbose_internals() {
15111511
// The two types are the same, elide and don't highlight.
15121512
(DiagnosticStyledString::normal("_"), DiagnosticStyledString::normal("_"))
15131513
} else {

compiler/rustc_infer/src/traits/structural_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl<'tcx, T: fmt::Debug> fmt::Debug for Normalized<'tcx, T> {
1717

1818
impl<'tcx, O: fmt::Debug> fmt::Debug for traits::Obligation<'tcx, O> {
1919
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20-
if ty::tls::with(|tcx| tcx.sess.verbose()) {
20+
if ty::tls::with(|tcx| tcx.sess.verbose_internals()) {
2121
write!(
2222
f,
2323
"Obligation(predicate={:?}, cause={:?}, param_env={:?}, depth={})",

compiler/rustc_interface/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ fn test_unstable_options_tracking_hash() {
714714
untracked!(unpretty, Some("expanded".to_string()));
715715
untracked!(unstable_options, true);
716716
untracked!(validate_mir, true);
717-
untracked!(verbose, true);
717+
untracked!(verbose_internals, true);
718718
untracked!(write_long_types_to_disk, false);
719719
// tidy-alphabetical-end
720720

compiler/rustc_middle/src/mir/pretty.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,11 @@ where
627627
w,
628628
"{:A$} // {}{}",
629629
indented_body,
630-
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() },
630+
if tcx.sess.verbose_internals() {
631+
format!("{current_location:?}: ")
632+
} else {
633+
String::new()
634+
},
631635
comment(tcx, statement.source_info),
632636
A = ALIGN,
633637
)?;
@@ -652,7 +656,11 @@ where
652656
w,
653657
"{:A$} // {}{}",
654658
indented_terminator,
655-
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() },
659+
if tcx.sess.verbose_internals() {
660+
format!("{current_location:?}: ")
661+
} else {
662+
String::new()
663+
},
656664
comment(tcx, data.terminator().source_info),
657665
A = ALIGN,
658666
)?;
@@ -943,7 +951,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
943951

944952
// When printing regions, add trailing space if necessary.
945953
let print_region = ty::tls::with(|tcx| {
946-
tcx.sess.verbose() || tcx.sess.opts.unstable_opts.identify_regions
954+
tcx.sess.verbose_internals() || tcx.sess.opts.unstable_opts.identify_regions
947955
});
948956
let region = if print_region {
949957
let mut region = region.to_string();
@@ -1668,7 +1676,7 @@ fn pretty_print_const_value_tcx<'tcx>(
16681676
) -> fmt::Result {
16691677
use crate::ty::print::PrettyPrinter;
16701678

1671-
if tcx.sess.verbose() {
1679+
if tcx.sess.verbose_internals() {
16721680
fmt.write_str(&format!("ConstValue({ct:?}: {ty})"))?;
16731681
return Ok(());
16741682
}

compiler/rustc_middle/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl<'tcx> ObligationCause<'tcx> {
177177

178178
// NOTE(flaper87): As of now, it keeps track of the whole error
179179
// chain. Ideally, we should have a way to configure this either
180-
// by using -Z verbose or just a CLI argument.
180+
// by using -Z verbose-internals or just a CLI argument.
181181
self.code =
182182
variant(DerivedObligationCause { parent_trait_pred, parent_code: self.code }).into();
183183
self

compiler/rustc_middle/src/ty/generics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl<'tcx> Generics {
326326
own_params.start = 1;
327327
}
328328

329-
let verbose = tcx.sess.verbose();
329+
let verbose = tcx.sess.verbose_internals();
330330

331331
// Filter the default arguments.
332332
//
@@ -342,7 +342,7 @@ impl<'tcx> Generics {
342342
param.default_value(tcx).is_some_and(|default| {
343343
default.instantiate(tcx, args) == args[param.index as usize]
344344
})
345-
// filter out trailing effect params, if we're not in `-Zverbose`.
345+
// filter out trailing effect params, if we're not in `-Zverbose-internals`.
346346
|| (!verbose && matches!(param.kind, GenericParamDefKind::Const { is_host_effect: true, .. }))
347347
})
348348
.count();

compiler/rustc_middle/src/ty/print/pretty.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
744744
// only affect certain debug messages (e.g. messages printed
745745
// from `rustc_middle::ty` during the computation of `tcx.predicates_of`),
746746
// and should have no effect on any compiler output.
747-
// [Unless `-Zverbose` is used, e.g. in the output of
747+
// [Unless `-Zverbose-internals` is used, e.g. in the output of
748748
// `tests/ui/nll/ty-outlives/impl-trait-captures.rs`, for
749749
// example.]
750750
if self.should_print_verbose() {
@@ -829,7 +829,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
829829
}
830830
ty::CoroutineWitness(did, args) => {
831831
p!(write("{{"));
832-
if !self.tcx().sess.verbose() {
832+
if !self.tcx().sess.verbose_internals() {
833833
p!("coroutine witness");
834834
// FIXME(eddyb) should use `def_span`.
835835
if let Some(did) = did.as_local() {
@@ -1698,7 +1698,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
16981698
}
16991699

17001700
fn should_print_verbose(&self) -> bool {
1701-
self.tcx().sess.verbose()
1701+
self.tcx().sess.verbose_internals()
17021702
}
17031703
}
17041704

compiler/rustc_query_impl/src/plumbing.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,11 @@ pub(crate) fn create_query_frame<
315315
ty::print::with_forced_impl_filename_line!(do_describe(tcx, key))
316316
)
317317
);
318-
let description =
319-
if tcx.sess.verbose() { format!("{description} [{name:?}]") } else { description };
318+
let description = if tcx.sess.verbose_internals() {
319+
format!("{description} [{name:?}]")
320+
} else {
321+
description
322+
};
320323
let span = if kind == dep_graph::dep_kinds::def_span || with_no_queries() {
321324
// The `def_span` query is used to calculate `default_span`,
322325
// so exit to avoid infinite recursion.

0 commit comments

Comments
 (0)