aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge #2332bors[bot]2019-11-2010-141/+127
|\ | | | | | | | | | | | | | | 2332: Add HasResolver trait r=matklad a=matklad bors merge Co-authored-by: Aleksey Kladov <[email protected]>
| * Alternative quite tests aliasAleksey Kladov2019-11-201-0/+1
| |
| * SimplifyAleksey Kladov2019-11-202-41/+15
| |
| * Add HasResolver traitAleksey Kladov2019-11-209-134/+145
| |
* | Merge #2330bors[bot]2019-11-209-105/+81
|\| | | | | | | | | | | | | | | 2330: Remove hir/adt.rs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove hir/adt.rsAleksey Kladov2019-11-206-66/+47
| |
| * Simplify generic paramsAleksey Kladov2019-11-204-39/+34
| |
* | Merge #2329bors[bot]2019-11-203-5/+58
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2329: fix 2190; add test for "replace if let with match" r=matklad a=fkohlgrueber Fixes #2190. Check that the expression doesn't contain newlines only for "replace if let with match". For "join lines", enclosing blocks for multiline expressions should be removed. Co-authored-by: Felix Kohlgrüber <[email protected]>
| * | fix 2190; add test for "replace if let with match"Felix Kohlgrüber2019-11-203-5/+58
|/ /
* | Merge #2328bors[bot]2019-11-204-27/+37
|\| | | | | | | | | | | | | | | 2328: Move generic_params query to HIR r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move generic_params query to HIRAleksey Kladov2019-11-204-27/+37
|/
* Merge #2327bors[bot]2019-11-2017-175/+287
|\ | | | | | | | | | | | | | | 2327: Move constants to new ID r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move constants to new IDAleksey Kladov2019-11-2016-89/+119
| | | | | | | | This allows us to get rid of trait item index
| * Don't duplicate ContainerId typeAleksey Kladov2019-11-205-42/+35
| |
| * Switch type aliases to new sourcesAleksey Kladov2019-11-209-73/+162
|/
* Merge #2326bors[bot]2019-11-201-132/+0
|\ | | | | | | | | | | | | | | 2326: Remove duplicate tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove duplicate testsAleksey Kladov2019-11-201-132/+0
| |
* | Merge #2318bors[bot]2019-11-203-9/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2318: Fix panic when use `Expand Macro` on `assert_eq` r=matklad a=edwin0cheng The cause of this [bug](https://github.com/rust-analyzer/rust-analyzer/pull/2291#issuecomment-555651542) is, when calling `SourceAnalyzer::expand` when an `ast::MacroCall` which is outside of `SourceAnalyzer::node`. Note that if we use a node in `SourceAnalyzer::new` with a `MacroFile` file id, the resolver inside `SourceAnalyzer` still will not work properly. Another PR will need to fix it. Co-authored-by: Edwin Cheng <[email protected]>
| * | Fix expand macroEdwin Cheng2019-11-203-9/+16
|/ /
* | Merge #2325bors[bot]2019-11-2012-42/+190
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2325: Next gen IDs for functions r=matklad a=matklad The current system with AstIds has two primaraly drawbacks: * It is possible to manufacture IDs out of thin air. For example, it's possible to create IDs for items which are not considered in CrateDefMap due to cfg. Or it is possible to mixup structs and unions, because they share ID space. * Getting the ID of a parent requires a secondary index. Instead, the plan is to pursue the more traditional approach, where each items stores the id of the parent declaration. This makes `FromSource` more awkward, but also more correct: now, to get from an AST to HIR, we first do this recursively for the parent item, and the just search the children of the parent for the matching def Co-authored-by: Aleksey Kladov <[email protected]>
| * | Next gen IDs for functionsAleksey Kladov2019-11-2012-42/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current system with AstIds has two primaraly drawbacks: * It is possible to manufacture IDs out of thin air. For example, it's possible to create IDs for items which are not considered in CrateDefMap due to cfg. Or it is possible to mixup structs and unions, because they share ID space. * Getting the ID of a parent requires a secondary index. Instead, the plan is to pursue the more traditional approach, where each items stores the id of the parent declaration. This makes `FromSource` more awkward, but also more correct: now, to get from an AST to HIR, we first do this recursively for the parent item, and the just search the children of the parent for the matching def
* | | Merge #2324bors[bot]2019-11-2010-117/+103
|\| | | |/ |/| | | | | | | | | | | 2324: Move traits to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move traits to hir_defAleksey Kladov2019-11-2010-117/+103
|/
* Merge #2323bors[bot]2019-11-208-51/+51
|\ | | | | | | | | | | | | | | 2323: Rename with_ast -> with_value r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Rename with_ast -> with_valueAleksey Kladov2019-11-208-51/+51
|/
* Merge #2322bors[bot]2019-11-206-170/+247
|\ | | | | | | | | | | | | | | 2322: Move Generics to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move Generics to hir_defAleksey Kladov2019-11-206-170/+247
| |
* | Merge #2321bors[bot]2019-11-206-19/+38
|\| | | | | | | | | | | | | | | 2321: Allow non-path default type parameters r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Allow non-path default type parametersAleksey Kladov2019-11-206-19/+38
|/
* Merge #2320bors[bot]2019-11-202-4/+6
|\ | | | | | | | | | | | | | | 2320: Cleanup imports r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Cleanup importsAleksey Kladov2019-11-202-4/+6
| |
* | Merge #2319bors[bot]2019-11-2044-214/+227
|\| | | | | | | | | | | | | | | 2319: Rename Source::ast -> Source::value r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Rename Source::ast -> Source::valueAleksey Kladov2019-11-2043-214/+226
| |
| * add wsAleksey Kladov2019-11-201-0/+1
|/
* Merge pull request #2297 from kiljacken/masterAleksey Kladov2019-11-2010-35/+134
|\ | | | | Add fancy truncation of type hints.
| * Add test for inlay hint truncationEmil Lauridsen2019-11-191-0/+37
| |
| * Move type inlay hint truncation to language serverEmil Lauridsen2019-11-1910-35/+97
| | | | | | | | | | | | | | | | | | | | | | | | This commit implements a general truncation framework for HirFormatter that keeps track of how much has been output so far. This information can then be used to perform truncation inside the language server, instead of relying on the client. Initial support is implemented for truncating types hints using the maxInlayHintLength server config option. The existing solution in the VSCode extension has been removed in favor of letting the server truncate type hints.
* | Merge #2314bors[bot]2019-11-194-22/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | 2314: :arrow_up: rowan r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | :arrow_up: rowanAleksey Kladov2019-11-194-22/+21
|/ /
* | Merge #2291bors[bot]2019-11-1911-1/+332
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2291: Show expanded macro in vscode r=matklad a=edwin0cheng *Edited* ![new_screen_shot](https://user-images.githubusercontent.com/11014119/69169852-00550c00-0b34-11ea-9c40-8ecebdca0621.gif) Co-authored-by: Edwin Cheng <[email protected]>
| * | Minor fix for outpu text formatingEdwin Cheng2019-11-191-1/+1
| | |
| * | Add shot doc for expand_macro moduleEdwin Cheng2019-11-191-1/+1
| | |
| * | Add document in features.mdEdwin Cheng2019-11-191-0/+4
| | |
| * | Use DocumentProvider instead of HoverEdwin Cheng2019-11-193-33/+75
| | |
| * | Improve insert_whitespacesEdwin Cheng2019-11-191-17/+77
| | |
| * | Change return type of expand_macroEdwin Cheng2019-11-195-13/+33
| | |
| * | Change to use Expansion::file_id and reorderingEdwin Cheng2019-11-192-46/+40
| | |
| * | Fix npm formattingEdwin Cheng2019-11-192-14/+14
| | |
| * | RebaseEdwin Cheng2019-11-192-3/+9
| | |
| * | Add recursive expand in vscodeEdwin Cheng2019-11-198-5/+210
|/ /