]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/base.rs
auto merge of #7903 : michaelwoerister/rust/end_of_spanned, r=jdm
[rust.git] / src / librustc / middle / trans / base.rs
index 2e54423431fb08e8cb4328a46a9276a44c55e3d5..32a5ebe0c39cb100bd884a200a6c5ed4ca9e37c0 100644 (file)
@@ -1093,23 +1093,23 @@ pub fn trans_trace(bcx: block, sp_opt: Option<span>, trace_str: @str) {
     Call(bcx, ccx.upcalls.trace, args);
 }
 
-pub fn ignore_lhs(_bcx: block, local: &ast::local) -> bool {
-    match local.node.pat.node {
+pub fn ignore_lhs(_bcx: block, local: &ast::Local) -> bool {
+    match local.pat.node {
         ast::pat_wild => true, _ => false
     }
 }
 
-pub fn init_local(bcx: block, local: &ast::local) -> block {
+pub fn init_local(bcx: block, local: &ast::Local) -> block {
 
     debug!("init_local(bcx=%s, local.id=%?)",
-           bcx.to_str(), local.node.id);
+           bcx.to_str(), local.id);
     let _indenter = indenter();
 
     let _icx = push_ctxt("init_local");
 
     if ignore_lhs(bcx, local) {
         // Handle let _ = e; just like e;
-        match local.node.init {
+        match local.init {
             Some(init) => {
               return expr::trans_into(bcx, init, expr::Ignore);
             }
@@ -1117,7 +1117,7 @@ pub fn init_local(bcx: block, local: &ast::local) -> block {
         }
     }
 
-    _match::store_local(bcx, local.node.pat, local.node.init)
+    _match::store_local(bcx, local.pat, local.init)
 }
 
 pub fn trans_stmt(cx: block, s: &ast::stmt) -> block {
@@ -1446,7 +1446,7 @@ pub fn with_scope_datumblock(bcx: block, opt_node_info: Option<NodeInfo>,
     DatumBlock {bcx: leave_block(bcx, scope_cx), datum: datum}
 }
 
-pub fn block_locals(b: &ast::blk, it: &fn(@ast::local)) {
+pub fn block_locals(b: &ast::Block, it: &fn(@ast::Local)) {
     for b.stmts.iter().advance |s| {
         match s.node {
           ast::stmt_decl(d, _) => {
@@ -1830,7 +1830,7 @@ pub enum self_arg { impl_self(ty::t, ty::SelfMode), no_self, }
 pub fn trans_closure(ccx: @mut CrateContext,
                      path: path,
                      decl: &ast::fn_decl,
-                     body: &ast::blk,
+                     body: &ast::Block,
                      llfndecl: ValueRef,
                      self_arg: self_arg,
                      param_substs: Option<@param_substs>,
@@ -1911,7 +1911,7 @@ pub fn trans_closure(ccx: @mut CrateContext,
 pub fn trans_fn(ccx: @mut CrateContext,
                 path: path,
                 decl: &ast::fn_decl,
-                body: &ast::blk,
+                body: &ast::Block,
                 llfndecl: ValueRef,
                 self_arg: self_arg,
                 param_substs: Option<@param_substs>,
@@ -2628,7 +2628,7 @@ pub fn trans_constant(ccx: &mut CrateContext, it: @ast::item) {
     }
 }
 
-pub fn trans_constants(ccx: @mut CrateContext, crate: &ast::crate) {
+pub fn trans_constants(ccx: @mut CrateContext, crate: &ast::Crate) {
     visit::visit_crate(
         crate, ((),
         visit::mk_simple_visitor(@visit::SimpleVisitor {
@@ -2885,7 +2885,7 @@ pub fn crate_ctxt_to_encode_parms<'r>(cx: &'r CrateContext, ie: encoder::encode_
         }
 }
 
-pub fn write_metadata(cx: &mut CrateContext, crate: &ast::crate) {
+pub fn write_metadata(cx: &mut CrateContext, crate: &ast::Crate) {
     if !*cx.sess.building_library { return; }
 
     let encode_inlined_item: encoder::encode_inlined_item =
@@ -2943,7 +2943,7 @@ pub fn write_abi_version(ccx: &mut CrateContext) {
 }
 
 pub fn trans_crate(sess: session::Session,
-                   crate: &ast::crate,
+                   crate: &ast::Crate,
                    tcx: ty::ctxt,
                    output: &Path,
                    emap2: resolve::ExportMap2,
@@ -2984,7 +2984,7 @@ pub fn trans_crate(sess: session::Session,
 
     {
         let _icx = push_ctxt("text");
-        trans_mod(ccx, &crate.node.module);
+        trans_mod(ccx, &crate.module);
     }
 
     decl_gc_metadata(ccx, llmod_id);