Skip to content

Commit e870221

Browse files
ehusstraviscross
authored andcommitted
Unwrap should_panic
1 parent c1720b1 commit e870221

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
@@ -124,19 +124,13 @@ r[attributes.testing.should_panic]
124124
## The `should_panic` attribute
125125
126126
r[attributes.testing.should_panic.intro]
127-
A function annotated with the `test` attribute that returns `()` can also be
128-
annotated with the `should_panic` attribute.
127+
A function annotated with the `test` attribute that returns `()` can also be annotated with the `should_panic` attribute.
129128
130129
r[attributes.testing.should_panic.behavior]
131-
The *`should_panic` attribute*
132-
makes the test only pass if it actually panics.
130+
The *`should_panic` attribute* makes the test only pass if it actually panics.
133131
134132
r[attributes.testing.should_panic.syntax]
135-
The `should_panic` attribute may optionally take an input string that must
136-
appear within the panic message. If the string is not found in the message,
137-
then the test will fail. The string may be passed using the
138-
[MetaNameValueStr] syntax or the [MetaListNameValueStr] syntax with an
139-
`expected` field.
133+
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.
140134
141135
```rust
142136
#[test]

0 commit comments

Comments
 (0)