1
Fork 0

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: 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`
This commit is contained in:
bors 2023-12-26 12:27:29 +00:00
commit 2fe50cd72c
69 changed files with 160 additions and 98 deletions

View file

@ -214,7 +214,7 @@ impl<'tcx> Printer<'tcx> for SymbolPrinter<'tcx> {
| ty::Coroutine(def_id, args, _) => self.print_def_path(def_id, args),
// The `pretty_print_type` formatting of array size depends on
// -Zverbose flag, so we cannot reuse it here.
// -Zverbose-internals flag, so we cannot reuse it here.
ty::Array(ty, size) => {
self.write_str("[")?;
self.print_type(ty)?;
@ -255,7 +255,7 @@ impl<'tcx> Printer<'tcx> for SymbolPrinter<'tcx> {
// only print integers
match (ct.kind(), ct.ty().kind()) {
(ty::ConstKind::Value(ty::ValTree::Leaf(scalar)), ty::Int(_) | ty::Uint(_)) => {
// The `pretty_print_const` formatting depends on -Zverbose
// The `pretty_print_const` formatting depends on -Zverbose-internals
// flag, so we cannot reuse it here.
let signed = matches!(ct.ty().kind(), ty::Int(_));
write!(