From 803f941867d1d68710f211535de69bb30f79f917 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 26 Aug 2013 16:58:38 -0400 Subject: [PATCH] reflect: rm unused visit_{var,var_integral,constr} --- src/libstd/reflect.rs | 15 --------------- src/libstd/repr.rs | 5 ----- src/libstd/unstable/intrinsics.rs | 3 --- src/test/run-pass/reflect-visit-data.rs | 18 ------------------ src/test/run-pass/reflect-visit-type.rs | 3 --- 5 files changed, 44 deletions(-) diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs index 1d093c4c14b8b..56e0f83e05cf0 100644 --- a/src/libstd/reflect.rs +++ b/src/libstd/reflect.rs @@ -460,16 +460,6 @@ impl TyVisitor for MovePtrAdaptor { true } - fn visit_var(&self) -> bool { - if ! self.inner.visit_var() { return false; } - true - } - - fn visit_var_integral(&self) -> bool { - if ! self.inner.visit_var_integral() { return false; } - true - } - fn visit_param(&self, i: uint) -> bool { if ! self.inner.visit_param(i) { return false; } true @@ -494,11 +484,6 @@ impl TyVisitor for MovePtrAdaptor { true } - fn visit_constr(&self, inner: *TyDesc) -> bool { - if ! self.inner.visit_constr(inner) { return false; } - true - } - fn visit_closure_ptr(&self, ck: uint) -> bool { self.align_to::<@fn()>(); if ! self.inner.visit_closure_ptr(ck) { return false; } diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index 0bedabf835f61..ad4658d2f42bb 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -563,8 +563,6 @@ impl TyVisitor for ReprVisitor { fn visit_trait(&self) -> bool { true } - fn visit_var(&self) -> bool { true } - fn visit_var_integral(&self) -> bool { true } fn visit_param(&self, _i: uint) -> bool { true } fn visit_self(&self) -> bool { true } fn visit_type(&self) -> bool { true } @@ -577,9 +575,6 @@ impl TyVisitor for ReprVisitor { } } - // Type no longer exists, vestigial function. - fn visit_constr(&self, _inner: *TyDesc) -> bool { fail!(); } - fn visit_closure_ptr(&self, _ck: uint) -> bool { true } } diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs index 0642bb1973745..796567bd56119 100644 --- a/src/libstd/unstable/intrinsics.rs +++ b/src/libstd/unstable/intrinsics.rs @@ -161,13 +161,10 @@ pub trait TyVisitor { n_inputs: uint, retstyle: uint) -> bool; fn visit_trait(&self) -> bool; - fn visit_var(&self) -> bool; - fn visit_var_integral(&self) -> bool; fn visit_param(&self, i: uint) -> bool; fn visit_self(&self) -> bool; fn visit_type(&self) -> bool; fn visit_opaque_box(&self) -> bool; - fn visit_constr(&self, inner: *TyDesc) -> bool; fn visit_closure_ptr(&self, ck: uint) -> bool; } diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs index 72bdc2ee0a63e..b56cef4277f57 100644 --- a/src/test/run-pass/reflect-visit-data.rs +++ b/src/test/run-pass/reflect-visit-data.rs @@ -436,16 +436,6 @@ impl TyVisitor for ptr_visit_adaptor { true } - fn visit_var(&self) -> bool { - if ! self.inner.visit_var() { return false; } - true - } - - fn visit_var_integral(&self) -> bool { - if ! self.inner.visit_var_integral() { return false; } - true - } - fn visit_param(&self, i: uint) -> bool { if ! self.inner.visit_param(i) { return false; } true @@ -470,11 +460,6 @@ impl TyVisitor for ptr_visit_adaptor { true } - fn visit_constr(&self, inner: *TyDesc) -> bool { - if ! self.inner.visit_constr(inner) { return false; } - true - } - fn visit_closure_ptr(&self, ck: uint) -> bool { self.align_to::<@fn()>(); if ! self.inner.visit_closure_ptr(ck) { return false; } @@ -633,13 +618,10 @@ impl TyVisitor for my_visitor { fn visit_trait(&self) -> bool { true } - fn visit_var(&self) -> bool { true } - fn visit_var_integral(&self) -> bool { true } fn visit_param(&self, _i: uint) -> bool { true } fn visit_self(&self) -> bool { true } fn visit_type(&self) -> bool { true } fn visit_opaque_box(&self) -> bool { true } - fn visit_constr(&self, _inner: *TyDesc) -> bool { true } fn visit_closure_ptr(&self, _ck: uint) -> bool { true } } diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs index 544f42eb69f5e..1462d8aace130 100644 --- a/src/test/run-pass/reflect-visit-type.rs +++ b/src/test/run-pass/reflect-visit-type.rs @@ -144,13 +144,10 @@ impl TyVisitor for MyVisitor { fn visit_trait(&self) -> bool { true } - fn visit_var(&self) -> bool { true } - fn visit_var_integral(&self) -> bool { true } fn visit_param(&self, _i: uint) -> bool { true } fn visit_self(&self) -> bool { true } fn visit_type(&self) -> bool { true } fn visit_opaque_box(&self) -> bool { true } - fn visit_constr(&self, _inner: *TyDesc) -> bool { true } fn visit_closure_ptr(&self, _ck: uint) -> bool { true } }