提交 7c21a0ff 编写于 作者: H Huon Wilson

Update rustc_driver tests.

上级 d442f775
......@@ -295,13 +295,13 @@ pub fn t_closure(&self,
})
}
pub fn t_param(&self, space: subst::ParamSpace, index: uint) -> Ty<'tcx> {
pub fn t_param(&self, space: subst::ParamSpace, index: u32) -> Ty<'tcx> {
ty::mk_param(self.infcx.tcx, space, index, ast_util::local_def(ast::DUMMY_NODE_ID))
}
pub fn re_early_bound(&self,
space: subst::ParamSpace,
index: uint,
index: u32,
name: &'static str)
-> ty::Region
{
......@@ -309,44 +309,48 @@ pub fn re_early_bound(&self,
ty::ReEarlyBound(ast::DUMMY_NODE_ID, space, index, name)
}
pub fn re_late_bound_with_debruijn(&self, id: uint, debruijn: ty::DebruijnIndex) -> ty::Region {
pub fn re_late_bound_with_debruijn(&self, id: u32, debruijn: ty::DebruijnIndex) -> ty::Region {
ty::ReLateBound(debruijn, ty::BrAnon(id))
}
pub fn t_rptr(&self, r: ty::Region) -> Ty<'tcx> {
ty::mk_imm_rptr(self.infcx.tcx, r, ty::mk_int())
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
}
pub fn t_rptr_late_bound(&self, id: uint) -> Ty<'tcx> {
pub fn t_rptr_late_bound(&self, id: u32) -> Ty<'tcx> {
let r = self.re_late_bound_with_debruijn(id, ty::DebruijnIndex::new(1));
ty::mk_imm_rptr(self.infcx.tcx,
self.re_late_bound_with_debruijn(id, ty::DebruijnIndex::new(1)),
self.infcx.tcx.mk_region(r),
ty::mk_int())
}
pub fn t_rptr_late_bound_with_debruijn(&self,
id: uint,
id: u32,
debruijn: ty::DebruijnIndex)
-> Ty<'tcx> {
let r = self.re_late_bound_with_debruijn(id, debruijn);
ty::mk_imm_rptr(self.infcx.tcx,
self.re_late_bound_with_debruijn(id, debruijn),
self.infcx.tcx.mk_region(r),
ty::mk_int())
}
pub fn t_rptr_scope(&self, id: ast::NodeId) -> Ty<'tcx> {
ty::mk_imm_rptr(self.infcx.tcx, ty::ReScope(CodeExtent::from_node_id(id)), ty::mk_int())
let r = ty::ReScope(CodeExtent::from_node_id(id));
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
}
pub fn re_free(&self, nid: ast::NodeId, id: uint) -> ty::Region {
pub fn re_free(&self, nid: ast::NodeId, id: u32) -> ty::Region {
ty::ReFree(ty::FreeRegion { scope: CodeExtent::from_node_id(nid),
bound_region: ty::BrAnon(id)})
}
pub fn t_rptr_free(&self, nid: ast::NodeId, id: uint) -> Ty<'tcx> {
ty::mk_imm_rptr(self.infcx.tcx, self.re_free(nid, id), ty::mk_int())
pub fn t_rptr_free(&self, nid: ast::NodeId, id: u32) -> Ty<'tcx> {
let r = self.re_free(nid, id);
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(r), ty::mk_int())
}
pub fn t_rptr_static(&self) -> Ty<'tcx> {
ty::mk_imm_rptr(self.infcx.tcx, ty::ReStatic, ty::mk_int())
ty::mk_imm_rptr(self.infcx.tcx, self.infcx.tcx.mk_region(ty::ReStatic), ty::mk_int())
}
pub fn dummy_type_trace(&self) -> infer::TypeTrace<'tcx> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册