Skip to content

Commit 121c292

Browse files
committed
---
yaml --- r: 166576 b: refs/heads/snap-stage3 c: 7c21a0f h: refs/heads/master v: v3
1 parent 6908418 commit 121c292

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 18842f89f084c52588fe7cffe07f87bf6e90796a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d442f7756161eb36531772ed905680385f87f1a4
4+
refs/heads/snap-stage3: 7c21a0ff69ee44a0e2892968dabc3804ebe056ed
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustc_driver/test.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -295,58 +295,62 @@ impl<'a, 'tcx> Env<'a, 'tcx> {
295295
})
296296
}
297297

298-
pub fn t_param(&self, space: subst::ParamSpace, index: uint) -> Ty<'tcx> {
298+
pub fn t_param(&self, space: subst::ParamSpace, index: u32) -> Ty<'tcx> {
299299
ty::mk_param(self.infcx.tcx, space, index, ast_util::local_def(ast::DUMMY_NODE_ID))
300300
}
301301

302302
pub fn re_early_bound(&self,
303303
space: subst::ParamSpace,
304-
index: uint,
304+
index: u32,
305305
name: &'static str)
306306
-> ty::Region
307307
{
308308
let name = token::intern(name);
309309
ty::ReEarlyBound(ast::DUMMY_NODE_ID, space, index, name)
310310
}
311311

312-
pub fn re_late_bound_with_debruijn(&self, id: uint, debruijn: ty::DebruijnIndex) -> ty::Region {
312+
pub fn re_late_bound_with_debruijn(&self, id: u32, debruijn: ty::DebruijnIndex) -> ty::Region {
313313
ty::ReLateBound(debruijn, ty::BrAnon(id))
314314
}
315315

316316
pub fn t_rptr(&self, r: ty::Region) -> Ty<'tcx> {
317-
ty::mk_imm_rptr(self.infcx.tcx, r, ty::mk_int())
317+
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
318318
}
319319

320-
pub fn t_rptr_late_bound(&self, id: uint) -> Ty<'tcx> {
320+
pub fn t_rptr_late_bound(&self, id: u32) -> Ty<'tcx> {
321+
let r = self.re_late_bound_with_debruijn(id, ty::DebruijnIndex::new(1));
321322
ty::mk_imm_rptr(self.infcx.tcx,
322-
self.re_late_bound_with_debruijn(id, ty::DebruijnIndex::new(1)),
323+
self.infcx.tcx.mk_region(r),
323324
ty::mk_int())
324325
}
325326

326327
pub fn t_rptr_late_bound_with_debruijn(&self,
327-
id: uint,
328+
id: u32,
328329
debruijn: ty::DebruijnIndex)
329330
-> Ty<'tcx> {
331+
let r = self.re_late_bound_with_debruijn(id, debruijn);
330332
ty::mk_imm_rptr(self.infcx.tcx,
331-
self.re_late_bound_with_debruijn(id, debruijn),
333+
self.infcx.tcx.mk_region(r),
332334
ty::mk_int())
333335
}
334336

335337
pub fn t_rptr_scope(&self, id: ast::NodeId) -> Ty<'tcx> {
336-
ty::mk_imm_rptr(self.infcx.tcx, ty::ReScope(CodeExtent::from_node_id(id)), ty::mk_int())
338+
let r = ty::ReScope(CodeExtent::from_node_id(id));
339+
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
337340
}
338341

339-
pub fn re_free(&self, nid: ast::NodeId, id: uint) -> ty::Region {
342+
pub fn re_free(&self, nid: ast::NodeId, id: u32) -> ty::Region {
340343
ty::ReFree(ty::FreeRegion { scope: CodeExtent::from_node_id(nid),
341344
bound_region: ty::BrAnon(id)})
342345
}
343346

344-
pub fn t_rptr_free(&self, nid: ast::NodeId, id: uint) -> Ty<'tcx> {
345-
ty::mk_imm_rptr(self.infcx.tcx, self.re_free(nid, id), ty::mk_int())
347+
pub fn t_rptr_free(&self, nid: ast::NodeId, id: u32) -> Ty<'tcx> {
348+
let r = self.re_free(nid, id);
349+
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
346350
}
347351

348352
pub fn t_rptr_static(&self) -> Ty<'tcx> {
349-
ty::mk_imm_rptr(self.infcx.tcx, ty::ReStatic, ty::mk_int())
353+
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(ty::ReStatic), ty::mk_int())
350354
}
351355

352356
pub fn dummy_type_trace(&self) -> infer::TypeTrace<'tcx> {

0 commit comments

Comments
 (0)