Skip to content

Commit 0c79be4

Browse files
committed
---
yaml --- r: 147695 b: refs/heads/try2 c: 89dfd00 h: refs/heads/master i: 147693: 61de93b 147691: 6a43afb 147687: fdcf2e9 147679: f599886 v: v3
1 parent b1a5e7d commit 0c79be4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a483ee8e33c74ffe2b06e62b934c91ec0aa762ba
8+
refs/heads/try2: 89dfd00dcf8016447143e985dbbd812dba4c1b3a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/ty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use util::ppaux::{Repr, UserString};
2929
use util::common::{indenter};
3030

3131
use std::cast;
32-
use std::cell::RefCell;
32+
use std::cell::{Cell, RefCell};
3333
use std::cmp;
3434
use std::hashmap::{HashMap, HashSet};
3535
use std::ops;
@@ -265,7 +265,7 @@ pub type ctxt = @ctxt_;
265265
struct ctxt_ {
266266
diag: @mut syntax::diagnostic::span_handler,
267267
interner: RefCell<HashMap<intern_key, ~t_box_>>,
268-
next_id: @mut uint,
268+
next_id: Cell<uint>,
269269
cstore: @metadata::cstore::CStore,
270270
sess: session::Session,
271271
def_map: resolve::DefMap,
@@ -970,7 +970,7 @@ pub fn mk_ctxt(s: session::Session,
970970
item_variance_map: RefCell::new(HashMap::new()),
971971
diag: s.diagnostic(),
972972
interner: RefCell::new(HashMap::new()),
973-
next_id: @mut primitives::LAST_PRIMITIVE_ID,
973+
next_id: Cell::new(primitives::LAST_PRIMITIVE_ID),
974974
cstore: s.cstore,
975975
sess: s,
976976
def_map: dm,
@@ -1124,7 +1124,7 @@ pub fn mk_t(cx: ctxt, st: sty) -> t {
11241124

11251125
let t = ~t_box_ {
11261126
sty: st,
1127-
id: *cx.next_id,
1127+
id: cx.next_id.get(),
11281128
flags: flags,
11291129
};
11301130

@@ -1137,7 +1137,7 @@ pub fn mk_t(cx: ctxt, st: sty) -> t {
11371137
let mut interner = cx.interner.borrow_mut();
11381138
interner.get().insert(key, t);
11391139

1140-
*cx.next_id += 1;
1140+
cx.next_id.set(cx.next_id.get() + 1);
11411141

11421142
unsafe {
11431143
cast::transmute::<*sty, t>(sty_ptr)

0 commit comments

Comments
 (0)