@@ -3397,15 +3397,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
3397
3397
match * err {
3398
3398
terr_mismatch => ~"types differ",
3399
3399
terr_purity_mismatch( values) => {
3400
- fmt ! ( "expected %s fn but found %s fn" ,
3400
+ fmt ! ( "expected %s fn, found %s fn" ,
3401
3401
values. expected. to_str( ) , values. found. to_str( ) )
3402
3402
}
3403
3403
terr_abi_mismatch( values) => {
3404
- fmt ! ( "expected %s fn but found %s fn" ,
3404
+ fmt ! ( "expected %s fn, found %s fn" ,
3405
3405
values. expected. to_str( ) , values. found. to_str( ) )
3406
3406
}
3407
3407
terr_onceness_mismatch( values) => {
3408
- fmt ! ( "expected %s fn but found %s fn" ,
3408
+ fmt ! ( "expected %s fn, found %s fn" ,
3409
3409
values. expected. to_str( ) , values. found. to_str( ) )
3410
3410
}
3411
3411
terr_sigil_mismatch( values) => {
@@ -3419,25 +3419,25 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
3419
3419
terr_ptr_mutability => ~"pointers differ in mutability",
3420
3420
terr_ref_mutability => ~"references differ in mutability",
3421
3421
terr_ty_param_size( values) => {
3422
- fmt ! ( "expected a type with %? type params \
3423
- but found one with %? type params",
3422
+ fmt ! ( "expected a type with %? type params, \
3423
+ found one with %? type params",
3424
3424
values. expected, values. found)
3425
3425
}
3426
3426
terr_tuple_size( values) => {
3427
- fmt ! ( "expected a tuple with %? elements \
3428
- but found one with %? elements",
3427
+ fmt ! ( "expected a tuple with %? elements, \
3428
+ found one with %? elements",
3429
3429
values. expected, values. found)
3430
3430
}
3431
3431
terr_record_size( values) => {
3432
- fmt ! ( "expected a record with %? fields \
3433
- but found one with %? fields",
3432
+ fmt ! ( "expected a record with %? fields, \
3433
+ found one with %? fields",
3434
3434
values. expected, values. found)
3435
3435
}
3436
3436
terr_record_mutability => {
3437
3437
~"record elements differ in mutability"
3438
3438
}
3439
3439
terr_record_fields( values) => {
3440
- fmt ! ( "expected a record with field `%s` but found one with field \
3440
+ fmt ! ( "expected a record with field `%s`, found one with field \
3441
3441
`%s`",
3442
3442
cx. sess. str_of( values. expected) ,
3443
3443
cx. sess. str_of( values. found) )
@@ -3454,22 +3454,22 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
3454
3454
}
3455
3455
terr_regions_insufficiently_polymorphic( br, _) => {
3456
3456
fmt ! ( "expected bound lifetime parameter %s, \
3457
- but found concrete lifetime",
3457
+ found concrete lifetime",
3458
3458
bound_region_ptr_to_str( cx, br) )
3459
3459
}
3460
3460
terr_regions_overly_polymorphic( br, _) => {
3461
3461
fmt ! ( "expected concrete lifetime, \
3462
- but found bound lifetime parameter %s",
3462
+ found bound lifetime parameter %s",
3463
3463
bound_region_ptr_to_str( cx, br) )
3464
3464
}
3465
3465
terr_vstores_differ( k, ref values) => {
3466
- fmt ! ( "%s storage differs: expected %s but found %s" ,
3466
+ fmt ! ( "%s storage differs: expected %s, found %s" ,
3467
3467
terr_vstore_kind_to_str( k) ,
3468
3468
vstore_to_str( cx, ( * values) . expected) ,
3469
3469
vstore_to_str( cx, ( * values) . found) )
3470
3470
}
3471
3471
terr_trait_stores_differ( _, ref values) => {
3472
- fmt ! ( "trait storage differs: expected %s but found %s" ,
3472
+ fmt ! ( "trait storage differs: expected %s, found %s" ,
3473
3473
trait_store_to_str( cx, ( * values) . expected) ,
3474
3474
trait_store_to_str( cx, ( * values) . found) )
3475
3475
}
@@ -3478,38 +3478,38 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
3478
3478
type_err_to_str( cx, err) )
3479
3479
}
3480
3480
terr_sorts( values) => {
3481
- fmt ! ( "expected %s but found %s" ,
3481
+ fmt ! ( "expected %s, found %s" ,
3482
3482
ty_sort_str( cx, values. expected) ,
3483
3483
ty_sort_str( cx, values. found) )
3484
3484
}
3485
3485
terr_traits( values) => {
3486
- fmt ! ( "expected trait %s but found trait %s" ,
3486
+ fmt ! ( "expected trait %s, found trait %s" ,
3487
3487
item_path_str( cx, values. expected) ,
3488
3488
item_path_str( cx, values. found) )
3489
3489
}
3490
3490
terr_builtin_bounds( values) => {
3491
3491
if values. expected . is_empty ( ) {
3492
- fmt ! ( "expected no bounds but found `%s`" ,
3492
+ fmt ! ( "expected no bounds, found `%s`" ,
3493
3493
values. found. user_string( cx) )
3494
3494
} else if values. found . is_empty ( ) {
3495
- fmt ! ( "expected bounds `%s` but found no bounds" ,
3495
+ fmt ! ( "expected bounds `%s`, found no bounds" ,
3496
3496
values. expected. user_string( cx) )
3497
3497
} else {
3498
- fmt ! ( "expected bounds `%s` but found bounds `%s`" ,
3498
+ fmt ! ( "expected bounds `%s`, found bounds `%s`" ,
3499
3499
values. expected. user_string( cx) ,
3500
3500
values. found. user_string( cx) )
3501
3501
}
3502
3502
}
3503
3503
terr_integer_as_char => {
3504
- fmt ! ( "expected an integral type but found char" )
3504
+ fmt ! ( "expected an integral type, found char" )
3505
3505
}
3506
3506
terr_int_mismatch( ref values) => {
3507
- fmt ! ( "expected %s but found %s" ,
3507
+ fmt ! ( "expected %s, found %s" ,
3508
3508
values. expected. to_str( ) ,
3509
3509
values. found. to_str( ) )
3510
3510
}
3511
3511
terr_float_mismatch( ref values) => {
3512
- fmt ! ( "expected %s but found %s" ,
3512
+ fmt ! ( "expected %s, found %s" ,
3513
3513
values. expected. to_str( ) ,
3514
3514
values. found. to_str( ) )
3515
3515
}
@@ -4336,7 +4336,7 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
4336
4336
const_eval:: const_int( count) => if count < 0 {
4337
4337
tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4338
4338
"expected positive integer for \
4339
- repeat count but found negative integer") ;
4339
+ repeat count, found negative integer") ;
4340
4340
return 0 ;
4341
4341
} else {
4342
4342
return count as uint
@@ -4345,26 +4345,26 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
4345
4345
const_eval:: const_float( count) => {
4346
4346
tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4347
4347
"expected positive integer for \
4348
- repeat count but found float") ;
4348
+ repeat count, found float") ;
4349
4349
return count as uint ;
4350
4350
}
4351
4351
const_eval:: const_str( _) => {
4352
4352
tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4353
4353
"expected positive integer for \
4354
- repeat count but found string") ;
4354
+ repeat count, found string") ;
4355
4355
return 0 ;
4356
4356
}
4357
4357
const_eval:: const_bool( _) => {
4358
4358
tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4359
4359
"expected positive integer for \
4360
- repeat count but found boolean") ;
4360
+ repeat count, found boolean") ;
4361
4361
return 0 ;
4362
4362
}
4363
4363
} ,
4364
4364
Err ( * ) => {
4365
4365
tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4366
- "expected constant integer for repeat count \
4367
- but found variable") ;
4366
+ "expected constant integer for repeat count, \
4367
+ found variable") ;
4368
4368
return 0 ;
4369
4369
}
4370
4370
}
0 commit comments