Auto merge of #138603 - xizheyin:issue-137405, r=chenyukang

Report line number of test when should_panic test failed

Closes #137405

---

try-job: x86_64-gnu-llvm-19-3
try-job: test-various
This commit is contained in:
bors 2025-04-14 13:33:44 +00:00
commit 07d3fd1d9b
5 changed files with 98 additions and 2 deletions

View file

@ -5,7 +5,7 @@ test $DIR/failed-doctest-should-panic.rs - Foo (line 10) - should panic ... FAIL
failures:
---- $DIR/failed-doctest-should-panic.rs - Foo (line 10) stdout ----
note: test did not panic as expected
note: test did not panic as expected at $DIR/failed-doctest-should-panic.rs:10:0
failures:
$DIR/failed-doctest-should-panic.rs - Foo (line 10)