1 error[E0053]: method `mul` has an incompatible type for trait
2 --> $DIR/wrong-mul-method-signature.rs:16:21
4 LL | fn mul(self, s: &f64) -> Vec1 {
7 | expected `f64`, found `&f64`
8 | help: change the parameter type to match the trait: `f64`
10 = note: expected signature `fn(Vec1, f64) -> Vec1`
11 found signature `fn(Vec1, &f64) -> Vec1`
13 error[E0053]: method `mul` has an incompatible type for trait
14 --> $DIR/wrong-mul-method-signature.rs:33:21
16 LL | fn mul(self, s: f64) -> Vec2 {
19 | expected struct `Vec2`, found `f64`
20 | help: change the parameter type to match the trait: `Vec2`
22 = note: expected signature `fn(Vec2, Vec2) -> f64`
23 found signature `fn(Vec2, f64) -> Vec2`
25 error[E0053]: method `mul` has an incompatible type for trait
26 --> $DIR/wrong-mul-method-signature.rs:52:29
28 LL | fn mul(self, s: f64) -> f64 {
31 | expected `i32`, found `f64`
32 | help: change the output type to match the trait: `i32`
34 = note: expected signature `fn(Vec3, _) -> i32`
35 found signature `fn(Vec3, _) -> f64`
37 error[E0308]: mismatched types
38 --> $DIR/wrong-mul-method-signature.rs:63:45
40 LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
41 | ----------------------- ^^^ expected struct `Vec2`, found floating-point number
43 | expected because this is `Vec2`
45 error[E0308]: mismatched types
46 --> $DIR/wrong-mul-method-signature.rs:63:19
48 LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
49 | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
51 | expected due to this
53 error: aborting due to 5 previous errors
55 Some errors have detailed explanations: E0053, E0308.
56 For more information about an error, try `rustc --explain E0053`.