rust/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
350 B
Rust
Raw Normal View History

// run-pass
// pretty-expanded FIXME #23616
use std::marker;
pub struct Foo<T>(marker::PhantomData<T>);
2015-01-02 09:25:54 -06:00
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() {}