blob: 50bb3995b944466335968be50680a51cde71ac13 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | //@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@ ignore-compare-mode-next-solver (explicit revisions)
//@ check-pass
// Regression test for trait-system-refactor-initiative#196.
fn iterator(b: bool) -> impl Iterator<Item = String> {
    if b {
        // We need to eagerly figure out the type of `i` here by using
        // the `<opaque as IntoIterator>::Item` obligation. This means
        // we not only have to consider item bounds, but also blanket impls.
        for i in iterator(false) {
            i.len();
        }
    }
    vec![].into_iter()
}
fn main() {}
 |