summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/runaway-impl-candidate-selection.rs
blob: 1dca86d3630b1a82e99700380b0b301e9183e771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// compile-flags: -Ztrait-solver=next

// In the new solver, we are trying to select `<?0 as Iterator>::Item: Debug`,
// which, naively can be unified with every impl of `Debug` if we're not careful.
// This test makes sure that we treat projections with inference var substs as
// placeholders during fast reject.

fn iter<T: Iterator>() -> <T as Iterator>::Item {
    todo!()
}

fn main() {
    println!("{:?}", iter::<_>());
    //~^ ERROR type annotations needed
}