fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
747 B24 linesraw
1error[E0308]: mismatched types
2  --> $DIR/equality.rs:15:5
3   |
4LL | fn two(x: bool) -> impl Foo {
5   |                    -------- expected because this return type...
6LL |     if x {
7LL |         return 1_i32;
8   |                ----- ...is found to be `i32` here
9LL |     }
10LL |     0_u32
11   |     ^^^^^ expected `i32`, found `u32`
12
13error[E0277]: cannot add `impl Foo` to `u32`
14  --> $DIR/equality.rs:24:11
15   |
16LL |         n + sum_to(n - 1)
17   |           ^ no implementation for `u32 + impl Foo`
18   |
19   = help: the trait `std::ops::Add<impl Foo>` is not implemented for `u32`
20
21error: aborting due to 2 previous errors
22
23Some errors have detailed explanations: E0277, E0308.
24For more information about an error, try `rustc --explain E0277`.