File tree 1 file changed +3
-3
lines changed
compiler/rustc_middle/src/util
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- // These functions are used by macro expansion for bug! and span_bug!
1
+ // These functions are used by macro expansion for ` bug!` and ` span_bug!`.
2
2
3
3
use std:: fmt;
4
4
use std:: panic:: { Location , panic_any} ;
@@ -8,15 +8,15 @@ use rustc_span::Span;
8
8
9
9
use crate :: ty:: { TyCtxt , tls} ;
10
10
11
+ // This wrapper makes for more compact code at callsites than calling `opt_span_buf_fmt` directly.
11
12
#[ cold]
12
13
#[ inline( never) ]
13
14
#[ track_caller]
14
15
pub fn bug_fmt ( args : fmt:: Arguments < ' _ > ) -> ! {
15
- // this wrapper mostly exists so I don't have to write a fully
16
- // qualified path of None::<Span> inside the bug!() macro definition
17
16
opt_span_bug_fmt ( None :: < Span > , args, Location :: caller ( ) ) ;
18
17
}
19
18
19
+ // This wrapper makes for more compact code at callsites than calling `opt_span_buf_fmt` directly.
20
20
#[ cold]
21
21
#[ inline( never) ]
22
22
#[ track_caller]
You can’t perform that action at this time.
0 commit comments