]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/issue-38371.rs
Rollup merge of #93443 - spastorino:add-stable-hash-impl-doc, r=cjgillot
[rust.git] / src / test / ui / mismatched_types / issue-38371.rs
1 struct Foo {
2 }
3
4 fn foo(&foo: Foo) { //~ ERROR mismatched types
5 }
6
7 fn bar(foo: Foo) {
8 }
9
10 fn qux(foo: &Foo) {
11 }
12
13 fn zar(&foo: &Foo) {
14 }
15
16 // The somewhat unexpected help message in this case is courtesy of
17 // match_default_bindings.
18 fn agh(&&bar: &u32) { //~ ERROR mismatched types
19 }
20
21 fn bgh(&&bar: u32) { //~ ERROR mismatched types
22 }
23
24 fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice
25 }
26
27 fn main() {}