summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/issue-82361.stderr
blob: e4e8ad15d17891b3e4f22ee849b75ef1af40d5fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
error[E0308]: `if` and `else` have incompatible types
  --> $DIR/issue-82361.rs:10:9
   |
LL | /     if true {
LL | |         a
   | |         - expected because of this
LL | |     } else {
LL | |         b
   | |         ^ expected `usize`, found `&usize`
LL | |     };
   | |_____- `if` and `else` have incompatible types
   |
help: consider dereferencing the borrow
   |
LL |         *b
   |         +

error[E0308]: `if` and `else` have incompatible types
  --> $DIR/issue-82361.rs:16:9
   |
LL | /     if true {
LL | |         1
   | |         - expected because of this
LL | |     } else {
LL | |         &1
   | |         ^^ expected integer, found `&{integer}`
LL | |     };
   | |_____- `if` and `else` have incompatible types
   |
help: consider removing the borrow
   |
LL -         &1
LL +         1
   |

error[E0308]: `if` and `else` have incompatible types
  --> $DIR/issue-82361.rs:22:9
   |
LL | /     if true {
LL | |         1
   | |         - expected because of this
LL | |     } else {
LL | |         &mut 1
   | |         ^^^^^^ expected integer, found `&mut {integer}`
LL | |     };
   | |_____- `if` and `else` have incompatible types
   |
help: consider removing the borrow
   |
LL -         &mut 1
LL +         1
   |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.