Skip to content

Commit

Permalink
std: Use correct conventions for statics in macros
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jul 25, 2014
1 parent a43e7d5 commit cf7a89f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libstd/macros.rs
Expand Up @@ -40,12 +40,12 @@
macro_rules! fail(
() => ({
// static requires less code at runtime, more constant data
static file_line: (&'static str, uint) = (file!(), line!());
::std::rt::begin_unwind_no_time_to_explain(&file_line)
static FILE_LINE: (&'static str, uint) = (file!(), line!());
::std::rt::begin_unwind_no_time_to_explain(&FILE_LINE)
});
($msg:expr) => ({
static file_line: (&'static str, uint) = (file!(), line!());
let (file, line) = file_line;
static FILE_LINE: (&'static str, uint) = (file!(), line!());
let (file, line) = FILE_LINE;
::std::rt::begin_unwind($msg, file, line)
});
($fmt:expr, $($arg:tt)*) => ({
Expand All @@ -62,8 +62,8 @@ macro_rules! fail(
// up with the number of calls to fail!()
#[inline(always)]
fn run_fmt(fmt: &::std::fmt::Arguments) -> ! {
static file_line: (&'static str, uint) = (file!(), line!());
::std::rt::begin_unwind_fmt(fmt, &file_line)
static FILE_LINE: (&'static str, uint) = (file!(), line!());
::std::rt::begin_unwind_fmt(fmt, &FILE_LINE)
}
format_args!(run_fmt, $fmt, $($arg)*)
});
Expand Down

0 comments on commit cf7a89f

Please sign in to comment.