File tree 2 files changed +15
-3
lines changed
src/test/ui/mismatched_types
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
28
28
fn agh ( & & bar: & u32 ) {
29
29
}
30
30
31
+ fn bgh ( & & bar: u32 ) {
32
+ }
33
+
31
34
fn ugh ( & [ bar] : & u32 ) {
32
35
}
33
36
Original file line number Diff line number Diff line change @@ -17,11 +17,20 @@ error[E0308]: mismatched types
17
17
= note: expected type `u32`
18
18
= note: found type `&_`
19
19
20
+ error[E0308]: mismatched types
21
+ --> $DIR/issue-38371.rs:31:8
22
+ |
23
+ 31 | fn bgh(&&bar: u32) {
24
+ | ^^^^^ expected u32, found reference
25
+ |
26
+ = note: expected type `u32`
27
+ = note: found type `&_`
28
+
20
29
error[E0529]: expected an array or slice, found `u32`
21
- --> $DIR/issue-38371.rs:31 :9
30
+ --> $DIR/issue-38371.rs:34 :9
22
31
|
23
- 31 | fn ugh(&[bar]: &u32) {
32
+ 34 | fn ugh(&[bar]: &u32) {
24
33
| ^^^^^ pattern cannot match with input type `u32`
25
34
26
- error: aborting due to 3 previous errors
35
+ error: aborting due to 4 previous errors
27
36
You can’t perform that action at this time.
0 commit comments