rust/src/test
Nicholas Nethercote 99f5945f85 Overhaul MacArgs::Eq.
The value in `MacArgs::Eq` is currently represented as a `Token`.
Because of `TokenKind::Interpolated`, `Token` can be either a token or
an arbitrary AST fragment. In practice, a `MacArgs::Eq` starts out as a
literal or macro call AST fragment, and then is later lowered to a
literal token. But this is very non-obvious. `Token` is a much more
general type than what is needed.

This commit restricts things, by introducing a new type `MacArgsEqKind`
that is either an AST expression (pre-lowering) or an AST literal
(post-lowering). The downside is that the code is a bit more verbose in
a few places. The benefit is that makes it much clearer what the
possibilities are (though also shorter in some other places). Also, it
removes one use of `TokenKind::Interpolated`, taking us a step closer to
removing that variant, which will let us make `Token` impl `Copy` and
remove many "handle Interpolated" code paths in the parser.

Things to note:
- Error messages have improved. Messages like this:
  ```
  unexpected token: `"bug" + "found"`
  ```
  now say "unexpected expression", which makes more sense. Although
  arbitrary expressions can exist within tokens thanks to
  `TokenKind::Interpolated`, that's not obvious to anyone who doesn't
  know compiler internals.
- In `parse_mac_args_common`, we no longer need to collect tokens for
  the value expression.
2022-05-05 07:06:12 +10:00
..
assembly Rollup merge of #94703 - kjetilkjeka:nvptx-kernel-args-abi2, r=nagisa 2022-04-26 13:22:27 +02:00
auxiliary
codegen Rollup merge of #96215 - nikic:legacy-pm-removal, r=nagisa 2022-04-25 00:11:02 +02:00
codegen-units Collect panic/panic_bounds_check during monomorphization 2021-10-30 18:21:44 +01:00
debuginfo std: update debuginfo check to match type definition 2022-04-28 15:48:21 +02:00
incremental Bless incremental tests. 2022-04-23 09:59:27 +02:00
mir-opt Auto merge of #96116 - ouz-a:mir-opt, r=oli-obk 2022-04-25 19:34:52 +00:00
pretty Bless pretty-print output. 2022-04-23 23:03:18 +02:00
run-make Rollup merge of #96279 - GuillaumeGomez:remove-woff-fonts, r=camelid,jsha 2022-04-26 01:21:21 +02:00
run-make-fulldeps Auto merge of #95604 - nbdd0121:used2, r=petrochenkov 2022-04-25 16:14:54 +00:00
run-pass-valgrind
rustdoc Rollup merge of #96410 - notriddle:notriddle/issue-95873, r=GuillaumeGomez 2022-04-27 02:47:11 +02:00
rustdoc-gui * Greatly improve the rustdoc search parser source code 2022-04-18 20:59:08 +02:00
rustdoc-js Improve documentation and add some explanations in the code 2022-04-18 20:59:09 +02:00
rustdoc-js-std Update rustdoc search test to check ! 2022-04-26 20:57:46 +02:00
rustdoc-json rustdoc-json: Lifetime tests 2022-03-15 18:34:16 +00:00
rustdoc-ui rustdoc: Unindent doc fragments on Attributes construction 2022-04-21 16:13:02 +03:00
ui Overhaul MacArgs::Eq. 2022-05-05 07:06:12 +10:00
ui-fulldeps Auto merge of #95246 - ChrisDenton:command-args, r=joshtriplett 2022-04-25 07:28:09 +00:00
COMPILER_TESTS.md