]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-no-bound-in-argument-cleanup.rs
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / regions / regions-no-bound-in-argument-cleanup.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 use std::marker;
5
6 pub struct Foo<T>(marker::PhantomData<T>);
7
8 impl<T> Iterator for Foo<T> {
9     type Item = T;
10
11     fn next(&mut self) -> Option<T> {
12         None
13     }
14 }
15
16 impl<T> Drop for Foo<T> {
17     fn drop(&mut self) {
18         self.next();
19     }
20 }
21
22 pub fn foo<'a>(_: Foo<&'a ()>) {}
23
24 pub fn main() {}