while desugars to loop so 'a: while break 'a {} in ctfe doesn't work yet.
This commit is contained in:
parent
4edfa6d4c9
commit
7d1cd41be3
@ -4,7 +4,6 @@
|
||||
// See https://github.com/rust-lang/rust/issues/51350 for more information.
|
||||
|
||||
const CRASH: () = 'a: while break 'a {};
|
||||
//~^ ERROR constant contains unimplemented expression type
|
||||
|
||||
fn main() {
|
||||
println!("{:?}", CRASH);
|
||||
}
|
||||
fn main() {}
|
9
src/test/ui/consts/const-labeled-break.stderr
Normal file
9
src/test/ui/consts/const-labeled-break.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error[E0019]: constant contains unimplemented expression type
|
||||
--> $DIR/const-labeled-break.rs:6:19
|
||||
|
|
||||
LL | const CRASH: () = 'a: while break 'a {};
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0019`.
|
Loading…
x
Reference in New Issue
Block a user