]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/monomorphize.rs
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / librustc / middle / trans / monomorphize.rs
index 6ff6c4741c77c87763a26dd7037be321db638825..986d3328f2c3a7a97f8ab94660909cfd54cb9530 100644 (file)
@@ -149,7 +149,8 @@ pub fn monomorphic_fn(ccx: &CrateContext,
               } => {
                   let d = mk_lldecl();
                   set_llvm_fn_attrs(i.attrs.as_slice(), d);
-                  trans_fn(ccx, &**decl, &**body, d, &psubsts, fn_id.node, []);
+                  trans_fn(ccx, &**decl, &**body, d, &psubsts, fn_id.node, [],
+                           IgnoreItems);
                   d
               }
               _ => {
@@ -181,7 +182,8 @@ pub fn monomorphic_fn(ccx: &CrateContext,
         ast_map::NodeMethod(mth) => {
             let d = mk_lldecl();
             set_llvm_fn_attrs(mth.attrs.as_slice(), d);
-            trans_fn(ccx, &*mth.pe_fn_decl(), &*mth.pe_body(), d, &psubsts, mth.id, []);
+            trans_fn(ccx, &*mth.pe_fn_decl(), &*mth.pe_body(), d, &psubsts, mth.id, [],
+                     IgnoreItems);
             d
         }
         ast_map::NodeTraitMethod(method) => {
@@ -190,7 +192,7 @@ pub fn monomorphic_fn(ccx: &CrateContext,
                     let d = mk_lldecl();
                     set_llvm_fn_attrs(mth.attrs.as_slice(), d);
                     trans_fn(ccx, &*mth.pe_fn_decl(), &*mth.pe_body(), d,
-                             &psubsts, mth.id, []);
+                             &psubsts, mth.id, [], IgnoreItems);
                     d
                 }
                 _ => {
@@ -254,6 +256,13 @@ pub fn make_vtable_id(_ccx: &CrateContext,
             }
         }
 
+        &typeck::vtable_unboxed_closure(def_id) => {
+            MonoId {
+                def: def_id,
+                params: subst::VecPerParamSpace::empty(),
+            }
+        }
+
         // can't this be checked at the callee?
         _ => fail!("make_vtable_id needs vtable_static")
     }