diff options
| author | Michael Goulet <michael@errs.io> | 2024-06-01 10:31:28 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-06-01 10:31:32 -0400 |
| commit | 208c316a61d3f21f834845ea35aca41369673f59 (patch) | |
| tree | 01304274655ad3a969883850502de37b3b21a189 /compiler/rustc_infer/src | |
| parent | f14b9651a1cb2544fb79cac587971fa3113602b7 (diff) | |
| download | rust-208c316a61d3f21f834845ea35aca41369673f59.tar.gz rust-208c316a61d3f21f834845ea35aca41369673f59.zip | |
Address nits
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index cb5c976ac1c..3380f945241 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1269,16 +1269,16 @@ impl<'tcx> InferCtxt<'tcx> { ty::IntVar(v) => { match self.inner.borrow_mut().int_unification_table().probe_value(v) { - ty::IntVarValue::Unknown => ty, ty::IntVarValue::IntType(ty) => Ty::new_int(self.tcx, ty), ty::IntVarValue::UintType(ty) => Ty::new_uint(self.tcx, ty), + ty::IntVarValue::Unknown => ty, } } ty::FloatVar(v) => { match self.inner.borrow_mut().float_unification_table().probe_value(v) { - ty::FloatVarValue::Unknown => ty, ty::FloatVarValue::Known(ty) => Ty::new_float(self.tcx, ty), + ty::FloatVarValue::Unknown => ty, } } @@ -1644,7 +1644,7 @@ impl<'tcx> InferCtxt<'tcx> { // If `inlined_probe_value` returns a value it's always a // `ty::Int(_)` or `ty::UInt(_)`, which never matches a // `ty::Infer(_)`. - !self.inner.borrow_mut().int_unification_table().inlined_probe_value(v).is_unknown() + self.inner.borrow_mut().int_unification_table().inlined_probe_value(v).is_known() } TyOrConstInferVar::TyFloat(v) => { @@ -1652,7 +1652,7 @@ impl<'tcx> InferCtxt<'tcx> { // `ty::Float(_)`, which never matches a `ty::Infer(_)`. // // Not `inlined_probe_value(v)` because this call site is colder. - !self.inner.borrow_mut().float_unification_table().probe_value(v).is_unknown() + self.inner.borrow_mut().float_unification_table().probe_value(v).is_known() } TyOrConstInferVar::Const(v) => { |
