]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/issue-82361.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / suggestions / issue-82361.stderr
CommitLineData
6a06907d
XL
1error[E0308]: `if` and `else` have incompatible types
2 --> $DIR/issue-82361.rs:10:9
3 |
4LL | / if true {
5LL | | a
6 | | - expected because of this
7LL | | } else {
8LL | | b
94222f64 9 | | ^ expected `usize`, found `&usize`
6a06907d
XL
10LL | | };
11 | |_____- `if` and `else` have incompatible types
94222f64
XL
12 |
13help: consider dereferencing the borrow
14 |
15LL | *b
16 | +
6a06907d
XL
17
18error[E0308]: `if` and `else` have incompatible types
19 --> $DIR/issue-82361.rs:16:9
20 |
21LL | / if true {
22LL | | 1
23 | | - expected because of this
24LL | | } else {
25LL | | &1
94222f64 26 | | ^^ expected integer, found `&{integer}`
6a06907d
XL
27LL | | };
28 | |_____- `if` and `else` have incompatible types
94222f64
XL
29 |
30help: consider removing the borrow
31 |
32LL - &1
33LL + 1
923072b8 34 |
6a06907d
XL
35
36error[E0308]: `if` and `else` have incompatible types
37 --> $DIR/issue-82361.rs:22:9
38 |
39LL | / if true {
40LL | | 1
41 | | - expected because of this
42LL | | } else {
43LL | | &mut 1
94222f64 44 | | ^^^^^^ expected integer, found `&mut {integer}`
6a06907d
XL
45LL | | };
46 | |_____- `if` and `else` have incompatible types
94222f64
XL
47 |
48help: consider removing the borrow
49 |
50LL - &mut 1
51LL + 1
923072b8 52 |
6a06907d
XL
53
54error: aborting due to 3 previous errors
55
56For more information about this error, try `rustc --explain E0308`.