Skip to content

Commit 3ecd7bc

Browse files
committed
Update ui tests
1 parent 00f51ab commit 3ecd7bc

7 files changed

+270
-245
lines changed

futures/testcrate/ui/bad-input.stderr

+74-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,81 @@
1-
error: attribute must be of the form `#[for_await]`
1+
error[E0464]: multiple matching crates for `futures`
2+
--> $DIR/bad-input.rs:4:5
3+
|
4+
4 | use futures::*;
5+
| ^^^^^^^
6+
|
7+
= note: candidates:
8+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
9+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib
10+
11+
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
12+
--> $DIR/bad-input.rs:14:3
13+
|
14+
14 | #[async_stream(baz)]
15+
| ^^^^^^^^^^^^
16+
|
17+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
18+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
19+
20+
error[E0658]: attributes on expressions are experimental
21+
--> $DIR/bad-input.rs:16:5
22+
|
23+
16 | #[for_await]
24+
| ^^^^^^^^^^^^
25+
|
26+
= note: for more information, see https://github.com/rust-lang/rust/issues/15701
27+
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
28+
29+
error[E0658]: The attribute `for_await` is currently unknown to the compiler and may have meaning added to it in the future
30+
--> $DIR/bad-input.rs:16:7
31+
|
32+
16 | #[for_await]
33+
| ^^^^^^^^^
34+
|
35+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
36+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
37+
38+
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
39+
--> $DIR/bad-input.rs:6:3
40+
|
41+
6 | #[async_stream]
42+
| ^^^^^^^^^^^^
43+
|
44+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
45+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
46+
47+
error[E0658]: attributes on expressions are experimental
248
--> $DIR/bad-input.rs:8:5
349
|
450
8 | #[for_await(bar)]
551
| ^^^^^^^^^^^^^^^^^
52+
|
53+
= note: for more information, see https://github.com/rust-lang/rust/issues/15701
54+
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
655

7-
error: attribute must be of the form `#[async_stream]`
8-
--> $DIR/bad-input.rs:14:1
9-
|
10-
14 | #[async_stream(baz)]
11-
| ^^^^^^^^^^^^^^^^^^^^
56+
error[E0658]: The attribute `for_await` is currently unknown to the compiler and may have meaning added to it in the future
57+
--> $DIR/bad-input.rs:8:7
58+
|
59+
8 | #[for_await(bar)]
60+
| ^^^^^^^^^
61+
|
62+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
63+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
64+
65+
error[E0462]: found staticlib `futures` instead of rlib or dylib
66+
--> $DIR/bad-input.rs:4:5
67+
|
68+
4 | use futures::*;
69+
| ^^^^^^^
70+
|
71+
= help: please recompile that crate using --crate-type lib
72+
= note: the following crate versions were found:
73+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
74+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
75+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
76+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
77+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib
1278

13-
error: aborting due to 2 previous errors
79+
error: aborting due to 8 previous errors
1480

81+
For more information about this error, try `rustc --explain E0658`.
+35-121
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,45 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/bad-return-type.rs:13:11
3-
|
4-
13 | yield val;
5-
| ^^^
6-
| |
7-
| expected enum `std::option::Option`, found integer
8-
| help: try using a variant of the expected type: `Some(val)`
9-
|
10-
= note: expected type `std::option::Option<_>`
11-
found type `{integer}`
12-
13-
error[E0698]: type inside generator must be known in this context
14-
--> $DIR/bad-return-type.rs:7:9
1+
error[E0464]: multiple matching crates for `futures`
2+
--> $DIR/bad-return-type.rs:3:5
153
|
16-
7 | let val = Some(42);
17-
| ^^^
4+
3 | use futures::*;
5+
| ^^^^^^^
186
|
19-
note: the type is part of the generator because of this `yield`
20-
--> $DIR/bad-return-type.rs:5:1
21-
|
22-
5 | #[async_stream]
23-
| ^^^^^^^^^^^^^^^
24-
25-
error[E0698]: type inside generator must be known in this context
26-
--> $DIR/bad-return-type.rs:12:9
27-
|
28-
12 | let val = val.unwrap();
29-
| ^^^
30-
|
31-
note: the type is part of the generator because of this `yield`
32-
--> $DIR/bad-return-type.rs:5:1
33-
|
34-
5 | #[async_stream]
35-
| ^^^^^^^^^^^^^^^
36-
37-
error[E0698]: type inside generator must be known in this context
38-
--> $DIR/bad-return-type.rs:13:11
39-
|
40-
13 | yield val;
41-
| ^^^
42-
|
43-
note: the type is part of the generator because of this `yield`
44-
--> $DIR/bad-return-type.rs:5:1
45-
|
46-
5 | #[async_stream]
47-
| ^^^^^^^^^^^^^^^
48-
49-
error[E0308]: mismatched types
50-
--> $DIR/bad-return-type.rs:21:11
51-
|
52-
21 | yield (1, 2)
53-
| ^^^^^^ expected integer, found tuple
54-
|
55-
= note: expected type `{integer}`
56-
found type `({integer}, {integer})`
57-
58-
error[E0271]: type mismatch resolving `<impl futures_core::stream::Stream as futures_core::stream::Stream>::Item == (i32, i32)`
59-
--> $DIR/bad-return-type.rs:17:15
60-
|
61-
17 | fn tuple() -> (i32, i32) {
62-
| ^^^^^^^^^^ expected integer, found tuple
63-
|
64-
= note: expected type `{integer}`
65-
found type `(i32, i32)`
66-
= note: the return type of a function must have a statically known size
67-
68-
error[E0698]: type inside generator must be known in this context
69-
--> $DIR/bad-return-type.rs:16:1
70-
|
71-
16 | #[async_stream]
72-
| ^^^^^^^^^^^^^^^
73-
|
74-
note: the type is part of the generator because of this `yield`
75-
--> $DIR/bad-return-type.rs:16:1
76-
|
77-
16 | #[async_stream]
78-
| ^^^^^^^^^^^^^^^
7+
= note: candidates:
8+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
9+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib
7910

80-
error[E0698]: type inside generator must be known in this context
81-
--> $DIR/bad-return-type.rs:19:15
82-
|
83-
19 | yield 3;
84-
| ^
85-
|
86-
note: the type is part of the generator because of this `yield`
87-
--> $DIR/bad-return-type.rs:16:1
11+
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
12+
--> $DIR/bad-return-type.rs:16:3
8813
|
8914
16 | #[async_stream]
90-
| ^^^^^^^^^^^^^^^
91-
92-
error[E0698]: type inside generator must be known in this context
93-
--> $DIR/bad-return-type.rs:21:12
15+
| ^^^^^^^^^^^^
9416
|
95-
21 | yield (1, 2)
96-
| ^
97-
|
98-
note: the type is part of the generator because of this `yield`
99-
--> $DIR/bad-return-type.rs:16:1
100-
|
101-
16 | #[async_stream]
102-
| ^^^^^^^^^^^^^^^
17+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
18+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
10319

104-
error[E0698]: type inside generator must be known in this context
105-
--> $DIR/bad-return-type.rs:21:15
106-
|
107-
21 | yield (1, 2)
108-
| ^
109-
|
110-
note: the type is part of the generator because of this `yield`
111-
--> $DIR/bad-return-type.rs:16:1
112-
|
113-
16 | #[async_stream]
114-
| ^^^^^^^^^^^^^^^
20+
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
21+
--> $DIR/bad-return-type.rs:5:3
22+
|
23+
5 | #[async_stream]
24+
| ^^^^^^^^^^^^
25+
|
26+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
27+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
11528

116-
error[E0698]: type inside generator must be known in this context
117-
--> $DIR/bad-return-type.rs:21:11
118-
|
119-
21 | yield (1, 2)
120-
| ^^^^^^
121-
|
122-
note: the type is part of the generator because of this `yield`
123-
--> $DIR/bad-return-type.rs:16:1
124-
|
125-
16 | #[async_stream]
126-
| ^^^^^^^^^^^^^^^
29+
error[E0462]: found staticlib `futures` instead of rlib or dylib
30+
--> $DIR/bad-return-type.rs:3:5
31+
|
32+
3 | use futures::*;
33+
| ^^^^^^^
34+
|
35+
= help: please recompile that crate using --crate-type lib
36+
= note: the following crate versions were found:
37+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
38+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
39+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
40+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
41+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib
12742

128-
error: aborting due to 11 previous errors
43+
error: aborting due to 4 previous errors
12944

130-
Some errors have detailed explanations: E0271, E0308.
131-
For more information about an error, try `rustc --explain E0271`.
45+
For more information about this error, try `rustc --explain E0658`.
+32-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/forget-semicolon.rs:8:5
1+
error[E0464]: multiple matching crates for `futures`
2+
--> $DIR/forget-semicolon.rs:3:5
33
|
4-
8 | Some(())
5-
| ^^^^^^^^- help: try adding a semicolon: `;`
6-
| |
7-
| expected (), found enum `std::option::Option`
4+
3 | use futures::*;
5+
| ^^^^^^^
86
|
9-
= note: expected type `()`
10-
found type `std::option::Option<()>`
7+
= note: candidates:
8+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
9+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib
1110

12-
error: aborting due to previous error
11+
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
12+
--> $DIR/forget-semicolon.rs:5:3
13+
|
14+
5 | #[async_stream]
15+
| ^^^^^^^^^^^^
16+
|
17+
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
18+
= help: add #![feature(custom_attribute)] to the crate attributes to enable
19+
20+
error[E0462]: found staticlib `futures` instead of rlib or dylib
21+
--> $DIR/forget-semicolon.rs:3:5
22+
|
23+
3 | use futures::*;
24+
| ^^^^^^^
25+
|
26+
= help: please recompile that crate using --crate-type lib
27+
= note: the following crate versions were found:
28+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
29+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
30+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
31+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
32+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib
33+
34+
error: aborting due to 3 previous errors
1335

14-
For more information about this error, try `rustc --explain E0308`.
36+
For more information about this error, try `rustc --explain E0658`.

futures/testcrate/ui/move-captured-variable.stderr

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
error[E0507]: cannot move out of captured variable in an `FnMut` closure
2-
--> $DIR/move-captured-variable.rs:10:9
3-
|
4-
8 | let a = String::new();
5-
| - captured outer variable
6-
9 | foo(|| {
7-
10 | / async_stream_block! {
8-
11 | | yield a
9-
12 | | };
10-
| |__________^ cannot move out of captured variable in an `FnMut` closure
1+
error[E0464]: multiple matching crates for `futures`
2+
--> $DIR/move-captured-variable.rs:3:5
3+
|
4+
3 | use futures::*;
5+
| ^^^^^^^
6+
|
7+
= note: candidates:
8+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
9+
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib
1110

12-
error: aborting due to previous error
11+
error[E0462]: found staticlib `futures` instead of rlib or dylib
12+
--> $DIR/move-captured-variable.rs:3:5
13+
|
14+
3 | use futures::*;
15+
| ^^^^^^^
16+
|
17+
= help: please recompile that crate using --crate-type lib
18+
= note: the following crate versions were found:
19+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
20+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
21+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
22+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
23+
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib
24+
25+
error: aborting due to 2 previous errors
1326

14-
For more information about this error, try `rustc --explain E0507`.

0 commit comments

Comments
 (0)