aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove progress bar and add a true counterEdwin Cheng2019-11-263-29/+12
|
* Remove commented codeEdwin Cheng2019-11-261-3/+0
|
* Use a simple progress bar instead of indicatifEdwin Cheng2019-11-265-37/+138
|
* Merge #2412bors[bot]2019-11-262-2/+2
|\ | | | | | | | | | | | | | | 2412: Fix stale crates that snuck in r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * Fix stale crates that snuck inJeremy Kolb2019-11-262-2/+2
| |
* | Merge #2406bors[bot]2019-11-265-13/+34
|\ \ | |/ |/| | | | | | | | | | | 2406: Add hygiene information to SourceAnalyzer r=matklad a=edwin0cheng This should fix https://github.com/rust-analyzer/rust-analyzer/pull/2392#issuecomment-557964686 Co-authored-by: Edwin Cheng <[email protected]>
| * Remove dbg!Edwin Cheng2019-11-261-2/+0
| |
| * Add hygiene information to SourceAnalyzerEdwin Cheng2019-11-265-13/+36
| |
* | Merge #2410bors[bot]2019-11-2612-245/+329
|\ \ | | | | | | | | | | | | | | | | | | | | | 2410: Introduce hir_ty r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Doc primitivesAleksey Kladov2019-11-262-2/+6
| | |
| * | id-ify impls_in_crate_queryAleksey Kladov2019-11-266-56/+74
| | |
| * | Introduce hir_tyAleksey Kladov2019-11-267-190/+252
| | |
* | | Merge #2411bors[bot]2019-11-263-48/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2411: Update parking_lot and smallvec to drop some dependencies r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | | Update parking_lot and smallvec to drop some dependenciesJeremy Kolb2019-11-263-48/+7
|/ / /
* | | Merge #2409bors[bot]2019-11-2611-39/+98
|\| | | | | | | | | | | | | | | | | | | | | | | 2409: Id-ify Ty::Adt r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Id-ify Ty::AdtAleksey Kladov2019-11-2611-39/+98
| | |
* | | Merge #2398bors[bot]2019-11-2615-136/+253
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2398: WIP: introduce hir::Type r=matklad a=matklad This introduces `hir::Type` wrapper over `hir::Ty`, with two purposes: * bind `Ty` and it's corresponding environment * Am I correct that `Ty` without an env doesn't make much sense, because the meaning of type parameters is unclear * Am I correct that we can safely re-use the same environment for all types derived from the given type? * hide representation defails of `Ty`. Specifically, I want to change `Ty::Adt` to use `hir_def::AdtId` instead of `hir::Adt`, but IDE doesn't know about underlying IDs. More generally, I feel like IDE shouldn't know that `Ty` is enum. @flodiebold what do you think about this? Co-authored-by: Aleksey Kladov <[email protected]>
| * | Introduce hir::TypeAleksey Kladov2019-11-2615-136/+253
|/ / | | | | | | It should provide a convenient API over more low-level Ty
* | Merge #2408bors[bot]2019-11-262-37/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | 2408: Use chalk fork to paper over #2052 r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Use chalk fork to paper over #2052Aleksey Kladov2019-11-262-37/+39
|/ /
* | Merge #2407bors[bot]2019-11-269-25/+53
|\ \ | |/ |/| | | | | | | | | | | 2407: :arrow_up: salsa r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * :arrow_up: salsaAleksey Kladov2019-11-269-25/+53
|/
* Merge #2404bors[bot]2019-11-257-62/+70
|\ | | | | | | | | | | | | | | 2404: Use TypeAliasId in Ty, pt 2 r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Use TypeAliasId in Ty, pt 2Aleksey Kladov2019-11-255-46/+40
| |
| * Use TypeAliasId in Ty, pt 1Aleksey Kladov2019-11-252-11/+29
| |
| * More ids in TyAleksey Kladov2019-11-254-17/+13
|/
* Merge #2403bors[bot]2019-11-2527-98/+190
|\ | | | | | | | | | | | | | | 2403: Fixme for union fields r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Fixme for union fieldsAleksey Kladov2019-11-254-0/+9
| |
| * Fix hir for ast::UnionDefAleksey Kladov2019-11-2522-86/+121
| |
| * Introduce dedicated AST node for unionAleksey Kladov2019-11-257-15/+63
|/ | | | | | | | | | Although structs and unions have the same syntax and differ only in the keyword, re-using the single syntax node for both of them leads to confusion in practice, and propagates further down the hir in an upleasent way. Moreover, static and consts also share syntax, but we use different nodes for them.
* Merge #2388bors[bot]2019-11-252-2/+8
|\ | | | | | | | | | | | | | | 2388: Show missing struct fields in the error message r=matklad a=Frizi This provides the most interesting information about the "missing structure fields" error directly to the user. Co-authored-by: Frizi <[email protected]>
| * Show missing struct fields in the error messageFrizi2019-11-242-2/+8
| |
* | Merge #2402bors[bot]2019-11-254-47/+64
|\ \ | | | | | | | | | | | | | | | | | | | | | 2402: Use ids for Callable r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Use ids for CallableAleksey Kladov2019-11-254-34/+50
| | |
| * | Use more IDsAleksey Kladov2019-11-251-17/+18
| | |
* | | Merge #2401bors[bot]2019-11-251-56/+62
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 2401: Update crates r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | Update cratesJeremy Kolb2019-11-251-56/+62
| | |
* | | Merge #2400bors[bot]2019-11-2510-56/+44
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2400: Use GenericDefIdMore r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Use GenericDefIdMoreAleksey Kladov2019-11-2510-56/+44
| | | |
* | | | Merge #2399bors[bot]2019-11-255-33/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2399: Use GenericDefId more r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Use GenericDefId moreAleksey Kladov2019-11-255-33/+20
|/ / /
* | | Merge #2397bors[bot]2019-11-257-58/+85
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2397: Remove Resolver from autoderef r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Remove Resolver from autoderefAleksey Kladov2019-11-257-49/+73
| | | | | | | | | | | | | | | | | | | | Resolver holds onto too much context, including local scopes. Let's try to pass in only what is necessary -- the trait environment.
| * | | Push resolver upAleksey Kladov2019-11-251-12/+15
|/ / /
* | | Merge #2362bors[bot]2019-11-252-0/+39
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2362: Expand compile_error! r=edwin0cheng a=kjeremy Does not validate that the input is a string literal. I thought that I could `match_ast!` against the `macro_args` but that did not work. Even if it had I am not sure which error would be appropriate. Co-authored-by: Jeremy Kolb <[email protected]>
| * | | Expand compile_error!Jeremy Kolb2019-11-252-0/+39
| | | |
* | | | Merge #2392bors[bot]2019-11-251-5/+16
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2392: Fix panic during the expansion of `column!` r=edwin0cheng a=marcogroppo Fixes #2379. Well, this isn't the "proper" fix but it doesn't hurt, IMHO. The problem is that `to_col_number`, called by `column_expand`, receives a position number that isn't included in the text range of the file. My (very limited) understanding is that the text is the one of the original file, while `pos` is relative to something else, probably the text of the macro. Notice that in this case the `column!` expansion seems to be triggered by `assert_eq!`, so we're in the middle of another expansion. This PR simply avoids the panic by checking the length of the text. r? @edwin0cheng Co-authored-by: Marco Groppo <[email protected]>
| * | | Fix panic during the expansion of `column!`Marco Groppo2019-11-241-5/+16
| | | |
* | | | Merge #2396bors[bot]2019-11-2410-42/+68
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2396: Switch to variant-granularity field type inference r=flodiebold a=matklad r? @flodiebold Previously, we had a `ty` query for each field. This PR switcthes to a query per struct, which returns an `ArenaMap` with `Ty`s. I don't know which approach is better. What is bugging me about the original approach is that, if we do all queries on the "leaf" defs, in practice we get a ton of queries which repeatedly reach into the parent definition to compute module, resolver, etc. This *seems* wasteful (but I don't think this is really what causes any perf problems for us). At the same time, I've been looking at Kotlin, and they seem to use the general pattern of analyzing the *parent* definition, and storing info about children into a `BindingContext`. I don't really which way is preferable. I think I want to try this approach, where query granularity generally mirrors the data granularity. The primary motivation for me here is probably just hope that we can avoid adding a ton of helpers to a `StructField`, and maybe in general avoid the need to switch to a global `StructField`, using `LocalStructFieldId` most of the time internally. For external API (ie, for `ra_ide_api`), I think we should continue with fine-grained `StructField::ty` approach, which internally fetches the table for the whole struct and indexes into it. In terms of actual memory savings, the results are as follows: ``` This PR: 142kb FieldTypesQuery (deps) 38kb FieldTypesQuery Status Quo: 208kb TypeForFieldQuery (deps) 18kb TypeForFieldQuery ``` Note how the table itself occupies more than twice as much space! I don't have an explanation for this: a plausible hypothesis is that single-field structs are very common and for them the table is a pessimisation. THere's noticiable wallclock time difference. Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | Switch to variant-granularity field type inferenceAleksey Kladov2019-11-2410-42/+68
| | | | |