aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
Commit message (Collapse)AuthorAgeFilesLines
...
* More manual clippy fixesKirill Bulatov2020-02-182-3/+3
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-188-15/+11
|
* Merge #3169bors[bot]2020-02-171-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3169: Show record field names in Enum completion r=flodiebold a=adamrk Adresses https://github.com/rust-analyzer/rust-analyzer/issues/2947. Previously the details shown when autocompleting an Enum variant would look like the variant was a tuple even if it was a record: ![2020-02-16-15:59:32_crop](https://user-images.githubusercontent.com/16367467/74607233-64f21980-50d7-11ea-99db-e973e29c71d7.png) This change will show the names of the fields for a record and use curly braces instead of parentheses: ![2020-02-16-15:33:00_crop](https://user-images.githubusercontent.com/16367467/74607251-8ce17d00-50d7-11ea-9d4d-38d198a4aec0.png) This required exposing the type `adt::StructKind` from `ra_hir` and adding a function ``` kind(self, db: &impl HirDatabase) -> StructKind ``` in the `impl` of `EnumVariant`. There was also a previously existing function `is_unit(self, db: &impl HirDatabase) -> bool` for `EnumVariant` which I removed because it seemed redundant after adding `kind`. Co-authored-by: adamrk <[email protected]>
| * replace uses of VariantData::is_unit with VariantData::kindadamrk2020-02-161-6/+0
| |
| * show names for record fields in enum completionadamrk2020-02-161-1/+8
| |
* | Introduce AsMacroCall traitEdwin Cheng2020-02-173-70/+124
| |
* | Bump crate resolution limit for large projectsBenjamin Brittain2020-02-141-1/+1
|/ | | | Change-Id: Ie0221e5bcfd1779cd5e241f96b4489e5bd3854c1
* Make Self implement the trait inside trait default methodsFlorian Diebold2020-02-141-5/+1
|
* Merge #3062bors[bot]2020-02-113-7/+16
|\ | | | | | | | | | | | | | | | | | | 3062: Implement slice pattern AST > HIR lowering r=jplatte a=jplatte WIP. The necessary changes for parsing are implemented, but actual inference is not yet. Just wanted to upload what I've got so far so it doesn't get duplicated :) Will fix #3043 Co-authored-by: Jonas Platte <[email protected]>
| * Implement slice pattern AST > HIR loweringJonas Platte2020-02-113-7/+16
| |
* | Merge #3074bors[bot]2020-02-103-10/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | 3074: Or patterns r=matthewjasper a=matthewjasper Works towards #2458 Co-authored-by: Matthew Jasper <[email protected]>
| * | Add or- and parenthesized-patternsMatthew Jasper2020-02-093-10/+14
| | |
* | | move to to_usize()Veetaha2020-02-091-1/+1
|/ /
* | FormattingFlorian Diebold2020-02-072-9/+12
| |
* | First stab at desugaring bounds for APITFlorian Diebold2020-02-071-4/+23
| |
* | wip lower impl trait to type argsFlorian Diebold2020-02-073-9/+90
|/
* Merge #2962bors[bot]2020-02-044-14/+34
|\ | | | | | | | | | | | | | | | | 2962: Differentiate underscore alias from named aliases r=matklad a=zombiefungus pre for Fixing Issue 2736 edited to avoid autoclosing the issue Co-authored-by: zombiefungus <[email protected]>
| * include requested changeszombiefungus2020-02-024-27/+28
| |
| * add new ImportAlias enum to differentiate no alias from an _ aliaszombiefungus2020-02-024-11/+30
| |
* | Require ModPath for importingKirill Bulatov2020-02-021-2/+2
|/
* Merge #2917bors[bot]2020-01-282-14/+86
|\ | | | | | | | | | | | | | | 2917: Prefer imports starting with std r=matklad a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/2915 Co-authored-by: Kirill Bulatov <[email protected]>
| * Add the testsKirill Bulatov2020-01-282-0/+42
| |
| * Apply the proposed refactoringKirill Bulatov2020-01-281-38/+43
| |
| * Prefer imports starting with stdKirill Bulatov2020-01-271-6/+31
| |
* | Publicize debug printing of CrateDefMapAleksey Kladov2020-01-282-41/+42
|/
* Update cratesJeremy Kolb2020-01-261-1/+1
|
* Remove dead codeAleksey Kladov2020-01-161-34/+2
|
* Make FromSource privateAleksey Kladov2020-01-161-1/+3
|
* Merge #2837bors[bot]2020-01-151-1/+1
|\ | | | | | | | | | | | | | | | | | | 2837: Accidentally quadratic r=matklad a=matklad Our syntax highlighting is accdentally quadratic. Current state of the PR fixes it in a pretty crude way, looks like for the proper fix we need to redo how source-analyzer works. **NB:** don't be scared by diff stats, that's mostly a test-data file Co-authored-by: Aleksey Kladov <[email protected]>
| * Introduce SourceBinderAleksey Kladov2020-01-151-1/+1
| |
* | RenameAleksey Kladov2020-01-153-17/+14
|/
* Don't parse child modules when doing diagnosticsAleksey Kladov2020-01-151-0/+7
|
* Merge #2803bors[bot]2020-01-112-1/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2803: Fix various names, e.g. Iterator not resolving in core prelude r=matklad a=flodiebold Basically, `Iterator` is re-exported via several steps, which happened to not be resolved yet when we got to the prelude import, but since the name resolved to the reexport from `core::iter` (just to no actual items), we gave up trying to resolve it further. Maybe part of the problem is that we can have `PartialResolvedImport::Unresolved` or `PartialResolvedImport::Indeterminate` with `None` in all namespaces, and handle them differently. Fixes #2683. Co-authored-by: Florian Diebold <[email protected]>
| * Fix various names, e.g. Iterator not resolving in core preludeFlorian Diebold2020-01-112-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Basically, `Iterator` is re-exported via several steps, which happened to not be resolved yet when we got to the prelude import, but since the name resolved to the reexport from `core::iter` (just to no actual items), we gave up trying to resolve it further. Maybe part of the problem is that we can have `PartialResolvedImport::Unresolved` or `PartialResolvedImport::Indeterminate` with `None` in all namespaces, and handle them differently. Fixes #2683.
* | Apply review suggestionsFlorian Diebold2020-01-115-34/+23
| |
* | Qualify some paths in 'add missing impl members'Florian Diebold2020-01-112-1/+48
| |
* | Use `self`Florian Diebold2020-01-111-0/+20
| |
* | CleanupFlorian Diebold2020-01-111-13/+25
| |
* | Handle cyclesFlorian Diebold2020-01-111-5/+54
| |
* | Use query for importable locationsFlorian Diebold2020-01-114-34/+77
| |
* | Use super, don't use private importsFlorian Diebold2020-01-111-2/+48
| |
* | Use shortest pathFlorian Diebold2020-01-111-4/+19
| |
* | handle most casesFlorian Diebold2020-01-112-11/+67
| |
* | basics workingFlorian Diebold2020-01-111-5/+113
| |
* | more WIPFlorian Diebold2020-01-112-12/+122
| |
* | find_path WIPFlorian Diebold2020-01-113-0/+58
|/
* Add `_query` suffix to `compute_crate_def_map` for consistencyMichal Terepeta2020-01-032-2/+2
| | | | Signed-off-by: Michal Terepeta <[email protected]>
* Split `crate_def_map` into two methodsMichal Terepeta2020-01-032-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change: - introduces `compute_crate_def_map` query and renames `CrateDefMap::crate_def_map_query` for consistency, - annotates `crate_def_map` as `salsa::transparent` and adds a top-level `crate_def_map` wrapper function around that starts the profiler and immediately calls into `compute_crate_def_map` query. This allows us to better understand where we spent the time, in particular, how much is spent in the recomputaiton and how much in salsa. Example output (where we don't actually re-compute anything, but the query still takes a non-trivial amount of time): ``` 211ms - handle_inlay_hints 150ms - get_inlay_hints 150ms - SourceAnalyzer::new 65ms - def_with_body_from_child_node 65ms - analyze_container 65ms - analyze_container 65ms - Module::from_definition 65ms - Module::from_file 65ms - crate_def_map 1ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 64ms - ??? ``` Signed-off-by: Michal Terepeta <[email protected]>
* Remove a duplicate line in `collect_defs`Michal Terepeta2020-01-031-1/+0
| | | | Signed-off-by: Michal Terepeta <[email protected]>
* Remove unused hard-coded pathsEmil Lauridsen2019-12-291-4/+0
|