diff options
Diffstat (limited to 'src/docs/string_slice.txt')
| -rw-r--r-- | src/docs/string_slice.txt | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/docs/string_slice.txt b/src/docs/string_slice.txt deleted file mode 100644 index 3d9e49dd39e..00000000000 --- a/src/docs/string_slice.txt +++ /dev/null @@ -1,17 +0,0 @@ -### What it does -Checks for slice operations on strings - -### Why is this bad? -UTF-8 characters span multiple bytes, and it is easy to inadvertently confuse character -counts and string indices. This may lead to panics, and should warrant some test cases -containing wide UTF-8 characters. This lint is most useful in code that should avoid -panics at all costs. - -### Known problems -Probably lots of false positives. If an index comes from a known valid position (e.g. -obtained via `char_indices` over the same string), it is totally OK. - -# Example -``` -&"Ölkanne"[1..]; -``` \ No newline at end of file |
