rust/tests/ui/impl-trait/call_method_on_inherent_impl_ref.next.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
864 B
Plaintext
Raw Normal View History

2024-04-15 06:20:33 -05:00
error[E0282]: type annotations needed
--> $DIR/call_method_on_inherent_impl_ref.rs:17:13
2024-04-15 06:20:33 -05:00
|
LL | let x = my_foo();
| ^
LL |
LL | x.my_debug();
| - type must be known at this point
|
help: consider giving `x` an explicit type
|
LL | let x: /* Type */ = my_foo();
| ++++++++++++
error[E0282]: type annotations needed for `&_`
--> $DIR/call_method_on_inherent_impl_ref.rs:27:13
2024-04-15 06:20:33 -05:00
|
LL | let x = &my_bar();
| ^
LL |
LL | x.my_debug();
| -------- type must be known at this point
|
help: consider giving `x` an explicit type, where the placeholders `_` are specified
|
LL | let x: &_ = &my_bar();
| ++++
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0282`.