Skip to content

Commit

Permalink
update test case to include fn(&&u32: Foo)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jan 10, 2017
1 parent 59d7d4c commit d723e02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/test/ui/mismatched_types/issue-38371.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
fn agh(&&bar: &u32) {
}

fn bgh(&&bar: u32) {
}

fn ugh(&[bar]: &u32) {
}

Expand Down
15 changes: 12 additions & 3 deletions src/test/ui/mismatched_types/issue-38371.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ error[E0308]: mismatched types
= note: expected type `u32`
= note: found type `&_`

error[E0308]: mismatched types
--> $DIR/issue-38371.rs:31:8
|
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:31:9
--> $DIR/issue-38371.rs:34:9
|
31 | fn ugh(&[bar]: &u32) {
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

0 comments on commit d723e02

Please sign in to comment.