From 0fc23971d9dd1a1859a905b3fc9ed77fef412141 Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Tue, 9 Sep 2025 16:26:16 +0300 Subject: [PATCH] macros: add missing `local` flavor to `tokio::main` error message (#7597) --- tests-build/tests/fail/macros_invalid_input.stderr | 2 +- tokio-macros/src/entry.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests-build/tests/fail/macros_invalid_input.stderr b/tests-build/tests/fail/macros_invalid_input.stderr index e6e80e811..cfb2f8444 100644 --- a/tests-build/tests/fail/macros_invalid_input.stderr +++ b/tests-build/tests/fail/macros_invalid_input.stderr @@ -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")] diff --git a/tokio-macros/src/entry.rs b/tokio-macros/src/entry.rs index abd9b9e98..067cb3c04 100644 --- a/tokio-macros/src/entry.rs +++ b/tokio-macros/src/entry.rs @@ -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`.")), } } }