File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ fn foo(_x: @uint) {}
12
12
13
13
fn main ( ) {
14
14
let x = @3 u;
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 `
18
18
}
Original file line number Diff line number Diff line change 11
11
trait foo { fn foo ( & self ) ; }
12
12
13
13
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
15
17
}
16
18
17
19
fn to_foo2 < T : Copy + foo + ' static > ( t : T ) -> @foo {
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
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`
14
13
result
15
14
}
16
15
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ fn main() {
32
32
let x = Cell :: new ( foo ( Port ( @( ) ) ) ) ;
33
33
34
34
do task:: spawn {
35
- let y = x. take( ) ; //~ ERROR value has non-owned type
35
+ let y = x. take( ) ; //~ ERROR does not fulfill `Owned`
36
36
error ! ( y) ;
37
37
}
38
38
}
You can’t perform that action at this time.
0 commit comments