mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
@@ -1,97 +1,101 @@
|
||||
error: the `async` keyword is missing from the function declaration
|
||||
--> $DIR/macros_invalid_input.rs:4:1
|
||||
--> tests/fail/macros_invalid_input.rs:6:1
|
||||
|
|
||||
4 | fn main_is_not_async() {}
|
||||
6 | fn main_is_not_async() {}
|
||||
| ^^
|
||||
|
||||
error: Unknown attribute foo is specified; expected one of: `flavor`, `worker_threads`, `start_paused`, `crate`
|
||||
--> $DIR/macros_invalid_input.rs:6:15
|
||||
--> tests/fail/macros_invalid_input.rs:8:15
|
||||
|
|
||||
6 | #[tokio::main(foo)]
|
||||
8 | #[tokio::main(foo)]
|
||||
| ^^^
|
||||
|
||||
error: Must have specified ident
|
||||
--> $DIR/macros_invalid_input.rs:9:15
|
||||
|
|
||||
9 | #[tokio::main(threadpool::bar)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
--> tests/fail/macros_invalid_input.rs:11:15
|
||||
|
|
||||
11 | #[tokio::main(threadpool::bar)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: the `async` keyword is missing from the function declaration
|
||||
--> $DIR/macros_invalid_input.rs:13:1
|
||||
--> tests/fail/macros_invalid_input.rs:15:1
|
||||
|
|
||||
13 | fn test_is_not_async() {}
|
||||
15 | fn test_is_not_async() {}
|
||||
| ^^
|
||||
|
||||
error: Unknown attribute foo is specified; expected one of: `flavor`, `worker_threads`, `start_paused`, `crate`
|
||||
--> $DIR/macros_invalid_input.rs:15:15
|
||||
--> tests/fail/macros_invalid_input.rs:17:15
|
||||
|
|
||||
15 | #[tokio::test(foo)]
|
||||
17 | #[tokio::test(foo)]
|
||||
| ^^^
|
||||
|
||||
error: Unknown attribute foo is specified; expected one of: `flavor`, `worker_threads`, `start_paused`, `crate`
|
||||
--> $DIR/macros_invalid_input.rs:18:15
|
||||
--> tests/fail/macros_invalid_input.rs:20:15
|
||||
|
|
||||
18 | #[tokio::test(foo = 123)]
|
||||
20 | #[tokio::test(foo = 123)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: Failed to parse value of `flavor` as string.
|
||||
--> $DIR/macros_invalid_input.rs:21:24
|
||||
--> tests/fail/macros_invalid_input.rs:23:24
|
||||
|
|
||||
21 | #[tokio::test(flavor = 123)]
|
||||
23 | #[tokio::test(flavor = 123)]
|
||||
| ^^^
|
||||
|
||||
error: No such runtime flavor `foo`. The runtime flavors are `current_thread` and `multi_thread`.
|
||||
--> $DIR/macros_invalid_input.rs:24:24
|
||||
--> tests/fail/macros_invalid_input.rs:26:24
|
||||
|
|
||||
24 | #[tokio::test(flavor = "foo")]
|
||||
26 | #[tokio::test(flavor = "foo")]
|
||||
| ^^^^^
|
||||
|
||||
error: The `start_paused` option requires the `current_thread` runtime flavor. Use `#[tokio::test(flavor = "current_thread")]`
|
||||
--> $DIR/macros_invalid_input.rs:27:55
|
||||
--> tests/fail/macros_invalid_input.rs:29:55
|
||||
|
|
||||
27 | #[tokio::test(flavor = "multi_thread", start_paused = false)]
|
||||
29 | #[tokio::test(flavor = "multi_thread", start_paused = false)]
|
||||
| ^^^^^
|
||||
|
||||
error: Failed to parse value of `worker_threads` as integer.
|
||||
--> $DIR/macros_invalid_input.rs:30:57
|
||||
--> tests/fail/macros_invalid_input.rs:32:57
|
||||
|
|
||||
30 | #[tokio::test(flavor = "multi_thread", worker_threads = "foo")]
|
||||
32 | #[tokio::test(flavor = "multi_thread", worker_threads = "foo")]
|
||||
| ^^^^^
|
||||
|
||||
error: The `worker_threads` option requires the `multi_thread` runtime flavor. Use `#[tokio::test(flavor = "multi_thread")]`
|
||||
--> $DIR/macros_invalid_input.rs:33:59
|
||||
--> tests/fail/macros_invalid_input.rs:35:59
|
||||
|
|
||||
33 | #[tokio::test(flavor = "current_thread", worker_threads = 4)]
|
||||
35 | #[tokio::test(flavor = "current_thread", worker_threads = 4)]
|
||||
| ^
|
||||
|
||||
error: Failed to parse value of `crate` as ident.
|
||||
--> $DIR/macros_invalid_input.rs:36:23
|
||||
--> tests/fail/macros_invalid_input.rs:38:23
|
||||
|
|
||||
36 | #[tokio::test(crate = 456)]
|
||||
38 | #[tokio::test(crate = 456)]
|
||||
| ^^^
|
||||
|
||||
error: Failed to parse value of `crate` as ident: "456"
|
||||
--> $DIR/macros_invalid_input.rs:39:23
|
||||
--> tests/fail/macros_invalid_input.rs:41:23
|
||||
|
|
||||
39 | #[tokio::test(crate = "456")]
|
||||
41 | #[tokio::test(crate = "456")]
|
||||
| ^^^^^
|
||||
|
||||
error: Failed to parse value of `crate` as ident: "abc::edf"
|
||||
--> $DIR/macros_invalid_input.rs:42:23
|
||||
--> tests/fail/macros_invalid_input.rs:44:23
|
||||
|
|
||||
42 | #[tokio::test(crate = "abc::edf")]
|
||||
44 | #[tokio::test(crate = "abc::edf")]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: second test attribute is supplied
|
||||
--> $DIR/macros_invalid_input.rs:46:1
|
||||
--> tests/fail/macros_invalid_input.rs:48:1
|
||||
|
|
||||
46 | #[test]
|
||||
48 | #[test]
|
||||
| ^^^^^^^
|
||||
|
||||
error: duplicated attribute
|
||||
--> $DIR/macros_invalid_input.rs:46:1
|
||||
--> tests/fail/macros_invalid_input.rs:48:1
|
||||
|
|
||||
46 | #[test]
|
||||
48 | #[test]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: `-D duplicate-macro-attributes` implied by `-D warnings`
|
||||
note: the lint level is defined here
|
||||
--> tests/fail/macros_invalid_input.rs:1:9
|
||||
|
|
||||
1 | #![deny(duplicate_macro_attributes)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user