Skip to content

Commit 806fd2a

Browse files
committed
---
yaml --- r: 147579 b: refs/heads/try2 c: ff2d16e h: refs/heads/master i: 147577: c5249d9 147575: e26152c v: v3
1 parent 53d048d commit 806fd2a

File tree

2 files changed

+21
-21
lines changed
  • branches/try2/src/librustc/middle/typeck/infer/region_inference

2 files changed

+21
-21
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: a39ab7445c248548fe5c9fb2d1cc600eee311f24
8+
refs/heads/try2: ff2d16e119093d98ab2d8fa1802e7e200475c729
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/typeck/infer/region_inference/mod.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl RegionVarBindings {
130130
undo_log.get().len() > 0
131131
}
132132

133-
pub fn start_snapshot(&mut self) -> uint {
133+
pub fn start_snapshot(&self) -> uint {
134134
debug!("RegionVarBindings: start_snapshot()");
135135
if self.in_snapshot() {
136136
{
@@ -146,15 +146,15 @@ impl RegionVarBindings {
146146
}
147147
}
148148

149-
pub fn commit(&mut self) {
149+
pub fn commit(&self) {
150150
debug!("RegionVarBindings: commit()");
151151
let mut undo_log = self.undo_log.borrow_mut();
152152
while undo_log.get().len() > 0 {
153153
undo_log.get().pop();
154154
}
155155
}
156156

157-
pub fn rollback_to(&mut self, snapshot: uint) {
157+
pub fn rollback_to(&self, snapshot: uint) {
158158
debug!("RegionVarBindings: rollback_to({})", snapshot);
159159
let mut undo_log = self.undo_log.borrow_mut();
160160
while undo_log.get().len() > snapshot {
@@ -188,7 +188,7 @@ impl RegionVarBindings {
188188
var_origins.get().len()
189189
}
190190

191-
pub fn new_region_var(&mut self, origin: RegionVariableOrigin) -> RegionVid {
191+
pub fn new_region_var(&self, origin: RegionVariableOrigin) -> RegionVid {
192192
let id = self.num_vars();
193193
let mut var_origins = self.var_origins.borrow_mut();
194194
var_origins.get().push(origin);
@@ -204,13 +204,13 @@ impl RegionVarBindings {
204204
return vid;
205205
}
206206

207-
pub fn new_skolemized(&mut self, br: ty::BoundRegion) -> Region {
207+
pub fn new_skolemized(&self, br: ty::BoundRegion) -> Region {
208208
let sc = self.skolemization_count.get();
209209
self.skolemization_count.set(sc + 1);
210210
ReInfer(ReSkolemized(sc, br))
211211
}
212212

213-
pub fn new_bound(&mut self, binder_id: ast::NodeId) -> Region {
213+
pub fn new_bound(&self, binder_id: ast::NodeId) -> Region {
214214
// Creates a fresh bound variable for use in GLB computations.
215215
// See discussion of GLB computation in the large comment at
216216
// the top of this file for more details.
@@ -244,7 +244,7 @@ impl RegionVarBindings {
244244
values.get().is_none()
245245
}
246246

247-
pub fn add_constraint(&mut self,
247+
pub fn add_constraint(&self,
248248
constraint: Constraint,
249249
origin: SubregionOrigin) {
250250
// cannot add constraints once regions are resolved
@@ -263,7 +263,7 @@ impl RegionVarBindings {
263263
}
264264
}
265265

266-
pub fn make_subregion(&mut self,
266+
pub fn make_subregion(&self,
267267
origin: SubregionOrigin,
268268
sub: Region,
269269
sup: Region) {
@@ -297,7 +297,7 @@ impl RegionVarBindings {
297297
}
298298
}
299299

300-
pub fn lub_regions(&mut self,
300+
pub fn lub_regions(&self,
301301
origin: SubregionOrigin,
302302
a: Region,
303303
b: Region)
@@ -320,7 +320,7 @@ impl RegionVarBindings {
320320
}
321321
}
322322

323-
pub fn glb_regions(&mut self,
323+
pub fn glb_regions(&self,
324324
origin: SubregionOrigin,
325325
a: Region,
326326
b: Region)
@@ -344,7 +344,7 @@ impl RegionVarBindings {
344344
}
345345
}
346346

347-
pub fn resolve_var(&mut self, rid: RegionVid) -> ty::Region {
347+
pub fn resolve_var(&self, rid: RegionVid) -> ty::Region {
348348
let values = self.values.borrow();
349349
let v = match *values.get() {
350350
None => {
@@ -374,20 +374,20 @@ impl RegionVarBindings {
374374
}
375375
}
376376

377-
fn combine_map<'a>(&'a mut self, t: CombineMapType)
378-
-> &'a mut RefCell<CombineMap> {
377+
fn combine_map<'a>(&'a self, t: CombineMapType)
378+
-> &'a RefCell<CombineMap> {
379379
match t {
380-
Glb => &mut self.glbs,
381-
Lub => &mut self.lubs,
380+
Glb => &self.glbs,
381+
Lub => &self.lubs,
382382
}
383383
}
384384

385-
pub fn combine_vars(&mut self,
385+
pub fn combine_vars(&self,
386386
t: CombineMapType,
387387
a: Region,
388388
b: Region,
389389
origin: SubregionOrigin,
390-
relate: |this: &mut RegionVarBindings,
390+
relate: |this: &RegionVarBindings,
391391
old_r: Region,
392392
new_r: Region|)
393393
-> Region {
@@ -418,7 +418,7 @@ impl RegionVarBindings {
418418
ReInfer(ReVar(c))
419419
}
420420

421-
pub fn vars_created_since_snapshot(&mut self, snapshot: uint)
421+
pub fn vars_created_since_snapshot(&self, snapshot: uint)
422422
-> ~[RegionVid] {
423423
let undo_log = self.undo_log.borrow();
424424
undo_log.get().slice_from(snapshot).iter()
@@ -429,7 +429,7 @@ impl RegionVarBindings {
429429
.collect()
430430
}
431431

432-
pub fn tainted(&mut self, snapshot: uint, r0: Region) -> ~[Region] {
432+
pub fn tainted(&self, snapshot: uint, r0: Region) -> ~[Region] {
433433
/*!
434434
* Computes all regions that have been related to `r0` in any
435435
* way since the snapshot `snapshot` was taken---`r0` itself
@@ -522,7 +522,7 @@ impl RegionVarBindings {
522522
constraints, assuming such values can be found; if they cannot,
523523
errors are reported.
524524
*/
525-
pub fn resolve_regions(&mut self) -> OptVec<RegionResolutionError> {
525+
pub fn resolve_regions(&self) -> OptVec<RegionResolutionError> {
526526
debug!("RegionVarBindings: resolve_regions()");
527527
let mut errors = opt_vec::Empty;
528528
let v = self.infer_variable_values(&mut errors);

0 commit comments

Comments
 (0)