fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
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 9 | | ^ expected `usize`, found `&usize` 10LL | | }; 11 | |_____- `if` and `else` have incompatible types 12 | 13help: consider dereferencing the borrow 14 | 15LL | *b 16 | + 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 26 | | ^^ expected integer, found `&{integer}` 27LL | | }; 28 | |_____- `if` and `else` have incompatible types 29 | 30help: consider removing the borrow 31 | 32LL - &1 33LL + 1 34 | 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 44 | | ^^^^^^ expected integer, found `&mut {integer}` 45LL | | }; 46 | |_____- `if` and `else` have incompatible types 47 | 48help: consider removing the borrow 49 | 50LL - &mut 1 51LL + 1 52 | 53 54error: aborting due to 3 previous errors 55 56For more information about this error, try `rustc --explain E0308`.