]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-82361.stderr
Rollup merge of #107116 - ozkanonur:consolidate-bootstrap-docs, r=jyn514
[rust.git] / tests / ui / suggestions / issue-82361.stderr
1 error[E0308]: `if` and `else` have incompatible types
2   --> $DIR/issue-82361.rs:10:9
3    |
4 LL | /     if true {
5 LL | |         a
6    | |         - expected because of this
7 LL | |     } else {
8 LL | |         b
9    | |         ^ expected `usize`, found `&usize`
10 LL | |     };
11    | |_____- `if` and `else` have incompatible types
12    |
13 help: consider dereferencing the borrow
14    |
15 LL |         *b
16    |         +
17
18 error[E0308]: `if` and `else` have incompatible types
19   --> $DIR/issue-82361.rs:16:9
20    |
21 LL | /     if true {
22 LL | |         1
23    | |         - expected because of this
24 LL | |     } else {
25 LL | |         &1
26    | |         ^^ expected integer, found `&{integer}`
27 LL | |     };
28    | |_____- `if` and `else` have incompatible types
29    |
30 help: consider removing the borrow
31    |
32 LL -         &1
33 LL +         1
34    |
35
36 error[E0308]: `if` and `else` have incompatible types
37   --> $DIR/issue-82361.rs:22:9
38    |
39 LL | /     if true {
40 LL | |         1
41    | |         - expected because of this
42 LL | |     } else {
43 LL | |         &mut 1
44    | |         ^^^^^^ expected integer, found `&mut {integer}`
45 LL | |     };
46    | |_____- `if` and `else` have incompatible types
47    |
48 help: consider removing the borrow
49    |
50 LL -         &mut 1
51 LL +         1
52    |
53
54 error: aborting due to 3 previous errors
55
56 For more information about this error, try `rustc --explain E0308`.