2018-09-06 07:41:12 -05:00
|
|
|
//@ run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(dead_code)]
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2018-04-27 14:41:30 -05:00
|
|
|
struct WithDrop;
|
|
|
|
|
|
|
|
impl Drop for WithDrop {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn reborrow_from_closure(r: &mut ()) -> &mut () {
|
|
|
|
let d = WithDrop;
|
|
|
|
(move || { d; &mut *r })()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|