Skip to content

Commit 02539e1

Browse files
authored
Rollup merge of rust-lang#94676 - TaKO8Ki:remove-unnecessary-pattens-for-ignoring-remaining-parts, r=Dylan-DPC
Remove unnecessary `..` patterns This patch removes unnecessary `..` patterns.
2 parents 9c7ff1a + 51a53bf commit 02539e1

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,17 +2064,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
20642064
)),
20652065
_ => None,
20662066
});
2067-
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes, .. } =
2068-
itctx
2069-
{
2067+
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes } = itctx {
20702068
capturable_lifetimes.extend(lt_def_names.clone());
20712069
}
20722070

20732071
let res = this.lower_trait_ref(&p.trait_ref, itctx.reborrow());
20742072

2075-
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes, .. } =
2076-
itctx
2077-
{
2073+
if let ImplTraitContext::TypeAliasesOpaqueTy { ref mut capturable_lifetimes } = itctx {
20782074
for param in lt_def_names {
20792075
capturable_lifetimes.remove(&param);
20802076
}

compiler/rustc_middle/src/mir/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ pub fn write_allocations<'tcx>(
660660
}
661661
fn alloc_ids_from_const(val: ConstValue<'_>) -> impl Iterator<Item = AllocId> + '_ {
662662
match val {
663-
ConstValue::Scalar(interpret::Scalar::Ptr(ptr, _size)) => {
663+
ConstValue::Scalar(interpret::Scalar::Ptr(ptr, _)) => {
664664
Either::Left(Either::Left(std::iter::once(ptr.provenance)))
665665
}
666666
ConstValue::Scalar(interpret::Scalar::Int { .. }) => {

compiler/rustc_privacy/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ impl ReachEverythingInTheInterfaceVisitor<'_, '_> {
852852
self.visit(self.ev.tcx.type_of(param.def_id));
853853
}
854854
}
855-
GenericParamDefKind::Const { has_default, .. } => {
855+
GenericParamDefKind::Const { has_default } => {
856856
self.visit(self.ev.tcx.type_of(param.def_id));
857857
if has_default {
858858
self.visit(self.ev.tcx.const_param_default(param.def_id));

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
405405
}
406406
hir::Node::Item(hir::Item {
407407
kind:
408-
hir::ItemKind::Trait(_, _, generics, _, _)
408+
hir::ItemKind::Trait(_, _, generics, ..)
409409
| hir::ItemKind::Impl(hir::Impl { generics, .. }),
410410
..
411411
}) if projection.is_some() => {

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14031403
self.fcx.var_for_def(self.span, param)
14041404
}
14051405
}
1406-
GenericParamDefKind::Const { has_default, .. } => {
1406+
GenericParamDefKind::Const { has_default } => {
14071407
if !infer_args && has_default {
14081408
tcx.const_param_default(param.def_id)
14091409
.subst_spanned(tcx, substs.unwrap(), Some(self.span))

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl Clean<GenericParamDef> for ty::GenericParamDef {
451451
},
452452
)
453453
}
454-
ty::GenericParamDefKind::Const { has_default, .. } => (
454+
ty::GenericParamDefKind::Const { has_default } => (
455455
self.name,
456456
GenericParamDefKind::Const {
457457
did: self.def_id,

0 commit comments

Comments
 (0)