mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Update test output
This commit is contained in:
parent
c94ba6382d
commit
908d97d03c
@ -1,9 +1,11 @@
|
||||
fn main() {
|
||||
loop {
|
||||
|_: [_; break]| {} //~ ERROR: `break` outside of loop
|
||||
//~^ ERROR mismatched types
|
||||
}
|
||||
|
||||
loop {
|
||||
|_: [_; continue]| {} //~ ERROR: `continue` outside of loop
|
||||
//~^ ERROR mismatched types
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,30 @@ LL | |_: [_; break]| {}
|
||||
| ^^^^^ cannot break outside of a loop
|
||||
|
||||
error[E0268]: `continue` outside of loop
|
||||
--> $DIR/array-break-length.rs:7:17
|
||||
--> $DIR/array-break-length.rs:8:17
|
||||
|
|
||||
LL | |_: [_; continue]| {}
|
||||
| ^^^^^^^^ cannot break outside of a loop
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/array-break-length.rs:3:9
|
||||
|
|
||||
LL | |_: [_; break]| {}
|
||||
| ^^^^^^^^^^^^^^^^^^ expected (), found closure
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
|
||||
|
||||
For more information about this error, try `rustc --explain E0268`.
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/array-break-length.rs:8:9
|
||||
|
|
||||
LL | |_: [_; continue]| {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
|
||||
|
|
||||
= note: expected type `()`
|
||||
found type `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0268, E0308.
|
||||
For more information about an error, try `rustc --explain E0268`.
|
||||
|
@ -2,6 +2,8 @@ fn main() {
|
||||
|_: [_; continue]| {}; //~ ERROR: `continue` outside of loop
|
||||
|
||||
while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of loop
|
||||
//~^ ERROR mismatched types
|
||||
|
||||
while |_: [_; break]| {} {} //~ ERROR: `break` outside of loop
|
||||
//~^ ERROR mismatched types
|
||||
}
|
||||
|
@ -11,11 +11,30 @@ LL | while |_: [_; continue]| {} {}
|
||||
| ^^^^^^^^ cannot break outside of a loop
|
||||
|
||||
error[E0268]: `break` outside of loop
|
||||
--> $DIR/closure-array-break-length.rs:6:19
|
||||
--> $DIR/closure-array-break-length.rs:7:19
|
||||
|
|
||||
LL | while |_: [_; break]| {} {}
|
||||
| ^^^^^ cannot break outside of a loop
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/closure-array-break-length.rs:4:11
|
||||
|
|
||||
LL | while |_: [_; continue]| {} {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected bool, found closure
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found type `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]`
|
||||
|
||||
For more information about this error, try `rustc --explain E0268`.
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/closure-array-break-length.rs:7:11
|
||||
|
|
||||
LL | while |_: [_; break]| {} {}
|
||||
| ^^^^^^^^^^^^^^^^^^ expected bool, found closure
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found type `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0268, E0308.
|
||||
For more information about an error, try `rustc --explain E0268`.
|
||||
|
@ -3,4 +3,5 @@ fn main() {
|
||||
const l: usize = v.count(); //~ ERROR attempt to use a non-constant value in a constant
|
||||
let s: [u32; l] = v.into_iter().collect();
|
||||
//~^ ERROR evaluation of constant value failed
|
||||
//~^^ ERROR a collection of type
|
||||
}
|
||||
|
@ -10,7 +10,15 @@ error[E0080]: evaluation of constant value failed
|
||||
LL | let s: [u32; l] = v.into_iter().collect();
|
||||
| ^ referenced constant has errors
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0277]: a collection of type `[u32; _]` cannot be built from an iterator over elements of type `{integer}`
|
||||
--> $DIR/type-dependent-def-issue-49241.rs:4:37
|
||||
|
|
||||
LL | let s: [u32; l] = v.into_iter().collect();
|
||||
| ^^^^^^^ a collection of type `[u32; _]` cannot be built from `std::iter::Iterator<Item={integer}>`
|
||||
|
|
||||
= help: the trait `std::iter::FromIterator<{integer}>` is not implemented for `[u32; _]`
|
||||
|
||||
Some errors have detailed explanations: E0080, E0435.
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0080, E0277, E0435.
|
||||
For more information about an error, try `rustc --explain E0080`.
|
||||
|
Loading…
Reference in New Issue
Block a user