library: Normalize safety-for-unsafe-block comments#82467
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 26, 2021
Merged
library: Normalize safety-for-unsafe-block comments#82467bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Almost all safety comments are of the form `// SAFETY:`, so normalize the rest and fix a few of them that should have been a `/// # Safety` section instead. Furthermore, make `tidy` only allow the uppercase form. While currently `tidy` only checks `core`, it is a good idea to prevent `core` from drifting to non-uppercase comments, so that later we can start checking `alloc` etc. too. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Contributor
|
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors r+ rollup |
Collaborator
|
📌 Commit eefec8a has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 25, 2021
Rollup of 11 pull requests Successful merges: - rust-lang#82269 (Cleanup `PpMode` and friends) - rust-lang#82431 (Set RUST_BACKTRACE=0 when running `treat-err-as-bug` tests) - rust-lang#82441 (Fix typo in sanitizer flag in unstable book.) - rust-lang#82463 (panic_bounds_checks should be panic_bounds_check) - rust-lang#82464 (Update outdated comment in unix Command.) - rust-lang#82467 (library: Normalize safety-for-unsafe-block comments) - rust-lang#82468 (Move pick_by_value_method docs above function header) - rust-lang#82484 (rustdoc: Remove duplicate "List of all items") - rust-lang#82502 (Only look for HTML `tidy` when running rustdoc tests) - rust-lang#82503 (fix typo in `pre-commit.sh`) - rust-lang#82510 (Fix typo in `param_env_reveal_all_normalized`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Almost all safety comments are of the form
// SAFETY:,so normalize the rest and fix a few of them that should
have been a
/// # Safetysection instead.Furthermore, make
tidyonly allow the uppercase form. Whilecurrently
tidyonly checkscore, it is a good idea to preventcorefrom drifting to non-uppercase comments, so that laterwe can start checking
allocetc. too.Signed-off-by: Miguel Ojeda ojeda@kernel.org