granite-rust/tests
bors 2bf78d12d3 Auto merge of - petrochenkov:dialoc5, r=compiler-errors,cjgillot
macro_rules: Preserve all metavariable spans in a global side table

This PR preserves spans of `tt` metavariables used to pass tokens to declarative macros.
Such metavariable spans can then be used in span combination operations like `Span::to` to improve all kinds of diagnostics.

Spans of non-`tt` metavariables are currently kept in nonterminal tokens, but the long term plan is remove all nonterminal tokens from rustc parser and rely on the proc macro model with invisible delimiters (, ).
In particular, `NtIdent` nonterminal (corresponding to `ident` metavariables) becomes easy to remove when this PR lands ( does it).

The metavariable spans are kept in a global side table keyed by `Span`s of original tokens.
The alternative to the side table is keeping them in `SpanData` instead, but the performance regressions would be large because any spans from tokens passed to declarative macros would stop being inline and would work through span interner instead, and the penalty would be paid even if we never use the metavar span for the given original span.
(But also see the comment on `fn maybe_use_metavar_location` describing the map collision issues with the side table approach.)

There are also other alternatives - keeping the metavar span in `Token` or `TokenTree`, but associating it with `Span` itsel is the most natural choice because metavar spans are used in span combining operations, and those operations are not necessarily tied to tokens.
2024-02-18 20:51:16 +00:00
..
assembly Bless/fix tests 2024-02-08 19:56:30 -05:00
auxiliary
codegen Auto merge of - lukas-code:optimized-draining, r=the8472 2024-02-18 00:03:39 +00:00
codegen-units Update tests 2024-02-07 10:42:01 +08:00
coverage Update coverage-run tests 2024-02-18 20:51:45 +03:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo Update tests. 2024-01-27 16:38:57 +01:00
incremental Auto merge of - oli-obk:impl_polarity, r=compiler-errors 2024-02-13 02:48:49 +00:00
mir-opt Rollup merge of - cjgillot:gvn-adjust, r=compiler-errors 2024-02-14 11:53:41 +01:00
pretty Auto merge of - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
run-make Update data layouts in custom target tests for LLVM 18 2024-01-31 15:15:59 +01:00
run-make-fulldeps Make CodegenBackend::join_codegen infallible. 2024-02-17 10:51:35 +11:00
run-pass-valgrind
rustdoc Rollup merge of - ShoyuVanilla:fix-issue-76736, r=notriddle 2024-02-18 05:10:18 +01:00
rustdoc-gui Add regression test for to ensure that long crate name are handled as expected on mobile 2024-01-31 16:40:23 +01:00
rustdoc-js Rollup merge of - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-js-std Rollup merge of - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-json Add regression test for is_object_safe field on traits 2023-12-23 19:00:17 +01:00
rustdoc-ui Clean inlined type alias with correct param-env 2024-02-12 04:51:49 +00:00
ui Auto merge of - petrochenkov:dialoc5, r=compiler-errors,cjgillot 2024-02-18 20:51:16 +00:00
ui-fulldeps Rollup merge of - davidtwco:always-eager-diagnostics, r=nnethercote 2024-02-17 18:47:40 +01:00
COMPILER_TESTS.md