Skip to content

Commit 7a4122a

Browse files
committed
librustc: Remove visit_tydesc intrinsic.
1 parent ce6226e commit 7a4122a

File tree

4 files changed

+0
-175
lines changed

4 files changed

+0
-175
lines changed

src/libcore/intrinsics.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,6 @@ extern "rust-intrinsic" {
327327
/// Returns `true` if a type is managed (will be allocated on the local heap)
328328
pub fn owns_managed<T>() -> bool;
329329

330-
pub fn visit_tydesc(td: *const TyDesc, tv: &mut TyVisitor);
331-
332330
/// Calculates the offset from a pointer. The offset *must* be in-bounds of
333331
/// the object, or one-byte-past-the-end. An arithmetic overflow is also
334332
/// undefined behaviour.

src/librustc/middle/trans/intrinsic.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,6 @@ pub fn trans_intrinsic_call<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, node: ast::N
307307
let tp_ty = *substs.types.get(FnSpace, 0);
308308
C_bool(ccx, ty::type_contents(ccx.tcx(), tp_ty).owns_managed())
309309
}
310-
(_, "visit_tydesc") => {
311-
let td = *llargs.get(0);
312-
let visitor = *llargs.get(1);
313-
let td = PointerCast(bcx, td, ccx.tydesc_type().ptr_to());
314-
glue::call_visit_glue(bcx, visitor, td);
315-
C_nil(ccx)
316-
}
317310
(_, "offset") => {
318311
let ptr = *llargs.get(0);
319312
let offset = *llargs.get(1);

src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5578,25 +5578,6 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
55785578
}
55795579
}
55805580
},
5581-
"visit_tydesc" => {
5582-
let tydesc_ty = match ty::get_tydesc_ty(ccx.tcx) {
5583-
Ok(t) => t,
5584-
Err(s) => { tcx.sess.span_fatal(it.span, s.as_slice()); }
5585-
};
5586-
let region0 = ty::ReLateBound(it.id, ty::BrAnon(0));
5587-
let region1 = ty::ReLateBound(it.id, ty::BrAnon(1));
5588-
let visitor_object_ty =
5589-
match ty::visitor_object_ty(tcx, region0, region1) {
5590-
Ok((_, vot)) => vot,
5591-
Err(s) => { tcx.sess.span_fatal(it.span, s.as_slice()); }
5592-
};
5593-
5594-
let td_ptr = ty::mk_ptr(ccx.tcx, ty::mt {
5595-
ty: tydesc_ty,
5596-
mutbl: ast::MutImmutable
5597-
});
5598-
(0, vec!( td_ptr, visitor_object_ty ), ty::mk_nil())
5599-
}
56005581
"offset" => {
56015582
(1,
56025583
vec!(

src/test/run-pass/reflect-visit-type.rs

Lines changed: 0 additions & 147 deletions
This file was deleted.

0 commit comments

Comments
 (0)