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
0 commit comments