File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -124,19 +124,13 @@ r[attributes.testing.should_panic]
124
124
## The `should_panic ` attribute
125
125
126
126
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 .
129
128
130
129
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 .
133
131
134
132
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 .
140
134
141
135
```rust
142
136
#[test]
You can’t perform that action at this time.
0 commit comments