rust/tests
bors de6d33c033 Auto merge of #151550 - petrochenkov:packhyg2, r=nnethercote
resolve: Replace `Macros20NormalizedIdent` with `IdentKey`

This is a continuation of https://github.com/rust-lang/rust/pull/150741 and https://github.com/rust-lang/rust/pull/150982 based on the ideas from https://github.com/rust-lang/rust/pull/151491#issuecomment-3784421866.

Before this PR `Macros20NormalizedIdent` was used as a key in various "identifier -> its resolution" maps in `rustc_resolve`.
`Macros20NormalizedIdent` is a newtype around `Ident` in which `SyntaxContext` (packed inside `Span`) is guaranteed to be normalized using `normalize_to_macros_2_0`.
This type is also used in a number of functions looking up identifiers in those maps.
`Macros20NormalizedIdent` still contains span locations, which are useless and ignored during hash map lookups and comparisons due to `Ident`'s special `PartialEq` and `Hash` impls.

This PR replaces `Macros20NormalizedIdent` with a new type called `IdentKey`, which contains only a symbol and a normalized unpacked syntax context. (E.g. `IdentKey` == `Macros20NormalizedIdent` minus span locations.)
So we avoid keeping additional data and doing some syntax context packing/unpacking.

Along with `IdentKey` you can often see `orig_ident_span: Span` being passed around.
This is an unnormalized span of the original `Ident` from which `IdentKey` was obtained.
It is not used in map keys, but it is used in a number of other scenarios:
- diagnostics
- edition checks
- `allow_unstable` checks

This is because `normalize_to_macros_2_0` normalization is lossy and the normalized spans / syntax contexts no longer contain parts of macro backtraces, while the original span contains everything.
2026-01-28 18:31:51 +00:00
..
assembly-llvm Adjust loongarch assembly test 2026-01-27 12:09:39 +01:00
auxiliary Rollup merge of #150368 - minicore-ordering, r=workingjubilee 2026-01-11 09:56:38 +01:00
build-std/configurations Test that -Zbuild-std=core works on a variety of profiles 2026-01-14 20:39:12 -05:00
codegen-llvm Rollup merge of #150893 - ZuseZ4:move-un-register-lib, r=oli-obk 2026-01-28 19:03:51 +11:00
codegen-units address review comments; fix CI 2026-01-01 19:17:11 -05:00
coverage Rollup merge of #147611 - stablize-remap-path-scope, r=davidtwco 2026-01-20 14:36:30 +01:00
coverage-run-rustdoc
crashes Auto merge of #150843 - fmease:dyn-ace, r=BoxyUwU 2026-01-22 01:56:41 +00:00
debuginfo Auto merge of #150843 - fmease:dyn-ace, r=BoxyUwU 2026-01-22 01:56:41 +00:00
incremental Implement incremental caching for derive macro expansions 2026-01-16 07:36:36 +01:00
mir-opt Auto merge of #150945 - scottmcm:tweak-slice-partial-eq, r=Mark-Simulacrum 2026-01-28 14:31:41 +00:00
pretty Update uitests 2026-01-19 21:50:29 +01:00
run-make Add support for trait object types in type_info reflection 2026-01-27 19:49:09 -04:00
run-make-cargo tests/run-make-cargo/same-crate-name-and-macro-name: New regression test 2025-12-17 11:21:27 +01:00
rustdoc-gui Try to reduce rustdoc GUI tests flakyness 2026-01-26 16:18:36 +01:00
rustdoc-html rustdoc: render doc(hidden) as a code attribute 2026-01-22 09:15:53 +09:00
rustdoc-js Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar 2025-11-27 07:30:25 +00:00
rustdoc-js-std Explicitly export core and std macros 2026-01-13 08:47:48 +01:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
ui Auto merge of #151550 - petrochenkov:packhyg2, r=nnethercote 2026-01-28 18:31:51 +00:00
ui-fulldeps Update stderrs 2026-01-27 17:11:47 +01:00
COMPILER_TESTS.md