Skip to content

Commit 3002c06

Browse files
committed
Don't emit trailing semicolon from bail!
This will allow `bail!` to continue to be used in expression position if rust-lang/rust#33953 is fixed
1 parent c25be95 commit 3002c06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
#[macro_export]
5454
macro_rules! bail {
5555
($msg:literal $(,)?) => {
56-
return $crate::private::Err($crate::anyhow!($msg));
56+
return $crate::private::Err($crate::anyhow!($msg))
5757
};
5858
($err:expr $(,)?) => {
59-
return $crate::private::Err($crate::anyhow!($err));
59+
return $crate::private::Err($crate::anyhow!($err))
6060
};
6161
($fmt:expr, $($arg:tt)*) => {
62-
return $crate::private::Err($crate::anyhow!($fmt, $($arg)*));
62+
return $crate::private::Err($crate::anyhow!($fmt, $($arg)*))
6363
};
6464
}
6565

0 commit comments

Comments
 (0)