Skip to content

Commit 0e3f440

Browse files
committed
WIP -- Patch various tests.
1 parent 9eff04f commit 0e3f440

6 files changed

+32
-6
lines changed

src/test/compile-fail/hrtb-perfect-forwarding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn foo_hrtb_bar_not<'b,T>(mut t: T)
5353
// be implemented. Thus to satisfy `&mut T : for<'a> Foo<&'a
5454
// int>`, we require `T : for<'a> Bar<&'a int>`, but the where
5555
// clause only specifies `T : Bar<&'b int>`.
56-
foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> Bar<&'a int>` not implemented for the type `T`
56+
foo_hrtb_bar_not(&mut t); //~ ERROR `for<'a> Bar<&'a int>` is not implemented for the type `T`
5757
}
5858

5959
fn foo_hrtb_bar_hrtb<T>(mut t: T)

src/test/compile-fail/issue-14366.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
fn main() {
1212
let _x = "test" as &::std::any::Any;
1313
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `str`
14-
//~^^ ERROR the trait `core::kinds::Sized` is not implemented for the type `str`
1514
}

src/test/compile-fail/kindck-inherited-copy-bound.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ impl<T:Copy> Foo for T {
2121

2222
fn take_param<T:Foo>(foo: &T) { }
2323

24-
fn main() {
24+
fn a() {
2525
let x = box 3i;
2626
take_param(&x); //~ ERROR `core::kinds::Copy` is not implemented
27+
}
2728

29+
fn b() {
30+
let x = box 3i;
2831
let y = &x;
2932
let z = &x as &Foo; //~ ERROR `core::kinds::Copy` is not implemented
3033
}
34+
35+
fn main() { }

src/test/compile-fail/unboxed-closures-unsafe-extern-fn.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,16 @@ fn call_it<F:Fn(&int)->int>(_: &F, _: int) -> int { 0 }
2020
fn call_it_mut<F:FnMut(&int)->int>(_: &mut F, _: int) -> int { 0 }
2121
fn call_it_once<F:FnOnce(&int)->int>(_: F, _: int) -> int { 0 }
2222

23-
fn main() {
23+
fn a() {
2424
let x = call_it(&square, 22); //~ ERROR not implemented
25+
}
26+
27+
fn b() {
2528
let y = call_it_mut(&mut square, 22); //~ ERROR not implemented
29+
}
30+
31+
fn c() {
2632
let z = call_it_once(square, 22); //~ ERROR not implemented
2733
}
2834

35+
fn main() { }

src/test/compile-fail/unboxed-closures-wrong-abi.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ fn call_it<F:Fn(&int)->int>(_: &F, _: int) -> int { 0 }
2020
fn call_it_mut<F:FnMut(&int)->int>(_: &mut F, _: int) -> int { 0 }
2121
fn call_it_once<F:FnOnce(&int)->int>(_: F, _: int) -> int { 0 }
2222

23-
fn main() {
23+
fn a() {
2424
let x = call_it(&square, 22); //~ ERROR not implemented
25+
}
26+
27+
fn b() {
2528
let y = call_it_mut(&mut square, 22); //~ ERROR not implemented
29+
}
30+
31+
fn c() {
2632
let z = call_it_once(square, 22); //~ ERROR not implemented
2733
}
2834

35+
fn main() { }
36+

src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ fn call_it<F:Fn(&int)->int>(_: &F, _: int) -> int { 0 }
2121
fn call_it_mut<F:FnMut(&int)->int>(_: &mut F, _: int) -> int { 0 }
2222
fn call_it_once<F:FnOnce(&int)->int>(_: F, _: int) -> int { 0 }
2323

24-
fn main() {
24+
fn a() {
2525
let x = call_it(&square, 22); //~ ERROR not implemented
26+
}
27+
28+
fn b() {
2629
let y = call_it_mut(&mut square, 22); //~ ERROR not implemented
30+
}
31+
32+
fn c() {
2733
let z = call_it_once(square, 22); //~ ERROR not implemented
2834
}
2935

36+
fn main() { }

0 commit comments

Comments
 (0)