]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-26709.rs
Rollup merge of #104059 - Rejyr:rustc_middle-lint-typo, r=petrochenkov
[rust.git] / src / test / ui / issues / issue-26709.rs
1 // run-pass
2 struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(unused_tuple_struct_fields)] T);
3
4 impl<'a, T: ?Sized> Drop for Wrapper<'a, T> {
5     fn drop(&mut self) {
6         *self.0 = 432;
7     }
8 }
9
10 fn main() {
11     let mut x = 0;
12     {
13         let wrapper = Box::new(Wrapper(&mut x, 123));
14         let _: Box<Wrapper<dyn Send>> = wrapper;
15     }
16     assert_eq!(432, x)
17 }