Allocate HIR on an arena 4/4
This is the fourth and last PR in the series started by #66931, #66936 and #66942.
The last commits should compile on their own.
The difference with the previous PR is given by https://github.com/cjgillot/rust/compare/hirene-ty...hirene
A few more cleanups may be necessary, please tell me.
r? @eddyb like the other
cc @Zoxc
This extends the invalid cases we catch in const prop to include
overflowing integer casts using the same machinery as the overflowing
binary and unary operation logic.
Get rid of ErrorReportingCtx [5/N]
We can now use `MirBorrowckCtxt` instead :)
```
6 files changed, 122 insertions(+), 243 deletions(-)
```
This is a followup to (and thus blocked on) #67241.
r? @matthewjasper
cc @eddyb
I while try to do one more to get rid of the weird usage of `RegionInferenceCtx` in `borrow_check::diagnostics::{region_errors, region_naming}`. I think those uses can possibly also be refactored to use `MirBorrowckCtxt`...
Resolve long compile times when evaluating always valid constants
This extends the existing logic which skips validating every integer or
floating point number type to also skip validating empty structs because
they are also trivially valid.
Fixes#67539
r? @oli-obk
cc @RalfJung @spastorino
Rollup of 10 pull requests
Successful merges:
- #64273 (Stabilize attribute macros on inline modules)
- #67287 (typeck: note other end-point when checking range pats)
- #67564 (docs: Iterator adapters have unspecified results after a panic)
- #67622 (Some keyword documentation.)
- #67657 (Clean up const-hack PRs now that const if / match exist.)
- #67677 (resolve: Minor cleanup of duplicate macro reexports)
- #67687 (Do not ICE on lifetime error involving closures)
- #67698 (Move reachable_set and diagnostic_items to librustc_passes.)
- #67701 (tidy: Enforce formatting rather than just check it if `--bless` is specified)
- #67715 (Typo fix)
Failed merges:
r? @ghost
tidy: Enforce formatting rather than just check it if `--bless` is specified
Ensuring the "tidy"-ness currently requires running `rustfmt` twice:
```sh
./x.py fmt && ./x.py test tidy
```
, once to actually format code and the second time as a part of tidy to check that the code is formatted.
Running `rustfmt` is slow, so we don't want to run it twice.
With this PR tidy enforces the formatting rather than just checks it if `--bless` was passed to it:
```sh
./x.py test tidy --bless
```
r? @Mark-Simulacrum