]> git.proxmox.com Git - rustc.git/blame - src/test/ui/tuple/add-tuple-within-arguments.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / tuple / add-tuple-within-arguments.stderr
CommitLineData
064997fb
FG
1error[E0061]: this function takes 3 arguments but 4 arguments were supplied
2 --> $DIR/add-tuple-within-arguments.rs:6:5
3 |
4LL | foo("hi", 1, 2, "hi");
5 | ^^^
6 |
7note: function defined here
8 --> $DIR/add-tuple-within-arguments.rs:1:4
9 |
10LL | fn foo(s: &str, a: (i32, i32), s2: &str) {}
f2b60f7d 11 | ^^^ -------------
064997fb
FG
12help: wrap these arguments in parentheses to construct a tuple
13 |
14LL | foo("hi", (1, 2), "hi");
15 | + +
16
17error[E0308]: mismatched types
18 --> $DIR/add-tuple-within-arguments.rs:8:15
19 |
20LL | bar("hi", "hi", "hi");
21 | --- ^^^^ expected tuple, found `&str`
22 | |
23 | arguments to this function are incorrect
24 |
25 = note: expected tuple `(&str,)`
26 found reference `&'static str`
27note: function defined here
28 --> $DIR/add-tuple-within-arguments.rs:3:4
29 |
30LL | fn bar(s: &str, a: (&str,), s2: &str) {}
f2b60f7d 31 | ^^^ ----------
064997fb
FG
32help: use a trailing comma to create a tuple with one element
33 |
34LL | bar("hi", ("hi",), "hi");
35 | + ++
36
37error: aborting due to 2 previous errors
38
39Some errors have detailed explanations: E0061, E0308.
40For more information about an error, try `rustc --explain E0061`.