summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/projection/param-env-trait-candidate-1.rs
blob: b337c06737421405d178fd5f5de460e4941324e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// check-pass
// compile-flags: -Znext-solver

// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1
// a minimization of a pattern in core.
fn next<T: Iterator<Item = U>, U>(t: &mut T) -> Option<U> {
    t.next()
}

fn foo<T: Iterator>(t: &mut T) {
    let _: Option<T::Item> = next(t);
}

fn main() {}