]> git.proxmox.com Git - rustc.git/blob - tests/ui/wrong-mul-method-signature.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 signature `fn(Vec1, f64) -> Vec1`
11 found signature `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 signature `fn(Vec2, Vec2) -> f64`
23 found signature `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 signature `fn(Vec3, _) -> i32`
35 found signature `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 | expected because this is `Vec2`
44
45 error[E0308]: mismatched types
46 --> $DIR/wrong-mul-method-signature.rs:63:19
47 |
48 LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
49 | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
50 | |
51 | expected due to this
52
53 error: aborting due to 5 previous errors
54
55 Some errors have detailed explanations: E0053, E0308.
56 For more information about an error, try `rustc --explain E0053`.