]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/shadowed-lplace-method-2.stderr
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / suggestions / shadowed-lplace-method-2.stderr
1 error[E0308]: mismatched types
2   --> $DIR/shadowed-lplace-method-2.rs:22:17
3    |
4 LL |     *x.foo(0) = ();
5    |     ---------   ^^ expected struct `X`, found `()`
6    |     |
7    |     expected due to the type of this binding
8    |
9 note: the `foo` call is resolved to the method in `X`, shadowing the method of the same name on trait `A`
10   --> $DIR/shadowed-lplace-method-2.rs:22:8
11    |
12 LL |     *x.foo(0) = ();
13    |        ^^^ refers to `X::foo`
14 help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
15    |
16 LL |     *<_ as A>::foo(&mut x, 0) = ();
17    |      ++++++++++++++++++  ~
18 help: try wrapping the expression in `X`
19    |
20 LL |     *x.foo(0) = X { x: () };
21    |                 ++++++    +
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0308`.