Fix `SAFETY` comment tag casing in undocumented_unsafe_blocks by r00ster91 · Pul...
source link: https://github.com/rust-lang/rust-clippy/pull/8138
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This changes the lint introduced in #7748 to suggest adding a SAFETY
comment instead of a Safety
comment.
Searching for // Safety:
in rust-lang/rust yields 67 results while // SAFETY:
yields 1072.
I think it's safe to say that this comment tag is written in upper case, just like TODO
, FIXME
and so on are. As such I would expect this lint to follow the official convention as well.
Note that I intentionally introduced some casing diversity in tests/ui/undocumented_unsafe_blocks.rs
to test more cases than just Safety:
.
changelog: Capitalize SAFETY
comment in [undocumented_unsafe_blocks
]
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK