summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inference/issue-86162-1.rs
blob: 5a547eb38d1f9f2e683207265a70d59f100cfb39 (plain)
1
2
3
4
5
6
7
8
9
// Regression test of #86162.

fn foo(x: impl Clone) {}
fn gen<T>() -> T { todo!() }

fn main() {
    foo(gen()); //<- Do not suggest `foo::<impl Clone>()`!
    //~^ ERROR: type annotations needed
}