]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/issue-38371.stderr
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
[rust.git] / src / test / ui / mismatched_types / issue-38371.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-38371.rs:4:8
3    |
4 LL | fn foo(&foo: Foo) {
5    |        ^^^^------
6    |        |
7    |        expected struct `Foo`, found reference
8    |        help: did you mean `foo`: `&Foo`
9    |
10    = note: expected type `Foo`
11               found type `&_`
12
13 error[E0308]: mismatched types
14   --> $DIR/issue-38371.rs:18:9
15    |
16 LL | fn agh(&&bar: &u32) {
17    |         ^^^^
18    |         |
19    |         expected u32, found reference
20    |         help: you can probably remove the explicit borrow: `bar`
21    |
22    = note: expected type `u32`
23               found type `&_`
24
25 error[E0308]: mismatched types
26   --> $DIR/issue-38371.rs:21:8
27    |
28 LL | fn bgh(&&bar: u32) {
29    |        ^^^^^ expected u32, found reference
30    |
31    = note: expected type `u32`
32               found type `&_`
33
34 error[E0529]: expected an array or slice, found `u32`
35   --> $DIR/issue-38371.rs:24:9
36    |
37 LL | fn ugh(&[bar]: &u32) {
38    |         ^^^^^ pattern cannot match with input type `u32`
39
40 error: aborting due to 4 previous errors
41
42 Some errors have detailed explanations: E0308, E0529.
43 For more information about an error, try `rustc --explain E0308`.