Rollup merge of #94676 - TaKO8Ki:remove-unnecessary-pattens-for-ignoring-remaining-parts, r=Dylan-DPC

Remove unnecessary `..` patterns

This patch removes unnecessary `..` patterns.
This commit is contained in:
Matthias Krüger 2022-03-07 06:44:03 +01:00 committed by GitHub
commit 02539e1612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 11 deletions

View File

@ -2064,17 +2064,13 @@ fn lower_poly_trait_ref(
)),
_ => None,
});
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes, .. } =
itctx
{
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes } = itctx {
capturable_lifetimes.extend(lt_def_names.clone());
}
let res = this.lower_trait_ref(&p.trait_ref, itctx.reborrow());
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes, .. } =
itctx
{
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes } = itctx {
for param in lt_def_names {
capturable_lifetimes.remove(&param);
}

View File

@ -660,7 +660,7 @@ fn alloc_ids_from_alloc(
}
fn alloc_ids_from_const(val: ConstValue<'_>) -> impl Iterator<Item = AllocId> + '_ {
match val {
ConstValue::Scalar(interpret::Scalar::Ptr(ptr, _size)) => {
ConstValue::Scalar(interpret::Scalar::Ptr(ptr, _)) => {
Either::Left(Either::Left(std::iter::once(ptr.provenance)))
}
ConstValue::Scalar(interpret::Scalar::Int { .. }) => {

View File

@ -852,7 +852,7 @@ fn generics(&mut self) -> &mut Self {
self.visit(self.ev.tcx.type_of(param.def_id));
}
}
GenericParamDefKind::Const { has_default, .. } => {
GenericParamDefKind::Const { has_default } => {
self.visit(self.ev.tcx.type_of(param.def_id));
if has_default {
self.visit(self.ev.tcx.const_param_default(param.def_id));

View File

@ -405,7 +405,7 @@ fn suggest_restricting_param_bound(
}
hir::Node::Item(hir::Item {
kind:
hir::ItemKind::Trait(_, _, generics, _, _)
hir::ItemKind::Trait(_, _, generics, ..)
| hir::ItemKind::Impl(hir::Impl { generics, .. }),
..
}) if projection.is_some() => {

View File

@ -1403,7 +1403,7 @@ fn inferred_kind(
self.fcx.var_for_def(self.span, param)
}
}
GenericParamDefKind::Const { has_default, .. } => {
GenericParamDefKind::Const { has_default } => {
if !infer_args && has_default {
tcx.const_param_default(param.def_id)
.subst_spanned(tcx, substs.unwrap(), Some(self.span))

View File

@ -451,7 +451,7 @@ fn clean(&self, cx: &mut DocContext<'_>) -> GenericParamDef {
},
)
}
ty::GenericParamDefKind::Const { has_default, .. } => (
ty::GenericParamDefKind::Const { has_default } => (
self.name,
GenericParamDefKind::Const {
did: self.def_id,