diff --git a/src/ch13-01-closures.md b/src/ch13-01-closures.md index 73ad637c47..d81e26228a 100644 --- a/src/ch13-01-closures.md +++ b/src/ch13-01-closures.md @@ -421,7 +421,7 @@ is allowed When you start designing functions that accept or return closures, you'll need to think about the lifetime of data captured by the closure. For example, here is a simple program that is supposed to return a closure that clones a string: -```rust,ignore,should_fail +```rust,ignore,does_not_compile fn make_a_cloner(s_ref: &str) -> impl Fn() -> String { move || s_ref.to_string() } @@ -517,4 +517,4 @@ as we continue! {{#quiz ../quizzes/ch13-01-closures-sec2.toml}} [unwrap-or-else]: https://doc.rust-lang.org/std/option/enum.Option.html#method.unwrap_or_else -[lifetime elision]: ch10-03-lifetime-syntax.html#lifetime-elision \ No newline at end of file +[lifetime elision]: ch10-03-lifetime-syntax.html#lifetime-elision