Files
rust/tests/ui/did_you_mean/replace-impl-infer-ty-from-trait.stderr
Esteban Küber f0845adb0c Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
2025-02-10 20:21:39 +00:00

27 lines
1002 B
Plaintext

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
--> $DIR/replace-impl-infer-ty-from-trait.rs:9:15
|
LL | fn bar(i: _, t: _, s: _) -> _ {
| ^ ^ ^ ^ not allowed in type signatures
| | | |
| | | not allowed in type signatures
| | not allowed in type signatures
| not allowed in type signatures
|
help: try replacing `_` with the types in the corresponding trait method signature
|
LL - fn bar(i: _, t: _, s: _) -> _ {
LL + fn bar(i: i32, t: usize, s: &()) -> (usize, i32) {
|
error[E0282]: type annotations needed
--> $DIR/replace-impl-infer-ty-from-trait.rs:9:15
|
LL | fn bar(i: _, t: _, s: _) -> _ {
| ^ cannot infer type
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0121, E0282.
For more information about an error, try `rustc --explain E0121`.