fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
2.1 KiB75 linesraw
1error[E0308]: mismatched types
2  --> $DIR/if-no-match-bindings.rs:18:8
3   |
4LL |     if b_ref() {}
5   |        ^^^^^^^
6   |        |
7   |        expected `bool`, found `&bool`
8   |        help: consider dereferencing the borrow: `*b_ref()`
9
10error[E0308]: mismatched types
11  --> $DIR/if-no-match-bindings.rs:19:8
12   |
13LL |     if b_mut_ref() {}
14   |        ^^^^^^^^^^^
15   |        |
16   |        expected `bool`, found `&mut bool`
17   |        help: consider dereferencing the borrow: `*b_mut_ref()`
18
19error[E0308]: mismatched types
20  --> $DIR/if-no-match-bindings.rs:20:8
21   |
22LL |     if &true {}
23   |        ^^^^^
24   |        |
25   |        expected `bool`, found `&bool`
26   |        help: consider removing the borrow: `true`
27
28error[E0308]: mismatched types
29  --> $DIR/if-no-match-bindings.rs:21:8
30   |
31LL |     if &mut true {}
32   |        ^^^^^^^^^
33   |        |
34   |        expected `bool`, found `&mut bool`
35   |        help: consider removing the borrow: `true`
36
37error[E0308]: mismatched types
38  --> $DIR/if-no-match-bindings.rs:24:11
39   |
40LL |     while b_ref() {}
41   |           ^^^^^^^
42   |           |
43   |           expected `bool`, found `&bool`
44   |           help: consider dereferencing the borrow: `*b_ref()`
45
46error[E0308]: mismatched types
47  --> $DIR/if-no-match-bindings.rs:25:11
48   |
49LL |     while b_mut_ref() {}
50   |           ^^^^^^^^^^^
51   |           |
52   |           expected `bool`, found `&mut bool`
53   |           help: consider dereferencing the borrow: `*b_mut_ref()`
54
55error[E0308]: mismatched types
56  --> $DIR/if-no-match-bindings.rs:26:11
57   |
58LL |     while &true {}
59   |           ^^^^^
60   |           |
61   |           expected `bool`, found `&bool`
62   |           help: consider removing the borrow: `true`
63
64error[E0308]: mismatched types
65  --> $DIR/if-no-match-bindings.rs:27:11
66   |
67LL |     while &mut true {}
68   |           ^^^^^^^^^
69   |           |
70   |           expected `bool`, found `&mut bool`
71   |           help: consider removing the borrow: `true`
72
73error: aborting due to 8 previous errors
74
75For more information about this error, try `rustc --explain E0308`.