File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/rustc_middle/src/util Expand file tree Collapse file tree 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!`.
22
33use std:: fmt;
44use std:: panic:: { Location , panic_any} ;
@@ -8,15 +8,15 @@ use rustc_span::Span;
88
99use crate :: ty:: { TyCtxt , tls} ;
1010
11+ // This wrapper makes for more compact code at callsites than calling `opt_span_buf_fmt` directly.
1112#[ cold]
1213#[ inline( never) ]
1314#[ track_caller]
1415pub 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
1716 opt_span_bug_fmt ( None :: < Span > , args, Location :: caller ( ) ) ;
1817}
1918
19+ // This wrapper makes for more compact code at callsites than calling `opt_span_buf_fmt` directly.
2020#[ cold]
2121#[ inline( never) ]
2222#[ track_caller]
You can’t perform that action at this time.
0 commit comments