Skip to content

Commit 4f19894

Browse files
authored
Merge pull request #1965 from PunKeel/patch-1
Mark the dangle function as does_not_compile
2 parents bf7f9a9 + ee81907 commit 4f19894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ch04-02-references-and-borrowing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Let’s take a closer look at exactly what’s happening at each stage of our
314314

315315
<span class="filename">Filename: src/main.rs</span>
316316

317-
```rust,ignore
317+
```rust,ignore,does_not_compile
318318
fn dangle() -> &String { // dangle returns a reference to a String
319319
320320
let s = String::from("hello"); // s is a new String

0 commit comments

Comments
 (0)