2018-09-06 14:41:12 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(dead_code)]
|
2018-09-06 14:41:12 +02:00
|
|
|
|
2018-04-27 20:41:30 +01: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() {}
|