rust/compiler/rustc_ast/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
..
ast mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
attr Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00
expand Make allocator_kind a query. 2021-06-20 11:52:51 +02:00
util Handle let-else initializer edge case errors 2021-08-30 20:18:42 -05:00
ast_like.rs parser: Ensure that all nonterminals have tokens after parsing 2021-06-06 14:21:12 +03:00
ast.rs Auto merge of #88598 - estebank:type-ascription-can-die-in-a-fire, r=wesleywiser 2021-09-04 01:40:36 +00:00
entry.rs Fix ICE when main is declared in an extern block 2021-06-09 23:14:02 -04:00
lib.rs Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00
mut_visit.rs Auto merge of #88598 - estebank:type-ascription-can-die-in-a-fire, r=wesleywiser 2021-09-04 01:40:36 +00:00
node_id.rs Use LocalExpnId where possible. 2021-07-17 19:41:02 +02:00
ptr.rs Remove box syntax from rustc_ast 2021-08-18 09:25:26 +02:00
token.rs Fix formatting 2021-09-04 22:38:39 -04:00
tokenstream.rs don't clone attrs 2021-05-30 22:44:40 +03:00
visit.rs Add let-else to AST 2021-08-30 20:17:45 -05:00