Skip to content

Commit

Permalink
Join match arms since they do the same thing
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Dec 12, 2022
1 parent 8937720 commit b0c3228
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions compiler/rustc_hir_analysis/src/collect/predicates_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
| ItemKind::Struct(_, ref generics)
| ItemKind::Union(_, ref generics) => *generics,

ItemKind::Trait(_, _, ref generics, ..) => {
is_trait = Some(ty::TraitRef::identity(tcx, def_id));
*generics
}
ItemKind::TraitAlias(ref generics, _) => {
ItemKind::Trait(_, _, ref generics, ..) | ItemKind::TraitAlias(ref generics, _) => {
is_trait = Some(ty::TraitRef::identity(tcx, def_id));
*generics
}
Expand Down

0 comments on commit b0c3228

Please sign in to comment.