about summary refs log tree commit diff
path: root/compiler/rustc_index/src
AgeCommit message (Collapse)AuthorLines
2024-07-04Auto merge of #127170 - bjorn3:no_specialize_index_borrowck, r=michaelwoeristerbors-4/+1
Stop using specialization in rustc_index and rustc_borrowck For rustc_borrowck the version with specialization isn't much more readable anyway IMO. For rustc_index it probably doesn't affect perf in any noticeable way anyway.
2024-07-04Use `IndexVec` for coroutine local mappingLiu Dingming-0/+5
2024-06-30Remove usage of specialization from newtype_index!bjorn3-4/+1
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-1/+3
We already do this for a number of crates, e.g. `rustc_middle`, `rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`. For the ones we don't, in many cases the attributes are a mess. - There is no consistency about order of attribute kinds (e.g. `allow`/`deny`/`feature`). - Within attribute kind groups (e.g. the `feature` attributes), sometimes the order is alphabetical, and sometimes there is no particular order. - Sometimes the attributes of a particular kind aren't even grouped all together, e.g. there might be a `feature`, then an `allow`, then another `feature`. This commit extends the existing sorting to all compiler crates, increasing consistency. If any new attribute line is added there is now only one place it can go -- no need for arbitrary decisions. Exceptions: - `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`, because they have no crate attributes. - `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's ignored in `rustfmt.toml`).
2024-04-18Simplify `static_assert_size`s.Nicholas Nethercote-1/+1
We want to run them on all 64-bit platforms.
2024-04-03Check `x86_64` size assertions on `aarch64`, tooZalathar-1/+1
This makes it easier for contributors on aarch64 workstations (e.g. Macs) to notice when these assertions have been violated.
2024-03-06doc: Add better explanationorion GONZALEZ (contractor)-1/+18
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-27Auto merge of #120024 - Mark-Simulacrum:fast-union-merge, r=cjgillotbors-0/+6
Merge into larger interval set This reduces the work done while merging rows. In at least one case (#50450), we have thousands of union([range], [20,000 ranges]), which previously inserted each of the 20,000 ranges one by one. Now we only insert one range into the right hand set after copying the set over. This cuts the runtime of the test case in #50450 from ~26 seconds to ~6 seconds locally, though it doesn't change the memory usage peak (~9.5GB).
2024-01-26Rollup merge of #119800 - dev-ardi:tmp, r=wesleywiserMatthias Krüger-0/+7
Document `rustc_index::vec::IndexVec` Document a few of the methods. Part of https://github.com/rust-lang/rust/issues/93792.
2024-01-26Update compiler/rustc_index/src/vec.rsArdi-0/+1
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
2024-01-25Remove unused featuresclubby789-9/+2
2024-01-22Remove uses of HybridBitSet.Camille GILLOT-2/+2
2024-01-16Merge into larger interval setMark Rousskov-0/+6
This reduces the work done while merging rows. In at least one case (issue 50450), we have thousands of union([range], [20,000 ranges]), which previously inserted each of the 20,000 ranges one by one. Now we only insert one range into the right hand set after copying the set over.
2024-01-10Fix some mistakes + new docardi-6/+5
2024-01-10Oh wellardi-15/+3
2024-01-10Document the struct and a few methodsardi-0/+19
2024-01-06Auto merge of #119499 - cjgillot:dtm-opt, r=nnethercotebors-11/+5
Two small bitset optimisations
2024-01-02Reuse `bitwise` in BitMatrix.Camille GILLOT-11/+5
2023-12-31Avoid specialization for the Span Encodable and Decodable implsbjorn3-4/+4
2023-12-23Mention the relevant tracking issue next to my `bit_set` hackNadrieril-0/+2
2023-12-15Make `rustc_index::bit_set` available on stableNadrieril-12/+37
2023-11-22Replace `no_ord_impl` with `orderable`.Nicholas Nethercote-0/+1
Similar to the previous commit, this replaces `newtype_index`'s opt-out `no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-11-18Begin nightly-ifying rustc_type_irMichael Goulet-3/+2
2023-11-13Remove unnecessary annotation.Nicholas Nethercote-2/+0
2023-11-13Remove `IndexSlice::convert_index_type`.Nicholas Nethercote-4/+0
2023-11-13Remove `impl FiniteBitSetTy for {u64,u128}`.Nicholas Nethercote-48/+0
Only the impl for `u32` is used. These can be reinstated easily if needed in the future.
2023-11-13Remove `BitSet::to_hybrid`.Nicholas Nethercote-6/+0
2023-11-13Remove `BitSet::words`.Nicholas Nethercote-9/+4
2023-10-06Preserve DebugInfo in DeadStoreElimination.Camille GILLOT-1/+7
2023-08-24Auto merge of #115094 - Mark-Simulacrum:bootstrap-update, r=ozkanonurbors-1/+1
Update bootstrap compiler to 1.73.0 beta
2023-08-23Bump cfg(bootstrap)Mark Rousskov-1/+1
2023-08-22Convert it into a warningNilstrieb-1/+6
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2023-08-22Add disclaimer on size assertion macroNilstrieb-0/+7
Sometimes people are inspired by rustc to add size assertions to their code and copy the macro. This is bad because it causes hard build errors. rustc happens to be special where it makes this okay.
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-3/+1
2023-05-25Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearthbors-4/+4
Rollup of 5 pull requests Successful merges: - #111741 (Use `ObligationCtxt` in custom type ops) - #111840 (Expose more information in `get_body_with_borrowck_facts`) - #111876 (Roll compiler_builtins to 0.1.92) - #111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - #111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-4/+4
2023-05-19Leverage the interval property to precompute borrow kill points.Camille GILLOT-0/+24
2023-04-24Decorative changes to `IndexVec`Maybe Waffle-13/+12
2023-04-24`const`-ify some `{IndexVec, IndexSlice}` methodsMaybe Waffle-11/+11
2023-04-24move index code aroundMaybe Waffle-99/+100
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-297/+317
2023-04-18Don't allocate it `IndexVec::remove`Maybe Waffle-1/+1
2023-04-17Make `IndexVec::ensure_contains_elem` return a reference to the elementMaybe Waffle-9/+9
2023-04-09Fix some clippy::complexityNilstrieb-8/+5
2023-04-06Auto merge of #109915 - scottmcm:layout-indexvec, r=oli-obkbors-0/+43
Use `FieldIdx` in `FieldsShape` Finally got to the main motivating example from https://github.com/rust-lang/compiler-team/issues/606 :)
2023-04-04Use `FieldIdx` in `FieldsShape`Scott McMurray-0/+43
Finally got to the main motivating example from the MCP :)
2023-04-03Doc-comment `IndexVec::from_elem` and use it in a few more placesScott McMurray-0/+11
2023-04-02Use `&IndexSlice` instead of `&IndexVec` where possibleScott McMurray-2/+40
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.