fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
876 B28 linesraw
1error[E0277]: the trait bound `{integer}: Scalar` is not satisfied
2  --> $DIR/issue-22645.rs:15:5
3   |
4LL |   b + 3
5   |     ^ the trait `Scalar` is not implemented for `{integer}`
6   |
7   = help: the trait `Scalar` is implemented for `f64`
8note: required for `Bob` to implement `Add<{integer}>`
9  --> $DIR/issue-22645.rs:8:19
10   |
11LL | impl<RHS: Scalar> Add <RHS> for Bob {
12   |           ------  ^^^^^^^^^     ^^^
13   |           |
14   |           unsatisfied trait bound introduced here
15
16error[E0308]: mismatched types
17  --> $DIR/issue-22645.rs:15:3
18   |
19LL | fn main() {
20   |          - expected `()` because of default return type
21LL |   let b = Bob + 3.5;
22LL |   b + 3
23   |   ^^^^^ expected `()`, found `Bob`
24
25error: aborting due to 2 previous errors
26
27Some errors have detailed explanations: E0277, E0308.
28For more information about an error, try `rustc --explain E0277`.