2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_mut)]
|
|
|
|
#![allow(unused_variables)]
|
2015-07-23 22:38:42 +00:00
|
|
|
pub struct Registry<'a> {
|
|
|
|
listener: &'a mut (),
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Listener<'a> {
|
2019-05-28 18:47:21 +00:00
|
|
|
pub announce: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
|
|
|
|
pub remove: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
|
2015-07-23 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Drop for Registry<'a> {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut registry_listener = Listener {
|
|
|
|
announce: None,
|
|
|
|
remove: None,
|
|
|
|
};
|
|
|
|
}
|