@@ -1189,7 +1189,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1189
1189
1190
1190
fn fmt_region < ' tcx > ( region : ty:: Region < ' tcx > ) -> String {
1191
1191
let mut r = region. to_string ( ) ;
1192
- if r == "'_" {
1192
+ if r == "'_" && ! self . tcx . sess . options . verbose {
1193
1193
r. clear ( ) ;
1194
1194
} else {
1195
1195
r. push ( ' ' ) ;
@@ -1302,7 +1302,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1302
1302
if lifetimes. 0 != lifetimes. 1 {
1303
1303
values. 0 . push_highlighted ( l1) ;
1304
1304
values. 1 . push_highlighted ( l2) ;
1305
- } else if lifetimes. 0 . is_bound ( ) {
1305
+ } else if lifetimes. 0 . is_bound ( ) || self . tcx . sess . options . verbose {
1306
1306
values. 0 . push_normal ( l1) ;
1307
1307
values. 1 . push_normal ( l2) ;
1308
1308
} else {
@@ -1323,7 +1323,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1323
1323
let num_display_types = consts_offset - regions_len;
1324
1324
for ( i, ( ta1, ta2) ) in type_arguments. take ( num_display_types) . enumerate ( ) {
1325
1325
let i = i + regions_len;
1326
- if ta1 == ta2 && !self . tcx . sess . verbose_internals ( ) {
1326
+ if ta1 == ta2 && !self . tcx . sess . opts . verbose {
1327
1327
values. 0 . push_normal ( "_" ) ;
1328
1328
values. 1 . push_normal ( "_" ) ;
1329
1329
} else {
@@ -1337,7 +1337,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1337
1337
let const_arguments = sub1. consts ( ) . zip ( sub2. consts ( ) ) ;
1338
1338
for ( i, ( ca1, ca2) ) in const_arguments. enumerate ( ) {
1339
1339
let i = i + consts_offset;
1340
- if ca1 == ca2 && !self . tcx . sess . verbose_internals ( ) {
1340
+ if ca1 == ca2 && !self . tcx . sess . opts . verbose {
1341
1341
values. 0 . push_normal ( "_" ) ;
1342
1342
values. 1 . push_normal ( "_" ) ;
1343
1343
} else {
@@ -1507,7 +1507,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
1507
1507
( ty:: FnPtr ( sig1) , ty:: FnPtr ( sig2) ) => self . cmp_fn_sig ( sig1, sig2) ,
1508
1508
1509
1509
_ => {
1510
- if t1 == t2 && !self . tcx . sess . verbose_internals ( ) {
1510
+ if t1 == t2 && !self . tcx . sess . opts . verbose {
1511
1511
// The two types are the same, elide and don't highlight.
1512
1512
( DiagnosticStyledString :: normal ( "_" ) , DiagnosticStyledString :: normal ( "_" ) )
1513
1513
} else {
0 commit comments