Skip to content

Commit 7ccafe1

Browse files
committed
safety-tags: styling
1 parent 5d92060 commit 7ccafe1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

text/0000-safety-tags.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ and provide first-class IDE support.
2121
#![feature(custom_inner_attributes)]
2222
#![clippy::safety(invariant::ValidPtr)] // 💡
2323

24-
2524
pub mod invariant {
2625
#[clippy::safety::tag]
2726
pub fn ValidPtr() {}
@@ -239,14 +238,16 @@ Safety-tag analysis requirements:
239238

240239
* Harvest every item marked `#[clippy::safety::tag]`, including those pulled in from dependencies.
241240
* Offer path completion for `#![clippy::safety { ... }]`.
242-
* Offer tag-name completion for `#[clippy::safety]` on unsafe functions, let-statements, or expressions.
243-
* Validate all tags inside `#[clippy::safety]`, and support “go-to-definition” plus inline documentation hover.
241+
* Offer tag-name completion for `#[clippy::safety]` on unsafe functions, let-statements, or
242+
expressions.
243+
* Validate all tags inside `#[clippy::safety]`, and support “go-to-definition” plus inline
244+
documentation hover.
244245

245246
# Drawbacks
246247
[drawbacks]: #drawbacks
247248

248249
Even though safety tags are machine-readable, their correctness still hinges on human review:
249-
developers can silence Clippy by discharging tags without verifying the underlying obligations.
250+
developers can silence Clippy by discharging tags without verifying underlying safety requirements.
250251

251252
# Rationale and alternatives
252253
[rationale-and-alternatives]: #rationale-and-alternatives
@@ -318,7 +319,7 @@ Currently, there are efforts on introducing contracts and formal verification in
318319
* [verify-rust-std] pursues applying formal verification tools to libstd. Also see Rust Foundation
319320
[announcement][vrs#ann], project goals during [2024h2] and [2025h1].
320321

321-
While safety tags are less formally verified, intended to be a check list on safety requirements.
322+
While safety tags are less formally verified and intended to be a check list on safety requirements.
322323

323324
[verify-rust-std]: https://github.com/model-checking/verify-rust-std
324325
[vrs#ann]: https://foundation.rust-lang.org/news/rust-foundation-collaborates-with-aws-initiative-to-verify-rust-standard-libraries/
@@ -336,7 +337,7 @@ Crates with heavy unsafe-trait usage will likely need. We’d welcome more minds
336337

337338
## Tagging on Datastructures
338339

339-
We believe safety obligations are almost always imposed by unsafe functions, so tagging a struct,
340+
We believe safety requirements are almost always imposed by unsafe functions, so tagging a struct,
340341
enum, or union is neither needed nor permitted.
341342

342343
## Tagging on Unsafe Fields

0 commit comments

Comments
 (0)