aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge #6048bors[bot]2020-09-212-0/+47
|\ | | | | | | | | | | | | | | 6048: Code Docs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Apply suggestions from code reviewAleksey Kladov2020-09-211-5/+5
| | | | | | Co-authored-by: Laurențiu Nicola <[email protected]>
| * Document AstTransformationAleksey Kladov2020-09-211-0/+28
| |
| * Document SemanticScopeAleksey Kladov2020-09-211-0/+19
|/
* Merge #6043bors[bot]2020-09-213-9/+51
|\ | | | | | | | | | | | | | | | | | | | | | | 6043: Allow missing trait members assist without needing braces r=matklad a=M-J-Hooper Assist to complete missing items when implementing a trait does not appear without impl def braces (see #5144 ). The reason behind this was that this assist is based on `ast::AssocItemList` which only appears in the AST after the braces are added to the impl def. Instead of relying on and replacing the item list, we now instead replace the entire `ast::Impl` and add the item list if its missing. Co-authored-by: Matt Hooper <[email protected]>
| * Rename impl edit method to be more explicitMatt Hooper2020-09-212-2/+2
| |
| * Added test for impl member assist when impl def is missing bracesMatt Hooper2020-09-211-0/+19
| |
| * Replace entire impl def instead of only associated items for missing impl ↵Matt Hooper2020-09-211-9/+12
| | | | | | | | member assist (if braces are missing from an impl def then there is no associated item list in the AST)
| * Add make utility for empty associated item listsMatt Hooper2020-09-211-0/+4
| |
| * Add edit utility for adding an associated item list to a impl defMatt Hooper2020-09-211-0/+16
| |
* | Merge #6018bors[bot]2020-09-202-8/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | 6018: Correct project_root path for ProjectJson. r=jonas-schievink a=woody77 It was already the folder containing the rust-project.json file, not the file itself. This also removes the Option-ness of it, since it's now an infallible operation to set the member value. Co-authored-by: Aaron Wood <[email protected]>
| * | Add rustdoc for ProjectJson methodsAaron Wood2020-09-201-0/+10
| | |
| * | Correct project_root path for ProjectJson.Aaron Wood2020-09-162-8/+5
| | | | | | | | | | | | It was already the folder containing the rust-project.json file, not the file itself.
* | | Merge #6041bors[bot]2020-09-201-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6041: Fix typo in syntax.md r=kjeremy a=magurotuna This might be a typo, so I fixed it. Co-authored-by: Yusuke Tanaka <[email protected]>
| * | | Fix typoYusuke Tanaka2020-09-201-1/+1
| | | |
| * | | Fix typoYusuke Tanaka2020-09-201-1/+1
|/ / /
* | | Merge #6036bors[bot]2020-09-181-4/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6036: Don't re-read open files from disk when reloading a workspace r=kjeremy a=lnicola Fixes #5742 Fixes #4263 or so I hope. Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | Don't re-read open files from disk when reloading a workspaceLaurențiu Nicola2020-09-181-4/+7
| | | |
* | | | Merge #6035bors[bot]2020-09-181-1/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6035: Log failure to load crate root file r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Log failure to load crate root fileJonas Schievink2020-09-181-1/+7
|/ / / /
* | | | Merge #6034bors[bot]2020-09-181-0/+5
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 6034: docs: suggest disabling the official extension r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | docs: suggest disabling the official extensionJonas Schievink2020-09-181-0/+5
| | | |
* | | | Merge #6032bors[bot]2020-09-183-14/+20
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6032: Support active parameters at the per-signature level r=jonas-schievink a=kjeremy No functionality change. This also pulls in a few other protocol changes that we don't use and updates crates. Co-authored-by: kjeremy <[email protected]>
| * | | Support active parameters at the per-signature levelkjeremy2020-09-183-14/+20
|/ / / | | | | | | | | | Update crates
* | | Merge #6030bors[bot]2020-09-186-166/+165
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6030: Small proc macro cleanup r=jonas-schievink a=jonas-schievink git got really confused, but all I did in the first commit was unindent a few lines Co-authored-by: Jonas Schievink <[email protected]>
| * | | Rename `CustomDerive` to `ProcMacro`Jonas Schievink2020-09-186-8/+8
| | | | | | | | | | | | | | | | | | | | It handles fn-like macros too, and will handle attribute macros in the future
| * | | Invert condition to unindent codeJonas Schievink2020-09-181-158/+157
|/ / /
* | | Merge #6025bors[bot]2020-09-172-1/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6025: Use `log::error!` in a few more places r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | Use `log::error!` in a few more placesJonas Schievink2020-09-172-1/+8
|/ / /
* | | Merge #6024bors[bot]2020-09-175-18/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6024: Give `ExternCrate` a `Name`, not a `ModPath` r=jonas-schievink a=jonas-schievink Simplifies things Co-authored-by: Jonas Schievink <[email protected]>
| * | | Give `ExternCrate` a `Name`, not a `ModPath`Jonas Schievink2020-09-175-18/+11
|/ / /
* | | Merge #6017bors[bot]2020-09-172-4/+45
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6017: Don't return any TextEdit if formatting is unchanged r=jonas-schievink a=cuviper I found that `textDocument/formatting` was always returning a full `TextEdit` replacement, even when there are no changes, which caused Vim (w/ vim-lsp) to always indicate a modified buffer after formatting. We can easily compare whether there were changes and return `null` if not, so the client knows there's nothing to do. Co-authored-by: Josh Stone <[email protected]>
| * | | Don't return any TextEdit if formatting is unchangedJosh Stone2020-09-162-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that `textDocument/formatting` was always returning a full `TextEdit` replacement, even when there are no changes, which caused Vim (w/ vim-lsp) to always indicate a modified buffer after formatting. We can easily compare whether there were changes and return `null` if not, so the client knows there's nothing to do.
* | | | Merge #6016bors[bot]2020-09-1711-77/+445
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6016: Emit diagnostics for unresolved imports and extern crates r=jonas-schievink a=jonas-schievink AFAIK, we don't have any major bugs in name resolution that would cause a lot of false positives here (except procedural attribute macro support and some rare issues around `#[path]` on module files), so these are *not* marked as experimental diagnostics right now. I noticed that diagnostics in a file sometimes don't get displayed after opening, but require some edit to be performed. This seems like a preexisting issue though. Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Don't diagnose imports whose base crate is missingJonas Schievink2020-09-172-17/+64
| | | | |
| * | | | Add annotation-based nameres diagnostic testsJonas Schievink2020-09-164-38/+150
| | | | |
| * | | | Update testsJonas Schievink2020-09-161-5/+57
| | | | |
| * | | | Track import sources and emit diagnosticsJonas Schievink2020-09-162-21/+60
| | | | |
| * | | | Leave extern crate items unresolved if they areJonas Schievink2020-09-161-1/+5
| | | | |
| * | | | Add diagnostic types for unresolved crates/importsJonas Schievink2020-09-163-19/+128
| | | | |
| * | | | Store `Import` indices for later reconstructionJonas Schievink2020-09-163-4/+9
| |/ / /
* | | | Merge #6023bors[bot]2020-09-172-6/+6
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | 6023: Fix LSP requests with no arguments r=kjeremy a=lnicola r? @kjeremy Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | Fix LSP requests with no argumentsLaurențiu Nicola2020-09-172-6/+6
|/ / /
* | | Merge #5989bors[bot]2020-09-165-103/+292
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5989: Rewrite import merging r=jonas-schievink a=Veykril Rewrites how import merging is being handled. It is now a recursive function to properly handle merging of intermediate levels in the import trees. With this ordering the imports is also now possible tho it doesn't quite order it the same way as `rustfmt` does yet, namely it orders lowercase identifiers after uppercase identifiers as that is the standard character order that rust uses. This also fixes a few weird behaviors that were visible in some of the `replace_qualified_name_with_use.rs` tests. This really took longer than I was hoping for, fighting with import trees is quite the exhausting task 😅 Co-authored-by: Lukas Wirth <[email protected]>
| * | | Add make::glob_use_tree function to create star-only UseTreeLukas Wirth2020-09-162-11/+7
| | | |
| * | | Fix merge imports failing if the `self` module import is in the wrong treeLukas Wirth2020-09-121-22/+34
| | | |
| * | | Tidy up `recursive_merge` implementationLukas Wirth2020-09-121-60/+60
| | | |
| * | | Reimplement import merging by making it recursive properly nesting all levelsLukas Wirth2020-09-124-83/+264
| | | |
* | | | Merge #6013bors[bot]2020-09-162-7/+19
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6013: Add support for custom flycheck commands with JSON project workspaces r=jonas-schievink a=woody77 Enable flychecks with JSON project workspaces if an override command was provided as part of the client configuration: ``` "rust-analyzer.checkOnSave.enable": true, "rust-analyzer.checkOnSave.overrideCommand": ["custom_tool", "arg1", "arg2"], ``` Co-authored-by: Aaron Wood <[email protected]>
| * | | Add support for custom flycheck commands with JSON project workspacesAaron Wood2020-09-162-7/+19
| | | | | | | | | | | | | | | | | | | | Enable flychecks with JSON project workspaces if an override command was provided as part of the client configuration.