]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/issue-38371.stderr
Rollup merge of #107027 - GuillaumeGomez:rm-extra-removal, r=tmiasko
[rust.git] / tests / ui / mismatched_types / issue-38371.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-38371.rs:8:8
3    |
4 LL | fn foo(&_a: Foo) {}
5    |        ^^^  --- expected due to this
6    |        |
7    |        expected struct `Foo`, found reference
8    |
9    = note: expected struct `Foo`
10            found reference `&_`
11 help: to take parameter `_a` by reference, move `&` to the type
12    |
13 LL - fn foo(&_a: Foo) {}
14 LL + fn foo(_a: &Foo) {}
15    |
16
17 error[E0308]: mismatched types
18   --> $DIR/issue-38371.rs:16:9
19    |
20 LL | fn agh(&&_a: &u32) {}
21    |         ^^^  ---- expected due to this
22    |         |
23    |         expected `u32`, found reference
24    |
25    = note:   expected type `u32`
26            found reference `&_`
27 help: consider removing `&` from the pattern
28    |
29 LL - fn agh(&&_a: &u32) {}
30 LL + fn agh(&_a: &u32) {}
31    |
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0308`.