about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/traits/structural_impls.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-26 12:27:29 +0000
committerbors <bors@rust-lang.org>2023-12-26 12:27:29 +0000
commit2fe50cd72c476ebacdedb14893e9632b4de961c2 (patch)
tree646eae2f31ec0a7ad1dbef7bce78bf331efda17b /compiler/rustc_infer/src/traits/structural_impls.rs
parentea7ef7b6c224226a4bd9f9796de39d57b527f7f9 (diff)
parentcb6d033316bdc2a1c5c1c0e04b297fbbb81eafca (diff)
downloadrust-2fe50cd72c476ebacdedb14893e9632b4de961c2.tar.gz
rust-2fe50cd72c476ebacdedb14893e9632b4de961c2.zip
Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank
rework `-Zverbose`

implements the changes described in https://github.com/rust-lang/compiler-team/issues/706

the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics.

possible follow up work:
- `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200
- `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`.

r? `@compiler-errors` cc `@estebank`
Diffstat (limited to 'compiler/rustc_infer/src/traits/structural_impls.rs')
-rw-r--r--compiler/rustc_infer/src/traits/structural_impls.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/traits/structural_impls.rs b/compiler/rustc_infer/src/traits/structural_impls.rs
index 8a7c59da09e..51c06c8970b 100644
--- a/compiler/rustc_infer/src/traits/structural_impls.rs
+++ b/compiler/rustc_infer/src/traits/structural_impls.rs
@@ -17,7 +17,7 @@ impl<'tcx, T: fmt::Debug> fmt::Debug for Normalized<'tcx, T> {
 
 impl<'tcx, O: fmt::Debug> fmt::Debug for traits::Obligation<'tcx, O> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        if ty::tls::with(|tcx| tcx.sess.verbose()) {
+        if ty::tls::with(|tcx| tcx.sess.verbose_internals()) {
             write!(
                 f,
                 "Obligation(predicate={:?}, cause={:?}, param_env={:?}, depth={})",