@@ -1216,8 +1216,6 @@ fn write_ice_to_disk(info: &panic::PanicInfo<'_>) -> Result<(String, String), Ic
12161216
12171217 writeln ! ( file, "{}" , version) ?;
12181218 args. push ( ( "version" , version. as_str ( ) ) ) ;
1219- let backtrace_msg = format ! ( "please include the contents of `{}` here" , path. display( ) ) ;
1220- args. push ( ( "backtrace" , & backtrace_msg) ) ;
12211219
12221220 if let Some ( ( flags, excluded_cargo_defaults) ) = extra_compiler_flags ( ) {
12231221 writeln ! ( file, "compiler flags:" ) ?;
@@ -1229,8 +1227,6 @@ fn write_ice_to_disk(info: &panic::PanicInfo<'_>) -> Result<(String, String), Ic
12291227 }
12301228 }
12311229 writeln ! ( file, "" ) ?;
1232- let mut text = String :: new ( ) ;
1233- text. push_str ( & format ! ( "{:?} {:?}" , info. message( ) , info. location( ) ) ) ;
12341230 match ( info. message ( ) , info. location ( ) ) {
12351231 ( Some ( message) , Some ( location) ) => {
12361232 writeln ! ( file, "panicked at {location}:\n {message}" ) ?;
@@ -1247,6 +1243,7 @@ fn write_ice_to_disk(info: &panic::PanicInfo<'_>) -> Result<(String, String), Ic
12471243 }
12481244
12491245 writeln ! ( file, "" ) ?;
1246+ let capture = format ! ( "{capture}" ) ;
12501247 writeln ! ( file, "{capture}" ) ?;
12511248
12521249 // Be careful relying on global state here: this code is called from
@@ -1304,7 +1301,8 @@ static DEFAULT_HOOK: LazyLock<Box<dyn Fn(&panic::PanicInfo<'_>) + Sync + Send +
13041301 && std:: env:: var ( "RUSTC_BACKTRACE_FORCE" ) . as_deref ( ) != Ok ( "0" )
13051302 } ,
13061303 ) ;
1307- let written_ice = if !is_dev { write_ice_to_disk ( info) } else { Err ( IceError ) } ;
1304+ let written_ice =
1305+ if !is_dev && !ci_info:: is_ci ( ) { write_ice_to_disk ( info) } else { Err ( IceError ) } ;
13081306 // Invoke the default handler, which prints the actual panic message and optionally a backtrace
13091307 // Don't do this for delayed bugs, which already emit their own more useful backtrace.
13101308 if !info. payload ( ) . is :: < rustc_errors:: DelayedBugPanic > ( ) && written_ice. is_err ( ) {
@@ -1359,8 +1357,7 @@ pub fn report_ice(
13591357 }
13601358
13611359 let xs: Vec < Cow < ' static , str > > = if let Some ( ( path, custom_url) ) = & reported_ice {
1362- let link = format ! ( "\x1b ]8;;{custom_url}\x1b \\ {bug_report_url}\x1b ]8;;\x1b \\ " ) ;
1363- let path = format ! ( "\x1b ]8;;file://{path}\x1b \\ {path}\x1b ]8;;\x1b \\ " ) ;
1360+ let link = format ! ( "\x1b ]8;;{custom_url}\x07 {bug_report_url}\x1b ]8;;\x07 " ) ;
13641361 vec ! [
13651362 format!( "all necessary context about this bug was written to `{path}`" ) . into( ) ,
13661363 format!( "we would appreciate a bug report with this context at {link}" ) . into( ) ,
0 commit comments