diff --git a/listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs b/listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs
index 6fd76ce006..62d0fddbf1 100644
--- a/listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs
+++ b/listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs
@@ -1,3 +1,6 @@
+fn main() {}
+
+// ANCHOR: here
fn prints_and_returns_10(a: i32) -> i32 {
println!("I got the value {}", a);
10
@@ -19,3 +22,4 @@ mod tests {
assert_eq!(5, value);
}
}
+// ANCHOR_END: here
diff --git a/src/ch11-02-running-tests.md b/src/ch11-02-running-tests.md
index da31ca804c..7941ce786c 100644
--- a/src/ch11-02-running-tests.md
+++ b/src/ch11-02-running-tests.md
@@ -62,7 +62,7 @@ parameter and returns 10, as well as a test that passes and a test that fails.
Filename: src/lib.rs
```rust,panics
-{{#rustdoc_include ../listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs}}
+{{#rustdoc_include ../listings/ch11-writing-automated-tests/listing-11-10/src/lib.rs:here}}
```
Listing 11-10: Tests for a function that calls