diff --git a/src/ch08-02-strings.md b/src/ch08-02-strings.md index cce644b29..9494fd94c 100644 --- a/src/ch08-02-strings.md +++ b/src/ch08-02-strings.md @@ -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. ++ ```rust,ignore,does_not_compile {{#rustdoc_include ../listings/ch08-common-collections/listing-08-19/src/main.rs:here}} ``` -Listing 8-19: Attempting to use indexing syntax with a -String + This code will result in the following error: