@@ -2,7 +2,10 @@ error[E0308]: mismatched types
22 --> $DIR/if-no-match-bindings.rs:18:8
33 |
44LL | if b_ref() {}
5- | ^^^^^^^ expected bool, found &bool
5+ | ^^^^^^^
6+ | |
7+ | expected bool, found &bool
8+ | help: consider dereferencing the borrow: `*b_ref()`
69 |
710 = note: expected type `bool`
811 found type `&bool`
@@ -11,7 +14,10 @@ error[E0308]: mismatched types
1114 --> $DIR/if-no-match-bindings.rs:19:8
1215 |
1316LL | 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()`
1521 |
1622 = note: expected type `bool`
1723 found type `&mut bool`
@@ -20,7 +26,10 @@ error[E0308]: mismatched types
2026 --> $DIR/if-no-match-bindings.rs:20:8
2127 |
2228LL | if &true {}
23- | ^^^^^ expected bool, found &bool
29+ | ^^^^^
30+ | |
31+ | expected bool, found &bool
32+ | help: consider dereferencing the borrow: `*&true`
2433 |
2534 = note: expected type `bool`
2635 found type `&bool`
@@ -29,7 +38,10 @@ error[E0308]: mismatched types
2938 --> $DIR/if-no-match-bindings.rs:21:8
3039 |
3140LL | 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`
3345 |
3446 = note: expected type `bool`
3547 found type `&mut bool`
@@ -38,7 +50,10 @@ error[E0308]: mismatched types
3850 --> $DIR/if-no-match-bindings.rs:24:11
3951 |
4052LL | while b_ref() {}
41- | ^^^^^^^ expected bool, found &bool
53+ | ^^^^^^^
54+ | |
55+ | expected bool, found &bool
56+ | help: consider dereferencing the borrow: `*b_ref()`
4257 |
4358 = note: expected type `bool`
4459 found type `&bool`
@@ -47,25 +62,34 @@ error[E0308]: mismatched types
4762 --> $DIR/if-no-match-bindings.rs:25:11
4863 |
4964LL | 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()`
5169 |
5270 = note: expected type `bool`
5371 found type `&mut bool`
5472
5573error[E0308]: mismatched types
5674 --> $DIR/if-no-match-bindings.rs:26:11
5775 |
58- LL | while &true {}
59- | ^^^^^ expected bool, found &bool
76+ 26 | while &true {}
77+ | ^^^^^
78+ | |
79+ | expected bool, found &bool
80+ | help: consider dereferencing the borrow: `*&true`
6081 |
6182 = note: expected type `bool`
6283 found type `&bool`
6384
6485error[E0308]: mismatched types
6586 --> $DIR/if-no-match-bindings.rs:27:11
6687 |
67- LL | while &mut true {}
68- | ^^^^^^^^^ expected bool, found &mut bool
88+ 27 | while &mut true {}
89+ | ^^^^^^^^^
90+ | |
91+ | expected bool, found &mut bool
92+ | help: consider dereferencing the borrow: `*&mut true`
6993 |
7094 = note: expected type `bool`
7195 found type `&mut bool`
0 commit comments