update test case to include fn(&&u32: Foo)

This commit is contained in:
Niko Matsakis 2017-01-10 15:13:21 -05:00
parent 59d7d4c80e
commit d723e02dfc
2 changed files with 16 additions and 4 deletions

View file

@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
fn agh(&&bar: &u32) {
}
fn bgh(&&bar: u32) {
}
fn ugh(&[bar]: &u32) {
}

View file

@ -17,11 +17,20 @@ error[E0308]: mismatched types
= note: expected type `u32`
= note: found type `&_`
error[E0529]: expected an array or slice, found `u32`
--> $DIR/issue-38371.rs:31:9
error[E0308]: mismatched types
--> $DIR/issue-38371.rs:31:8
|
31 | fn ugh(&[bar]: &u32) {
31 | fn bgh(&&bar: u32) {
| ^^^^^ expected u32, found reference
|
= note: expected type `u32`
= note: found type `&_`
error[E0529]: expected an array or slice, found `u32`
--> $DIR/issue-38371.rs:34:9
|
34 | fn ugh(&[bar]: &u32) {
| ^^^^^ pattern cannot match with input type `u32`
error: aborting due to 3 previous errors
error: aborting due to 4 previous errors