]> git.feebdaed.xyz Git - 0xmirror/tokio.git/commitdiff
macros: add missing `local` flavor to `tokio::main` error message (#7597)
authorMartin Grigorov <martin-g@users.noreply.github.com>
Tue, 9 Sep 2025 13:26:16 +0000 (16:26 +0300)
committerGitHub <noreply@github.com>
Tue, 9 Sep 2025 13:26:16 +0000 (21:26 +0800)
tests-build/tests/fail/macros_invalid_input.stderr
tokio-macros/src/entry.rs

index e6e80e8114a7ba43599a1c8bfc03e41ba4f6b0dc..cfb2f84448a1f49a40b2ae7978c5a7a7a48e047e 100644 (file)
@@ -40,7 +40,7 @@ error: Failed to parse value of `flavor` as string.
 23 | #[tokio::test(flavor = 123)]
    |                        ^^^
 
-error: No such runtime flavor `foo`. The runtime flavors are `current_thread` and `multi_thread`.
+error: No such runtime flavor `foo`. The runtime flavors are `current_thread`, `local`, and `multi_thread`.
   --> tests/fail/macros_invalid_input.rs:26:24
    |
 26 | #[tokio::test(flavor = "foo")]
index abd9b9e9834c22fd2977ecaa690b91c1e5341a55..067cb3c04de5ea54fe4439e63d87181e7147a31e 100644 (file)
@@ -22,7 +22,7 @@ impl RuntimeFlavor {
             "single_thread" => Err("The single threaded runtime flavor is called `current_thread`.".to_string()),
             "basic_scheduler" => Err("The `basic_scheduler` runtime flavor has been renamed to `current_thread`.".to_string()),
             "threaded_scheduler" => Err("The `threaded_scheduler` runtime flavor has been renamed to `multi_thread`.".to_string()),
-            _ => Err(format!("No such runtime flavor `{s}`. The runtime flavors are `current_thread` and `multi_thread`.")),
+            _ => Err(format!("No such runtime flavor `{s}`. The runtime flavors are `current_thread`, `local`, and `multi_thread`.")),
         }
     }
 }