summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/variance
AgeCommit message (Collapse)AuthorLines
2023-01-21Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obkbors-9/+6
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-2/+2
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19Rollup merge of #106931 - Ezrashaw:docs-e0208, r=compiler-errorsGuillaume Gomez-3/+2
document + UI test `E0208` and make its output more user-friendly Cleans up `E0208`'s output a lot. It could actually be useful for someone learning about variance now. I also added a UI test for it in `tests/ui/error-codes/` and wrote some docs for it. r? `@GuillaumeGomez` another error code, can't be bothered to find the issue :P. Obviously there's some compiler stuff, so you'll have to hand it off. Part of https://github.com/rust-lang/rust/issues/61137.
2023-01-19Use UnordMap instead of FxHashMap in define_id_collections!().Michael Woerister-9/+6
2023-01-18remove error code from `#[rustc_variance]` and document its remainsEzra Shaw-3/+2
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-1/+1
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2023-01-17`rustc_hir_analysis`: remove `ref` patternsMaybe Waffle-2/+2
2022-12-14Prevent the creation of `TraitRef` without dedicated methodsOli Scherer-1/+1
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-2/+2
2022-12-13Address a few more nitsMichael Goulet-5/+6
2022-12-13Combine identical alias armsMichael Goulet-5/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-4/+4
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-5/+5
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-5/+6
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-1/+1
2022-12-04Recurse into nested impl-trait when computing variance.Camille GILLOT-4/+38
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-7/+7
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-5/+8
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-4/+4
2022-11-14Typo.Camille GILLOT-1/+1
2022-11-12Compute variance for opaques too.Camille GILLOT-2/+92
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-3/+4
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-09-27rustc_typeck to rustc_hir_analysislcnr-0/+824