1
Fork 0
rust/compiler/rustc_parse/src
Jack Huey 77ac329a08
Rollup merge of #88553 - theo-lw:issue-88276, r=estebank
Improve diagnostics for unary plus operators (#88276)

This pull request improves the diagnostics emitted on parsing a unary plus operator. See #88276.

Before:

```
error: expected expression, found `+`
 --> src/main.rs:2:13
  |
2 |     let x = +1;
  |             ^ expected expression
```

After:

```
error: leading `+` is not supported
 --> main.rs:2:13
  |
2 |     let x = +1;
  |             ^
  |             |
  |             unexpected `+`
  |             help: try removing the `+`
```
2021-09-08 12:24:16 -04:00
..
lexer Warn when an escaped newline skips multiple lines 2021-08-11 11:35:08 +02:00
parser Rollup merge of #88553 - theo-lw:issue-88276, r=estebank 2021-09-08 12:24:16 -04:00
lib.rs Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix. 2021-08-27 11:50:44 +02:00
validate_attr.rs Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00