Skip to content

Commit 91cf70e

Browse files
committed
---
yaml --- r: 273229 b: refs/heads/beta c: c3f856e h: refs/heads/master i: 273227: 3e44f8f
1 parent 14007b7 commit 91cf70e

File tree

2 files changed

+1
-41
lines changed

2 files changed

+1
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: e0970498c79de1a1381d697b3c27895ef798e288
26+
refs/heads/beta: c3f856e7e24be568902a38c6a488aee6098f94cc
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_trans/trans/base.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,46 +2845,6 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef {
28452845
}
28462846
}
28472847
}
2848-
2849-
hir_map::NodeVariant(ref v) => {
2850-
let llfn;
2851-
let fields = if v.node.data.is_struct() {
2852-
ccx.sess().bug("struct variant kind unexpected in get_item_val")
2853-
} else {
2854-
v.node.data.fields()
2855-
};
2856-
assert!(!fields.is_empty());
2857-
let ty = ccx.tcx().node_id_to_type(id);
2858-
let parent = ccx.tcx().map.get_parent(id);
2859-
let enm = ccx.tcx().map.expect_item(parent);
2860-
let sym = exported_name(ccx, id, ty, &enm.attrs);
2861-
2862-
llfn = match enm.node {
2863-
hir::ItemEnum(_, _) => {
2864-
register_fn(ccx, (*v).span, sym, id, ty)
2865-
}
2866-
_ => ccx.sess().bug("NodeVariant, shouldn't happen"),
2867-
};
2868-
attributes::inline(llfn, attributes::InlineAttr::Hint);
2869-
llfn
2870-
}
2871-
2872-
hir_map::NodeStructCtor(struct_def) => {
2873-
// Only register the constructor if this is a tuple-like struct.
2874-
let ctor_id = if struct_def.is_struct() {
2875-
ccx.sess().bug("attempt to register a constructor of a non-tuple-like struct")
2876-
} else {
2877-
struct_def.id()
2878-
};
2879-
let parent = ccx.tcx().map.get_parent(id);
2880-
let struct_item = ccx.tcx().map.expect_item(parent);
2881-
let ty = ccx.tcx().node_id_to_type(ctor_id);
2882-
let sym = exported_name(ccx, id, ty, &struct_item.attrs);
2883-
let llfn = register_fn(ccx, struct_item.span, sym, ctor_id, ty);
2884-
attributes::inline(llfn, attributes::InlineAttr::Hint);
2885-
llfn
2886-
}
2887-
28882848
ref variant => {
28892849
ccx.sess().bug(&format!("get_item_val(): unexpected variant: {:?}", variant))
28902850
}

0 commit comments

Comments
 (0)