@@ -2,7 +2,10 @@ error[E0308]: mismatched types
2
2
--> $DIR/if-no-match-bindings.rs:18:8
3
3
|
4
4
LL | if b_ref() {}
5
- | ^^^^^^^ expected bool, found &bool
5
+ | ^^^^^^^
6
+ | |
7
+ | expected bool, found &bool
8
+ | help: consider dereferencing the borrow: `*b_ref()`
6
9
|
7
10
= note: expected type `bool`
8
11
found type `&bool`
@@ -11,7 +14,10 @@ error[E0308]: mismatched types
11
14
--> $DIR/if-no-match-bindings.rs:19:8
12
15
|
13
16
LL | if b_mut_ref() {}
14
- | ^^^^^^^^^^^ expected bool, found &mut bool
17
+ | ^^^^^^^^^^^
18
+ | |
19
+ | expected bool, found &mut bool
20
+ | help: consider dereferencing the borrow: `*b_mut_ref()`
15
21
|
16
22
= note: expected type `bool`
17
23
found type `&mut bool`
@@ -20,7 +26,10 @@ error[E0308]: mismatched types
20
26
--> $DIR/if-no-match-bindings.rs:20:8
21
27
|
22
28
LL | if &true {}
23
- | ^^^^^ expected bool, found &bool
29
+ | ^^^^^
30
+ | |
31
+ | expected bool, found &bool
32
+ | help: consider dereferencing the borrow: `*&true`
24
33
|
25
34
= note: expected type `bool`
26
35
found type `&bool`
@@ -29,7 +38,10 @@ error[E0308]: mismatched types
29
38
--> $DIR/if-no-match-bindings.rs:21:8
30
39
|
31
40
LL | if &mut true {}
32
- | ^^^^^^^^^ expected bool, found &mut bool
41
+ | ^^^^^^^^^
42
+ | |
43
+ | expected bool, found &mut bool
44
+ | help: consider dereferencing the borrow: `*&mut true`
33
45
|
34
46
= note: expected type `bool`
35
47
found type `&mut bool`
@@ -38,7 +50,10 @@ error[E0308]: mismatched types
38
50
--> $DIR/if-no-match-bindings.rs:24:11
39
51
|
40
52
LL | while b_ref() {}
41
- | ^^^^^^^ expected bool, found &bool
53
+ | ^^^^^^^
54
+ | |
55
+ | expected bool, found &bool
56
+ | help: consider dereferencing the borrow: `*b_ref()`
42
57
|
43
58
= note: expected type `bool`
44
59
found type `&bool`
@@ -47,7 +62,10 @@ error[E0308]: mismatched types
47
62
--> $DIR/if-no-match-bindings.rs:25:11
48
63
|
49
64
LL | while b_mut_ref() {}
50
- | ^^^^^^^^^^^ expected bool, found &mut bool
65
+ | ^^^^^^^^^^^
66
+ | |
67
+ | expected bool, found &mut bool
68
+ | help: consider dereferencing the borrow: `*b_mut_ref()`
51
69
|
52
70
= note: expected type `bool`
53
71
found type `&mut bool`
@@ -56,7 +74,10 @@ error[E0308]: mismatched types
56
74
--> $DIR/if-no-match-bindings.rs:26:11
57
75
|
58
76
LL | while &true {}
59
- | ^^^^^ expected bool, found &bool
77
+ | ^^^^^
78
+ | |
79
+ | expected bool, found &bool
80
+ | help: consider dereferencing the borrow: `*&true`
60
81
|
61
82
= note: expected type `bool`
62
83
found type `&bool`
@@ -65,7 +86,10 @@ error[E0308]: mismatched types
65
86
--> $DIR/if-no-match-bindings.rs:27:11
66
87
|
67
88
LL | while &mut true {}
68
- | ^^^^^^^^^ expected bool, found &mut bool
89
+ | ^^^^^^^^^
90
+ | |
91
+ | expected bool, found &mut bool
92
+ | help: consider dereferencing the borrow: `*&mut true`
69
93
|
70
94
= note: expected type `bool`
71
95
found type `&mut bool`
0 commit comments