diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/inference/issue-86162-2.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/inference/issue-86162-2.rs b/src/test/ui/inference/issue-86162-2.rs new file mode 100644 index 000000000..b8c75dd77 --- /dev/null +++ b/src/test/ui/inference/issue-86162-2.rs @@ -0,0 +1,14 @@ +// Regression test of #86162. + +fn gen<T>() -> T { todo!() } + +struct Foo; + +impl Foo { + fn bar(x: impl Clone) {} +} + +fn main() { + Foo::bar(gen()); //<- Do not suggest `Foo::bar::<impl Clone>()`! + //~^ ERROR: type annotations needed +} |