Add UI test outputs

This commit is contained in:
Alex Crichton 2017-08-09 16:37:56 -07:00
parent f72724eeb4
commit e181060a59
6 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,29 @@
error[E0597]: `a` does not live long enough
--> $DIR/borrowing.rs:18:20
|
18 | (|| yield &a).resume()
| -- ^ does not live long enough
| |
| capture occurs here
19 | //~^ ERROR: `a` does not live long enough
20 | };
| - borrowed value only lives until here
...
29 | }
| - borrowed value needs to live until here
error[E0597]: `a` does not live long enough
--> $DIR/borrowing.rs:25:20
|
24 | || {
| -- capture occurs here
25 | yield &a
| ^ does not live long enough
...
28 | };
| - borrowed value only lives until here
29 | }
| - borrowed value needs to live until here
error: aborting due to 2 previous errors

View File

@ -0,0 +1,8 @@
error[E0625]: generators cannot have explicit arguments
--> $DIR/no-arguments-on-generators.rs:14:15
|
14 | let gen = |start| { //~ ERROR generators cannot have explicit arguments
| ^^^^^^^
error: aborting due to previous error

View File

@ -0,0 +1,24 @@
error[E0277]: the trait bound `std::cell::Cell<i32>: std::marker::Sync` is not satisfied
--> $DIR/not-send-sync.rs:26:5
|
26 | assert_send(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:26:17: 30:6 a:&std::cell::Cell<i32> _]`
= note: required by `main::assert_send`
error[E0277]: the trait bound `std::cell::Cell<i32>: std::marker::Sync` is not satisfied in `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`
--> $DIR/not-send-sync.rs:19:5
|
19 | assert_sync(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
|
= help: within `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because it appears within the type `(std::cell::Cell<i32>, ())`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:19:17: 23:6 (std::cell::Cell<i32>, ())]`
= note: required by `main::assert_sync`
error: aborting due to 2 previous errors

View File

@ -0,0 +1,10 @@
error[E0601]: main function not found
error[E0627]: yield statement outside of generator literal
--> $DIR/yield-in-const.rs:13:17
|
13 | const A: u8 = { yield 3u8; 3u8};
| ^^^^^^^^^
error: aborting due to 2 previous errors

View File

@ -0,0 +1,8 @@
error[E0627]: yield statement outside of generator literal
--> $DIR/yield-in-function.rs:13:13
|
13 | fn main() { yield; }
| ^^^^^
error: aborting due to previous error

View File

@ -0,0 +1,10 @@
error[E0601]: main function not found
error[E0627]: yield statement outside of generator literal
--> $DIR/yield-in-static.rs:13:18
|
13 | static B: u8 = { yield 3u8; 3u8};
| ^^^^^^^^^
error: aborting due to 2 previous errors