Skip to content

Commit 565fdc2

Browse files
committed
---
yaml --- r: 97155 b: refs/heads/dist-snap c: 89dfd00 h: refs/heads/master i: 97153: f46c3a8 97151: 8577238 v: v3
1 parent 105fca7 commit 565fdc2

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
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: a483ee8e33c74ffe2b06e62b934c91ec0aa762ba
9+
refs/heads/dist-snap: 89dfd00dcf8016447143e985dbbd812dba4c1b3a
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)