From 87f56947f382d4de226a4354c255566762052c20 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 19 May 2023 11:09:09 -0700 Subject: [PATCH] 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. --- src/unbounded-lifetimes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unbounded-lifetimes.md b/src/unbounded-lifetimes.md index 89dcc60..9ca2a2f 100644 --- a/src/unbounded-lifetimes.md +++ b/src/unbounded-lifetimes.md @@ -17,7 +17,8 @@ boundaries. Given a function, any output lifetimes that don't derive from inputs are unbounded. For instance: -```rust + +```rust,no_run fn get_str<'a>(s: *const String) -> &'a str { unsafe { &*s } }