From ee81907fdfb760767b7583425c31c9851bcfe7af Mon Sep 17 00:00:00 2001 From: Maxime Guerreiro Date: Mon, 20 May 2019 15:26:15 +0100 Subject: [PATCH] Mark the dangle function as does_not_compile Fixes #1964 --- src/ch04-02-references-and-borrowing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch04-02-references-and-borrowing.md b/src/ch04-02-references-and-borrowing.md index b44aad3e50..69e829cf04 100644 --- a/src/ch04-02-references-and-borrowing.md +++ b/src/ch04-02-references-and-borrowing.md @@ -314,7 +314,7 @@ Let’s take a closer look at exactly what’s happening at each stage of our Filename: src/main.rs -```rust,ignore +```rust,ignore,does_not_compile fn dangle() -> &String { // dangle returns a reference to a String let s = String::from("hello"); // s is a new String