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