提交 6f257bf2 编写于 作者: V varkor

Correct variable renaming fallout

上级 0b8b14f6
......@@ -5094,8 +5094,8 @@ pub fn check_bounds_are_used<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
for param in generics.params.iter() {
let key = match param {
hir::GenericParamDef::Type(_) => ty::Kind::Type,
hir::GenericParamDef::Lifetime(_) => ty::Kind::Lifetime,
hir::GenericParam::Type(_) => ty::Kind::Type,
hir::GenericParam::Lifetime(_) => ty::Kind::Lifetime,
};
*param_counts.get_mut(&key).unwrap() += 1;
}
......
......@@ -119,13 +119,13 @@ fn enforce_impl_params_are_constrained<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
.zip(impl_hir_generics.params.iter()) {
match (ty_param, hir_param) {
// Disallow ANY unconstrained type parameters.
(ty::GenericParamDef::Type(ty_ty), hir::GenericParamDef::Type(hir_ty)) => {
(ty::GenericParamDef::Type(ty_ty), hir::GenericParam::Type(hir_ty)) => {
let param_ty = ty::ParamTy::for_def(ty_ty);
if !input_parameters.contains(&ctp::Parameter::from(param_ty)) {
report_unused_parameter(tcx, hir_ty.span, "type", &param_ty.to_string());
}
}
(ty::GenericParamDef::Lifetime(ty_lt), hir::GenericParamDef::Lifetime(hir_lt)) => {
(ty::GenericParamDef::Lifetime(ty_lt), hir::GenericParam::Lifetime(hir_lt)) => {
let param = ctp::Parameter::from(ty_lt.to_early_bound_region_data());
if lifetimes_in_associated_types.contains(&param) && // (*)
!input_parameters.contains(&param) {
......
......@@ -2687,7 +2687,7 @@ fn clean(&self, cx: &DocContext) -> Type {
let mut indices = FxHashMap();
for param in generics.params.iter() {
match param {
GenericParamDef::Type(ty_param) => {
hir::GenericParam::Type(ty_param) => {
let i = indices.entry(Kind::Type).or_insert(0);
let ty_param_def =
Def::TyParam(cx.tcx.hir.local_def_id(ty_param.id));
......@@ -2699,7 +2699,7 @@ fn clean(&self, cx: &DocContext) -> Type {
}
*i += 1;
}
GenericParamDef::Lifetime(lt_param) => {
hir::GenericParam::Lifetime(lt_param) => {
let i = indices.entry(Kind::Type).or_insert(0);
if let Some(lt) = provided_params.lifetimes.get(*i).cloned() {
if !lt.is_elided() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册