Fixed the local macro visibility.
To use the local macros the $crate keyword needed to be used. This now means that the macro will not work with Rust 2015 edition.
This commit is contained in:
parent
c84c65540e
commit
d91d4c16f2
@ -45,7 +45,7 @@ macro_rules! log
|
||||
|
||||
($log_level: expr, $($arg: tt)+) =>
|
||||
({
|
||||
log!(domain: determine_domain!(), $log_level, $($arg)+);
|
||||
$crate::log!(domain: $crate::determine_domain!(), $log_level, $($arg)+);
|
||||
});
|
||||
}
|
||||
|
||||
@ -57,14 +57,14 @@ macro_rules! error
|
||||
{
|
||||
(domain: $domain_name: expr, $($arg: tt)*) =>
|
||||
({
|
||||
log!(domain: $domain_name, $crate::Levels::Error, $($arg)*);
|
||||
generate_panic!($($arg)*);
|
||||
$crate::log!(domain: $domain_name, $crate::Levels::Error, $($arg)*);
|
||||
$crate::generate_panic!($($arg)*);
|
||||
});
|
||||
|
||||
($($arg: tt)*) =>
|
||||
({
|
||||
log!($crate::Levels::Error, $($arg)*);
|
||||
generate_panic!($($arg)*);
|
||||
$crate::log!($crate::Levels::Error, $($arg)*);
|
||||
$crate::generate_panic!($($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
@ -77,12 +77,12 @@ macro_rules! warn
|
||||
{
|
||||
(domain: $domain_name: expr, $($arg: tt)*) =>
|
||||
({
|
||||
log!(domain: $domain_name, $crate::Levels::Warn, $($arg)*);
|
||||
$crate::log!(domain: $domain_name, $crate::Levels::Warn, $($arg)*);
|
||||
});
|
||||
|
||||
($($arg: tt)*) =>
|
||||
({
|
||||
log!($crate::Levels::Warn, $($arg)*);
|
||||
$crate::log!($crate::Levels::Warn, $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
@ -94,12 +94,12 @@ macro_rules! info
|
||||
{
|
||||
(domain: $domain_name: expr, $($arg: tt)*) =>
|
||||
({
|
||||
log!(domain: $domain_name, $crate::Levels::Info, $($arg)*);
|
||||
$crate::log!(domain: $domain_name, $crate::Levels::Info, $($arg)*);
|
||||
});
|
||||
|
||||
($($arg: tt)*) =>
|
||||
({
|
||||
log!($crate::Levels::Info, $($arg)*);
|
||||
$crate::log!($crate::Levels::Info, $($arg)*);
|
||||
})
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ macro_rules! debug
|
||||
({
|
||||
if cfg!(debug_assertions) == true
|
||||
{
|
||||
log!(domain: $domain_name, $crate::Levels::Debug, $($arg)*);
|
||||
$crate::log!(domain: $domain_name, $crate::Levels::Debug, $($arg)*);
|
||||
}
|
||||
});
|
||||
|
||||
@ -124,7 +124,7 @@ macro_rules! debug
|
||||
// Only log this if we are currently in a debug build.
|
||||
if cfg!(debug_assertions) == true
|
||||
{
|
||||
log!($crate::Levels::Debug, $($arg)*);
|
||||
$crate::log!($crate::Levels::Debug, $($arg)*);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user