1 error[E0308]: mismatched types
2 --> $DIR/issue-92741.rs:4:5
4 LL | fn _foo() -> bool {
5 | ---- expected `bool` because of return type
8 LL | | if true { true } else { false }
9 | |___________________________________^ expected `bool`, found `&mut bool`
11 help: consider removing the borrow
17 error[E0308]: mismatched types
18 --> $DIR/issue-92741.rs:10:5
20 LL | fn _bar() -> bool {
21 | ---- expected `bool` because of return type
23 LL | | mut if true { true } else { false }
24 | |_______________________________________^ expected `bool`, found `&mut bool`
26 help: consider removing the borrow
29 LL - mut if true { true } else { false }
30 LL + if true { true } else { false }
33 error[E0308]: mismatched types
34 --> $DIR/issue-92741.rs:15:5
36 LL | fn _baz() -> bool {
37 | ---- expected `bool` because of return type
39 LL | | if true { true } else { false }
40 | |___________________________________^ expected `bool`, found `&mut bool`
42 help: consider removing the borrow
47 error: aborting due to 3 previous errors
49 For more information about this error, try `rustc --explain E0308`.