@@ -250,18 +250,18 @@ invariants, and define the new tag on `delegation` function. This practice exten
250
250
delegation of multiple tag discharges:
251
251
252
252
``` rust
253
- #[safety:: requires { MyInvaraint = " Invariants of A and C, but could be a more contextual name." }]
253
+ #[safety:: requires { MyInvariant = " Invariants of A and C, but could be a more contextual name." }]
254
254
unsafe fn delegation () {
255
255
unsafe {
256
- #[safety:: checked { A = " delegated to the caller's MyInvaraint " , B }]
256
+ #[safety:: checked { A = " delegated to the caller's MyInvariant " , B }]
257
257
foo ();
258
- #[safety:: checked { C = " delegated to the caller's MyInvaraint " , D }]
258
+ #[safety:: checked { C = " delegated to the caller's MyInvariant " , D }]
259
259
bar ();
260
260
}
261
261
}
262
262
```
263
263
264
- Note that discharing a tag that is not defined will raise a hard error .
264
+ Note that discharing a tag that is not defined will raise a warning-by-default lint .
265
265
266
266
## Safety Tags are a Part of an Unsafe Function
267
267
@@ -289,7 +289,7 @@ NOTE:
289
289
* ` requires ` or ` checked ` can be specified multiple times, and they will be merged together.
290
290
* Duplicate tags in ` requires ` will trigger errors.
291
291
* Duplicate tags in ` checked ` will trigger warning-by-default diagnostics.
292
- * the scope of a tag is limited to the defined unsafe function, so identical tag name on different
292
+ * the scope of a tag is limited to the defining unsafe function, so identical tag name on different
293
293
unsafe functions won't affect with each other.
294
294
295
295
## Auto Generate Safety Docs from Tags
0 commit comments