@@ -563,8 +563,7 @@ impl GotocCtx<'_> {
563
563
self . tcx ,
564
564
span,
565
565
format ! (
566
- "Type check failed for intrinsic `{name}`: Expected {expected}, found {}" ,
567
- self . pretty_ty( actual)
566
+ "Type check failed for intrinsic `{name}`: Expected {expected}, found {actual}"
568
567
) ,
569
568
) ;
570
569
self . tcx . dcx ( ) . abort_if_errors ( ) ;
@@ -715,10 +714,7 @@ impl GotocCtx<'_> {
715
714
if layout. is_uninhabited ( ) {
716
715
return self . codegen_fatal_error (
717
716
PropertyClass :: SafetyCheck ,
718
- & format ! (
719
- "attempted to instantiate uninhabited type `{}`" ,
720
- self . pretty_ty( * target_ty)
721
- ) ,
717
+ & format ! ( "attempted to instantiate uninhabited type `{}`" , * target_ty) ,
722
718
span,
723
719
) ;
724
720
}
@@ -736,10 +732,7 @@ impl GotocCtx<'_> {
736
732
{
737
733
return self . codegen_fatal_error (
738
734
PropertyClass :: SafetyCheck ,
739
- & format ! (
740
- "attempted to zero-initialize type `{}`, which is invalid" ,
741
- self . pretty_ty( * target_ty)
742
- ) ,
735
+ & format ! ( "attempted to zero-initialize type `{}`, which is invalid" , * target_ty) ,
743
736
span,
744
737
) ;
745
738
}
@@ -757,7 +750,7 @@ impl GotocCtx<'_> {
757
750
PropertyClass :: SafetyCheck ,
758
751
& format ! (
759
752
"attempted to leave type `{}` uninitialized, which is invalid" ,
760
- self . pretty_ty ( * target_ty)
753
+ * target_ty
761
754
) ,
762
755
span,
763
756
) ;
@@ -1142,7 +1135,7 @@ impl GotocCtx<'_> {
1142
1135
} else {
1143
1136
let err_msg = format ! (
1144
1137
"simd_shuffle index must be a SIMD vector of `u32`, got `{}`" ,
1145
- self . pretty_ty ( farg_types[ 2 ] )
1138
+ farg_types[ 2 ]
1146
1139
) ;
1147
1140
utils:: span_err ( self . tcx , span, err_msg) ;
1148
1141
// Return a dummy value
@@ -1281,10 +1274,8 @@ impl GotocCtx<'_> {
1281
1274
let ( _, vector_base_type) = self . simd_size_and_type ( rust_arg_types[ 0 ] ) ;
1282
1275
if rust_ret_type != vector_base_type {
1283
1276
let err_msg = format ! (
1284
- "expected return type `{}` (element of input `{}`), found `{}`" ,
1285
- self . pretty_ty( vector_base_type) ,
1286
- self . pretty_ty( rust_arg_types[ 0 ] ) ,
1287
- self . pretty_ty( rust_ret_type)
1277
+ "expected return type `{vector_base_type}` (element of input `{}`), found `{rust_ret_type}`" ,
1278
+ rust_arg_types[ 0 ]
1288
1279
) ;
1289
1280
utils:: span_err ( self . tcx , span, err_msg) ;
1290
1281
}
@@ -1322,10 +1313,8 @@ impl GotocCtx<'_> {
1322
1313
let ( _, vector_base_type) = self . simd_size_and_type ( rust_arg_types[ 0 ] ) ;
1323
1314
if vector_base_type != rust_arg_types[ 2 ] {
1324
1315
let err_msg = format ! (
1325
- "expected inserted type `{}` (element of input `{}`), found `{}`" ,
1326
- self . pretty_ty( vector_base_type) ,
1327
- self . pretty_ty( rust_arg_types[ 0 ] ) ,
1328
- self . pretty_ty( rust_arg_types[ 2 ] ) ,
1316
+ "expected inserted type `{vector_base_type}` (element of input `{}`), found `{}`" ,
1317
+ rust_arg_types[ 0 ] , rust_arg_types[ 2 ] ,
1329
1318
) ;
1330
1319
utils:: span_err ( self . tcx , span, err_msg) ;
1331
1320
}
@@ -1389,10 +1378,9 @@ impl GotocCtx<'_> {
1389
1378
if arg1. typ ( ) . len ( ) . unwrap ( ) != ret_typ. len ( ) . unwrap ( ) {
1390
1379
let err_msg = format ! (
1391
1380
"expected return type with length {} (same as input type `{}`), \
1392
- found `{}` with length {}",
1381
+ found `{rust_ret_type }` with length {}",
1393
1382
arg1. typ( ) . len( ) . unwrap( ) ,
1394
- self . pretty_ty( rust_arg_types[ 0 ] ) ,
1395
- self . pretty_ty( rust_ret_type) ,
1383
+ rust_arg_types[ 0 ] ,
1396
1384
ret_typ. len( ) . unwrap( )
1397
1385
) ;
1398
1386
utils:: span_err ( self . tcx , span, err_msg) ;
@@ -1401,9 +1389,7 @@ impl GotocCtx<'_> {
1401
1389
if !ret_typ. base_type ( ) . unwrap ( ) . is_integer ( ) {
1402
1390
let ( _, rust_base_type) = self . simd_size_and_type ( rust_ret_type) ;
1403
1391
let err_msg = format ! (
1404
- "expected return type with integer elements, found `{}` with non-integer `{}`" ,
1405
- self . pretty_ty( rust_ret_type) ,
1406
- self . pretty_ty( rust_base_type) ,
1392
+ "expected return type with integer elements, found `{rust_ret_type}` with non-integer `{rust_base_type}`"
1407
1393
) ;
1408
1394
utils:: span_err ( self . tcx , span, err_msg) ;
1409
1395
}
@@ -1591,19 +1577,15 @@ impl GotocCtx<'_> {
1591
1577
let ( ret_type_len, ret_type_subtype) = self . simd_size_and_type ( rust_ret_type) ;
1592
1578
if ret_type_len != n {
1593
1579
let err_msg = format ! (
1594
- "expected return type of length {n}, found `{}` with length {ret_type_len}" ,
1595
- self . pretty_ty( rust_ret_type) ,
1580
+ "expected return type of length {n}, found `{rust_ret_type}` with length {ret_type_len}"
1596
1581
) ;
1597
1582
utils:: span_err ( self . tcx , span, err_msg) ;
1598
1583
}
1599
1584
if vec_subtype != ret_type_subtype {
1600
1585
let err_msg = format ! (
1601
- "expected return element type `{}` (element of input `{}`), \
1602
- found `{}` with element type `{}`",
1603
- self . pretty_ty( vec_subtype) ,
1604
- self . pretty_ty( rust_arg_types[ 0 ] ) ,
1605
- self . pretty_ty( rust_ret_type) ,
1606
- self . pretty_ty( ret_type_subtype) ,
1586
+ "expected return element type `{vec_subtype}` (element of input `{}`), \
1587
+ found `{rust_ret_type}` with element type `{ret_type_subtype}`",
1588
+ rust_arg_types[ 0 ]
1607
1589
) ;
1608
1590
utils:: span_err ( self . tcx , span, err_msg) ;
1609
1591
}
0 commit comments