We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83d8e8f commit 97af26aCopy full SHA for 97af26a
compiler/rustc_error_codes/src/error_codes/E0608.md
@@ -1,13 +1,13 @@
1
-Indexing was attempted on a type which doesn't implement
2
-the `std::ops::Index` trait.
+Attempted to index a value whose type doesn't implement the
+`std::ops::Index` trait.
3
4
Erroneous code example:
5
6
```compile_fail,E0608
7
0u8[2]; // error: cannot index into a value of type `u8`
8
```
9
10
-Only types which implement the `std::ops::Index` trait,
+Only values with types that implement the `std::ops::Index` trait
11
can be indexed with square brackets. Example:
12
13
0 commit comments