File tree 1 file changed +7
-8
lines changed
src/librustc_mir/transform 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -25,22 +25,21 @@ use syntax_pos::{Span, DUMMY_SP};
25
25
26
26
use rustc_data_structures:: indexed_vec:: Idx ;
27
27
28
+ fn mirbug ( tcx : TyCtxt , span : Span , msg : & str ) {
29
+ tcx. sess . diagnostic ( ) . span_bug ( span, msg) ;
30
+ }
31
+
28
32
macro_rules! span_mirbug {
29
33
( $context: expr, $elem: expr, $( $message: tt) * ) => ( {
30
- $context. tcx( ) . sess. span_warn(
31
- $context. last_span,
32
- & format!( "broken MIR ({:?}): {}" , $elem, format!( $( $message) * ) )
33
- )
34
+ mirbug( $context. tcx( ) , $context. last_span,
35
+ & format!( "broken MIR ({:?}): {}" , $elem, format!( $( $message) * ) ) )
34
36
} )
35
37
}
36
38
37
39
macro_rules! span_mirbug_and_err {
38
40
( $context: expr, $elem: expr, $( $message: tt) * ) => ( {
39
41
{
40
- $context. tcx( ) . sess. span_warn(
41
- $context. last_span,
42
- & format!( "broken MIR ({:?}): {:?}" , $elem, format!( $( $message) * ) )
43
- ) ;
42
+ span_mirbug!( $context, $elem, $( $message) * ) ;
44
43
$context. error( )
45
44
}
46
45
} )
You can’t perform that action at this time.
0 commit comments