File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/librustc/middle/typeck/check Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3327,11 +3327,15 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
3327
3327
fcx. infcx( ) . next_ty_vars( ty_param_count)
3328
3328
} else if ty_substs_len > ty_param_count {
3329
3329
fcx. ccx. tcx. sess. span_err
3330
- ( span, "too many type parameters provided for this item" ) ;
3330
+ ( span,
3331
+ fmt!( "too many type parameters provided: expected %u, found %u" ,
3332
+ ty_param_count, ty_substs_len) ) ;
3331
3333
fcx. infcx( ) . next_ty_vars( ty_param_count)
3332
3334
} else if ty_substs_len < ty_param_count {
3333
3335
fcx. ccx . tcx . sess . span_err
3334
- ( span, "not enough type parameters provided for this item" ) ;
3336
+ ( span,
3337
+ fmt ! ( "not enough type parameters provided: expected %u, found %u" ,
3338
+ ty_param_count, ty_substs_len) ) ;
3335
3339
fcx. infcx ( ) . next_ty_vars ( ty_param_count)
3336
3340
} else {
3337
3341
pth. types . map ( |aty| fcx. to_ty ( aty) )
You can’t perform that action at this time.
0 commit comments