]> git.lizzy.rs Git - rust.git/commitdiff
FIXME(#19481) -- workaround valgrind cleanup failure (but the code is nicer this...
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 25 Nov 2014 12:54:24 +0000 (07:54 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 3 Dec 2014 01:17:55 +0000 (20:17 -0500)
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/glue.rs
src/test/compile-fail/dst-object-from-unsized-type.rs

index 71439f5887b1acfe09cb7d6e26c82946c6c1eaf2..23072dee3b6b1491651af2c6d3530076845fd643 100644 (file)
@@ -965,7 +965,7 @@ pub fn trans_external_path<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
 
 pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                           llfn: ValueRef,
-                          llargs: Vec<ValueRef> ,
+                          llargs: &[ValueRef],
                           fn_ty: Ty<'tcx>,
                           call_info: Option<NodeInfo>,
                           // FIXME(15064) is_lang_item is a horrible hack, please remove it
index 80a17465d7899af0b6f1834ee40a6ea0698b0519..50d2f885afa17f69015c0d9a42c1345d94ab17be 100644 (file)
@@ -808,7 +808,7 @@ pub fn trans_call_inner<'a, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         // Invoke the actual rust fn and update bcx/llresult.
         let (llret, b) = base::invoke(bcx,
                                       llfn,
-                                      llargs,
+                                      llargs[],
                                       callee_ty,
                                       call_info,
                                       dest.is_none());
index 4ed7983789696d5e494a5de6aa94e4b9da9c68cb..fbaf1e6581060ccb5f360462679b598663d879a6 100644 (file)
@@ -291,7 +291,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         let dtor_ty = ty::mk_ctor_fn(bcx.tcx(),
                                      &[get_drop_glue_type(bcx.ccx(), t)],
                                      ty::mk_nil(bcx.tcx()));
-        let (_, variant_cx) = invoke(variant_cx, dtor_addr, args, dtor_ty, None, false);
+        let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None, false);
 
         variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope);
         variant_cx
index e40cc342c0b4914c4cdda370bf5bbaa3a0b77a4b..99c63c3c6e95e01c0b4f7e68f96997a670333864 100644 (file)
 trait Foo for Sized? {}
 impl Foo for str {}
 
-fn test<Sized? T: Foo>(t: &T) {
+fn test1<Sized? T: Foo>(t: &T) {
     let u: &Foo = t;
     //~^ ERROR `core::kinds::Sized` is not implemented for the type `T`
+}
 
+fn test2<Sized? T: Foo>(t: &T) {
     let v: &Foo = t as &Foo;
     //~^ ERROR `core::kinds::Sized` is not implemented for the type `T`
 }
 
-fn main() {
+fn test3() {
     let _: &[&Foo] = &["hi"];
     //~^ ERROR `core::kinds::Sized` is not implemented for the type `str`
+}
 
+fn test4() {
     let _: &Foo = "hi" as &Foo;
     //~^ ERROR `core::kinds::Sized` is not implemented for the type `str`
 }
+
+fn main() { }