@@ -3397,15 +3397,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
33973397 match * err {
33983398 terr_mismatch => ~"types differ",
33993399 terr_purity_mismatch( values) => {
3400- fmt ! ( "expected %s fn but found %s fn" ,
3400+ fmt ! ( "expected %s fn, found %s fn" ,
34013401 values. expected. to_str( ) , values. found. to_str( ) )
34023402 }
34033403 terr_abi_mismatch( values) => {
3404- fmt ! ( "expected %s fn but found %s fn" ,
3404+ fmt ! ( "expected %s fn, found %s fn" ,
34053405 values. expected. to_str( ) , values. found. to_str( ) )
34063406 }
34073407 terr_onceness_mismatch( values) => {
3408- fmt ! ( "expected %s fn but found %s fn" ,
3408+ fmt ! ( "expected %s fn, found %s fn" ,
34093409 values. expected. to_str( ) , values. found. to_str( ) )
34103410 }
34113411 terr_sigil_mismatch( values) => {
@@ -3419,25 +3419,25 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34193419 terr_ptr_mutability => ~"pointers differ in mutability",
34203420 terr_ref_mutability => ~"references differ in mutability",
34213421 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",
34243424 values. expected, values. found)
34253425 }
34263426 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",
34293429 values. expected, values. found)
34303430 }
34313431 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",
34343434 values. expected, values. found)
34353435 }
34363436 terr_record_mutability => {
34373437 ~"record elements differ in mutability"
34383438 }
34393439 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 \
34413441 `%s`",
34423442 cx. sess. str_of( values. expected) ,
34433443 cx. sess. str_of( values. found) )
@@ -3454,22 +3454,22 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34543454 }
34553455 terr_regions_insufficiently_polymorphic( br, _) => {
34563456 fmt ! ( "expected bound lifetime parameter %s, \
3457- but found concrete lifetime",
3457+ found concrete lifetime",
34583458 bound_region_ptr_to_str( cx, br) )
34593459 }
34603460 terr_regions_overly_polymorphic( br, _) => {
34613461 fmt ! ( "expected concrete lifetime, \
3462- but found bound lifetime parameter %s",
3462+ found bound lifetime parameter %s",
34633463 bound_region_ptr_to_str( cx, br) )
34643464 }
34653465 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" ,
34673467 terr_vstore_kind_to_str( k) ,
34683468 vstore_to_str( cx, ( * values) . expected) ,
34693469 vstore_to_str( cx, ( * values) . found) )
34703470 }
34713471 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" ,
34733473 trait_store_to_str( cx, ( * values) . expected) ,
34743474 trait_store_to_str( cx, ( * values) . found) )
34753475 }
@@ -3478,38 +3478,38 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34783478 type_err_to_str( cx, err) )
34793479 }
34803480 terr_sorts( values) => {
3481- fmt ! ( "expected %s but found %s" ,
3481+ fmt ! ( "expected %s, found %s" ,
34823482 ty_sort_str( cx, values. expected) ,
34833483 ty_sort_str( cx, values. found) )
34843484 }
34853485 terr_traits( values) => {
3486- fmt ! ( "expected trait %s but found trait %s" ,
3486+ fmt ! ( "expected trait %s, found trait %s" ,
34873487 item_path_str( cx, values. expected) ,
34883488 item_path_str( cx, values. found) )
34893489 }
34903490 terr_builtin_bounds( values) => {
34913491 if values. expected . is_empty ( ) {
3492- fmt ! ( "expected no bounds but found `%s`" ,
3492+ fmt ! ( "expected no bounds, found `%s`" ,
34933493 values. found. user_string( cx) )
34943494 } else if values. found . is_empty ( ) {
3495- fmt ! ( "expected bounds `%s` but found no bounds" ,
3495+ fmt ! ( "expected bounds `%s`, found no bounds" ,
34963496 values. expected. user_string( cx) )
34973497 } else {
3498- fmt ! ( "expected bounds `%s` but found bounds `%s`" ,
3498+ fmt ! ( "expected bounds `%s`, found bounds `%s`" ,
34993499 values. expected. user_string( cx) ,
35003500 values. found. user_string( cx) )
35013501 }
35023502 }
35033503 terr_integer_as_char => {
3504- fmt ! ( "expected an integral type but found char" )
3504+ fmt ! ( "expected an integral type, found char" )
35053505 }
35063506 terr_int_mismatch( ref values) => {
3507- fmt ! ( "expected %s but found %s" ,
3507+ fmt ! ( "expected %s, found %s" ,
35083508 values. expected. to_str( ) ,
35093509 values. found. to_str( ) )
35103510 }
35113511 terr_float_mismatch( ref values) => {
3512- fmt ! ( "expected %s but found %s" ,
3512+ fmt ! ( "expected %s, found %s" ,
35133513 values. expected. to_str( ) ,
35143514 values. found. to_str( ) )
35153515 }
@@ -4336,7 +4336,7 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43364336 const_eval:: const_int( count) => if count < 0 {
43374337 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43384338 "expected positive integer for \
4339- repeat count but found negative integer") ;
4339+ repeat count, found negative integer") ;
43404340 return 0 ;
43414341 } else {
43424342 return count as uint
@@ -4345,26 +4345,26 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43454345 const_eval:: const_float( count) => {
43464346 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43474347 "expected positive integer for \
4348- repeat count but found float") ;
4348+ repeat count, found float") ;
43494349 return count as uint ;
43504350 }
43514351 const_eval:: const_str( _) => {
43524352 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43534353 "expected positive integer for \
4354- repeat count but found string") ;
4354+ repeat count, found string") ;
43554355 return 0 ;
43564356 }
43574357 const_eval:: const_bool( _) => {
43584358 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43594359 "expected positive integer for \
4360- repeat count but found boolean") ;
4360+ repeat count, found boolean") ;
43614361 return 0 ;
43624362 }
43634363 } ,
43644364 Err ( * ) => {
43654365 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") ;
43684368 return 0 ;
43694369 }
43704370 }
0 commit comments