Skip to content

Commit d723e02

Browse files
committed
update test case to include fn(&&u32: Foo)
1 parent 59d7d4c commit d723e02

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/test/ui/mismatched_types/issue-38371.rs

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
2828
fn agh(&&bar: &u32) {
2929
}
3030

31+
fn bgh(&&bar: u32) {
32+
}
33+
3134
fn ugh(&[bar]: &u32) {
3235
}
3336

src/test/ui/mismatched_types/issue-38371.stderr

+12-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,20 @@ error[E0308]: mismatched types
1717
= note: expected type `u32`
1818
= note: found type `&_`
1919

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+
2029
error[E0529]: expected an array or slice, found `u32`
21-
--> $DIR/issue-38371.rs:31:9
30+
--> $DIR/issue-38371.rs:34:9
2231
|
23-
31 | fn ugh(&[bar]: &u32) {
32+
34 | fn ugh(&[bar]: &u32) {
2433
| ^^^^^ pattern cannot match with input type `u32`
2534

26-
error: aborting due to 3 previous errors
35+
error: aborting due to 4 previous errors
2736

0 commit comments

Comments
 (0)