]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-92741.stderr
Add `run-rustfix` to tests/ui/issues/issue-92741.rs
[rust.git] / tests / ui / issues / issue-92741.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-92741.rs:4:5
3    |
4 LL |   fn _foo() -> bool {
5    |                ---- expected `bool` because of return type
6 LL | /     &
7 LL | |     mut
8 LL | |     if true { true } else { false }
9    | |___________________________________^ expected `bool`, found `&mut bool`
10    |
11 help: consider removing the borrow
12    |
13 LL -     &
14 LL -     mut
15    |
16
17 error[E0308]: mismatched types
18   --> $DIR/issue-92741.rs:10:5
19    |
20 LL |   fn _bar() -> bool {
21    |                ---- expected `bool` because of return type
22 LL | /     &
23 LL | |     mut if true { true } else { false }
24    | |_______________________________________^ expected `bool`, found `&mut bool`
25    |
26 help: consider removing the borrow
27    |
28 LL -     &
29 LL -     mut if true { true } else { false }
30 LL +     if true { true } else { false }
31    |
32
33 error[E0308]: mismatched types
34   --> $DIR/issue-92741.rs:15:5
35    |
36 LL |   fn _baz() -> bool {
37    |                ---- expected `bool` because of return type
38 LL | /     & mut
39 LL | |     if true { true } else { false }
40    | |___________________________________^ expected `bool`, found `&mut bool`
41    |
42 help: consider removing the borrow
43    |
44 LL -     & mut
45    |
46
47 error: aborting due to 3 previous errors
48
49 For more information about this error, try `rustc --explain E0308`.