@@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
2096
2096
}
2097
2097
2098
2098
pub fn trans_enum_def(ccx: @CrateContext, enum_definition: &ast::enum_def,
2099
- id: ast::node_id,
2100
- path: @ast_map::path, vi: @~[ty::VariantInfo],
2099
+ id: ast::node_id, vi: @~[ty::VariantInfo],
2101
2100
i: &mut uint) {
2102
2101
for vec::each(enum_definition.variants) |variant| {
2103
2102
let disr_val = vi[*i].disr_val;
@@ -2172,8 +2171,7 @@ pub fn trans_item(ccx: @CrateContext, item: &ast::item) {
2172
2171
if !generics.is_type_parameterized() {
2173
2172
let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
2174
2173
let mut i = 0;
2175
- trans_enum_def(ccx, enum_definition, item.id,
2176
- path, vi, &mut i);
2174
+ trans_enum_def(ccx, enum_definition, item.id, vi, &mut i);
2177
2175
}
2178
2176
}
2179
2177
ast::item_const(_, expr) => consts::trans_const(ccx, expr, item.id),
@@ -2430,13 +2428,13 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
2430
2428
Some(&v) => v,
2431
2429
None => {
2432
2430
let mut exprt = false;
2433
- let val = match *ccx. tcx.items.get(&id) {
2431
+ let val = match *tcx.items.get(&id) {
2434
2432
ast_map::node_item(i, pth) => {
2435
2433
let my_path = vec::append(/*bad*/copy *pth,
2436
2434
~[path_name(i.ident)]);
2437
2435
match i.node {
2438
2436
ast::item_const(_, expr) => {
2439
- let typ = ty::node_id_to_type(ccx. tcx, i.id);
2437
+ let typ = ty::node_id_to_type(tcx, i.id);
2440
2438
let s = mangle_exported_name(ccx, my_path, typ);
2441
2439
// We need the translated value here, because for enums the
2442
2440
// LLVM type is not fully determined by the Rust type.
@@ -2495,7 +2493,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
2495
2493
ni.attrs)
2496
2494
}
2497
2495
ast::foreign_item_const(*) => {
2498
- let typ = ty::node_id_to_type(ccx. tcx, ni.id);
2496
+ let typ = ty::node_id_to_type(tcx, ni.id);
2499
2497
let ident = ccx.sess.parse_sess.interner.get(ni.ident);
2500
2498
let g = do str::as_c_str(*ident) |buf| {
2501
2499
unsafe {
@@ -2536,7 +2534,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
2536
2534
// Only register the constructor if this is a tuple-like struct.
2537
2535
match struct_def.ctor_id {
2538
2536
None => {
2539
- ccx. tcx.sess.bug(~" attempt to register a constructor of \
2537
+ tcx.sess.bug(~" attempt to register a constructor of \
2540
2538
a non-tuple-like struct ")
2541
2539
}
2542
2540
Some(ctor_id) => {
0 commit comments