@@ -3427,15 +3427,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34273427 match * err {
34283428 terr_mismatch => ~"types differ",
34293429 terr_purity_mismatch( values) => {
3430- fmt ! ( "expected %s fn but found %s fn" ,
3430+ fmt ! ( "expected %s fn, found %s fn" ,
34313431 values. expected. to_str( ) , values. found. to_str( ) )
34323432 }
34333433 terr_abi_mismatch( values) => {
3434- fmt ! ( "expected %s fn but found %s fn" ,
3434+ fmt ! ( "expected %s fn, found %s fn" ,
34353435 values. expected. to_str( ) , values. found. to_str( ) )
34363436 }
34373437 terr_onceness_mismatch( values) => {
3438- fmt ! ( "expected %s fn but found %s fn" ,
3438+ fmt ! ( "expected %s fn, found %s fn" ,
34393439 values. expected. to_str( ) , values. found. to_str( ) )
34403440 }
34413441 terr_sigil_mismatch( values) => {
@@ -3449,25 +3449,25 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34493449 terr_ptr_mutability => ~"pointers differ in mutability",
34503450 terr_ref_mutability => ~"references differ in mutability",
34513451 terr_ty_param_size( values) => {
3452- fmt ! ( "expected a type with %? type params \
3453- but found one with %? type params",
3452+ fmt ! ( "expected a type with %? type params, \
3453+ found one with %? type params",
34543454 values. expected, values. found)
34553455 }
34563456 terr_tuple_size( values) => {
3457- fmt ! ( "expected a tuple with %? elements \
3458- but found one with %? elements",
3457+ fmt ! ( "expected a tuple with %? elements, \
3458+ found one with %? elements",
34593459 values. expected, values. found)
34603460 }
34613461 terr_record_size( values) => {
3462- fmt ! ( "expected a record with %? fields \
3463- but found one with %? fields",
3462+ fmt ! ( "expected a record with %? fields, \
3463+ found one with %? fields",
34643464 values. expected, values. found)
34653465 }
34663466 terr_record_mutability => {
34673467 ~"record elements differ in mutability"
34683468 }
34693469 terr_record_fields( values) => {
3470- fmt ! ( "expected a record with field `%s` but found one with field \
3470+ fmt ! ( "expected a record with field `%s`, found one with field \
34713471 `%s`",
34723472 cx. sess. str_of( values. expected) ,
34733473 cx. sess. str_of( values. found) )
@@ -3484,22 +3484,22 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34843484 }
34853485 terr_regions_insufficiently_polymorphic( br, _) => {
34863486 fmt ! ( "expected bound lifetime parameter %s, \
3487- but found concrete lifetime",
3487+ found concrete lifetime",
34883488 bound_region_ptr_to_str( cx, br) )
34893489 }
34903490 terr_regions_overly_polymorphic( br, _) => {
34913491 fmt ! ( "expected concrete lifetime, \
3492- but found bound lifetime parameter %s",
3492+ found bound lifetime parameter %s",
34933493 bound_region_ptr_to_str( cx, br) )
34943494 }
34953495 terr_vstores_differ( k, ref values) => {
3496- fmt ! ( "%s storage differs: expected %s but found %s" ,
3496+ fmt ! ( "%s storage differs: expected %s, found %s" ,
34973497 terr_vstore_kind_to_str( k) ,
34983498 vstore_to_str( cx, ( * values) . expected) ,
34993499 vstore_to_str( cx, ( * values) . found) )
35003500 }
35013501 terr_trait_stores_differ( _, ref values) => {
3502- fmt ! ( "trait storage differs: expected %s but found %s" ,
3502+ fmt ! ( "trait storage differs: expected %s, found %s" ,
35033503 trait_store_to_str( cx, ( * values) . expected) ,
35043504 trait_store_to_str( cx, ( * values) . found) )
35053505 }
@@ -3508,38 +3508,38 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
35083508 type_err_to_str( cx, err) )
35093509 }
35103510 terr_sorts( values) => {
3511- fmt ! ( "expected %s but found %s" ,
3511+ fmt ! ( "expected %s, found %s" ,
35123512 ty_sort_str( cx, values. expected) ,
35133513 ty_sort_str( cx, values. found) )
35143514 }
35153515 terr_traits( values) => {
3516- fmt ! ( "expected trait %s but found trait %s" ,
3516+ fmt ! ( "expected trait %s, found trait %s" ,
35173517 item_path_str( cx, values. expected) ,
35183518 item_path_str( cx, values. found) )
35193519 }
35203520 terr_builtin_bounds( values) => {
35213521 if values. expected . is_empty ( ) {
3522- fmt ! ( "expected no bounds but found `%s`" ,
3522+ fmt ! ( "expected no bounds, found `%s`" ,
35233523 values. found. user_string( cx) )
35243524 } else if values. found . is_empty ( ) {
3525- fmt ! ( "expected bounds `%s` but found no bounds" ,
3525+ fmt ! ( "expected bounds `%s`, found no bounds" ,
35263526 values. expected. user_string( cx) )
35273527 } else {
3528- fmt ! ( "expected bounds `%s` but found bounds `%s`" ,
3528+ fmt ! ( "expected bounds `%s`, found bounds `%s`" ,
35293529 values. expected. user_string( cx) ,
35303530 values. found. user_string( cx) )
35313531 }
35323532 }
35333533 terr_integer_as_char => {
3534- fmt ! ( "expected an integral type but found char" )
3534+ fmt ! ( "expected an integral type, found char" )
35353535 }
35363536 terr_int_mismatch( ref values) => {
3537- fmt ! ( "expected %s but found %s" ,
3537+ fmt ! ( "expected %s, found %s" ,
35383538 values. expected. to_str( ) ,
35393539 values. found. to_str( ) )
35403540 }
35413541 terr_float_mismatch( ref values) => {
3542- fmt ! ( "expected %s but found %s" ,
3542+ fmt ! ( "expected %s, found %s" ,
35433543 values. expected. to_str( ) ,
35443544 values. found. to_str( ) )
35453545 }
@@ -4366,7 +4366,7 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43664366 const_eval:: const_int( count) => if count < 0 {
43674367 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43684368 "expected positive integer for \
4369- repeat count but found negative integer") ;
4369+ repeat count, found negative integer") ;
43704370 return 0 ;
43714371 } else {
43724372 return count as uint
@@ -4375,26 +4375,26 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43754375 const_eval:: const_float( count) => {
43764376 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43774377 "expected positive integer for \
4378- repeat count but found float") ;
4378+ repeat count, found float") ;
43794379 return count as uint ;
43804380 }
43814381 const_eval:: const_str( _) => {
43824382 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43834383 "expected positive integer for \
4384- repeat count but found string") ;
4384+ repeat count, found string") ;
43854385 return 0 ;
43864386 }
43874387 const_eval:: const_bool( _) => {
43884388 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43894389 "expected positive integer for \
4390- repeat count but found boolean") ;
4390+ repeat count, found boolean") ;
43914391 return 0 ;
43924392 }
43934393 } ,
43944394 Err ( * ) => {
43954395 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4396- "expected constant integer for repeat count \
4397- but found variable") ;
4396+ "expected constant integer for repeat count, \
4397+ found variable") ;
43984398 return 0 ;
43994399 }
44004400 }
0 commit comments