mirror of
https://github.com/rust-lang/book.git
synced 2026-05-17 01:33:39 -04:00
Convert Listing 8-19 to <Listing>
This commit is contained in:
@@ -224,12 +224,13 @@ string by referencing them by index is a valid and common operation. However,
|
||||
if you try to access parts of a `String` using indexing syntax in Rust, you’ll
|
||||
get an error. Consider the invalid code in Listing 8-19.
|
||||
|
||||
<Listing number="8-19" caption="Attempting to use indexing syntax with a String">
|
||||
|
||||
```rust,ignore,does_not_compile
|
||||
{{#rustdoc_include ../listings/ch08-common-collections/listing-08-19/src/main.rs:here}}
|
||||
```
|
||||
|
||||
<span class="caption">Listing 8-19: Attempting to use indexing syntax with a
|
||||
String</span>
|
||||
</Listing>
|
||||
|
||||
This code will result in the following error:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user