Skip to content

Commit 18be42c

Browse files
committed
Fix tests
1 parent 5429305 commit 18be42c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/test/run-pass/issue-15763.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(unknown_features)]
11+
#![allow(unused_features)]
12+
#![allow(unreachable_code)]
1213
#![feature(box_syntax)]
1314

1415
#[derive(PartialEq, Debug)]
@@ -28,14 +29,14 @@ struct Foo {
2829
}
2930

3031
fn foo() -> Result<Foo, isize> {
31-
return Ok(Foo {
32+
return Ok::<Foo, isize>(Foo {
3233
x: Bar { x: 22 },
3334
a: return Err(32)
3435
});
3536
}
3637

3738
fn baz() -> Result<Foo, isize> {
38-
Ok(Foo {
39+
Ok::<Foo, isize>(Foo {
3940
x: Bar { x: 22 },
4041
a: return Err(32)
4142
})

src/test/run-pass/project-defer-unification.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// A regression test extracted from image-0.3.11. The point of
1212
// failure was in `index_colors` below.
1313

14+
#![allow(unused)]
15+
1416
use std::ops::{Deref, DerefMut};
1517

1618
#[derive(Copy, Clone)]
@@ -92,7 +94,7 @@ pub fn index_colors<Pix>(image: &ImageBuffer<Pix, Vec<u8>>)
9294
-> ImageBuffer<Luma<u8>, Vec<u8>>
9395
where Pix: Pixel<Subpixel=u8> + 'static,
9496
{
95-
let mut indices: ImageBuffer<_,Vec<_>> = loop { };
97+
let mut indices: ImageBuffer<Luma<u8>, Vec<u8>> = loop { };
9698
for (pixel, idx) in image.pixels().zip(indices.pixels_mut()) {
9799
// failured occurred here ^^ because we were requiring that we
98100
// could project Pixel or Subpixel from `T_indices` (type of

0 commit comments

Comments
 (0)