os-rust/src/test/ui/str/str-idx.stderr

12 lines
436 B
Text
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0277]: the type `str` cannot be indexed by `{integer}`
2018-12-25 08:56:47 -07:00
--> $DIR/str-idx.rs:3:17
2018-08-08 14:28:26 +02:00
|
LL | let c: u8 = s[4]; //~ ERROR the type `str` cannot be indexed by `{integer}`
| ^^^^ `str` cannot be indexed by `{integer}`
|
= help: the trait `std::ops::Index<{integer}>` is not implemented for `str`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.