about summary refs log tree commit diff
path: root/compiler/rustc_data_structures
AgeCommit message (Collapse)AuthorLines
2023-01-17Lazy dominator tree construction in borrowckTomasz Miąsko-4/+0
Motivated by the observation that sometimes constructed dominator tree was never queried.
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-3/+3
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-3/+3
2023-01-17`rustc_data_structures`: remove `ref` patterns and other artifacts of the pastMaybe Waffle-24/+22
2023-01-16Document wf constraints on control flow in cleanup blocksJakob Degen-1/+4
Also fixes a bug in dominator computation
2023-01-12Harden the pre-tyctxt query system against accidental recomputationOli Scherer-0/+5
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-18/+15
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2023-01-02Reduce HIR debug outputNilstrieb-1/+8
HIR debug output is currently very verbose, especially when used with the alternate (`#`) flag. This commit reduces the amount of noisy newlines by forcing a few small key types to stay on one line, which makes the output easier to read and scroll by. ``` $ rustc +after hello_world.rs -Zunpretty=hir-tree | wc -l 582 $ rustc +before hello_world.rs -Zunpretty=hir-tree | wc -l 932 ```
2022-12-25fix some typosKaDiWa-1/+1
2022-12-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-11/+8
rustc: Remove needless lifetimes
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-11/+8
2022-12-20Bump `cfg-if` to `1.0`Chris Denton-2/+6
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-1/+1
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-15more clippy::complexity fixesMatthias Krüger-4/+4
2022-12-12minor code cleanupsMatthias Krüger-1/+1
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-20/+5
2022-12-06Rollup merge of #104898 - oli-obk:group_all_the_things, r=wesleywiserMatthias Krüger-83/+0
Put all cached values into a central struct instead of just the stable hash cc `@nnethercote` this allows re-use of the type for Predicate without duplicating all the logic for the non-hash cached fields
2022-12-06Auto merge of #105175 - michaelwoerister:add-stable-ord-trait, r=nagisabors-33/+79
Add StableOrd trait as proposed in MCP 533. The `StableOrd` trait can be used to mark types as having a stable sort order across compilation sessions. Collections that sort their items in a stable way can safely implement HashStable by hashing items in sort order. See https://github.com/rust-lang/compiler-team/issues/533 for more information.
2022-12-05StableOrd: Address review comments.Michael Woerister-19/+19
2022-12-03Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgrbors-24/+24
Rollup of 9 pull requests Successful merges: - #104199 (Keep track of the start of the argument block of a closure) - #105050 (Remove useless borrows and derefs) - #105153 (Create a hacky fail-fast mode that stops tests at the first failure) - #105164 (Restore `use` suggestion for `dyn` method call requiring `Sized`) - #105193 (Disable coverage instrumentation for naked functions) - #105200 (Remove useless filter in unused extern crate check.) - #105201 (Do not call fn_sig on non-functions.) - #105208 (Add AmbiguityError for inconsistent resolution for an import) - #105214 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-03Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514Matthias Krüger-24/+24
Remove useless borrows and derefs They are nothing more than noise. <sub>These are not all of them, but my clippy started crashing (stack overflow), so rip :(</sub>
2022-12-03Auto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiserbors-0/+6
Rewrite LLVM's archive writer in Rust This allows it to be used by other codegen backends. Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155
2022-12-02Add StableOrd trait as proposed in MCP 533.Michael Woerister-34/+80
The StableOrd trait can be used to mark types as having a stable sort order across compilation sessions. Collections that sort their items in a stable way can safely implement HashStable by hashing items in sort order.
2022-12-01`rustc_data_structures` deref in a more humane wayMaybe Waffle-12/+12
2022-12-01Remove useless borrows and derefsMaybe Waffle-12/+12
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-1/+1
2022-11-30move WithCachedTypeInfo to rustc_type_irOli Scherer-83/+0
2022-11-30s/WithStableHash/WithCachedTypeInfo/Oli Scherer-10/+10
2022-11-28fix documentNeutron3529-2/+2
https://users.rust-lang.org/t/is-the-document-in-sortedmap-in-rustc-data-structures-sorted-map-correct/84939 SortedMap have `O(n)` insertions and removal rather than `O(log(n))`
2022-11-26Rewrite LLVM's archive writer in Rustbjorn3-0/+6
This allows it to be used by other codegen backends
2022-11-19Auto merge of #97870 - eggyal:inplace_fold_spec, r=wesleywiserbors-34/+2
Use liballoc's specialised in-place vec collection liballoc already specialises in-place vector collection, so manually reimplementing it in `IdFunctor::try_map_id` was superfluous.
2022-11-11Use the interned stable hash as plain hash.Camille GILLOT-1/+5
2022-11-11Hash spans when interning.Camille GILLOT-7/+2
2022-11-05Update several crates for improved support of the new targetsMateusz Mikuła-1/+1
This helps with `*-windows-gnullvm` targets
2022-11-04Rollup merge of #103845 - camsteffen:data-structures-track-caller, ↵Matthias Krüger-0/+11
r=compiler-errors Add track_caller to some Lock methods Would have helped to diagnose #103844.
2022-11-02rustdoc: use ThinVec for cleaned genericsMichael Howell-1/+1
2022-11-01Add track_caller to some Lock methodsCameron Steffen-0/+11
2022-10-27Introduce UnordMap, UnordSet, and UnordBag (see MCP 533)Michael Woerister-0/+384
MCP 533: https://github.com/rust-lang/compiler-team/issues/533 Also, as an example, substitute UnordMap for FxHashMap in used_trait_imports query result.
2022-10-21fix some typosRageking8-1/+1
2022-10-19Auto merge of #103214 - Nilstrieb:set-theory, r=petrochenkovbors-7/+5
Use Set instead of Vec in transitive_relation Helps with #103195. It doesn't fix the underlying quadraticness but it makes it _a lot_ faster to an extent where even doubling the amount of nested references still takes less than two seconds (50s on nightly). I want to see whether this causes regressions (because the vec was usually quite small) or improvements (as lookup for bigger sets is now much faster) in real code.
2022-10-19Use Set instead of Vec in transitive_relationnils-7/+5
2022-10-18Auto merge of #102543 - daym:patch-1, r=joshtriplettbors-6/+1
Remove "execute" bit from lock file permissions Previously, flock would set the "execute" bit on Rust lock files. That makes no sense. This patch clears the "execute" bit on Rust lock files. See issue #102531.
2022-10-17Remove execute bit from lock file permissionsDanny Milosavljevic-6/+1
2022-10-14more dupe word typosRageking8-2/+2
2022-10-06Rollup merge of #102725 - nnethercote:rm-Z-time, r=davidtwcoMatthias Krüger-37/+27
Remove `-Ztime` Because it has a lot of overlap with `-Ztime-passes` but is generally less useful. Plus some related cleanups. Best reviewed one commit at a time. r? `@davidtwco`
2022-10-06Be consistent about deciding whether to print pass data.Nicholas Nethercote-19/+21
`print_time_passes_entry` unconditionally prints data about a pass. The most commonly used call site, in `VerboseTimingGuard::drop`, guards it with a `should_print_passes` test. But there are a couple of other call sites that don't do that test. This commit moves the `should_print_passes` test within `print_time_passes_entry` so that all passes are treated equally.
2022-10-06Remove `-Ztime` option.Nicholas Nethercote-18/+6
The compiler currently has `-Ztime` and `-Ztime-passes`. I've used `-Ztime-passes` for years but only recently learned about `-Ztime`. What's the difference? Let's look at the `-Zhelp` output: ``` -Z time=val -- measure time of rustc processes (default: no) -Z time-passes=val -- measure time of each rustc pass (default: no) ``` The `-Ztime-passes` description is clear, but the `-Ztime` one is less so. Sounds like it measures the time for the entire process? No. The real difference is that `-Ztime-passes` prints out info about passes, and `-Ztime` does the same, but only for a subset of those passes. More specifically, there is a distinction in the profiling code between a "verbose generic activity" and an "extra verbose generic activity". `-Ztime-passes` prints both kinds, while `-Ztime` only prints the first one. (It took me a close reading of the source code to determine this difference.) In practice this distinction has low value. Perhaps in the past the "extra verbose" output was more voluminous, but now that we only print stats for a pass if it exceeds 5ms or alters the RSS, `-Ztime-passes` is less spammy. Also, a lot of the "extra verbose" cases are for individual lint passes, and you need to also use `-Zno-interleave-lints` to see those anyway. Therefore, this commit removes `-Ztime` and the associated machinery. One thing to note is that the existing "extra verbose" activities all have an extra string argument, so the commit adds the ability to accept an extra argument to the "verbose" activities.
2022-10-06Fix some comments.Nicholas Nethercote-4/+4
- It's `--print`, not `--prints`. - `-Ztime` and `-Ztime-passes` print to stderr, not stdout.
2022-10-06Auto merge of #99324 - reez12g:issue-99144, r=jyn514bors-1/+0
Enable doctests in compiler/ crates Helps with https://github.com/rust-lang/rust/issues/99144
2022-10-01Use a SortedMap instead of a VecMap.Camille GILLOT-14/+17