]> git.proxmox.com Git - rustc.git/blame - src/test/ui/polymorphization/drop_shims/simple.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / polymorphization / drop_shims / simple.rs
CommitLineData
3dfed10e
XL
1// check-pass
2// compile-flags:-Zpolymorphize=on
3
4pub struct OnDrop<F: Fn()>(pub F);
5
6impl<F: Fn()> Drop for OnDrop<F> {
7 fn drop(&mut self) { }
8}
9
10fn foo<R, S: FnOnce()>(
11 _: R,
12 _: S,
13) {
14 let bar = || {
15 let _ = OnDrop(|| ());
16 };
17 let _ = bar();
18}
19
20fn main() {
21 foo(3u32, || {});
22}