| error: lifetime may not live long enough |
| --> $DIR/ptr-to-trait-obj-different-regions-lt-ext.rs:12:5 |
| | |
| LL | fn bad_cast<'a>(x: *const dyn Static<'static>) -> *const dyn Static<'a> { |
| | -- lifetime `'a` defined here |
| LL | x as _ |
| | ^^^^^^ returning this value requires that `'a` must outlive `'static` |
| | |
| note: raw pointer casts of trait objects cannot extend lifetimes |
| --> $DIR/ptr-to-trait-obj-different-regions-lt-ext.rs:12:5 |
| | |
| LL | x as _ |
| | ^^^^^^ |
| = note: this was previously accepted by the compiler but was changed recently |
| = help: see <https://github.com/rust-lang/rust/issues/141402> for more information |
| |
| error: aborting due to 1 previous error |
| |