fork/rust

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

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

master
1.3 KiB49 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-92741.rs:4:5
3   |
4LL |   fn _foo() -> bool {
5   |                ---- expected `bool` because of return type
6LL | /     &
7LL | |     mut
8LL | |     if true { true } else { false }
9   | |___________________________________^ expected `bool`, found `&mut bool`
10   |
11help: consider removing the borrow
12   |
13LL -     &
14LL -     mut
15   |
16
17error[E0308]: mismatched types
18  --> $DIR/issue-92741.rs:10:5
19   |
20LL |   fn _bar() -> bool {
21   |                ---- expected `bool` because of return type
22LL | /     &
23LL | |     mut if true { true } else { false }
24   | |_______________________________________^ expected `bool`, found `&mut bool`
25   |
26help: consider removing the borrow
27   |
28LL -     &
29LL -     mut if true { true } else { false }
30LL +     if true { true } else { false }
31   |
32
33error[E0308]: mismatched types
34  --> $DIR/issue-92741.rs:15:5
35   |
36LL |   fn _baz() -> bool {
37   |                ---- expected `bool` because of return type
38LL | /     & mut
39LL | |     if true { true } else { false }
40   | |___________________________________^ expected `bool`, found `&mut bool`
41   |
42help: consider removing the borrow
43   |
44LL -     & mut
45   |
46
47error: aborting due to 3 previous errors
48
49For more information about this error, try `rustc --explain E0308`.