summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-no-bound-in-argument-cleanup.rs
blob: aafab5d86b8655d36b2645dd0e96152674ea26f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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() {}