Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 283 Bytes
// build-pass (FIXME(62277): could be check-pass?)
struct MyStruct<'a> {
field: &'a mut (),
field2: WithDrop
}
struct WithDrop;
impl Drop for WithDrop {
fn drop(&mut self) {}
}
impl<'a> MyStruct<'a> {
fn consume(self) -> &'a mut () { self.field }
}
fn main() {}
You can’t perform that action at this time.