diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/ui/traits/wrong-mul-method-signature.stderr | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/wrong-mul-method-signature.stderr')
-rw-r--r-- | tests/ui/traits/wrong-mul-method-signature.stderr | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/ui/traits/wrong-mul-method-signature.stderr b/tests/ui/traits/wrong-mul-method-signature.stderr new file mode 100644 index 000000000..25a92f5ec --- /dev/null +++ b/tests/ui/traits/wrong-mul-method-signature.stderr @@ -0,0 +1,56 @@ +error[E0053]: method `mul` has an incompatible type for trait + --> $DIR/wrong-mul-method-signature.rs:16:21 + | +LL | fn mul(self, s: &f64) -> Vec1 { + | ^^^^ + | | + | expected `f64`, found `&f64` + | help: change the parameter type to match the trait: `f64` + | + = note: expected signature `fn(Vec1, f64) -> Vec1` + found signature `fn(Vec1, &f64) -> Vec1` + +error[E0053]: method `mul` has an incompatible type for trait + --> $DIR/wrong-mul-method-signature.rs:33:21 + | +LL | fn mul(self, s: f64) -> Vec2 { + | ^^^ + | | + | expected `Vec2`, found `f64` + | help: change the parameter type to match the trait: `Vec2` + | + = note: expected signature `fn(Vec2, Vec2) -> f64` + found signature `fn(Vec2, f64) -> Vec2` + +error[E0053]: method `mul` has an incompatible type for trait + --> $DIR/wrong-mul-method-signature.rs:52:29 + | +LL | fn mul(self, s: f64) -> f64 { + | ^^^ + | | + | expected `i32`, found `f64` + | help: change the output type to match the trait: `i32` + | + = note: expected signature `fn(Vec3, _) -> i32` + found signature `fn(Vec3, _) -> f64` + +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 + | ----------------------- ^^^ expected `Vec2`, found floating-point number + | | + | expected because this is `Vec2` + +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 + | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Vec2`, found `f64` + | | + | expected due to this + +error: aborting due to 5 previous errors + +Some errors have detailed explanations: E0053, E0308. +For more information about an error, try `rustc --explain E0053`. |