]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-24086.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-24086.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_mut)]
4 #![allow(unused_variables)]
5 pub struct Registry<'a> {
6 listener: &'a mut (),
7 }
8
9 pub struct Listener<'a> {
10 pub announce: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
11 pub remove: Option<Box<dyn FnMut(&mut Registry) + 'a>>,
12 }
13
14 impl<'a> Drop for Registry<'a> {
15 fn drop(&mut self) {}
16 }
17
18 fn main() {
19 let mut registry_listener = Listener {
20 announce: None,
21 remove: None,
22 };
23 }