Skip to content

Commit c02c690

Browse files
committed
Unwrap should_panic
1 parent 9571d4d commit c02c690

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/attributes/testing.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,13 @@ r[attributes.testing.should_panic]
7575
## The `should_panic` attribute
7676

7777
r[attributes.testing.should_panic.intro]
78-
A function annotated with the `test` attribute that returns `()` can also be
79-
annotated with the `should_panic` attribute.
78+
A function annotated with the `test` attribute that returns `()` can also be annotated with the `should_panic` attribute.
8079

8180
r[attributes.testing.should_panic.behavior]
82-
The *`should_panic` attribute*
83-
makes the test only pass if it actually panics.
81+
The *`should_panic` attribute* makes the test only pass if it actually panics.
8482

8583
r[attributes.testing.should_panic.syntax]
86-
The `should_panic` attribute may optionally take an input string that must
87-
appear within the panic message. If the string is not found in the message,
88-
then the test will fail. The string may be passed using the
89-
[MetaNameValueStr] syntax or the [MetaListNameValueStr] syntax with an
90-
`expected` field.
84+
The `should_panic` attribute may optionally take an input string that must appear within the panic message. If the string is not found in the message, then the test will fail. The string may be passed using the [MetaNameValueStr] syntax or the [MetaListNameValueStr] syntax with an `expected` field.
9185

9286
```rust
9387
#[test]

0 commit comments

Comments
 (0)