about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2017-02-09 16:36:20 +0800
committerAndrew Cann <shum@canndrew.org>2017-02-09 16:36:20 +0800
commit18be42c5d7cf0e445befee2ca8aba092808b7e35 (patch)
treeb0d2ba326a77106784d67b6a084d6807f6a7ecb4 /src
parent5429305e5d9e2fa24645ebc9c5591cf39a24a322 (diff)
downloadrust-18be42c5d7cf0e445befee2ca8aba092808b7e35.tar.gz
rust-18be42c5d7cf0e445befee2ca8aba092808b7e35.zip
Fix tests
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/issue-15763.rs7
-rw-r--r--src/test/run-pass/project-defer-unification.rs4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/test/run-pass/issue-15763.rs b/src/test/run-pass/issue-15763.rs
index 0baaaac2676..f77888c2955 100644
--- a/src/test/run-pass/issue-15763.rs
+++ b/src/test/run-pass/issue-15763.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![allow(unknown_features)]
+#![allow(unused_features)]
+#![allow(unreachable_code)]
 #![feature(box_syntax)]
 
 #[derive(PartialEq, Debug)]
@@ -28,14 +29,14 @@ struct Foo {
 }
 
 fn foo() -> Result<Foo, isize> {
-    return Ok(Foo {
+    return Ok::<Foo, isize>(Foo {
         x: Bar { x: 22 },
         a: return Err(32)
     });
 }
 
 fn baz() -> Result<Foo, isize> {
-    Ok(Foo {
+    Ok::<Foo, isize>(Foo {
         x: Bar { x: 22 },
         a: return Err(32)
     })
diff --git a/src/test/run-pass/project-defer-unification.rs b/src/test/run-pass/project-defer-unification.rs
index 9a6ea2272fe..8e008c639b3 100644
--- a/src/test/run-pass/project-defer-unification.rs
+++ b/src/test/run-pass/project-defer-unification.rs
@@ -11,6 +11,8 @@
 // A regression test extracted from image-0.3.11. The point of
 // failure was in `index_colors` below.
 
+#![allow(unused)]
+
 use std::ops::{Deref, DerefMut};
 
 #[derive(Copy, Clone)]
@@ -92,7 +94,7 @@ pub fn index_colors<Pix>(image: &ImageBuffer<Pix, Vec<u8>>)
                          -> ImageBuffer<Luma<u8>, Vec<u8>>
 where Pix: Pixel<Subpixel=u8> + 'static,
 {
-    let mut indices: ImageBuffer<_,Vec<_>> = loop { };
+    let mut indices: ImageBuffer<Luma<u8>, Vec<u8>> = loop { };
     for (pixel, idx) in image.pixels().zip(indices.pixels_mut()) {
         // failured occurred here ^^ because we were requiring that we
         // could project Pixel or Subpixel from `T_indices` (type of