4
4
///
5
5
/// If you have a span available, you should use [`span_bug`] instead.
6
6
///
7
- /// If the bug should only be emitted when compilation didn't fail, [`DiagCtxtHandle::span_delayed_bug`]
8
- /// may be useful.
7
+ /// If the bug should only be emitted when compilation didn't fail,
8
+ /// [`DiagCtxtHandle::span_delayed_bug`] may be useful.
9
9
///
10
10
/// [`DiagCtxtHandle::span_delayed_bug`]: rustc_errors::DiagCtxtHandle::span_delayed_bug
11
11
/// [`span_bug`]: crate::span_bug
@@ -14,14 +14,8 @@ macro_rules! bug {
14
14
( ) => (
15
15
$crate:: bug!( "impossible case reached" )
16
16
) ;
17
- ( $msg: expr) => (
18
- $crate:: util:: bug:: bug_fmt( :: std:: format_args!( $msg) )
19
- ) ;
20
- ( $msg: expr, ) => (
21
- $crate:: bug!( $msg)
22
- ) ;
23
- ( $fmt: expr, $( $arg: tt) +) => (
24
- $crate:: util:: bug:: bug_fmt( :: std:: format_args!( $fmt, $( $arg) +) )
17
+ ( $( $arg: tt) +) => (
18
+ $crate:: util:: bug:: bug_fmt( :: std:: format_args!( $( $arg) +) )
25
19
) ;
26
20
}
27
21
@@ -30,20 +24,14 @@ macro_rules! bug {
30
24
/// at the code the compiler was compiling when it ICEd. This is the preferred way to trigger
31
25
/// ICEs.
32
26
///
33
- /// If the bug should only be emitted when compilation didn't fail, [`DiagCtxtHandle::span_delayed_bug`]
34
- /// may be useful.
27
+ /// If the bug should only be emitted when compilation didn't fail,
28
+ /// [`DiagCtxtHandle::span_delayed_bug`] may be useful.
35
29
///
36
30
/// [`DiagCtxtHandle::span_delayed_bug`]: rustc_errors::DiagCtxtHandle::span_delayed_bug
37
31
#[ macro_export]
38
32
macro_rules! span_bug {
39
- ( $span: expr, $msg: expr) => (
40
- $crate:: util:: bug:: span_bug_fmt( $span, :: std:: format_args!( $msg) )
41
- ) ;
42
- ( $span: expr, $msg: expr, ) => (
43
- $crate:: span_bug!( $span, $msg)
44
- ) ;
45
- ( $span: expr, $fmt: expr, $( $arg: tt) +) => (
46
- $crate:: util:: bug:: span_bug_fmt( $span, :: std:: format_args!( $fmt, $( $arg) +) )
33
+ ( $span: expr, $( $arg: tt) +) => (
34
+ $crate:: util:: bug:: span_bug_fmt( $span, :: std:: format_args!( $( $arg) +) )
47
35
) ;
48
36
}
49
37
@@ -53,7 +41,6 @@ macro_rules! span_bug {
53
41
// When possible, use one of these (relatively) convenient macros to write
54
42
// the impls for you.
55
43
56
- #[ macro_export]
57
44
macro_rules! TrivialLiftImpls {
58
45
( $( $ty: ty) ,+ $( , ) ?) => {
59
46
$(
@@ -69,7 +56,6 @@ macro_rules! TrivialLiftImpls {
69
56
70
57
/// Used for types that are `Copy` and which **do not care about arena
71
58
/// allocated data** (i.e., don't need to be folded).
72
- #[ macro_export]
73
59
macro_rules! TrivialTypeTraversalImpls {
74
60
( $( $ty: ty) ,+ $( , ) ?) => {
75
61
$(
@@ -104,7 +90,6 @@ macro_rules! TrivialTypeTraversalImpls {
104
90
} ;
105
91
}
106
92
107
- #[ macro_export]
108
93
macro_rules! TrivialTypeTraversalAndLiftImpls {
109
94
( $( $t: tt) * ) => {
110
95
TrivialTypeTraversalImpls ! { $( $t) * }
0 commit comments