88//! specialization errors. These things can (and probably should) be
99//! fixed, but for the moment it's easier to do these checks early.
1010
11- use crate :: constrained_generic_params as ctp ;
11+ use crate :: constrained_generic_params as cgp ;
1212use rustc:: hir;
1313use rustc:: hir:: itemlikevisit:: ItemLikeVisitor ;
1414use rustc:: hir:: def_id:: DefId ;
@@ -102,8 +102,8 @@ fn enforce_impl_params_are_constrained<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
102102 let impl_predicates = tcx. predicates_of ( impl_def_id) ;
103103 let impl_trait_ref = tcx. impl_trait_ref ( impl_def_id) ;
104104
105- let mut input_parameters = ctp :: parameters_for_impl ( impl_self_ty, impl_trait_ref) ;
106- ctp :: identify_constrained_generic_params (
105+ let mut input_parameters = cgp :: parameters_for_impl ( impl_self_ty, impl_trait_ref) ;
106+ cgp :: identify_constrained_generic_params (
107107 tcx, & impl_predicates, impl_trait_ref, & mut input_parameters) ;
108108
109109 // Disallow unconstrained lifetimes, but only if they appear in assoc types.
@@ -114,23 +114,23 @@ fn enforce_impl_params_are_constrained<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
114114 item. kind == ty:: AssociatedKind :: Type && item. defaultness . has_value ( )
115115 } )
116116 . flat_map ( |def_id| {
117- ctp :: parameters_for ( & tcx. type_of ( def_id) , true )
117+ cgp :: parameters_for ( & tcx. type_of ( def_id) , true )
118118 } ) . collect ( ) ;
119119
120120 for param in & impl_generics. params {
121121 match param. kind {
122122 // Disallow ANY unconstrained type parameters.
123123 ty:: GenericParamDefKind :: Type { .. } => {
124124 let param_ty = ty:: ParamTy :: for_def ( param) ;
125- if !input_parameters. contains ( & ctp :: Parameter :: from ( param_ty) ) {
125+ if !input_parameters. contains ( & cgp :: Parameter :: from ( param_ty) ) {
126126 report_unused_parameter ( tcx,
127127 tcx. def_span ( param. def_id ) ,
128128 "type" ,
129129 & param_ty. to_string ( ) ) ;
130130 }
131131 }
132132 ty:: GenericParamDefKind :: Lifetime => {
133- let param_lt = ctp :: Parameter :: from ( param. to_early_bound_region_data ( ) ) ;
133+ let param_lt = cgp :: Parameter :: from ( param. to_early_bound_region_data ( ) ) ;
134134 if lifetimes_in_associated_types. contains ( & param_lt) && // (*)
135135 !input_parameters. contains ( & param_lt) {
136136 report_unused_parameter ( tcx,
@@ -141,7 +141,7 @@ fn enforce_impl_params_are_constrained<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
141141 }
142142 ty:: GenericParamDefKind :: Const => {
143143 let param_ct = ty:: ParamConst :: for_def ( param) ;
144- if !input_parameters. contains ( & ctp :: Parameter :: from ( param_ct) ) {
144+ if !input_parameters. contains ( & cgp :: Parameter :: from ( param_ct) ) {
145145 report_unused_parameter ( tcx,
146146 tcx. def_span ( param. def_id ) ,
147147 "const" ,
0 commit comments