]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18819.stderr
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-18819.stderr
1 error[E0061]: this function takes 2 arguments but 1 argument was supplied
2   --> $DIR/issue-18819.rs:16:5
3    |
4 LL |     print_x(X);
5    |     ^^^^^^^---
6    |            ||
7    |            |expected reference, found struct `X`
8    |            an argument of type `&str` is missing
9    |
10    = note: expected reference `&dyn Foo<Item = bool>`
11                  found struct `X`
12 note: function defined here
13   --> $DIR/issue-18819.rs:11:4
14    |
15 LL | fn print_x(_: &dyn Foo<Item=bool>, extra: &str) {
16    |    ^^^^^^^ ----------------------  -----------
17 help: consider borrowing here
18    |
19 LL |     print_x(&X);
20    |             ~~
21 help: provide the argument
22    |
23 LL |     print_x({&dyn Foo<Item = bool>}, {&str});
24    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25
26 error: aborting due to previous error
27
28 For more information about this error, try `rustc --explain E0061`.