From 18be42c5d7cf0e445befee2ca8aba092808b7e35 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Thu, 9 Feb 2017 16:36:20 +0800 Subject: [PATCH] Fix tests --- src/test/run-pass/issue-15763.rs | 7 ++++--- src/test/run-pass/project-defer-unification.rs | 4 +++- 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 0baaaac267685..f77888c29554d 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 { - return Ok(Foo { + return Ok::(Foo { x: Bar { x: 22 }, a: return Err(32) }); } fn baz() -> Result { - Ok(Foo { + Ok::(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 9a6ea2272fea7..8e008c639b30e 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(image: &ImageBuffer>) -> ImageBuffer, Vec> where Pix: Pixel + 'static, { - let mut indices: ImageBuffer<_,Vec<_>> = loop { }; + let mut indices: ImageBuffer, Vec> = 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