about summary refs log tree commit diff
path: root/tests/ui/argument-suggestions/basic.stderr
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /tests/ui/argument-suggestions/basic.stderr
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'tests/ui/argument-suggestions/basic.stderr')
-rw-r--r--tests/ui/argument-suggestions/basic.stderr103
1 files changed, 103 insertions, 0 deletions
diff --git a/tests/ui/argument-suggestions/basic.stderr b/tests/ui/argument-suggestions/basic.stderr
new file mode 100644
index 00000000000..062b3768858
--- /dev/null
+++ b/tests/ui/argument-suggestions/basic.stderr
@@ -0,0 +1,103 @@
+error[E0308]: mismatched types
+  --> $DIR/basic.rs:20:13
+   |
+LL |     invalid(1.0);
+   |     ------- ^^^ expected `u32`, found floating-point number
+   |     |
+   |     arguments to this function are incorrect
+   |
+note: function defined here
+  --> $DIR/basic.rs:13:4
+   |
+LL | fn invalid(_i: u32) {}
+   |    ^^^^^^^ -------
+
+error[E0061]: this function takes 0 arguments but 1 argument was supplied
+  --> $DIR/basic.rs:21:5
+   |
+LL |     extra("");
+   |     ^^^^^ -- argument of type `&'static str` unexpected
+   |
+note: function defined here
+  --> $DIR/basic.rs:14:4
+   |
+LL | fn extra() {}
+   |    ^^^^^
+help: remove the extra argument
+   |
+LL |     extra();
+   |          ~~
+
+error[E0061]: this function takes 1 argument but 0 arguments were supplied
+  --> $DIR/basic.rs:22:5
+   |
+LL |     missing();
+   |     ^^^^^^^-- an argument of type `u32` is missing
+   |
+note: function defined here
+  --> $DIR/basic.rs:15:4
+   |
+LL | fn missing(_i: u32) {}
+   |    ^^^^^^^ -------
+help: provide the argument
+   |
+LL |     missing(/* u32 */);
+   |            ~~~~~~~~~~~
+
+error[E0308]: arguments to this function are incorrect
+  --> $DIR/basic.rs:23:5
+   |
+LL |     swapped("", 1);
+   |     ^^^^^^^ --  - expected `&str`, found `{integer}`
+   |             |
+   |             expected `u32`, found `&'static str`
+   |
+note: function defined here
+  --> $DIR/basic.rs:16:4
+   |
+LL | fn swapped(_i: u32, _s: &str) {}
+   |    ^^^^^^^ -------  --------
+help: swap these arguments
+   |
+LL |     swapped(1, "");
+   |            ~~~~~~~
+
+error[E0308]: arguments to this function are incorrect
+  --> $DIR/basic.rs:24:5
+   |
+LL |     permuted(Y {}, Z {}, X {});
+   |     ^^^^^^^^ ----  ----  ---- expected `Z`, found `X`
+   |              |     |
+   |              |     expected `Y`, found `Z`
+   |              expected `X`, found `Y`
+   |
+note: function defined here
+  --> $DIR/basic.rs:17:4
+   |
+LL | fn permuted(_x: X, _y: Y, _z: Z) {}
+   |    ^^^^^^^^ -----  -----  -----
+help: reorder these arguments
+   |
+LL |     permuted(X {}, Y {}, Z {});
+   |             ~~~~~~~~~~~~~~~~~~
+
+error[E0057]: this function takes 1 argument but 0 arguments were supplied
+  --> $DIR/basic.rs:27:5
+   |
+LL |     closure();
+   |     ^^^^^^^-- an argument is missing
+   |
+note: closure defined here
+  --> $DIR/basic.rs:26:19
+   |
+LL |     let closure = |x| x;
+   |                   ^^^
+help: provide the argument
+   |
+LL |     closure(/* x */);
+   |            ~~~~~~~~~
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0057, E0061, E0308.
+For more information about an error, try `rustc --explain E0057`.