From c2632f73cd85ea7900a83b8fb72dfe66879aab42 Mon Sep 17 00:00:00 2001 From: SpectralPixel Date: Mon, 27 May 2024 19:01:30 +0200 Subject: [PATCH] Convert Listing 8-19 to `` --- src/ch08-02-strings.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: