mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	 289fe36d37
			
		
	
	
		289fe36d37
		
	
	
	
	
		
			
			`panic!` does not print any identifying information for threads that are
unnamed. However, in many cases, the thread ID can be determined.
This changes the panic message from something like this:
    thread '<unnamed>' panicked at src/main.rs:3:5:
    explicit panic
To something like this:
    thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5:
    explicit panic
Stack overflow messages are updated as well.
This change applies to both named and unnamed threads. The ID printed is
the OS integer thread ID rather than the Rust thread ID, which should
also be what debuggers print.
		
	
			
		
			
				
	
	
		
			23 lines
		
	
	
		
			650 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			650 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
 | |
| running 1 test
 | |
| test remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11) ... FAILED
 | |
| 
 | |
| failures:
 | |
| 
 | |
| ---- remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11) stdout ----
 | |
| Test executable failed (exit status: 101).
 | |
| 
 | |
| stderr:
 | |
| 
 | |
| thread 'main' ($TID) panicked at remapped_path/remap-path-prefix-failed-doctest-output.rs:3:1:
 | |
| oh no
 | |
| note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 | |
| 
 | |
| 
 | |
| 
 | |
| failures:
 | |
|     remapped_path/remap-path-prefix-failed-doctest-output.rs - SomeStruct (line 11)
 | |
| 
 | |
| test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
 | |
| 
 |