mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
25 lines
350 B
Rust
25 lines
350 B
Rust
// run-pass
|
|
// pretty-expanded FIXME #23616
|
|
|
|
use std::marker;
|
|
|
|
pub struct Foo<T>(marker::PhantomData<T>);
|
|
|
|
impl<T> Iterator for Foo<T> {
|
|
type Item = T;
|
|
|
|
fn next(&mut self) -> Option<T> {
|
|
None
|
|
}
|
|
}
|
|
|
|
impl<T> Drop for Foo<T> {
|
|
fn drop(&mut self) {
|
|
self.next();
|
|
}
|
|
}
|
|
|
|
pub fn foo<'a>(_: Foo<&'a ()>) {}
|
|
|
|
pub fn main() {}
|