Skip to content

Commit 87f5694

Browse files
authored
Set example to no_run since it has UB
We can't guarantee the behavior when running this example, so it is not safe to run during tests.
1 parent b918344 commit 87f5694

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/unbounded-lifetimes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ boundaries.
1717
Given a function, any output lifetimes that don't derive from inputs are
1818
unbounded. For instance:
1919

20-
```rust
20+
<!-- no_run: This example exhibits undefined behavior. -->
21+
```rust,no_run
2122
fn get_str<'a>(s: *const String) -> &'a str {
2223
unsafe { &*s }
2324
}

0 commit comments

Comments
 (0)