File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 76
76
- name : RUSTFLAGS='-Z allow-features=' cargo test
77
77
run : cargo test
78
78
env :
79
- RUSTFLAGS : -Z allow-features= ${{env.RUSTFLAGS}}
79
+ RUSTFLAGS : -Z allow-features= --cfg procmacro2_backtrace ${{env.RUSTFLAGS}}
80
80
81
81
minimal :
82
82
name : Minimal versions
Original file line number Diff line number Diff line change @@ -40,7 +40,15 @@ impl LexError {
40
40
41
41
#[ cold]
42
42
fn mismatch ( line : u32 ) -> ! {
43
- panic ! ( "compiler/fallback mismatch #{}" , line)
43
+ #[ cfg( procmacro2_backtrace) ]
44
+ {
45
+ let backtrace = std:: backtrace:: Backtrace :: force_capture ( ) ;
46
+ panic ! ( "compiler/fallback mismatch #{}\n \n {}" , line, backtrace)
47
+ }
48
+ #[ cfg( not( procmacro2_backtrace) ) ]
49
+ {
50
+ panic ! ( "compiler/fallback mismatch #{}" , line)
51
+ }
44
52
}
45
53
46
54
impl DeferredTokenStream {
You can’t perform that action at this time.
0 commit comments