rust/tests
Nicholas Nethercote 8d2c63f514 Don't use kw::Empty in hir::Lifetime::ident.
`hir::Lifetime::ident` currently sometimes uses `kw::Empty` for elided
lifetimes and sometimes uses `kw::UnderscoreLifetime`, and the
distinction is used when creating some error suggestions, e.g. in
`Lifetime::suggestion` and `ImplicitLifetimeFinder::visit_ty`. I found
this *really* confusing, and it took me a while to understand what was
going on.

This commit replaces all uses of `kw::Empty` in `hir::Lifetime::ident`
with `kw::UnderscoreLifetime`. It adds a new field
`hir::Lifetime::is_path_anon` that mostly replaces the old
empty/underscore distinction and makes things much clearer.

Some other notable changes:

- Adds a big comment to `Lifetime` talking about permissable field
  values.

- Adds some assertions in `new_named_lifetime` about what ident values
  are permissible for the different `LifetimeRes` values.

- Adds a `Lifetime::new` constructor that does some checking to make
  sure the `is_elided` and `is_anonymous` states are valid.

- `add_static_impl_trait_suggestion` now looks at `Lifetime::res`
  instead of the ident when creating the suggestion. This is the one
  case where `is_path_anon` doesn't replace the old empty/underscore
  distinction.

- A couple of minor pretty-printing improvements.
2025-03-28 10:15:23 +11:00
..
assembly Auto merge of #133984 - DaniPopes:scmp-ucmp, r=scottmcm 2025-03-24 22:53:12 +00:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Rollup merge of #138818 - khuey:138198, r=jieyouxu 2025-03-26 19:40:28 +11:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Add some more cases to tests/coverage/holes.rs 2025-02-19 13:56:20 +11:00
coverage-run-rustdoc
crashes Auto merge of #138719 - lcnr:concrete_opaque_types-closures, r=oli-obk 2025-03-22 06:55:52 +00:00
debuginfo Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee 2025-03-11 13:30:50 +01:00
incremental Rollup merge of #130883 - madsmtm:env-var-query, r=petrochenkov 2025-03-27 15:57:21 +11:00
mir-opt Rollup merge of #138135 - scottmcm:chaining-ord, r=Mark-Simulacrum 2025-03-23 20:44:09 -04:00
pretty Don't use kw::Empty in hir::Lifetime::ident. 2025-03-28 10:15:23 +11:00
run-make Rollup merge of #138652 - ferrocene:pa-remote-test-rmake, r=jieyouxu 2025-03-25 15:36:32 +09:00
rustdoc rustdoc: be more strict about "Methods from Deref" 2025-03-22 12:47:05 -05:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json rustdoc: Use own logic to print #[repr(..)] attributes in JSON output. 2025-03-22 18:47:12 +00:00
rustdoc-ui Rollup merge of #138877 - TaKO8Ki:enable-per-target-ignores-for-doctests, r=notriddle 2025-03-25 20:34:48 -04:00
ui Don't use kw::Empty in hir::Lifetime::ident. 2025-03-28 10:15:23 +11:00
ui-fulldeps Rollup merge of #138964 - compiler-errors:usage-of-interner, r=lcnr 2025-03-27 15:57:24 +11:00
COMPILER_TESTS.md