]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-82361.fixed
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / ui / suggestions / issue-82361.fixed
1 // run-rustfix
2
3 fn main() {
4     let a: usize = 123;
5     let b: &usize = &a;
6
7     if true {
8         a
9     } else {
10         *b //~ ERROR `if` and `else` have incompatible types [E0308]
11     };
12
13     if true {
14         1
15     } else {
16         1 //~ ERROR `if` and `else` have incompatible types [E0308]
17     };
18
19     if true {
20         1
21     } else {
22         1 //~ ERROR `if` and `else` have incompatible types [E0308]
23     };
24 }