]> git.proxmox.com Git - rustc.git/blame - src/doc/book/listings/ch08-common-collections/listing-08-19/output.txt
New upstream version 1.64.0+dfsg1
[rustc.git] / src / doc / book / listings / ch08-common-collections / listing-08-19 / output.txt
CommitLineData
74b04a01
XL
1$ cargo run
2 Compiling collections v0.1.0 (file:///projects/collections)
fc512014 3error[E0277]: the type `String` cannot be indexed by `{integer}`
74b04a01
XL
4 --> src/main.rs:3:13
5 |
63 | let h = s1[0];
fc512014 7 | ^^^^^ `String` cannot be indexed by `{integer}`
74b04a01 8 |
fc512014 9 = help: the trait `Index<{integer}>` is not implemented for `String`
064997fb
FG
10 = help: the following other types implement trait `Index<Idx>`:
11 <String as Index<RangeFrom<usize>>>
12 <String as Index<RangeFull>>
13 <String as Index<RangeInclusive<usize>>>
14 <String as Index<RangeTo<usize>>>
15 <String as Index<RangeToInclusive<usize>>>
16 <String as Index<std::ops::Range<usize>>>
17 <str as Index<I>>
74b04a01 18
74b04a01 19For more information about this error, try `rustc --explain E0277`.
c295e0f8 20error: could not compile `collections` due to previous error