summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/remove-extra-argument.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/typeck/remove-extra-argument.rs')
-rw-r--r--src/test/ui/typeck/remove-extra-argument.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/typeck/remove-extra-argument.rs b/src/test/ui/typeck/remove-extra-argument.rs
new file mode 100644
index 000000000..659cb8b26
--- /dev/null
+++ b/src/test/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 this function takes 1 argument but 2 arguments were supplied
+ //~| HELP remove the extra argument
+}