Skip to content

Commit

Permalink
Remove some trailing semicolons from macro definitions
Browse files Browse the repository at this point in the history
This will allow these macros to continue to be used in expression
position if rust-lang/rust#33953 is fixed.
  • Loading branch information
Aaron1011 committed Nov 9, 2020
1 parent cb0b8c4 commit ed7a622
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ macro_rules! log {
#[macro_export(local_inner_macros)]
macro_rules! error {
(target: $target:expr, $($arg:tt)+) => (
log!(target: $target, $crate::Level::Error, $($arg)+);
log!(target: $target, $crate::Level::Error, $($arg)+)
);
($($arg:tt)+) => (
log!($crate::Level::Error, $($arg)+);
log!($crate::Level::Error, $($arg)+)
)
}

Expand All @@ -95,10 +95,10 @@ macro_rules! error {
#[macro_export(local_inner_macros)]
macro_rules! warn {
(target: $target:expr, $($arg:tt)+) => (
log!(target: $target, $crate::Level::Warn, $($arg)+);
log!(target: $target, $crate::Level::Warn, $($arg)+)
);
($($arg:tt)+) => (
log!($crate::Level::Warn, $($arg)+);
log!($crate::Level::Warn, $($arg)+)
)
}

Expand All @@ -121,10 +121,10 @@ macro_rules! warn {
#[macro_export(local_inner_macros)]
macro_rules! info {
(target: $target:expr, $($arg:tt)+) => (
log!(target: $target, $crate::Level::Info, $($arg)+);
log!(target: $target, $crate::Level::Info, $($arg)+)
);
($($arg:tt)+) => (
log!($crate::Level::Info, $($arg)+);
log!($crate::Level::Info, $($arg)+)
)
}

Expand All @@ -146,10 +146,10 @@ macro_rules! info {
#[macro_export(local_inner_macros)]
macro_rules! debug {
(target: $target:expr, $($arg:tt)+) => (
log!(target: $target, $crate::Level::Debug, $($arg)+);
log!(target: $target, $crate::Level::Debug, $($arg)+)
);
($($arg:tt)+) => (
log!($crate::Level::Debug, $($arg)+);
log!($crate::Level::Debug, $($arg)+)
)
}

Expand All @@ -173,10 +173,10 @@ macro_rules! debug {
#[macro_export(local_inner_macros)]
macro_rules! trace {
(target: $target:expr, $($arg:tt)+) => (
log!(target: $target, $crate::Level::Trace, $($arg)+);
log!(target: $target, $crate::Level::Trace, $($arg)+)
);
($($arg:tt)+) => (
log!($crate::Level::Trace, $($arg)+);
log!($crate::Level::Trace, $($arg)+)
)
}

Expand Down

0 comments on commit ed7a622

Please sign in to comment.