diff options
| author | bors <bors@rust-lang.org> | 2019-06-13 01:32:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-13 01:32:17 +0000 |
| commit | d8f50ab0ea6c529c24e575279acc72093caeb679 (patch) | |
| tree | 5d835ff63e67e12dd877cd2eefb3a84b2087283e /src/libstd | |
| parent | 2887008e0ce0824be4e0e9562c22ea397b165c97 (diff) | |
| parent | af281d24ca6cf3e8fe74bb7629e93f144870f0f0 (diff) | |
| download | rust-d8f50ab0ea6c529c24e575279acc72093caeb679.tar.gz rust-d8f50ab0ea6c529c24e575279acc72093caeb679.zip | |
Auto merge of #61789 - Centril:rollup-hhyvopq, r=Centril
Rollup of 9 pull requests Successful merges: - #60376 (Stabilize Option::xor) - #61398 (Stabilize copy_within) - #61629 (Hygienize macros in the standard library) - #61675 (Include frame pointer for bare metal RISC-V targets) - #61750 (Fix x.py install) - #61761 (Add an alias for x86_64-sun-solaris target tuple) - #61762 (rustbuild: fix libtest_stamp) - #61763 (ci: fix ci stats upload condition) - #61776 (Fix typos in error_codes) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index ef7179f0b6f..ef1b549d1dc 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -56,13 +56,13 @@ #[allow_internal_unstable(__rust_unstable_column, libstd_sys_internals)] macro_rules! panic { () => ({ - panic!("explicit panic") + $crate::panic!("explicit panic") }); ($msg:expr) => ({ $crate::rt::begin_panic($msg, &(file!(), line!(), __rust_unstable_column!())) }); ($msg:expr,) => ({ - panic!($msg) + $crate::panic!($msg) }); ($fmt:expr, $($arg:tt)+) => ({ $crate::rt::begin_panic_fmt(&format_args!($fmt, $($arg)+), @@ -145,7 +145,7 @@ macro_rules! print { #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(print_internals, format_args_nl)] macro_rules! println { - () => (print!("\n")); + () => ($crate::print!("\n")); ($($arg:tt)*) => ({ $crate::io::_print(format_args_nl!($($arg)*)); }) @@ -204,7 +204,7 @@ macro_rules! eprint { #[stable(feature = "eprint", since = "1.19.0")] #[allow_internal_unstable(print_internals, format_args_nl)] macro_rules! eprintln { - () => (eprint!("\n")); + () => ($crate::eprint!("\n")); ($($arg:tt)*) => ({ $crate::io::_eprint(format_args_nl!($($arg)*)); }) @@ -337,23 +337,23 @@ macro_rules! eprintln { #[stable(feature = "dbg_macro", since = "1.32.0")] macro_rules! dbg { () => { - eprintln!("[{}:{}]", file!(), line!()); + $crate::eprintln!("[{}:{}]", file!(), line!()); }; ($val:expr) => { // Use of `match` here is intentional because it affects the lifetimes // of temporaries - https://stackoverflow.com/a/48732525/1063961 match $val { tmp => { - eprintln!("[{}:{}] {} = {:#?}", + $crate::eprintln!("[{}:{}] {} = {:#?}", file!(), line!(), stringify!($val), &tmp); tmp } } }; // Trailing comma with single argument is ignored - ($val:expr,) => { dbg!($val) }; + ($val:expr,) => { $crate::dbg!($val) }; ($($val:expr),+ $(,)?) => { - ($(dbg!($val)),+,) + ($($crate::dbg!($val)),+,) }; } |
