The part about zero-sized structures is totally wrong. The rest of
it has almost no explanatory value; there are better explanations in
comments elsewhere.
Introduce `MixedBitSet`
`ChunkedBitSet` is good at avoiding excessive memory usage for programs with very large functgions where dataflow bitsets have very large domain sizes. But it's overly heavyweight for small bitsets, because any non-empty `ChunkedBitSet` takes up at least 256 bytes.
This PR introduces `MixedBitSet`, which is a simple bitset that uses `BitSet` for small/medium bitsets and `ChunkedBitSet` for large bitsets. It's a speed and memory usage win.
r? `@Mark-Simulacrum`
Remove ignored tests for hangs w/ new solver
As asked on zulip [here](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/needs_help.3A.20look.20through.20compare-mode.20hangs).
As far as I can tell there are no more UI tests that hang anymore, so this removes the ignore directives for the compare mode.
(As I was using `--compare-mode new-solver` and that failed in an obscure way without any info about what to do, I've also fixed its error handling in `compiletest`: it didn't show the invalid `--compare-mode`, nor the valid values one can pass).
r? lcnr
Fix some triagebot mentions paths
This fixes some mentions paths in `triagebot.toml` that are no longer valid.
* rustdoc themes were merged into rustdoc.css (which already has a mention, and unfortunately can't independently mention the ayu theme). https://github.com/rust-lang/rust/pull/115829 cc `@GuillaumeGomez` `@Cldfire`
* The entry for `inspect_obligations.rs` was never correct, from https://github.com/rust-lang/rust/pull/122385. cc `@lcnr` `@compiler-errors`
* The entry for `need_type_info.rs` was moved in https://github.com/rust-lang/rust/pull/127501
A bunch of cleanups
These are all extracted from a branch I have to get rid of driver queries. Most of the commits are not directly necessary for this, but were found in the process of implementing the removal of driver queries.
Previous PR: https://github.com/rust-lang/rust/pull/132410
A `ChunkedBitSet` has to be at least 2048 bits for it to outperform a
`BitSet`, because that's the chunk size. The largest `SparseBitMatrix`
encountered when compiling the compiler and the entire rustc-perf
benchmark suite is less than 600 bits.
This change is a tiny perf win, but the motivation is more about
avoiding uses of `ChunkedBitSet` outside of `MixedBitSet`.
The test change is necessary to avoid hitting the `<BitSet<T> as
BitRelations<ChunkedBitSet<T>>>::subtract` method that has
`unimplemented!` in its body and isn't otherwise used.
Don't use a SyntheticProvider for literally every type
Replaces a glob regex with individualized imports for each standard library type. This improves debugger performance by quite a bit when populating lots of values with lots of fields
With the glob, afaik every single value of every single type that the debugger renders is run through a python function that does quite a few string comparisons (i plan to fix those next) to determine the SyntheticProvider to use. It looks like DefaultSyntheticProvider's functions internally call the liblldb c++ functions, which ends up with identical behavior to not using a SyntheticProvider at all, except you have extra python round trips slowing things down.
These sample vidoes were run on x86-64-pc-windows-gnu. `vect` is a 1000 element `Vec<Big>`, `Big` contains a dozen or so `Small`, and `Small` contains a dozen or so `[i32; 5]`
Before:
https://github.com/user-attachments/assets/07c31fe7-e126-4c2e-8ae9-cfe36e351d3f
After:
https://github.com/user-attachments/assets/6c0d1a45-1ffe-46de-95a0-5dbe59a173b5
---
try-job: aarch64-apple
Advent of `tests/ui` (misc cleanups and improvements) [2/N]
Part of #133895.
Misc improvements to some ui tests immediately under `tests/ui/`.
Best reviewed commit-by-commit. Please see individual commit messages for some further rationale and change summaries.
r? compiler
Remove unnecessary `int_type_width_signed` function
This can just use `Ty::int_size_and_signed` instead of making its own version.
You might want to look at this [ignoring whitespace](https://github.com/rust-lang/rust/pull/134020/files?w=1) since a huge bunch of code got un-indented.
Adds new intrinsic declaration
This pr is for #132735 removes removes `extern "intrinsic"`
I think its the last block of this file and was kind of asking for advice how to handle other files as mentioned in the issue .
Fix: typo in E0751 error explanation
Corrected a grammatical error in the explanation for E0751. Changed "exists" to "exist" to improve clarity and ensure proper grammar in the error message.
Rollup of 7 pull requests
Successful merges:
- #131669 (lint: change help for pointers to dyn types in FFI)
- #133104 (crashes: add test for #131451)
- #133767 (Add more info on type/trait mismatches for different crate versions)
- #133861 (Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…)
- #133976 (Removed Unnecessary Spaces From RELEASES.md)
- #133987 (Define acronym for thread local storage)
- #133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`)
r? `@ghost`
`@rustbot` modify labels: rollup
Actually walk into lifetimes and attrs in `EarlyContextAndPass`
Visitors that don't also call `walk_*` are kinda a footgun...
I believe all the other early lint functions walk into their types correctly at this point.