summaryrefslogtreecommitdiffstats
path: root/src/test/ui/argument-suggestions/issue-96638.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/argument-suggestions/issue-96638.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/argument-suggestions/issue-96638.rs b/src/test/ui/argument-suggestions/issue-96638.rs
new file mode 100644
index 000000000..9c6e81ab8
--- /dev/null
+++ b/src/test/ui/argument-suggestions/issue-96638.rs
@@ -0,0 +1,9 @@
+fn f(_: usize, _: &usize, _: usize) {}
+
+fn arg<T>() -> T { todo!() }
+
+fn main() {
+ let x = arg(); // `x` must be inferred
+ // The reference on `&x` is important to reproduce the ICE
+ f(&x, ""); //~ ERROR this function takes 3 arguments but 2 arguments were supplied
+}