summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/remove-extra-argument.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/typeck/remove-extra-argument.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/typeck/remove-extra-argument.rs b/tests/ui/typeck/remove-extra-argument.rs
new file mode 100644
index 000000000..2181c37ce
--- /dev/null
+++ b/tests/ui/typeck/remove-extra-argument.rs
@@ -0,0 +1,9 @@
+// run-rustfix
+// Check that the HELP suggestion is `l(vec![])` instead of `l($crate::vec::Vec::new())`
+fn l(_a: Vec<u8>) {}
+
+fn main() {
+ l(vec![], vec![])
+ //~^ ERROR function takes 1 argument but 2 arguments were supplied
+ //~| HELP remove the extra argument
+}