Skip to content

Commit e3bcdb7

Browse files
committed
---
yaml --- r: 27730 b: refs/heads/try c: a9979c0 h: refs/heads/master v: v3
1 parent 3422285 commit e3bcdb7

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 6d2bef53aa99564c2da205fb7e17271707d0a03b
5+
refs/heads/try: a9979c0ae45eee5e6446b389b7f5cc12bfaf5519
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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)