@@ -9,14 +9,14 @@ macro_rules! panic {
9
9
$crate:: panic!( "explicit panic" )
10
10
) ;
11
11
( $msg: expr) => ( {
12
- $crate:: panicking:: panic( & ( $msg, file!( ) , line!( ) , __rust_unstable_column !( ) ) )
12
+ $crate:: panicking:: panic( & ( $msg, $crate :: file!( ) , $crate :: line!( ) , $crate :: column !( ) ) )
13
13
} ) ;
14
14
( $msg: expr, ) => (
15
15
$crate:: panic!( $msg)
16
16
) ;
17
17
( $fmt: expr, $( $arg: tt) +) => ( {
18
- $crate:: panicking:: panic_fmt( format_args!( $fmt, $( $arg) +) ,
19
- & ( file!( ) , line!( ) , __rust_unstable_column !( ) ) )
18
+ $crate:: panicking:: panic_fmt( $crate :: format_args!( $fmt, $( $arg) +) ,
19
+ & ( $crate :: file!( ) , $crate :: line!( ) , $crate :: column !( ) ) )
20
20
} ) ;
21
21
}
22
22
@@ -70,7 +70,7 @@ macro_rules! assert_eq {
70
70
panic!( r#"assertion failed: `(left == right)`
71
71
left: `{:?}`,
72
72
right: `{:?}`: {}"# , & * left_val, & * right_val,
73
- format_args!( $( $arg) +) )
73
+ $crate :: format_args!( $( $arg) +) )
74
74
}
75
75
}
76
76
}
@@ -127,7 +127,7 @@ macro_rules! assert_ne {
127
127
panic!( r#"assertion failed: `(left != right)`
128
128
left: `{:?}`,
129
129
right: `{:?}`: {}"# , & * left_val, & * right_val,
130
- format_args!( $( $arg) +) )
130
+ $crate :: format_args!( $( $arg) +) )
131
131
}
132
132
}
133
133
}
@@ -181,7 +181,7 @@ macro_rules! assert_ne {
181
181
#[ macro_export]
182
182
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
183
183
macro_rules! debug_assert {
184
- ( $( $arg: tt) * ) => ( if cfg!( debug_assertions) { assert!( $( $arg) * ) ; } )
184
+ ( $( $arg: tt) * ) => ( if $crate :: cfg!( debug_assertions) { $crate :: assert!( $( $arg) * ) ; } )
185
185
}
186
186
187
187
/// Asserts that two expressions are equal to each other.
@@ -208,7 +208,7 @@ macro_rules! debug_assert {
208
208
#[ macro_export]
209
209
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
210
210
macro_rules! debug_assert_eq {
211
- ( $( $arg: tt) * ) => ( if cfg!( debug_assertions) { $crate:: assert_eq!( $( $arg) * ) ; } )
211
+ ( $( $arg: tt) * ) => ( if $crate :: cfg!( debug_assertions) { $crate:: assert_eq!( $( $arg) * ) ; } )
212
212
}
213
213
214
214
/// Asserts that two expressions are not equal to each other.
@@ -235,7 +235,7 @@ macro_rules! debug_assert_eq {
235
235
#[ macro_export]
236
236
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
237
237
macro_rules! debug_assert_ne {
238
- ( $( $arg: tt) * ) => ( if cfg!( debug_assertions) { $crate:: assert_ne!( $( $arg) * ) ; } )
238
+ ( $( $arg: tt) * ) => ( if $crate :: cfg!( debug_assertions) { $crate:: assert_ne!( $( $arg) * ) ; } )
239
239
}
240
240
241
241
/// Unwraps a result or propagates its error.
@@ -386,7 +386,7 @@ macro_rules! r#try {
386
386
#[ macro_export]
387
387
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
388
388
macro_rules! write {
389
- ( $dst: expr, $( $arg: tt) * ) => ( $dst. write_fmt( format_args!( $( $arg) * ) ) )
389
+ ( $dst: expr, $( $arg: tt) * ) => ( $dst. write_fmt( $crate :: format_args!( $( $arg) * ) ) )
390
390
}
391
391
392
392
/// Write formatted data into a buffer, with a newline appended.
@@ -446,7 +446,7 @@ macro_rules! writeln {
446
446
$crate:: writeln!( $dst)
447
447
) ;
448
448
( $dst: expr, $( $arg: tt) * ) => (
449
- $dst. write_fmt( format_args_nl!( $( $arg) * ) )
449
+ $dst. write_fmt( $crate :: format_args_nl!( $( $arg) * ) )
450
450
) ;
451
451
}
452
452
@@ -515,7 +515,7 @@ macro_rules! unreachable {
515
515
$crate:: unreachable!( $msg)
516
516
} ) ;
517
517
( $fmt: expr, $( $arg: tt) * ) => ( {
518
- panic!( concat!( "internal error: entered unreachable code: " , $fmt) , $( $arg) * )
518
+ panic!( $crate :: concat!( "internal error: entered unreachable code: " , $fmt) , $( $arg) * )
519
519
} ) ;
520
520
}
521
521
@@ -573,7 +573,7 @@ macro_rules! unreachable {
573
573
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
574
574
macro_rules! unimplemented {
575
575
( ) => ( panic!( "not yet implemented" ) ) ;
576
- ( $( $arg: tt) +) => ( panic!( "not yet implemented: {}" , format_args!( $( $arg) +) ) ) ;
576
+ ( $( $arg: tt) +) => ( panic!( "not yet implemented: {}" , $crate :: format_args!( $( $arg) +) ) ) ;
577
577
}
578
578
579
579
/// Indicates unfinished code.
@@ -632,7 +632,7 @@ macro_rules! unimplemented {
632
632
#[ unstable( feature = "todo_macro" , issue = "59277" ) ]
633
633
macro_rules! todo {
634
634
( ) => ( panic!( "not yet implemented" ) ) ;
635
- ( $( $arg: tt) +) => ( panic!( "not yet implemented: {}" , format_args!( $( $arg) +) ) ) ;
635
+ ( $( $arg: tt) +) => ( panic!( "not yet implemented: {}" , $crate :: format_args!( $( $arg) +) ) ) ;
636
636
}
637
637
638
638
/// Definitions of built-in macros.
0 commit comments