aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Finish SourceFile grammarAleksey Kladov2020-07-292-2/+4
| | |
| | * Rename ModuleItem -> ItemAleksey Kladov2020-07-2916-462/+455
| | |
| * | Merge #5554bors[bot]2020-07-291-9/+85
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5554: Fix remove_dbg r=matklad a=petr-tik Closes #5129 Addresses two issues: - keep the parens from dbg!() in case the call is chained or there is semantic difference if parens are excluded - Exclude the semicolon after the dbg!(); by checking if it was accidentally included in the macro_call investigated, but decided against: fix ast::MacroCall extraction to never include semicolons at the end - this logic lives in rowan. Defensively shorten the macro_range if there is a semicolon token. Deleted unneccessary temp variable macro_args Renamed macro_content to "paste_instead_of_dbg", because it isn't a simple extraction of text inside dbg!() anymore Co-authored-by: petr-tik <[email protected]>
| | * | Addressed code reviewpetr-tik2020-07-291-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | replaced match with let-if variable assignment removed the unnecessary semicolon_on_end variable converted all code and expected test variables to raw strings and inlined them in asserts
| | * | Fixed #5129petr-tik2020-07-271-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses two issues: - keep the parens from dbg!() in case the call is chained or there is semantic difference if parens are excluded - Exclude the semicolon after the dbg!(); by checking if it was accidentally included in the macro_call investigated, but decided against: fix ast::MacroCall extraction to never include semicolons at the end - this logic lives in rowan. Defensively shorten the macro_range if there is a semicolon token. Deleted unneccessary temp variable macro_args Renamed macro_content to "paste_instead_of_dbg", because it isn't a simple extraction of text inside dbg!() anymore
| | * | Make all test fn names consistent in remove_dbgpetr-tik2020-07-271-3/+29
| | | |
| | * | Added failing testspetr-tik2020-07-271-0/+21
| | | |
| * | | Merge #5563bors[bot]2020-07-292-6/+7
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | 5563: Check all targets for package-level tasks r=matklad a=SomeoneToIgnore When invoking "Select Runnable" with the caret on a runnable with a specific target (test, bench, binary), append the corresponding argument for the `cargo check -p` module runnable. Co-authored-by: Kirill Bulatov <[email protected]>
| | * | Run package-specific cargo check and test for all targetsKirill Bulatov2020-07-292-6/+7
| | | |
| * | | cargo_metadata 0.11.1 and cargo updatekjeremy2020-07-293-3/+3
| | | |
| * | | Update crates/rust-analyzer/src/cli/analysis_stats.rsAleksey Kladov2020-07-291-1/+1
| | | | | | | | | | | | Co-authored-by: LaurenČ›iu Nicola <[email protected]>
| * | | Replace rand with oorandomAleksey Kladov2020-07-295-18/+33
| | | |
| * | | Rename NomialDef -> AdtDefAleksey Kladov2020-07-294-27/+27
| | | |
| * | | Switch to ungrammar from ast_srcAleksey Kladov2020-07-294-2205/+825
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary advantage of ungrammar is that it (eventually) allows one to describe concrete syntax tree structure -- with alternatives and specific sequence of tokens & nodes. That should be re-usable for: * generate `make` calls * Rust reference * Hypothetical parser's evented API We loose doc comments for the time being unfortunately. I don't think we should add support for doc comments to ungrammar -- they'll make grammar file hard to read. We might supply docs as out-of band info, or maybe just via a reference, but we'll think about that once things are no longer in flux
| * | | Dead codeAleksey Kladov2020-07-291-41/+0
| | | |
| * | | Remove dead codeAleksey Kladov2020-07-291-3/+1
| | | |
| * | | Remove dead codeAleksey Kladov2020-07-291-46/+0
| |/ /
| * | Merge #5564bors[bot]2020-07-299-53/+182
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5564: SSR: Restrict to current selection if any r=davidlattimore a=davidlattimore The selection is also used to avoid unnecessary work, but only to the file level. Further restricting unnecessary work is left for later. Co-authored-by: David Lattimore <[email protected]>
| | * | SSR: Rename position and lookup_context to resolve_contextDavid Lattimore2020-07-292-6/+6
| | | |
| | * | SSR: Restrict to current selection if anyDavid Lattimore2020-07-298-48/+177
| | | | | | | | | | | | | | | | | | | | The selection is also used to avoid unnecessary work, but only to the file level. Further restricting unnecessary work is left for later.
| * | | Merge #5565bors[bot]2020-07-292-1/+62
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5565: SSR: Don't mix non-path-based rules with path-based r=matklad a=davidlattimore If any rules contain paths, then we reject any rules that don't contain paths. Allowing a mix leads to strange semantics, since the path-based rules only match things where the path refers to semantically the same thing, whereas the non-path-based rules could match anything. Specifically, if we have a rule like `foo ==>> bar` we only want to match the `foo` that is in the current scope, not any `foo`. However "foo" can be parsed as a pattern (BIND_PAT -> NAME -> IDENT). Allowing such a rule through would result in renaming everything called `foo` to `bar`. It'd also be slow, since without a path, we'd have to use the slow-scan search mechanism. Co-authored-by: David Lattimore <[email protected]>
| | * | | SSR: Don't mix non-path-based rules with path-basedDavid Lattimore2020-07-292-1/+62
| | |/ / | | | | | | | | | | | | If any rules contain paths, then we reject any rules that don't contain paths. Allowing a mix leads to strange semantics, since the path-based rules only match things where the path refers to semantically the same thing, whereas the non-path-based rules could match anything. Specifically, if we have a rule like `foo ==>> bar` we only want to match the `foo` that is in the current scope, not any `foo`. However "foo" can be parsed as a pattern (BIND_PAT -> NAME -> IDENT). Allowing such a rule through would result in renaming everything called `foo` to `bar`. It'd also be slow, since without a path, we'd have to use the slow-scan search mechanism.
| * / / Allow running more tests at onceKirill Bulatov2020-07-281-54/+110
| |/ /
| * | Fix nameref parsingAleksey Kladov2020-07-283-7/+8
| | |
| * | Bump test timeout for macsAleksey Kladov2020-07-281-1/+2
| | |
* | | Added competition for unstable featuresDmitry2020-08-094-9/+25
|/ / | | | | Added xtask for download unstable book from rust repository and codegene for it. Also small changes from lint
* | Merge #5547bors[bot]2020-07-271-1/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5547: Fold multiline fn parameters r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Fold multiline fn parametersAleksey Kladov2020-07-271-1/+13
| | |
* | | Merge #5532bors[bot]2020-07-272-23/+31
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 5532: Restore line index optimization for edits r=matklad a=lnicola Co-authored-by: LaurenČ›iu Nicola <[email protected]>
| * | Restore line index micro-optimizationLaurențiu Nicola2020-07-252-23/+31
| | |
* | | Merge #5539bors[bot]2020-07-273-27/+103
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5539: SSR: Fix path resolution of locals in current scope r=matklad a=davidlattimore Co-authored-by: David Lattimore <[email protected]>
| * | | SSR: Fix for path resolution of localsDavid Lattimore2020-07-262-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that Semantics::scope, if given a statement node, won't resolve locals that were defined in the current scope, only in parent scopes. Not sure if this is intended / expected behavior, but we work around it for now by finding another nearby node to use as the scope (e.g. the expression inside the EXPR_STMT).
| * | | SSR: Move more resolution-related code into the resolving moduleDavid Lattimore2020-07-262-27/+38
| | | |
* | | | add completion for rustc lintsEmil Gardström2020-07-271-4/+278
|/ / /
* | | Report type errors in metricsAleksey Kladov2020-07-261-0/+4
| | |
* | | Add one more testAleksey Kladov2020-07-261-21/+50
|/ /
* | Add rustc-perf to metricsAleksey Kladov2020-07-254-20/+54
| |
* | Merge #5520bors[bot]2020-07-244-7/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | 5520: Add DocumentData to represent in-memory document with LSP info r=matklad a=kjeremy At the moment this only holds document version information but in the near-future it will hold other things like semantic token delta info. Co-authored-by: kjeremy <[email protected]>
| * | Add DocumentData to represent in-memory document with LSP infokjeremy2020-07-244-7/+26
| | |
* | | Merge #5524bors[bot]2020-07-249-98/+149
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5524: Allow opting out of experimental diagnostics like MismatchedArgCount r=matklad a=jonas-schievink Closes https://github.com/rust-analyzer/rust-analyzer/issues/5448 Closes https://github.com/rust-analyzer/rust-analyzer/issues/5419 Co-authored-by: Jonas Schievink <[email protected]>
| * | | Only display experimental diagnostics when enabledJonas Schievink2020-07-245-11/+22
| | | |
| * | | Add toggle for experimental diagnosticsJonas Schievink2020-07-241-0/+4
| | | |
| * | | Mark MismatchedArgCount as experimentalJonas Schievink2020-07-241-0/+3
| | | |
| * | | Allow filtering diagnosticsJonas Schievink2020-07-241-3/+22
| | | |
| * | | Add a builder for DiagnosticSinkJonas Schievink2020-07-244-88/+102
| | | |
* | | | Revert "Merge #5516"Aleksey Kladov2020-07-242-43/+32
| | | | | | | | | | | | | | | | | | | | This reverts commit 5b13c2411f025a16495f5828afe2def6e9220102, reversing changes made to c3defe2532ba6ffd12a13bcbc8fdeda037665efc.
* | | | Merge #5522bors[bot]2020-07-241-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5522: Increace tracing-tree version from 0.1.3 to 0.1.4 r=kjeremy a=vandenheuvel Co-authored-by: Bram van den Heuvel <[email protected]>
| * | | | Increace tracing-tree version from 0.1.3 to 0.1.4Bram van den Heuvel2020-07-241-1/+1
| | |_|/ | |/| |
* | | | Merge #5516bors[bot]2020-07-242-32/+43
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5516: Better LSP conformance r=matklad a=vsrs At the moment rust-analyzer does not fully conform to the LSP. This PR fixes two LSP related issues: 1) rust-analyzer sends predefined server capabilities and does not take supplied client capabilities in mind. 2) rust-analyzer uses dynamic `textDocument/didSave` registration even if the client does not support it. Co-authored-by: vsrs <[email protected]>
| * | | Always send experimental & semantic server caps.vsrs2020-07-241-72/+36
| | | |