Update ui tests
This commit is contained in:
parent
f6481ed1c3
commit
0b97726e6c
5 changed files with 8 additions and 8 deletions
|
@ -4,5 +4,5 @@ fn main() {
|
||||||
let _: &[i32] = [0];
|
let _: &[i32] = [0];
|
||||||
//~^ ERROR mismatched types
|
//~^ ERROR mismatched types
|
||||||
//~| expected type `&[i32]`
|
//~| expected type `&[i32]`
|
||||||
//~| expected &[i32], found array of 1 elements
|
//~| expected &[i32], found array of 1 element
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0308]: mismatched types
|
||||||
LL | let _: &[i32] = [0];
|
LL | let _: &[i32] = [0];
|
||||||
| ^^^
|
| ^^^
|
||||||
| |
|
| |
|
||||||
| expected &[i32], found array of 1 elements
|
| expected &[i32], found array of 1 element
|
||||||
| help: consider borrowing here: `&[0]`
|
| help: consider borrowing here: `&[0]`
|
||||||
|
|
|
|
||||||
= note: expected type `&[i32]`
|
= note: expected type `&[i32]`
|
||||||
|
|
|
@ -9,6 +9,6 @@ fn main() {
|
||||||
//~^ ERROR mismatched types
|
//~^ ERROR mismatched types
|
||||||
//~| expected type `std::option::Option<&[&str]>`
|
//~| expected type `std::option::Option<&[&str]>`
|
||||||
//~| found type `std::option::Option<&[&str; 1]>`
|
//~| found type `std::option::Option<&[&str; 1]>`
|
||||||
//~| expected slice, found array of 1 elements
|
//~| expected slice, found array of 1 element
|
||||||
assert_eq!(msg, 3);
|
assert_eq!(msg, 3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
||||||
--> $DIR/issue-15783.rs:8:19
|
--> $DIR/issue-15783.rs:8:19
|
||||||
|
|
|
|
||||||
LL | let msg = foo(x);
|
LL | let msg = foo(x);
|
||||||
| ^ expected slice, found array of 1 elements
|
| ^ expected slice, found array of 1 element
|
||||||
|
|
|
|
||||||
= note: expected type `std::option::Option<&[&str]>`
|
= note: expected type `std::option::Option<&[&str]>`
|
||||||
found type `std::option::Option<&[&str; 1]>`
|
found type `std::option::Option<&[&str; 1]>`
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0529]: expected an array or slice, found `std::string::String`
|
||||||
LL | ['f', 'o', ..] => {}
|
LL | ['f', 'o', ..] => {}
|
||||||
| ^^^^^^^^^^^^^^ pattern cannot match with input type `std::string::String`
|
| ^^^^^^^^^^^^^^ pattern cannot match with input type `std::string::String`
|
||||||
|
|
||||||
error[E0527]: pattern requires 1 elements but array has 3
|
error[E0527]: pattern requires 1 element but array has 3
|
||||||
--> $DIR/match-vec-mismatch.rs:20:9
|
--> $DIR/match-vec-mismatch.rs:20:9
|
||||||
|
|
|
|
||||||
LL | [0] => {},
|
LL | [0] => {},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue