Skip to content

Commit 3f675ab

Browse files
varkoryodaldevoid
andcommitted
Drive-by comment fixes
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
1 parent d113ff8 commit 3f675ab

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/librustc/infer/type_variable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct TypeVariableTable<'tcx> {
1717
/// the known value.
1818
eq_relations: ut::UnificationTable<ut::InPlace<TyVidEqKey<'tcx>>>,
1919

20-
/// Two variables are unified in `eq_relations` when we have a
20+
/// Two variables are unified in `sub_relations` when we have a
2121
/// constraint `?X <: ?Y` *or* a constraint `?Y <: ?X`. This second
2222
/// table exists only to help with the occurs check. In particular,
2323
/// we want to report constraints like these as an occurs check
@@ -365,7 +365,7 @@ impl sv::SnapshotVecDelegate for Delegate {
365365

366366
fn reverse(_values: &mut Vec<TypeVariableData>, _action: Instantiate) {
367367
// We don't actually have to *do* anything to reverse an
368-
// instanation; the value for a variable is stored in the
368+
// instantiation; the value for a variable is stored in the
369369
// `eq_relations` and hence its rollback code will handle
370370
// it. In fact, we could *almost* just remove the
371371
// `SnapshotVec` entirely, except that we would have to

src/librustc/infer/unify_key.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ impl UnifyKey for ty::IntVid {
1212
fn tag() -> &'static str { "IntVid" }
1313
}
1414

15-
impl EqUnifyValue for IntVarValue {
16-
}
15+
impl EqUnifyValue for IntVarValue {}
1716

1817
#[derive(PartialEq, Copy, Clone, Debug)]
1918
pub struct RegionVidKey {
@@ -62,8 +61,7 @@ impl UnifyKey for ty::FloatVid {
6261
fn tag() -> &'static str { "FloatVid" }
6362
}
6463

65-
impl EqUnifyValue for FloatVarValue {
66-
}
64+
impl EqUnifyValue for FloatVarValue {}
6765

6866
impl ToType for FloatVarValue {
6967
fn to_type<'a, 'gcx, 'tcx>(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Ty<'tcx> {

0 commit comments

Comments
 (0)