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.
pull/408/head
Eric Huss 2 years ago committed by GitHub
parent b918344212
commit 87f56947f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,8 @@ boundaries.
Given a function, any output lifetimes that don't derive from inputs are
unbounded. For instance:
```rust
<!-- no_run: This example exhibits undefined behavior. -->
```rust,no_run
fn get_str<'a>(s: *const String) -> &'a str {
unsafe { &*s }
}

Loading…
Cancel
Save