]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wrong-mul-method-signature.stderr
Rollup merge of #91312 - terrarier2111:anon-const-ice, r=jackh726
[rust.git] / src / test / ui / wrong-mul-method-signature.stderr
1 error[E0053]: method `mul` has an incompatible type for trait
2   --> $DIR/wrong-mul-method-signature.rs:16:21
3    |
4 LL |     fn mul(self, s: &f64) -> Vec1 {
5    |                     ^^^^
6    |                     |
7    |                     expected `f64`, found `&f64`
8    |                     help: change the parameter type to match the trait: `f64`
9    |
10    = note: expected fn pointer `fn(Vec1, f64) -> Vec1`
11               found fn pointer `fn(Vec1, &f64) -> Vec1`
12
13 error[E0053]: method `mul` has an incompatible type for trait
14   --> $DIR/wrong-mul-method-signature.rs:33:21
15    |
16 LL |     fn mul(self, s: f64) -> Vec2 {
17    |                     ^^^
18    |                     |
19    |                     expected struct `Vec2`, found `f64`
20    |                     help: change the parameter type to match the trait: `Vec2`
21    |
22    = note: expected fn pointer `fn(Vec2, Vec2) -> f64`
23               found fn pointer `fn(Vec2, f64) -> Vec2`
24
25 error[E0053]: method `mul` has an incompatible type for trait
26   --> $DIR/wrong-mul-method-signature.rs:52:29
27    |
28 LL |     fn mul(self, s: f64) -> f64 {
29    |                             ^^^
30    |                             |
31    |                             expected `i32`, found `f64`
32    |                             help: change the output type to match the trait: `i32`
33    |
34    = note: expected fn pointer `fn(Vec3, _) -> i32`
35               found fn pointer `fn(Vec3, _) -> f64`
36
37 error[E0308]: mismatched types
38   --> $DIR/wrong-mul-method-signature.rs:63:45
39    |
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
42
43 error[E0308]: mismatched types
44   --> $DIR/wrong-mul-method-signature.rs:63:19
45    |
46 LL |     let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
47    |            ----   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
48    |            |
49    |            expected due to this
50
51 error: aborting due to 5 previous errors
52
53 Some errors have detailed explanations: E0053, E0308.
54 For more information about an error, try `rustc --explain E0053`.