diff options
Diffstat (limited to 'src/test/ui/label')
8 files changed, 17 insertions, 14 deletions
diff --git a/src/test/ui/label/label_break_value_continue.rs b/src/test/ui/label/label_break_value_continue.rs index e0deb30c9..22172f4fd 100644 --- a/src/test/ui/label/label_break_value_continue.rs +++ b/src/test/ui/label/label_break_value_continue.rs @@ -1,4 +1,3 @@ -#![feature(label_break_value)] #![allow(unused_labels)] // Simple continue pointing to an unlabeled break should yield in an error diff --git a/src/test/ui/label/label_break_value_continue.stderr b/src/test/ui/label/label_break_value_continue.stderr index 9b8693dc5..284d213d6 100644 --- a/src/test/ui/label/label_break_value_continue.stderr +++ b/src/test/ui/label/label_break_value_continue.stderr @@ -1,11 +1,11 @@ error[E0695]: unlabeled `continue` inside of a labeled block - --> $DIR/label_break_value_continue.rs:7:9 + --> $DIR/label_break_value_continue.rs:6:9 | LL | continue; | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label error[E0696]: `continue` pointing to a labeled block - --> $DIR/label_break_value_continue.rs:14:9 + --> $DIR/label_break_value_continue.rs:13:9 | LL | / 'b: { LL | | continue 'b; @@ -14,7 +14,7 @@ LL | | } | |_____- labeled block the `continue` points to error[E0695]: unlabeled `continue` inside of a labeled block - --> $DIR/label_break_value_continue.rs:22:13 + --> $DIR/label_break_value_continue.rs:21:13 | LL | continue; | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label diff --git a/src/test/ui/label/label_break_value_desugared_break.rs b/src/test/ui/label/label_break_value_desugared_break.rs index de883b611..70227d869 100644 --- a/src/test/ui/label/label_break_value_desugared_break.rs +++ b/src/test/ui/label/label_break_value_desugared_break.rs @@ -1,5 +1,5 @@ // compile-flags: --edition 2018 -#![feature(label_break_value, try_blocks)] +#![feature(try_blocks)] // run-pass fn main() { @@ -9,4 +9,11 @@ fn main() { break 'foo; } }; + + 'foo: { + let _: Result<(), ()> = try { + Err(())?; + break 'foo; + }; + } } diff --git a/src/test/ui/label/label_break_value_illegal_uses.fixed b/src/test/ui/label/label_break_value_illegal_uses.fixed index c1d2023a2..fb75276b4 100644 --- a/src/test/ui/label/label_break_value_illegal_uses.fixed +++ b/src/test/ui/label/label_break_value_illegal_uses.fixed @@ -1,5 +1,4 @@ // run-rustfix -#![feature(label_break_value)] // These are forbidden occurrences of label-break-value diff --git a/src/test/ui/label/label_break_value_illegal_uses.rs b/src/test/ui/label/label_break_value_illegal_uses.rs index 5b20c95e5..3cbf41380 100644 --- a/src/test/ui/label/label_break_value_illegal_uses.rs +++ b/src/test/ui/label/label_break_value_illegal_uses.rs @@ -1,5 +1,4 @@ // run-rustfix -#![feature(label_break_value)] // These are forbidden occurrences of label-break-value diff --git a/src/test/ui/label/label_break_value_illegal_uses.stderr b/src/test/ui/label/label_break_value_illegal_uses.stderr index 24b733fec..15016ffd5 100644 --- a/src/test/ui/label/label_break_value_illegal_uses.stderr +++ b/src/test/ui/label/label_break_value_illegal_uses.stderr @@ -1,23 +1,23 @@ error: block label not supported here - --> $DIR/label_break_value_illegal_uses.rs:8:12 + --> $DIR/label_break_value_illegal_uses.rs:7:12 | LL | unsafe 'b: {} | ^^^ not supported here error: block label not supported here - --> $DIR/label_break_value_illegal_uses.rs:12:13 + --> $DIR/label_break_value_illegal_uses.rs:11:13 | LL | if true 'b: {} | ^^^ not supported here error: block label not supported here - --> $DIR/label_break_value_illegal_uses.rs:16:21 + --> $DIR/label_break_value_illegal_uses.rs:15:21 | LL | if true {} else 'b: {} | ^^^ not supported here error: block label not supported here - --> $DIR/label_break_value_illegal_uses.rs:20:17 + --> $DIR/label_break_value_illegal_uses.rs:19:17 | LL | match false 'b: { | ^^^ not supported here diff --git a/src/test/ui/label/label_break_value_unlabeled_break.rs b/src/test/ui/label/label_break_value_unlabeled_break.rs index fa0c70edc..2a4f5d574 100644 --- a/src/test/ui/label/label_break_value_unlabeled_break.rs +++ b/src/test/ui/label/label_break_value_unlabeled_break.rs @@ -1,4 +1,3 @@ -#![feature(label_break_value)] #![allow(unused_labels)] // Simple unlabeled break should yield in an error diff --git a/src/test/ui/label/label_break_value_unlabeled_break.stderr b/src/test/ui/label/label_break_value_unlabeled_break.stderr index 0c4f573d2..a2ccd27b8 100644 --- a/src/test/ui/label/label_break_value_unlabeled_break.stderr +++ b/src/test/ui/label/label_break_value_unlabeled_break.stderr @@ -1,11 +1,11 @@ error[E0695]: unlabeled `break` inside of a labeled block - --> $DIR/label_break_value_unlabeled_break.rs:7:9 + --> $DIR/label_break_value_unlabeled_break.rs:6:9 | LL | break; | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label error[E0695]: unlabeled `break` inside of a labeled block - --> $DIR/label_break_value_unlabeled_break.rs:15:13 + --> $DIR/label_break_value_unlabeled_break.rs:14:13 | LL | break; | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label |