2023-09-20 23:11:08 -05:00
|
|
|
//@ check-pass
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn rpitit(&mut self) -> impl Sized + 'static;
|
|
|
|
}
|
|
|
|
|
2023-10-14 09:28:44 -05:00
|
|
|
fn live_past_borrow<T: Foo>(mut t: T) {
|
|
|
|
let x = t.rpitit();
|
|
|
|
drop(t);
|
|
|
|
drop(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn overlapping_mut<T: Foo>(mut t: T) {
|
2023-09-20 23:11:08 -05:00
|
|
|
let a = t.rpitit();
|
|
|
|
let b = t.rpitit();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|