Fix tests
This commit is contained in:
parent
5429305e5d
commit
18be42c5d7
2 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue