rust/tests/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
233 B
Rust
Raw Normal View History

// Issue #8624. Test for reborrowing with 3 levels, not just two.
fn copy_borrowed_ptr<'a, 'b, 'c>(p: &'a mut &'b mut &'c mut isize) -> &'b mut isize {
&mut ***p
2022-04-01 17:13:25 +00:00
//~^ ERROR lifetime may not live long enough
}
fn main() {
}