@@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
20962096}
20972097
20982098pub 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],
21012100 i: &mut uint) {
21022101 for vec::each(enum_definition.variants) |variant| {
21032102 let disr_val = vi[*i].disr_val;
@@ -2172,8 +2171,7 @@ pub fn trans_item(ccx: @CrateContext, item: &ast::item) {
21722171 if !generics.is_type_parameterized() {
21732172 let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
21742173 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);
21772175 }
21782176 }
21792177 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 {
24302428 Some(&v) => v,
24312429 None => {
24322430 let mut exprt = false;
2433- let val = match *ccx. tcx.items.get(&id) {
2431+ let val = match *tcx.items.get(&id) {
24342432 ast_map::node_item(i, pth) => {
24352433 let my_path = vec::append(/*bad*/copy *pth,
24362434 ~[path_name(i.ident)]);
24372435 match i.node {
24382436 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);
24402438 let s = mangle_exported_name(ccx, my_path, typ);
24412439 // We need the translated value here, because for enums the
24422440 // 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 {
24952493 ni.attrs)
24962494 }
24972495 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);
24992497 let ident = ccx.sess.parse_sess.interner.get(ni.ident);
25002498 let g = do str::as_c_str(*ident) |buf| {
25012499 unsafe {
@@ -2536,7 +2534,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
25362534 // Only register the constructor if this is a tuple-like struct.
25372535 match struct_def.ctor_id {
25382536 None => {
2539- ccx. tcx.sess.bug(~" attempt to register a constructor of \
2537+ tcx.sess.bug(~" attempt to register a constructor of \
25402538 a non-tuple-like struct ")
25412539 }
25422540 Some(ctor_id) => {
0 commit comments