Skip to content

Commit

Permalink
simplify some refs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Feb 15, 2023
1 parent 2d14db3 commit 46f895c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl FlagComputation {
self.bound_computation(ts, |flags, ts| flags.add_tys(ts));
}

&ty::GeneratorWitnessMIR(_, ref substs) => {
ty::GeneratorWitnessMIR(_, substs) => {
let should_remove_further_specializable =
!self.flags.contains(TypeFlags::STILL_FURTHER_SPECIALIZABLE);
self.add_substs(substs);
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_type_ir/src/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl<I: Interner> PartialEq for TyKind<I> {
a_d == b_d && a_s == b_s && a_m == b_m
}
(GeneratorWitness(a_g), GeneratorWitness(b_g)) => a_g == b_g,
(&GeneratorWitnessMIR(ref a_d, ref a_s), &GeneratorWitnessMIR(ref b_d, ref b_s)) => {
(GeneratorWitnessMIR(a_d, a_s), GeneratorWitnessMIR(b_d, b_s)) => {
a_d == b_d && a_s == b_s
}
(Tuple(a_t), Tuple(b_t)) => a_t == b_t,
Expand Down Expand Up @@ -397,8 +397,8 @@ impl<I: Interner> Ord for TyKind<I> {
}
(GeneratorWitness(a_g), GeneratorWitness(b_g)) => a_g.cmp(b_g),
(
&GeneratorWitnessMIR(ref a_d, ref a_s),
&GeneratorWitnessMIR(ref b_d, ref b_s),
GeneratorWitnessMIR(a_d, a_s),
GeneratorWitnessMIR(b_d, b_s),
) => match Ord::cmp(a_d, b_d) {
Ordering::Equal => Ord::cmp(a_s, b_s),
cmp => cmp,
Expand Down

0 comments on commit 46f895c

Please sign in to comment.