aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of subst_bound_vars usesFlorian Diebold2021-04-053-5/+9
|
* Get rid of some walk_mut usesFlorian Diebold2021-04-052-10/+15
|
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-0514-43/+52
|
* Binders::subst -> substituteFlorian Diebold2021-04-0514-39/+39
|
* Use VariableKinds in BindersFlorian Diebold2021-04-057-84/+107
|
* Hide Binders internals moreFlorian Diebold2021-04-0511-88/+108
|
* Merge #8346bors[bot]2021-04-054-5/+5
|\ | | | | | | | | | | | | | | 8346: Use arrayvec 0.7 to avoid perf regression in 0.6.1 r=lnicola a=kjeremy See: https://github.com/bluss/arrayvec/issues/182 Co-authored-by: kjeremy <[email protected]>
| * Use arrayvec 0.7 to avoid perf regression in 0.6.1kjeremy2021-04-054-5/+5
|/ | | | See: https://github.com/bluss/arrayvec/issues/182
* Merge #8344bors[bot]2021-04-055-26/+30
|\ | | | | | | | | | | | | | | | | | | 8344: Pass interner to `ProjectionTy::self_type_parameter` and `TraitRef::self_type_parameter` r=flodiebold a=lnicola CC #8313 changelog skip Co-authored-by: Laurențiu Nicola <[email protected]>
| * Pass interner to TraitRef::self_type_parameterLaurențiu Nicola2021-04-054-20/+24
| |
| * Pass interner to ProjectionTy::self_type_parameterLaurențiu Nicola2021-04-054-7/+7
|/
* Merge #8343bors[bot]2021-04-051-0/+28
|\ | | | | | | | | | | | | | | | | 8343: internal: document hypothetical completion problem r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * internal: document hypothetical completion problemAleksey Kladov2021-04-051-0/+28
| |
* | Merge #8342bors[bot]2021-04-0514-58/+58
|\ \ | |/ |/| | | | | | | | | | | 8342: Rename `TyKind::Unknown` and `TyKind::ForeignType` (Chalk move) r=flodiebold a=lnicola CC #8313 Co-authored-by: Laurențiu Nicola <[email protected]>
| * Rename TyKind::ForeignType to ForeignLaurențiu Nicola2021-04-057-10/+10
| |
| * Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-0514-48/+48
| |
* | Merge #8245bors[bot]2021-04-057-157/+260
|\ \ | |/ |/| | | | | | | | | | | | | | | 8245: Properly resolve intra doc links in hover and goto_definition r=matklad a=Veykril Unfortunately involves a bit of weird workarounds due to pulldown_cmark's incorrect lifetimes on `BrokenLinkCallback`... I should probably open an issue there asking for the fixes to be pushed to a release since they already exist in the repo for quite some time it seems. Fixes #8258, Fixes #8238 Co-authored-by: Lukas Wirth <[email protected]>
| * Replace Range<usize> usage with TextRangeLukas Wirth2021-03-302-32/+27
| |
| * Remove unused Definition::docsLukas Wirth2021-03-301-23/+0
| |
| * Use new new docs string source mapping in goto_def and hoverLukas Wirth2021-03-304-119/+73
| |
| * Implement basic Documentation source to syntax range mappingLukas Wirth2021-03-305-36/+149
| |
| * Properly resolve intra doc links in hover and goto_definitionLukas Wirth2021-03-304-39/+103
| |
* | Merge #8339bors[bot]2021-04-051-18/+55
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 8339: fix: extract variable works in guards r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | fix: extract variable works in guardsAleksey Kladov2021-04-051-18/+55
| | | | | | | | | | | | closes #8336
* | | Merge #8326bors[bot]2021-04-051-39/+50
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8326: Rewrite reorder fields assist to use mutable syntax trees r=matklad a=Veykril This also instead uses `Either` to use the typed `RecordPat` and `RecordExpr` nodes, this unfortunately gives a bit of code duplication Co-authored-by: Lukas Wirth <[email protected]>
| * | | Rewrite reorder fields assist to use mutable syntax treesLukas Wirth2021-04-031-39/+50
| | | |
* | | | Merge #8337bors[bot]2021-04-052-10/+29
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 8337: internal: explain "extract if condition" refactoring r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | internal: explain "extract if condition" refactoringAleksey Kladov2021-04-052-10/+29
|/ / /
* | | Merge #8334bors[bot]2021-04-0512-99/+75
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8334: Intern and shrink more data to reduce memory usage r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | | simplify visibility.rsJonas Schievink2021-04-051-3/+3
| | | |
| * | | Intern `GenericParams`Jonas Schievink2021-04-059-82/+47
| | | | | | | | | | | | | | | | | | | | Also share the same instance between `ItemTree` and `generic_params` query.
| * | | Add `GenericParams::shrink_to_fit`Jonas Schievink2021-04-052-0/+10
| | | | | | | | | | | | | | | | Reduces memory usage by over 10 MB
| * | | Intern more `TypeRef`s in genericsJonas Schievink2021-04-054-14/+15
|/ / / | | | | | | | | | Saves ~3 MB
* | | Merge #8333bors[bot]2021-04-053-22/+42
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8333: analysis-stats: allow skipping type inference r=jonas-schievink a=jonas-schievink This removes "noise" from memory profiles since it avoids lowering function bodies and types bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | | analysis-stats: allow skipping type inferenceJonas Schievink2021-04-053-22/+42
|/ / / | | | | | | | | | | | | This removes "noise" from memory profiles since it avoids lowering function bodies and types
* | | Merge #8332bors[bot]2021-04-041-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8332: Error when `rustfmt` component is unavailable r=jonas-schievink a=jonas-schievink Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8331 When the toolchain has no installable rustfmt component, running `rustfmt` complains with ``` error: the 'rustfmt' component which provides the command 'rustfmt' is not available for the 'nightly-2021-04-04-x86_64-unknown-linux-gnu' toolchain ``` Check for occurrence of "not available" in addition to the existing "not installed" to detect this case and report a user-visible error. rustfmt and/or rustup should *really* be changed to not use the same exit status here bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | | Error when `rustfmt` component is unavailableJonas Schievink2021-04-041-1/+4
|/ / /
* | | Merge #8329bors[bot]2021-04-041-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8329: docs: Fix moveItem method name r=lnicola a=simrat39 Co-authored-by: sim <[email protected]>
| * | | docs: Fix moveItem method namesim2021-04-041-2/+1
|/ / /
* | | Merge #8328bors[bot]2021-04-0417-814/+855
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8328: Move things in hir_ty into submodules r=flodiebold a=flodiebold - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk` - also fix signature of `Substitution::interned` Co-authored-by: Florian Diebold <[email protected]>
| * | | Move things from `traits` module to `types` as wellFlorian Diebold2021-04-0412-110/+107
| | | |
| * | | Move things in hir_ty into submodulesFlorian Diebold2021-04-0411-707/+751
| | | | | | | | | | | | | | | | | | | | - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk`
* | | | Merge #8325bors[bot]2021-04-045-34/+33
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8325: Check if bitflags deps pulls its weight r=jonas-schievink a=matklad Bitflags is generally a good dependency -- it's lightweight, well maintained and embraced by the ecosystem. I wonder, however, do we really need it? Doesn't feel like it adds much to be honest. Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Check if bitflags deps pulls its weightAleksey Kladov2021-04-045-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitflags is generally a good dependency -- it's lightweight, well maintained and embraced by the ecosystem. I wonder, however, do we really need it? Doesn't feel like it adds much to be honest.
* | | | Merge #8295bors[bot]2021-04-045-1/+398
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8295: Add `convert_into_to_from` assist r=Veykril a=obmarg This adds a "Convert Into to From" assist, useful since clippy has recently started adding lints on every `Into`. It covers converting the signature, and converting any `self`/`Self` references within the body. It does assume that every instance of `Into` can be converted to a `From`, which I _think_ is the case now. Let me know if there's something I'm not thinking of and I can try and make it smarter. Closes #8196 ![CleanShot 2021-04-02 at 13 39 54](https://user-images.githubusercontent.com/556490/113420108-9ce21c00-93c0-11eb-8c49-80b5fb189284.gif) I'm extremely new to this codebase so please let me know if anything needs changed. Co-authored-by: Graeme Coupar <[email protected]>
| * | | | Convert Into to From assistGraeme Coupar2021-04-035-1/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a "Convert Into to From" assist, useful since clippy has recently started adding lints on every `Into`. It covers converting the signature, and converting any `self`/`Self` references within the body to the correct types. It does assume that every instance of `Into` can be converted to a `From`, which I _think_ is the case now. Let me know if there's something I'm not thinking of and I can try and make it smarter.
* | | | | Merge #8327bors[bot]2021-04-0420-373/+423
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8327: Move `Ty` creation methods out of `Ty` (Chalk move preparation) r=flodiebold a=flodiebold When we'll move to using `chalk_ir::Ty` (#8313), we won't be able to have our own inherent methods on `Ty` anymore, so we need to move the helpers elsewhere. This adds a `TyBuilder` that allows easily constructing `Ty` and related types (`TraitRef`, `ProjectionTy`, `Substitution`). It also replaces `SubstsBuilder`. `TyBuilder` can construct different things based on its type parameter; e.g. if it has an `AdtId`, we're constructing an ADT type, but if it has a `TraitId`, we're constructing a `TraitRef`. The common thing for all of them is that we need to build a `Substitution`, so the API stays the same for all of them except at the beginning and end. We also use `TyBuilder` to house various one-shot methods for constructing types, e.g. `TyBuilder::unit()`. Co-authored-by: Florian Diebold <[email protected]>
| * | | | Add commentFlorian Diebold2021-04-041-0/+3
| | | | |
| * | | | Replace Substitution::type_paramsFlorian Diebold2021-04-046-16/+15
| | | | |
| * | | | Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-047-54/+42
| | | | |