2018-08-08 12:28:26 +00:00
|
|
|
error[E0053]: method `mul` has an incompatible type for trait
|
2021-04-08 17:16:15 +00:00
|
|
|
--> $DIR/wrong-mul-method-signature.rs:16:21
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn mul(self, s: &f64) -> Vec1 {
|
2021-04-08 20:50:47 +00:00
|
|
|
| ^^^^
|
|
|
|
| |
|
|
|
|
| expected `f64`, found `&f64`
|
|
|
|
| help: change the parameter type to match the trait: `f64`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-12-24 23:17:25 +00:00
|
|
|
= note: expected signature `fn(Vec1, f64) -> Vec1`
|
|
|
|
found signature `fn(Vec1, &f64) -> Vec1`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0053]: method `mul` has an incompatible type for trait
|
2021-04-08 17:16:15 +00:00
|
|
|
--> $DIR/wrong-mul-method-signature.rs:33:21
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn mul(self, s: f64) -> Vec2 {
|
2021-04-08 20:50:47 +00:00
|
|
|
| ^^^
|
|
|
|
| |
|
|
|
|
| expected struct `Vec2`, found `f64`
|
|
|
|
| help: change the parameter type to match the trait: `Vec2`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-12-24 23:17:25 +00:00
|
|
|
= note: expected signature `fn(Vec2, Vec2) -> f64`
|
|
|
|
found signature `fn(Vec2, f64) -> Vec2`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0053]: method `mul` has an incompatible type for trait
|
2021-04-08 17:16:15 +00:00
|
|
|
--> $DIR/wrong-mul-method-signature.rs:52:29
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn mul(self, s: f64) -> f64 {
|
2021-04-08 22:27:43 +00:00
|
|
|
| ^^^
|
|
|
|
| |
|
|
|
|
| expected `i32`, found `f64`
|
|
|
|
| help: change the output type to match the trait: `i32`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-12-24 23:17:25 +00:00
|
|
|
= note: expected signature `fn(Vec3, _) -> i32`
|
|
|
|
found signature `fn(Vec3, _) -> f64`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-19 22:37:34 +00:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/wrong-mul-method-signature.rs:63:45
|
|
|
|
|
|
|
|
|
LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
|
2022-12-02 23:56:37 +00:00
|
|
|
| ----------------------- ^^^ expected struct `Vec2`, found floating-point number
|
|
|
|
| |
|
|
|
|
| expected because this is `Vec2`
|
2019-04-19 22:37:34 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/wrong-mul-method-signature.rs:63:19
|
|
|
|
|
|
|
|
|
LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
|
2019-11-19 05:00:24 +00:00
|
|
|
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2019-04-19 22:37:34 +00:00
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-19 22:37:34 +00:00
|
|
|
Some errors have detailed explanations: E0053, E0308.
|
|
|
|
For more information about an error, try `rustc --explain E0053`.
|