]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14379 : brson/rust/simd, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 24 May 2014 01:06:19 +0000 (18:06 -0700)
committerbors <bors@rust-lang.org>
Sat, 24 May 2014 01:06:19 +0000 (18:06 -0700)
Followup to https://github.com/mozilla/rust/pull/14331 and https://github.com/mozilla/rust/pull/12524

src/librustc/util/ppaux.rs
src/libstd/hash/sip.rs
src/test/compile-fail/issue-10291.rs [new file with mode: 0644]

index 087a4e58d497808299dcf75127e0969e387ddb32..2dff56d32d28d0f46a01c633924034c331eed34b 100644 (file)
@@ -145,7 +145,7 @@ fn explain_span(cx: &ctxt, heading: &str, span: Span)
 }
 
 pub fn bound_region_ptr_to_str(cx: &ctxt, br: BoundRegion) -> StrBuf {
-    bound_region_to_str(cx, "&", true, br)
+    bound_region_to_str(cx, "", false, br)
 }
 
 pub fn bound_region_to_str(cx: &ctxt,
index 1434e3c7ad71e693f60ea4a57615087f02e5f1f8..d7dae94cf167acbb36bf909ec9ffbcf9c6cb4088 100644 (file)
@@ -645,7 +645,7 @@ fn bench_compound_1(b: &mut Bencher) {
             y: 2,
         };
         b.iter(|| {
-            assert_eq!(hash(&compound), 15783192367317361799);
+            assert_eq!(hash(&compound), 12506681940457338191);
         })
     }
 }
diff --git a/src/test/compile-fail/issue-10291.rs b/src/test/compile-fail/issue-10291.rs
new file mode 100644 (file)
index 0000000..71b98bb
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn test<'x>(x: &'x int) { //~ NOTE the lifetime 'x as defined
+    drop::< <'z>|&'z int| -> &'z int>(|z| {
+        //~^ ERROR mismatched types
+        //~^^ ERROR cannot infer an appropriate lifetime
+        x
+    });
+}
+
+fn main() {}