diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/almost_complete_letter_range.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/almost_complete_letter_range.txt b/src/tools/clippy/src/docs/almost_complete_letter_range.txt new file mode 100644 index 000000000..01cbaf9ea --- /dev/null +++ b/src/tools/clippy/src/docs/almost_complete_letter_range.txt @@ -0,0 +1,15 @@ +### What it does +Checks for ranges which almost include the entire range of letters from 'a' to 'z', but +don't because they're a half open range. + +### Why is this bad? +This (`'a'..'z'`) is almost certainly a typo meant to include all letters. + +### Example +``` +let _ = 'a'..'z'; +``` +Use instead: +``` +let _ = 'a'..='z'; +```
\ No newline at end of file |