Skip to content

Commit 7c21a0f

Browse files
committed
Update rustc_driver tests.
1 parent d442f77 commit 7c21a0f

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

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)