@@ -704,9 +704,9 @@ pub fn check_item_type<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>, it: &'tcx hir::Item) {
704704 hir:: ItemStruct ( ..) => {
705705 check_struct ( ccx, it. id , it. span ) ;
706706 }
707- hir:: ItemTy ( ref t , ref generics) => {
707+ hir:: ItemTy ( _ , ref generics) => {
708708 let pty_ty = ccx. tcx . node_id_to_type ( it. id ) ;
709- check_bounds_are_used ( ccx, t . span , & generics. ty_params , pty_ty) ;
709+ check_bounds_are_used ( ccx, & generics. ty_params , pty_ty) ;
710710 }
711711 hir:: ItemForeignMod ( ref m) => {
712712 if m. abi == abi:: RustIntrinsic {
@@ -4904,7 +4904,6 @@ pub fn may_break(cx: &ty::ctxt, id: ast::NodeId, b: &hir::Block) -> bool {
49044904}
49054905
49064906pub fn check_bounds_are_used < ' a , ' tcx > ( ccx : & CrateCtxt < ' a , ' tcx > ,
4907- span : Span ,
49084907 tps : & OwnedSlice < hir:: TyParam > ,
49094908 ty : Ty < ' tcx > ) {
49104909 debug ! ( "check_bounds_are_used(n_tps={}, ty={:?})" ,
@@ -4923,7 +4922,7 @@ pub fn check_bounds_are_used<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
49234922
49244923 for ( i, b) in tps_used. iter ( ) . enumerate ( ) {
49254924 if !* b {
4926- span_err ! ( ccx. tcx. sess, span, E0091 ,
4925+ span_err ! ( ccx. tcx. sess, tps [ i ] . span, E0091 ,
49274926 "type parameter `{}` is unused" ,
49284927 tps[ i] . name) ;
49294928 }
0 commit comments