Skip to content

Commit 600a64b

Browse files
committed
more --blessing + test error annotations fixes
1 parent dd7082e commit 600a64b

6 files changed

+14
-14
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
fn main() {
22
loop {
3-
|_: [_; break]| {} //~ ERROR: `break` outside of loop
3+
|_: [_; break]| {} //~ ERROR: `break` outside of a loop
44
//~^ ERROR mismatched types
55
}
66

77
loop {
8-
|_: [_; continue]| {} //~ ERROR: `continue` outside of loop
8+
|_: [_; continue]| {} //~ ERROR: `continue` outside of a loop
99
//~^ ERROR mismatched types
1010
}
1111
}

src/test/ui/async-await/async-block-control-flow-static-semantics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ async fn return_targets_async_block_not_async_fn() -> u8 {
3030

3131
fn no_break_in_async_block() {
3232
async {
33-
break 0u8; //~ ERROR `break` inside of an async block
33+
break 0u8; //~ ERROR `break` inside of an `async` block
3434
};
3535
}
3636

3737
fn no_break_in_async_block_even_with_outer_loop() {
3838
loop {
3939
async {
40-
break 0u8; //~ ERROR `break` inside of an async block
40+
break 0u8; //~ ERROR `break` inside of an `async` block
4141
};
4242
}
4343
}

src/test/ui/async-await/async-block-control-flow-static-semantics.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0267]: `break` inside of an async block
1+
error[E0267]: `break` inside of an `async` block
22
--> $DIR/async-block-control-flow-static-semantics.rs:33:9
33
|
44
LL | async {
@@ -8,7 +8,7 @@ LL | | break 0u8;
88
LL | | };
99
| |_____- enclosing `async` block
1010

11-
error[E0267]: `break` inside of an async block
11+
error[E0267]: `break` inside of an `async` block
1212
--> $DIR/async-block-control-flow-static-semantics.rs:40:13
1313
|
1414
LL | async {

src/test/ui/break-outside-loop.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ fn cond() -> bool { true }
77
fn foo<F>(_: F) where F: FnOnce() {}
88

99
fn main() {
10-
let pth = break; //~ ERROR: `break` outside of loop
11-
if cond() { continue } //~ ERROR: `continue` outside of loop
10+
let pth = break; //~ ERROR: `break` outside of a loop
11+
if cond() { continue } //~ ERROR: `continue` outside of a loop
1212

1313
while cond() {
1414
if cond() { break }
@@ -21,5 +21,5 @@ fn main() {
2121

2222
let rs: Foo = Foo{t: pth};
2323

24-
let unconstrained = break; //~ ERROR: `break` outside of loop
24+
let unconstrained = break; //~ ERROR: `break` outside of a loop
2525
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
fn main() {
2-
|_: [_; continue]| {}; //~ ERROR: `continue` outside of loop
2+
|_: [_; continue]| {}; //~ ERROR: `continue` outside of a loop
33

4-
while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of loop
4+
while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of a loop
55
//~^ ERROR mismatched types
66

7-
while |_: [_; break]| {} {} //~ ERROR: `break` outside of loop
7+
while |_: [_; break]| {} {} //~ ERROR: `break` outside of a loop
88
//~^ ERROR mismatched types
99
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Make sure that a continue span actually contains the keyword.
22

33
fn main() {
4-
continue //~ ERROR `continue` outside of loop
4+
continue //~ ERROR `continue` outside of a loop
55
;
6-
break //~ ERROR `break` outside of loop
6+
break //~ ERROR `break` outside of a loop
77
;
88
}

0 commit comments

Comments
 (0)