os-rust/tests
bors fec98b3bbc Auto merge of #125468 - BoxyUwU:remove_defid_from_regionparam, r=compiler-errors
Remove `DefId` from `EarlyParamRegion`

Currently we represent usages of `Region` parameters via the `ReEarlyParam` or `ReLateParam` variants. The `ReEarlyParam` is effectively equivalent to `TyKind::Param` and `ConstKind::Param` (i.e. it stores a `Symbol` and a `u32` index) however it also stores a `DefId` for the definition of the lifetime parameter.

This was used in roughly two places:
- Borrowck diagnostics instead of threading the appropriate `body_id` down to relevant locations. Interestingly there were already some places that had to pass down a `DefId` manually.
- Some opaque type checking logic was using the `DefId` field to track captured lifetimes

I've split this PR up into a commit for generate rote changes to diagnostics code to pass around a `DefId` manually everywhere, and another commit for the opaque type related changes which likely require more careful review as they might change the semantics of lints/errors.

Instead of manually passing the `DefId` around everywhere I previously tried to bundle it in with `TypeErrCtxt` but ran into issues with some call sites of `infcx.err_ctxt` being unable to provide a `DefId`, particularly places involved with trait solving and normalization. It might be worth investigating adding some new wrapper type to pass this around everywhere but I think this might be acceptable for now.

This pr also has the effect of reducing the size of `EarlyParamRegion` from 16 bytes -> 8 bytes. I wouldn't expect this to have any direct performance improvement however, other variants of `RegionKind` over `8` bytes are all because they contain a `BoundRegionKind` which is, as far as I know, mostly there for diagnostics. If we're ever able to remove this it would shrink the `RegionKind` type from `24` bytes to `12` (and with clever bit packing we might be able to get it to `8` bytes). I am curious what the performance impact would be of removing interning of `Region`'s if we ever manage to shrink `RegionKind` that much.

Sidenote: by removing the `DefId` the `Debug` output for `Region` has gotten significantly nicer. As an example see this opaque type debug print before vs after this PR:
`Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a)_'a/#0, T, DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a)_'a/#0])`
`Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), ['a/#0, T, 'a/#0])`

r? `@compiler-errors` (I would like someone who understands the opaque type setup to atleast review the type system commit, but the rest is likely reviewable by anyone)
2024-05-27 06:36:57 +00:00
..
assembly test: Add assembly tests for x86_64-unknown-linux-none target 2024-05-12 01:25:11 +02:00
auxiliary Clean up users of rust_dbg_call 2024-04-17 15:08:08 -04:00
codegen Rollup merge of #125222 - Oneirical:fifth, r=jieyouxu 2024-05-23 07:41:18 +02:00
codegen-units Fix some minor issues from the ui-test auto-porting 2024-05-11 19:58:35 -04:00
coverage coverage: Simplify counter expressions using simple algebra 2024-05-14 13:58:40 +10:00
coverage-run-rustdoc
crashes Rollup merge of #125451 - oli-obk:const_type_mismatch, r=compiler-errors 2024-05-25 12:54:34 +02:00
debuginfo Fix tests/debuginfo/strings-and-strs. 2024-05-20 15:01:59 +10:00
incremental Update tests/incremental/foreign.rs 2024-05-20 11:13:10 -04:00
mir-opt Rollup merge of #125559 - scottmcm:simplify-shift-ubcheck, r=workingjubilee 2024-05-26 15:28:28 -07:00
pretty Move the checks for Arguments constructors to inline const 2024-05-24 21:09:15 -04:00
run-make Auto merge of #125518 - saethlin:check-arguments-new-in-const, r=joboet 2024-05-26 01:10:39 +00:00
run-make-fulldeps Soft-destabilize RustcEncodable/RustcDecodable 2024-03-22 13:24:35 -07:00
run-pass-valgrind Add test for Apple's -weak_framework linker argument 2024-03-18 23:27:34 +01:00
rustdoc Move tests into appropriate subdirectories 2024-05-21 21:21:26 -07:00
rustdoc-gui Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomez 2024-05-07 18:12:54 +02:00
rustdoc-js rustdoc-search: add parser for & syntax 2024-04-19 14:31:21 -07:00
rustdoc-js-std rustdoc-search: add parser for & syntax 2024-04-19 14:31:21 -07:00
rustdoc-json rustdoc-json: Add test for keywords with --document-private-items 2024-05-24 16:40:20 +00:00
rustdoc-ui Move tests into appropriate subdirectories 2024-05-21 21:21:26 -07:00
ui Auto merge of #125468 - BoxyUwU:remove_defid_from_regionparam, r=compiler-errors 2024-05-27 06:36:57 +00:00
ui-fulldeps Add conversion from IntrinsicDef to FnDef 2024-05-23 15:35:18 +00:00
COMPILER_TESTS.md