blob: 49315e7a8bf6bc9ae748acc46965d414f02825fe (
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
|
error[E0308]: mismatched types
--> $DIR/issue-92741.rs:4:5
|
LL | fn _foo() -> bool {
| ---- expected `bool` because of return type
LL | / &
LL | | mut
LL | | if true { true } else { false }
| |___________________________________^ expected `bool`, found `&mut bool`
|
help: consider removing the borrow
|
LL - &
LL - mut
|
error[E0308]: mismatched types
--> $DIR/issue-92741.rs:10:5
|
LL | fn _bar() -> bool {
| ---- expected `bool` because of return type
LL | / &
LL | | mut if true { true } else { false }
| |_______________________________________^ expected `bool`, found `&mut bool`
|
help: consider removing the borrow
|
LL - &
LL - mut if true { true } else { false }
LL + if true { true } else { false }
|
error[E0308]: mismatched types
--> $DIR/issue-92741.rs:15:5
|
LL | fn _baz() -> bool {
| ---- expected `bool` because of return type
LL | / & mut
LL | | if true { true } else { false }
| |___________________________________^ expected `bool`, found `&mut bool`
|
help: consider removing the borrow
|
LL - & mut
|
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0308`.
|