Skip to content

Commit 908d97d

Browse files
committed
Update test output
1 parent c94ba63 commit 908d97d

6 files changed

+59
-8
lines changed

src/test/ui/array-break-length.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
fn main() {
22
loop {
33
|_: [_; break]| {} //~ ERROR: `break` outside of loop
4+
//~^ ERROR mismatched types
45
}
56

67
loop {
78
|_: [_; continue]| {} //~ ERROR: `continue` outside of loop
9+
//~^ ERROR mismatched types
810
}
911
}

src/test/ui/array-break-length.stderr

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,30 @@ LL | |_: [_; break]| {}
55
| ^^^^^ cannot break outside of a loop
66

77
error[E0268]: `continue` outside of loop
8-
--> $DIR/array-break-length.rs:7:17
8+
--> $DIR/array-break-length.rs:8:17
99
|
1010
LL | |_: [_; continue]| {}
1111
| ^^^^^^^^ cannot break outside of a loop
1212

13-
error: aborting due to 2 previous errors
13+
error[E0308]: mismatched types
14+
--> $DIR/array-break-length.rs:3:9
15+
|
16+
LL | |_: [_; break]| {}
17+
| ^^^^^^^^^^^^^^^^^^ expected (), found closure
18+
|
19+
= note: expected type `()`
20+
found type `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
21+
22+
error[E0308]: mismatched types
23+
--> $DIR/array-break-length.rs:8:9
24+
|
25+
LL | |_: [_; continue]| {}
26+
| ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
27+
|
28+
= note: expected type `()`
29+
found type `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
30+
31+
error: aborting due to 4 previous errors
1432

15-
For more information about this error, try `rustc --explain E0268`.
33+
Some errors have detailed explanations: E0268, E0308.
34+
For more information about an error, try `rustc --explain E0268`.

src/test/ui/closures/closure-array-break-length.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ fn main() {
22
|_: [_; continue]| {}; //~ ERROR: `continue` outside of loop
33

44
while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of loop
5+
//~^ ERROR mismatched types
56

67
while |_: [_; break]| {} {} //~ ERROR: `break` outside of loop
8+
//~^ ERROR mismatched types
79
}

src/test/ui/closures/closure-array-break-length.stderr

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,30 @@ LL | while |_: [_; continue]| {} {}
1111
| ^^^^^^^^ cannot break outside of a loop
1212

1313
error[E0268]: `break` outside of loop
14-
--> $DIR/closure-array-break-length.rs:6:19
14+
--> $DIR/closure-array-break-length.rs:7:19
1515
|
1616
LL | while |_: [_; break]| {} {}
1717
| ^^^^^ cannot break outside of a loop
1818

19-
error: aborting due to 3 previous errors
19+
error[E0308]: mismatched types
20+
--> $DIR/closure-array-break-length.rs:4:11
21+
|
22+
LL | while |_: [_; continue]| {} {}
23+
| ^^^^^^^^^^^^^^^^^^^^^ expected bool, found closure
24+
|
25+
= note: expected type `bool`
26+
found type `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]`
27+
28+
error[E0308]: mismatched types
29+
--> $DIR/closure-array-break-length.rs:7:11
30+
|
31+
LL | while |_: [_; break]| {} {}
32+
| ^^^^^^^^^^^^^^^^^^ expected bool, found closure
33+
|
34+
= note: expected type `bool`
35+
found type `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]`
36+
37+
error: aborting due to 5 previous errors
2038

21-
For more information about this error, try `rustc --explain E0268`.
39+
Some errors have detailed explanations: E0268, E0308.
40+
For more information about an error, try `rustc --explain E0268`.

src/test/ui/type/type-dependent-def-issue-49241.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ fn main() {
33
const l: usize = v.count(); //~ ERROR attempt to use a non-constant value in a constant
44
let s: [u32; l] = v.into_iter().collect();
55
//~^ ERROR evaluation of constant value failed
6+
//~^^ ERROR a collection of type
67
}

src/test/ui/type/type-dependent-def-issue-49241.stderr

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ error[E0080]: evaluation of constant value failed
1010
LL | let s: [u32; l] = v.into_iter().collect();
1111
| ^ referenced constant has errors
1212

13-
error: aborting due to 2 previous errors
13+
error[E0277]: a collection of type `[u32; _]` cannot be built from an iterator over elements of type `{integer}`
14+
--> $DIR/type-dependent-def-issue-49241.rs:4:37
15+
|
16+
LL | let s: [u32; l] = v.into_iter().collect();
17+
| ^^^^^^^ a collection of type `[u32; _]` cannot be built from `std::iter::Iterator<Item={integer}>`
18+
|
19+
= help: the trait `std::iter::FromIterator<{integer}>` is not implemented for `[u32; _]`
20+
21+
error: aborting due to 3 previous errors
1422

15-
Some errors have detailed explanations: E0080, E0435.
23+
Some errors have detailed explanations: E0080, E0277, E0435.
1624
For more information about an error, try `rustc --explain E0080`.

0 commit comments

Comments
 (0)