@@ -3389,15 +3389,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
33893389 match * err {
33903390 terr_mismatch => ~"types differ",
33913391 terr_purity_mismatch( values) => {
3392- fmt ! ( "expected %s fn but found %s fn" ,
3392+ fmt ! ( "expected %s fn, found %s fn" ,
33933393 values. expected. to_str( ) , values. found. to_str( ) )
33943394 }
33953395 terr_abi_mismatch( values) => {
3396- fmt ! ( "expected %s fn but found %s fn" ,
3396+ fmt ! ( "expected %s fn, found %s fn" ,
33973397 values. expected. to_str( ) , values. found. to_str( ) )
33983398 }
33993399 terr_onceness_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_sigil_mismatch( values) => {
@@ -3411,25 +3411,25 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34113411 terr_ptr_mutability => ~"pointers differ in mutability",
34123412 terr_ref_mutability => ~"references differ in mutability",
34133413 terr_ty_param_size( values) => {
3414- fmt ! ( "expected a type with %? type params \
3415- but found one with %? type params",
3414+ fmt ! ( "expected a type with %? type params, \
3415+ found one with %? type params",
34163416 values. expected, values. found)
34173417 }
34183418 terr_tuple_size( values) => {
3419- fmt ! ( "expected a tuple with %? elements \
3420- but found one with %? elements",
3419+ fmt ! ( "expected a tuple with %? elements, \
3420+ found one with %? elements",
34213421 values. expected, values. found)
34223422 }
34233423 terr_record_size( values) => {
3424- fmt ! ( "expected a record with %? fields \
3425- but found one with %? fields",
3424+ fmt ! ( "expected a record with %? fields, \
3425+ found one with %? fields",
34263426 values. expected, values. found)
34273427 }
34283428 terr_record_mutability => {
34293429 ~"record elements differ in mutability"
34303430 }
34313431 terr_record_fields( values) => {
3432- fmt ! ( "expected a record with field `%s` but found one with field \
3432+ fmt ! ( "expected a record with field `%s`, found one with field \
34333433 `%s`",
34343434 cx. sess. str_of( values. expected) ,
34353435 cx. sess. str_of( values. found) )
@@ -3446,22 +3446,22 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34463446 }
34473447 terr_regions_insufficiently_polymorphic( br, _) => {
34483448 fmt ! ( "expected bound lifetime parameter %s, \
3449- but found concrete lifetime",
3449+ found concrete lifetime",
34503450 bound_region_ptr_to_str( cx, br) )
34513451 }
34523452 terr_regions_overly_polymorphic( br, _) => {
34533453 fmt ! ( "expected concrete lifetime, \
3454- but found bound lifetime parameter %s",
3454+ found bound lifetime parameter %s",
34553455 bound_region_ptr_to_str( cx, br) )
34563456 }
34573457 terr_vstores_differ( k, ref values) => {
3458- fmt ! ( "%s storage differs: expected %s but found %s" ,
3458+ fmt ! ( "%s storage differs: expected %s, found %s" ,
34593459 terr_vstore_kind_to_str( k) ,
34603460 vstore_to_str( cx, ( * values) . expected) ,
34613461 vstore_to_str( cx, ( * values) . found) )
34623462 }
34633463 terr_trait_stores_differ( _, ref values) => {
3464- fmt ! ( "trait storage differs: expected %s but found %s" ,
3464+ fmt ! ( "trait storage differs: expected %s, found %s" ,
34653465 trait_store_to_str( cx, ( * values) . expected) ,
34663466 trait_store_to_str( cx, ( * values) . found) )
34673467 }
@@ -3470,38 +3470,38 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
34703470 type_err_to_str( cx, err) )
34713471 }
34723472 terr_sorts( values) => {
3473- fmt ! ( "expected %s but found %s" ,
3473+ fmt ! ( "expected %s, found %s" ,
34743474 ty_sort_str( cx, values. expected) ,
34753475 ty_sort_str( cx, values. found) )
34763476 }
34773477 terr_traits( values) => {
3478- fmt ! ( "expected trait %s but found trait %s" ,
3478+ fmt ! ( "expected trait %s, found trait %s" ,
34793479 item_path_str( cx, values. expected) ,
34803480 item_path_str( cx, values. found) )
34813481 }
34823482 terr_builtin_bounds( values) => {
34833483 if values. expected . is_empty ( ) {
3484- fmt ! ( "expected no bounds but found `%s`" ,
3484+ fmt ! ( "expected no bounds, found `%s`" ,
34853485 values. found. user_string( cx) )
34863486 } else if values. found . is_empty ( ) {
3487- fmt ! ( "expected bounds `%s` but found no bounds" ,
3487+ fmt ! ( "expected bounds `%s`, found no bounds" ,
34883488 values. expected. user_string( cx) )
34893489 } else {
3490- fmt ! ( "expected bounds `%s` but found bounds `%s`" ,
3490+ fmt ! ( "expected bounds `%s`, found bounds `%s`" ,
34913491 values. expected. user_string( cx) ,
34923492 values. found. user_string( cx) )
34933493 }
34943494 }
34953495 terr_integer_as_char => {
3496- fmt ! ( "expected an integral type but found char" )
3496+ fmt ! ( "expected an integral type, found char" )
34973497 }
34983498 terr_int_mismatch( ref values) => {
3499- fmt ! ( "expected %s but found %s" ,
3499+ fmt ! ( "expected %s, found %s" ,
35003500 values. expected. to_str( ) ,
35013501 values. found. to_str( ) )
35023502 }
35033503 terr_float_mismatch( ref values) => {
3504- fmt ! ( "expected %s but found %s" ,
3504+ fmt ! ( "expected %s, found %s" ,
35053505 values. expected. to_str( ) ,
35063506 values. found. to_str( ) )
35073507 }
@@ -4327,7 +4327,7 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43274327 const_eval:: const_int( count) => if count < 0 {
43284328 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43294329 "expected positive integer for \
4330- repeat count but found negative integer") ;
4330+ repeat count, found negative integer") ;
43314331 return 0 ;
43324332 } else {
43334333 return count as uint
@@ -4336,26 +4336,26 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::expr) ->
43364336 const_eval:: const_float( count) => {
43374337 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43384338 "expected positive integer for \
4339- repeat count but found float") ;
4339+ repeat count, found float") ;
43404340 return count as uint ;
43414341 }
43424342 const_eval:: const_str( _) => {
43434343 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43444344 "expected positive integer for \
4345- repeat count but found string") ;
4345+ repeat count, found string") ;
43464346 return 0 ;
43474347 }
43484348 const_eval:: const_bool( _) => {
43494349 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
43504350 "expected positive integer for \
4351- repeat count but found boolean") ;
4351+ repeat count, found boolean") ;
43524352 return 0 ;
43534353 }
43544354 } ,
43554355 Err ( * ) => {
43564356 tcx. ty_ctxt ( ) . sess . span_err ( count_expr. span ,
4357- "expected constant integer for repeat count \
4358- but found variable") ;
4357+ "expected constant integer for \
4358+ repeat count, found variable") ;
43594359 return 0 ;
43604360 }
43614361 }
0 commit comments