1
Fork 0

Rollup merge of #108102 - matthiaskrgr:ref, r=compiler-errors

simplify some refs
This commit is contained in:
Dylan DPC 2023-02-16 11:40:21 +05:30 committed by GitHub
commit 7bde7b73f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -125,7 +125,7 @@ impl FlagComputation {
self.bound_computation(ts, |flags, ts| flags.add_tys(ts)); self.bound_computation(ts, |flags, ts| flags.add_tys(ts));
} }
&ty::GeneratorWitnessMIR(_, ref substs) => { ty::GeneratorWitnessMIR(_, substs) => {
let should_remove_further_specializable = let should_remove_further_specializable =
!self.flags.contains(TypeFlags::STILL_FURTHER_SPECIALIZABLE); !self.flags.contains(TypeFlags::STILL_FURTHER_SPECIALIZABLE);
self.add_substs(substs); self.add_substs(substs);

View file

@ -336,7 +336,7 @@ impl<I: Interner> PartialEq for TyKind<I> {
a_d == b_d && a_s == b_s && a_m == b_m a_d == b_d && a_s == b_s && a_m == b_m
} }
(GeneratorWitness(a_g), GeneratorWitness(b_g)) => a_g == b_g, (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 a_d == b_d && a_s == b_s
} }
(Tuple(a_t), Tuple(b_t)) => a_t == b_t, (Tuple(a_t), Tuple(b_t)) => a_t == b_t,
@ -397,8 +397,8 @@ impl<I: Interner> Ord for TyKind<I> {
} }
(GeneratorWitness(a_g), GeneratorWitness(b_g)) => a_g.cmp(b_g), (GeneratorWitness(a_g), GeneratorWitness(b_g)) => a_g.cmp(b_g),
( (
&GeneratorWitnessMIR(ref a_d, ref a_s), GeneratorWitnessMIR(a_d, a_s),
&GeneratorWitnessMIR(ref b_d, ref b_s), GeneratorWitnessMIR(b_d, b_s),
) => match Ord::cmp(a_d, b_d) { ) => match Ord::cmp(a_d, b_d) {
Ordering::Equal => Ord::cmp(a_s, b_s), Ordering::Equal => Ord::cmp(a_s, b_s),
cmp => cmp, cmp => cmp,