Skip to content

Commit 97af26a

Browse files
hkBstfee1-dead
andauthored
Apply suggestions from code review
Co-authored-by: beef <[email protected]>
1 parent 83d8e8f commit 97af26a

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+3
-3
lines changed

compiler/rustc_error_codes/src/error_codes/E0608.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Indexing was attempted on a type which doesn't implement
2-
the `std::ops::Index` trait.
1+
Attempted to index a value whose type doesn't implement the
2+
`std::ops::Index` trait.
33

44
Erroneous code example:
55

66
```compile_fail,E0608
77
0u8[2]; // error: cannot index into a value of type `u8`
88
```
99

10-
Only types which implement the `std::ops::Index` trait,
10+
Only values with types that implement the `std::ops::Index` trait
1111
can be indexed with square brackets. Example:
1212

1313
```

0 commit comments

Comments
 (0)