mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Add UI test outputs
This commit is contained in:
parent
f72724eeb4
commit
e181060a59
29
src/test/ui/generator/borrowing.stderr
Normal file
29
src/test/ui/generator/borrowing.stderr
Normal 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
|
||||
|
8
src/test/ui/generator/no-arguments-on-generators.stderr
Normal file
8
src/test/ui/generator/no-arguments-on-generators.stderr
Normal 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
|
||||
|
24
src/test/ui/generator/not-send-sync.stderr
Normal file
24
src/test/ui/generator/not-send-sync.stderr
Normal 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
|
||||
|
10
src/test/ui/generator/yield-in-const.stderr
Normal file
10
src/test/ui/generator/yield-in-const.stderr
Normal 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
|
||||
|
8
src/test/ui/generator/yield-in-function.stderr
Normal file
8
src/test/ui/generator/yield-in-function.stderr
Normal 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
|
||||
|
10
src/test/ui/generator/yield-in-static.stderr
Normal file
10
src/test/ui/generator/yield-in-static.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user