Skip to content

Commit 9aa2690

Browse files
committed
rustc: Remove redundant ty_params_of_tag() function
1 parent 80fa01f commit 9aa2690

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/comp/middle/trans.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -923,18 +923,6 @@ fn align_of(@block_ctxt cx, @ty.t t) -> result {
923923
ret dynamic_align_of(cx, t);
924924
}
925925

926-
// Returns the type parameters associated with the tag with the given ID.
927-
fn ty_params_of_tag(@crate_ctxt cx, &ast.def_id tid) -> vec[ast.ty_param] {
928-
alt (cx.items.get(tid).node) {
929-
case (ast.item_tag(_, _, ?tps, _)) { ret tps; }
930-
case (_) {
931-
log "ty_params_of_tag(): tag ID doesn't actually refer to a " +
932-
"tag item";
933-
fail;
934-
}
935-
}
936-
}
937-
938926
// Computes the size of the data part of a non-dynamically-sized tag.
939927
fn static_size_of_tag(@crate_ctxt cx, @ty.t t) -> uint {
940928
if (ty.type_has_dynamic_size(t)) {
@@ -960,7 +948,7 @@ fn static_size_of_tag(@crate_ctxt cx, @ty.t t) -> uint {
960948
}
961949

962950
// Pull the type parameters out of the corresponding tag item.
963-
let vec[ast.ty_param] ty_params = ty_params_of_tag(cx, tid);
951+
let vec[ast.ty_param] ty_params = tag_ty_params(cx, tid);
964952

965953
// Compute max(variant sizes).
966954
auto max_size = 0u;

0 commit comments

Comments
 (0)