Skip to content

Commit d7ec913

Browse files
committed
---
yaml --- r: 23152 b: refs/heads/master c: a9979c0 h: refs/heads/master v: v3
1 parent 14e2277 commit d7ec913

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6d2bef53aa99564c2da205fb7e17271707d0a03b
2+
refs/heads/master: a9979c0ae45eee5e6446b389b7f5cc12bfaf5519
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/rustc/middle/typeck/infer.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,16 @@ enum var_value<V:copy, T:copy> {
291291
root(T, uint),
292292
}
293293

294-
type vals_and_bindings<V:copy, T:copy> = {
295-
vals: smallintmap<var_value<V, T>>,
296-
mut bindings: ~[(V, var_value<V, T>)]
297-
};
294+
struct vals_and_bindings<V:copy, T:copy> {
295+
vals: smallintmap<var_value<V, T>>;
296+
mut bindings: ~[(V, var_value<V, T>)];
297+
}
298298

299-
enum node<V:copy, T:copy> = {
300-
root: V,
301-
possible_types: T,
302-
rank: uint,
303-
};
299+
struct node<V:copy, T:copy> {
300+
root: V;
301+
possible_types: T;
302+
rank: uint;
303+
}
304304

305305
enum infer_ctxt = @{
306306
tcx: ty::ctxt,
@@ -353,7 +353,10 @@ type ures = result::result<(), ty::type_err>;
353353
type fres<T> = result::result<T, fixup_err>;
354354

355355
fn new_vals_and_bindings<V:copy, T:copy>() -> vals_and_bindings<V, T> {
356-
{vals: smallintmap::mk(), mut bindings: ~[]}
356+
vals_and_bindings {
357+
vals: smallintmap::mk(),
358+
mut bindings: ~[]
359+
}
357360
}
358361

359362
fn new_infer_ctxt(tcx: ty::ctxt) -> infer_ctxt {
@@ -727,15 +730,15 @@ impl infer_ctxt {
727730
some(var_val) => {
728731
match var_val {
729732
redirect(vid) => {
730-
let nde = self.get(vb, vid);
731-
if nde.root != vid {
733+
let node = self.get(vb, vid);
734+
if node.root != vid {
732735
// Path compression
733-
vb.vals.insert(vid.to_uint(), redirect(nde.root));
736+
vb.vals.insert(vid.to_uint(), redirect(node.root));
734737
}
735-
nde
738+
node
736739
}
737740
root(pt, rk) => {
738-
node({root: vid, possible_types: pt, rank: rk})
741+
node {root: vid, possible_types: pt, rank: rk}
739742
}
740743
}
741744
}

0 commit comments

Comments
 (0)