about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-09 14:27:36 +0000
committerbors <bors@rust-lang.org>2022-01-09 14:27:36 +0000
commita6f80fccb19a52305ff88d960b4bb4e74df3d8b2 (patch)
treeacbd33bc3cbddd3fe6fb18099c3e2a87dc83dbfd /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent92048f4826a445872eb50760a4f46a92837b243e (diff)
downloadrust-a6f80fccb19a52305ff88d960b4bb4e74df3d8b2.tar.gz
rust-a6f80fccb19a52305ff88d960b4bb4e74df3d8b2.zip
new lint: `single_char_lifetime_names`
This pull request adds a lint against single character lifetime names, as they might not divulge enough information about the purpose of the lifetime. This can make code harder to understand. I placed this in `restriction` rather than `pedantic` (as suggested in #8233) since most of the Rust ecosystem already uses single character lifetime names (to my knowledge, at least) and since single character lifetime names aren't incorrect. I'd be happy to change this upon request, however. Fixes #8233.

- [x] Followed lint naming conventions
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`

changelog: new lint: [`single_char_lifetime_names`]
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions