Skip to content

Commit 0b97726

Browse files
committed
Update ui tests
1 parent f6481ed commit 0b97726

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/test/ui/coercion/coercion-slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ fn main() {
44
let _: &[i32] = [0];
55
//~^ ERROR mismatched types
66
//~| expected type `&[i32]`
7-
//~| expected &[i32], found array of 1 elements
7+
//~| expected &[i32], found array of 1 element
88
}

src/test/ui/coercion/coercion-slice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
44
LL | let _: &[i32] = [0];
55
| ^^^
66
| |
7-
| expected &[i32], found array of 1 elements
7+
| expected &[i32], found array of 1 element
88
| help: consider borrowing here: `&[0]`
99
|
1010
= note: expected type `&[i32]`

src/test/ui/issues/issue-15783.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ fn main() {
66
let name = "Foo";
77
let x = Some(&[name]);
88
let msg = foo(x);
9-
//~^ ERROR mismatched types
10-
//~| expected type `std::option::Option<&[&str]>`
11-
//~| found type `std::option::Option<&[&str; 1]>`
12-
//~| expected slice, found array of 1 elements
9+
//~^ ERROR mismatched types
10+
//~| expected type `std::option::Option<&[&str]>`
11+
//~| found type `std::option::Option<&[&str; 1]>`
12+
//~| expected slice, found array of 1 element
1313
assert_eq!(msg, 3);
1414
}

src/test/ui/issues/issue-15783.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-15783.rs:8:19
33
|
44
LL | let msg = foo(x);
5-
| ^ expected slice, found array of 1 elements
5+
| ^ expected slice, found array of 1 element
66
|
77
= note: expected type `std::option::Option<&[&str]>`
88
found type `std::option::Option<&[&str; 1]>`

src/test/ui/match/match-vec-mismatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0529]: expected an array or slice, found `std::string::String`
1010
LL | ['f', 'o', ..] => {}
1111
| ^^^^^^^^^^^^^^ pattern cannot match with input type `std::string::String`
1212

13-
error[E0527]: pattern requires 1 elements but array has 3
13+
error[E0527]: pattern requires 1 element but array has 3
1414
--> $DIR/match-vec-mismatch.rs:20:9
1515
|
1616
LL | [0] => {},

0 commit comments

Comments
 (0)