mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
macros: improve select! error message (#3352)
Co-authored-by: Alice Ryhl <alice@ryhl.io>
This commit is contained in:
parent
770044caa7
commit
0048d43713
@ -446,7 +446,7 @@ macro_rules! select {
|
||||
|
||||
(@ { $($t:tt)* } ) => {
|
||||
// No `else` branch
|
||||
$crate::select!(@{ $($t)*; unreachable!() })
|
||||
$crate::select!(@{ $($t)*; panic!("all branches are disabled and there is no else branch") })
|
||||
};
|
||||
(@ { $($t:tt)* } else => $else:expr $(,)?) => {
|
||||
$crate::select!(@{ $($t)*; $else })
|
||||
|
Loading…
x
Reference in New Issue
Block a user