about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-30 10:18:24 +0200
committerGitHub <noreply@github.com>2025-04-30 10:18:24 +0200
commitbd3e4474a6b47ed78d2a7b10ded1fc499ff0f798 (patch)
tree3b51fe1c7da9000092ecf1f7673b9eb9dcafdf41 /tests
parent427288b3ce2d574847fdb41cc3184c893750e09a (diff)
parent55a419f444378afb5eceb361959fa57eefce2be1 (diff)
downloadrust-bd3e4474a6b47ed78d2a7b10ded1fc499ff0f798.tar.gz
rust-bd3e4474a6b47ed78d2a7b10ded1fc499ff0f798.zip
Rollup merge of #136160 - ShE3py:should-panic-backticks, r=thomcc
Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`

More legible imo
```rs
#[test]
#[should_panic = "love"]
fn foo() {
    assert!(1 == 2);
}
```
Before:
```
note: panic did not contain expected string
      panic message: `"assertion failed: 1 == 2"`,
 expected substring: `"love"`
```
After:
```
note: panic did not contain expected string
      panic message: "assertion failed: 1 == 2"
 expected substring: "love"
```
Also removed the comma as `assert_eq!` / `assert_ne!` don't use one.

``@rustbot`` label +A-libtest
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout
index 75600b4d3d6..93204abb968 100644
--- a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout
+++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout
@@ -15,12 +15,12 @@ note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.
 note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:31:4
 ---- should_panic_with_substring_panics_with_incorrect_string stdout ----
 note: panic did not contain expected string
-      panic message: `"ZOMGWTFBBQ"`,
- expected substring: `"message"`
+      panic message: "ZOMGWTFBBQ"
+ expected substring: "message"
 ---- should_panic_with_substring_panics_with_non_string_value stdout ----
 note: expected panic with string value,
  found non-string value: `TypeId($HEX)`
-     expected substring: `"message"`
+     expected substring: "message"
 
 failures:
     should_panic_with_any_message_does_not_panic