Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
canndrew committed Feb 9, 2017
1 parent 5429305 commit 18be42c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/test/run-pass/issue-15763.rs
Expand Up @@ -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)]
Expand All @@ -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)
})
Expand Down
4 changes: 3 additions & 1 deletion src/test/run-pass/project-defer-unification.rs
Expand Up @@ -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)]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 18be42c

Please sign in to comment.