File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/librustc_mir/transform Expand file tree Collapse file tree 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};
2525
2626use rustc_data_structures:: indexed_vec:: Idx ;
2727
28+ fn mirbug ( tcx : TyCtxt , span : Span , msg : & str ) {
29+ tcx. sess . diagnostic ( ) . span_bug ( span, msg) ;
30+ }
31+
2832macro_rules! span_mirbug {
2933 ( $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) * ) ) )
3436 } )
3537}
3638
3739macro_rules! span_mirbug_and_err {
3840 ( $context: expr, $elem: expr, $( $message: tt) * ) => ( {
3941 {
40- $context. tcx( ) . sess. span_warn(
41- $context. last_span,
42- & format!( "broken MIR ({:?}): {:?}" , $elem, format!( $( $message) * ) )
43- ) ;
42+ span_mirbug!( $context, $elem, $( $message) * ) ;
4443 $context. error( )
4544 }
4645 } )
You can’t perform that action at this time.
0 commit comments