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:
commit
02539e1612
@ -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(¶m);
|
||||
}
|
||||
|
@ -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 { .. }) => {
|
||||
|
@ -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));
|
||||
|
@ -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() => {
|
||||
|
@ -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))
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user