diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-06 03:43:59 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-10 08:35:23 +0100 |
| commit | e72df7edadcc2ff3fba93b1a0a2e321dc45f8d65 (patch) | |
| tree | 9aa69df086f2ee9618e7044a0156298fa5f8868e /src/test/ui/parser | |
| parent | fe848b44feb5078f4f5c81bca0b61a29f71b6ef2 (diff) | |
| download | rust-e72df7edadcc2ff3fba93b1a0a2e321dc45f8d65.tar.gz rust-e72df7edadcc2ff3fba93b1a0a2e321dc45f8d65.zip | |
parse_labeled_expr: add a suggestion on missing colon.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/labeled-no-colon-expr.stderr | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/test/ui/parser/labeled-no-colon-expr.stderr b/src/test/ui/parser/labeled-no-colon-expr.stderr index 8a9e2b32400..a69532555d4 100644 --- a/src/test/ui/parser/labeled-no-colon-expr.stderr +++ b/src/test/ui/parser/labeled-no-colon-expr.stderr @@ -2,32 +2,36 @@ error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:4:5 | LL | 'l0 while false {} - | ---^^^^^^^^^^^^^^^ - | | + | ----^^^^^^^^^^^^^^ + | | | + | | help: add `:` after the label | the label error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:5:5 | LL | 'l1 for _ in 0..1 {} - | ---^^^^^^^^^^^^^^^^^ - | | + | ----^^^^^^^^^^^^^^^^ + | | | + | | help: add `:` after the label | the label error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:6:5 | LL | 'l2 loop {} - | ---^^^^^^^^ - | | + | ----^^^^^^^ + | | | + | | help: add `:` after the label | the label error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:7:5 | LL | 'l3 {} - | ---^^^ - | | + | ----^^ + | | | + | | help: add `:` after the label | the label error: expected `while`, `for`, `loop` or `{` after a label @@ -40,8 +44,9 @@ error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:8:9 | LL | 'l4 0; - | --- ^ - | | + | ----^ + | | | + | | help: add `:` after the label | the label error: cannot use a `block` macro fragment here @@ -61,7 +66,9 @@ error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:16:8 | LL | 'l5 $b; - | --- the label + | ---- help: add `:` after the label + | | + | the label ... LL | m!({}); | ^^ |
