Skip to content

Commit 518a0f7

Browse files
committed
---
yaml --- r: 109857 b: refs/heads/master c: a9bf099 h: refs/heads/master i: 109855: d588994 v: v3
1 parent 332694b commit 518a0f7

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ee82233a1e6d8b6af3d23a78e3c87ec0aa2545a6
2+
refs/heads/master: a9bf0990003d5d27bc30a9018bb5cdc0666be916
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c7fac4471201977fdb1c0c0a26c87287e12dc644
55
refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d

trunk/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)