Skip to content

Commit

Permalink
Auto merge of #27385 - chris-morgan:core-panic-use-$crate, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

I’ve been sitting on this one for ages now. Silly me, if only I had got on and submitted it earlier it’d be into the stable release by now…
  • Loading branch information
bors committed Jul 30, 2015
2 parents 87055a6 + fc5b79c commit 5fcaf95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/macros.rs
Expand Up @@ -17,15 +17,15 @@ macro_rules! panic {
);
($msg:expr) => ({
static _MSG_FILE_LINE: (&'static str, &'static str, u32) = ($msg, file!(), line!());
::core::panicking::panic(&_MSG_FILE_LINE)
$crate::panicking::panic(&_MSG_FILE_LINE)
});
($fmt:expr, $($arg:tt)*) => ({
// The leading _'s are to avoid dead code warnings if this is
// used inside a dead function. Just `#[allow(dead_code)]` is
// insufficient, since the user may have
// `#[forbid(dead_code)]` and which cannot be overridden.
static _FILE_LINE: (&'static str, u32) = (file!(), line!());
::core::panicking::panic_fmt(format_args!($fmt, $($arg)*), &_FILE_LINE)
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)*), &_FILE_LINE)
});
}

Expand Down

0 comments on commit 5fcaf95

Please sign in to comment.