Skip to content

Commit d0f56db

Browse files
committed
Change expected error message in kindchk compile-fail tests.
1 parent ffc8c0b commit d0f56db

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/test/compile-fail/kindck-nonsendable-1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn foo(_x: @uint) {}
1212

1313
fn main() {
1414
let x = @3u;
15-
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
16-
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
17-
let _: ~fn() = || foo(x); //~ ERROR value has non-owned type `@uint`
15+
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
16+
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
17+
let _: ~fn() = || foo(x); //~ ERROR does not fulfill `Owned`
1818
}

src/test/compile-fail/kindck-owned-trait.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
trait foo { fn foo(&self); }
1212

1313
fn to_foo<T:Copy + foo>(t: T) -> @foo {
14-
@t as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound
14+
@t as @foo
15+
//~^ ERROR value may contain borrowed pointers; add `'static` bound
16+
//~^^ ERROR cannot pack type
1517
}
1618

1719
fn to_foo2<T:Copy + foo + 'static>(t: T) -> @foo {

src/test/compile-fail/kindck-owned.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// except according to those terms.
1010

1111
fn copy1<T:Copy>(t: T) -> @fn() -> T {
12-
let result: @fn() -> T = || copy t;
13-
//~^ ERROR value may contain borrowed pointers
12+
let result: @fn() -> T = || copy t; //~ ERROR does not fulfill `'static`
1413
result
1514
}
1615

src/test/compile-fail/no-send-res-ports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() {
3232
let x = Cell::new(foo(Port(@())));
3333

3434
do task::spawn {
35-
let y = x.take(); //~ ERROR value has non-owned type
35+
let y = x.take(); //~ ERROR does not fulfill `Owned`
3636
error!(y);
3737
}
3838
}

0 commit comments

Comments
 (0)