mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-20 22:57:39 -04:00
update test case to include fn(&&u32: Foo)
This commit is contained in:
@@ -28,6 +28,9 @@ fn zar(&foo: &Foo) {
|
||||
fn agh(&&bar: &u32) {
|
||||
}
|
||||
|
||||
fn bgh(&&bar: u32) {
|
||||
}
|
||||
|
||||
fn ugh(&[bar]: &u32) {
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user