Skip to content

Commit a9bf099

Browse files
committed
middle: trans: adt: remove dead code
1 parent ee82233 commit a9bf099

File tree

1 file changed

+0
-27
lines changed
  • src/librustc/middle/trans

1 file changed

+0
-27
lines changed

src/librustc/middle/trans/adt.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -644,25 +644,6 @@ pub fn num_args(r: &Repr, discr: Disr) -> uint {
644644
}
645645
}
646646

647-
/// Access a field, at a point when the value's case is known.
648-
pub fn deref_ty(ccx: &CrateContext, r: &Repr) -> ty::t {
649-
match *r {
650-
CEnum(..) => {
651-
ccx.sess().bug("deref of c-like enum")
652-
}
653-
Univariant(ref st, _) => {
654-
*st.fields.get(0)
655-
}
656-
General(_, ref cases) => {
657-
assert!(cases.len() == 1);
658-
*cases.get(0).fields.get(0)
659-
}
660-
NullablePointer{ .. } => {
661-
ccx.sess().bug("deref of nullable ptr")
662-
}
663-
}
664-
}
665-
666647
/// Access a field, at a point when the value's case is known.
667648
pub fn trans_field_ptr(bcx: &Block, r: &Repr, val: ValueRef, discr: Disr,
668649
ix: uint) -> ValueRef {
@@ -896,11 +877,3 @@ fn const_struct_field(ccx: &CrateContext, val: ValueRef, ix: uint)
896877
real_ix = real_ix + 1;
897878
}
898879
}
899-
900-
/// Is it safe to bitcast a value to the one field of its one variant?
901-
pub fn is_newtypeish(r: &Repr) -> bool {
902-
match *r {
903-
Univariant(ref st, false) => st.fields.len() == 1,
904-
_ => false
905-
}
906-
}

0 commit comments

Comments
 (0)