]> git.proxmox.com Git - rustc.git/blob - tests/ui/traits/new-solver/runaway-impl-candidate-selection.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / ui / traits / new-solver / runaway-impl-candidate-selection.rs
1 // compile-flags: -Ztrait-solver=next
2
3 // In the new solver, we are trying to select `<?0 as Iterator>::Item: Debug`,
4 // which, naively can be unified with every impl of `Debug` if we're not careful.
5 // This test makes sure that we treat projections with inference var substs as
6 // placeholders during fast reject.
7
8 fn iter<T: Iterator>() -> <T as Iterator>::Item {
9 todo!()
10 }
11
12 fn main() {
13 println!("{:?}", iter::<_>());
14 //~^ ERROR type annotations needed
15 }