From 3f675ab038cfd82550fe54b7d659f26753987d34 Mon Sep 17 00:00:00 2001 From: varkor Date: Fri, 8 Mar 2019 01:20:58 +0000 Subject: [PATCH] Drive-by comment fixes Co-Authored-By: Gabriel Smith --- src/librustc/infer/type_variable.rs | 4 ++-- src/librustc/infer/unify_key.rs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index 1393e4f67eb..88933312b0d 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -17,7 +17,7 @@ pub struct TypeVariableTable<'tcx> { /// the known value. eq_relations: ut::UnificationTable>>, - /// Two variables are unified in `eq_relations` when we have a + /// Two variables are unified in `sub_relations` when we have a /// constraint `?X <: ?Y` *or* a constraint `?Y <: ?X`. This second /// table exists only to help with the occurs check. In particular, /// we want to report constraints like these as an occurs check @@ -365,7 +365,7 @@ impl sv::SnapshotVecDelegate for Delegate { fn reverse(_values: &mut Vec, _action: Instantiate) { // We don't actually have to *do* anything to reverse an - // instanation; the value for a variable is stored in the + // instantiation; the value for a variable is stored in the // `eq_relations` and hence its rollback code will handle // it. In fact, we could *almost* just remove the // `SnapshotVec` entirely, except that we would have to diff --git a/src/librustc/infer/unify_key.rs b/src/librustc/infer/unify_key.rs index 09f800d9f9b..208c553aa32 100644 --- a/src/librustc/infer/unify_key.rs +++ b/src/librustc/infer/unify_key.rs @@ -12,8 +12,7 @@ fn from_index(i: u32) -> ty::IntVid { ty::IntVid { index: i } } fn tag() -> &'static str { "IntVid" } } -impl EqUnifyValue for IntVarValue { -} +impl EqUnifyValue for IntVarValue {} #[derive(PartialEq, Copy, Clone, Debug)] pub struct RegionVidKey { @@ -62,8 +61,7 @@ fn from_index(i: u32) -> ty::FloatVid { ty::FloatVid { index: i } } fn tag() -> &'static str { "FloatVid" } } -impl EqUnifyValue for FloatVarValue { -} +impl EqUnifyValue for FloatVarValue {} impl ToType for FloatVarValue { fn to_type<'a, 'gcx, 'tcx>(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> { -- 2.44.0