aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | add doctest runnables on struct #6356Benjamin Coenen2020-10-271-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | | | Merge #6379bors[bot]2020-10-273-0/+15
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6379: Highlight never type as BuiltinType r=matklad a=Veykril Fixes #6374 Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Highlight never type as BuiltinTypeLukas Wirth2020-10-263-0/+15
| | |/ / / | |/| | |
* | | | | Merge #6376bors[bot]2020-10-274-1/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6376: Avoid impls_fnonce to return true when the trait solving is ambiguous r=flodiebold a=GrayJack This PR should fix #6375 This adds a variation of `method_resolution::implements_trait` called `method_resolution::implements_trait_unique`, that only returns true when the trait solving is unique, and also change `impls_fnonce` to use the later instead. I also added a test just to be sure. Co-authored-by: GrayJack <[email protected]>
| * | | | | Fix testGrayJack2020-10-261-158/+158
| | | | | |
| * | | | | Add test to avoid regressionGrayJack2020-10-262-153/+165
| | | | | |
| * | | | | Fix case where non FnOnce variables is marked callableGrayJack2020-10-262-1/+14
| | |/ / / | |/| | |
* | | | | Merge #6257bors[bot]2020-10-261-11/+11
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6257: Don't suggest extracting out 1-tuple enum variants r=matklad a=repnop Fixes #6241. Co-authored-by: Wesley Norris <[email protected]>
| * | | | Don't suggest extracting out 1-tuple enum variantsWesley Norris2020-10-261-11/+11
| | | | | | | | | | | | | | | | | | | | Fixes #6241.
* | | | | Better ordering of assistsAleksey Kladov2020-10-261-2/+3
| | | | |
* | | | | Merge #6351bors[bot]2020-10-2621-184/+164
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6351: Organized completions r=popzxc a=popzxc This PR continues the work on refactoring of the `completions` crate. In this episode: - Actual completions methods are encapsulated into `completions` module, so they aren't mixed with the rest of the code. - Name duplication was removed (`complete_attribute` => `completions::attribute`, `completion_context` => `context`). - `Completions` structure was moved from `item` module to the `completions`. - `presentation` module was removed, as it was basically a module with `impl` for `Completions`. - Code approaches were a bit unified here and there. Co-authored-by: Igor Aleksanov <[email protected]>
| * | | | Reduce visibility of some methodsIgor Aleksanov2020-10-262-3/+3
| | | | |
| * | | | Add a module doc-comment for completions moduleIgor Aleksanov2020-10-251-0/+2
| | | | |
| * | | | Remove presentation moduleIgor Aleksanov2020-10-253-1421/+1409
| | | | |
| * | | | Move Completions structure definition into completions moduleIgor Aleksanov2020-10-259-74/+74
| | | | |
| * | | | Reorganize completions structureIgor Aleksanov2020-10-2522-108/+98
| | |_|/ | |/| |
* | | | Merge #6367bors[bot]2020-10-262-2/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6367: Handle #![cfg] in crate root r=jonas-schievink a=jonas-schievink Now we correctly skip analysis of winapi on non-Windows platforms. bors r+ :robot: Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Handle #![cfg] in crate rootJonas Schievink2020-10-262-2/+22
| | | | |
* | | | | Merge #6313bors[bot]2020-10-2617-3/+57
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6313: Latest proposed LSP 3.16.0 and refresh semantic tokens r=matklad a=kjeremy Needs: https://github.com/gluon-lang/lsp-types/pull/183 Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy A. Kolb <[email protected]>
| * | | | Update testsJeremy A. Kolb2020-10-2610-0/+22
| | | | |
| * | | | Request a refresh of semantic tokens if things are loaded upkjeremy2020-10-262-0/+16
| | | | |
| * | | | Latest proposed LSP 3.16.0kjeremy2020-10-265-3/+19
| | | | | | | | | | | | | | | | | | | | Needs: https://github.com/gluon-lang/lsp-types/pull/183
* | | | | Merge #6333bors[bot]2020-10-264-8/+141
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6333: Don't interpret type path as part of visibility. r=matklad a=ArifRoktim This closes #5902. I only check that the next token isn't equal to `T![:]`, instead of the next two not being equal to `T![::]`. Is that ok? Co-authored-by: Arif Roktim <[email protected]>
| * | | | Allow assist move_arm_cond_to_match_guard inside blocksArif Roktim2020-10-241-7/+80
| | | | |
| * | | | Don't interpret type path as part of visibility.Arif Roktim2020-10-243-1/+61
| | | | |
* | | | | Merge #6347bors[bot]2020-10-261-24/+141
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6347: Support insertion in SyntaxRewriter r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Remove InsertPos::Before variant in Syntax RewriterLukas Wirth2020-10-241-13/+20
| | | | | |
| * | | | | Support insertion in SyntaxRewriterLukas Wirth2020-10-241-24/+134
| | | | | |
* | | | | | Merge #6350bors[bot]2020-10-261-126/+123
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6350: Make IncorrectDiagnostic match rustc by copying rustc's code. r=popzxc a=ArifRoktim This closes #6343 and closes #6345. The old algorithm which used a `DetectedCase` enum, didn't match how rustc thinks of cases. Some inputs can be interpreted as more than 1 case depending on the situation. For example, to rustc: - `ABCD`: Can be both camel case and upper snake case - `X86_64`: Can be both camel case and upper snake case I could've made `detect_case` return a collection of `DetectedCase` and then modified the other code as such, but I think using the same code rustc uses is simpler and a surefire way to achieve the same diagnostics as rustc. Co-authored-by: Arif Roktim <[email protected]>
| * | | | | Make IncorrectDiagnostic match rustc by copying rustc's code.Arif Roktim2020-10-251-126/+123
| |/ / / /
* | | | | Merge #6360bors[bot]2020-10-263-1/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6360: Fix unary minus highlighting r=matklad a=Veykril Fixes #6358 Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Fix unary minus highlightingLukas Wirth2020-10-253-1/+14
| | | | | |
* | | | | | Keep parens around in remove-dbg for range expressionsLukas Wirth2020-10-251-8/+9
| | | | | |
* | | | | | Don't keep parens around in remove-dbgLukas Wirth2020-10-251-1/+61
| | | | | |
* | | | | | Don't keep parens around with remove-dbg when encountering method chainingLukas Wirth2020-10-251-0/+20
|/ / / / /
* | | | | Add tracing to main rust-analyzer binaryFlorian Diebold2020-10-253-1/+26
| | | | |
* | | | | Get rid of FAKE_PLACEHOLDERFlorian Diebold2020-10-251-8/+9
| |_|/ / |/| | | | | | | | | | | | | | | The lifetime placeholder can be replaced by the static lifetime, and for array sizes we should just be using a concrete const.
| | | |
| \ \ \
*-. \ \ \ Merge #6331 #6342bors[bot]2020-10-2466-238/+420
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6331: correct hover text for items with doc attribute with raw strings r=matklad a=JoshMcguigan Fixes #6300 by improving the handling of raw string literals in attribute style doc comments. This still has a bug where it could consume too many `"` at the start or end of the comment text, just as the original code had. Not sure if we want to fix that as part of this PR or not? If so, I think I'd prefer to add a unit test for either the `as_simple_key_value` function (I'm not exactly sure where this would belong / how to set this up) or create a `fn(&SmolStr) -> &SmolStr` to unit test by factoring out the `trim` operations from `as_simple_key_value`. Thoughts on this? 6342: Shorter dependency chain r=matklad a=popzxc Continuing implementing suggestions from the `Completion refactoring` zulip thread. This PR does the following: - Removes dependency of `completions` on `assists` by moving required functionality into `ide_db`. - Moves completely `call_info` crate into `ide_db` as it looks like it fits perfect there. - Adds a bunch of new tests and docs. - Adds the re-export of `base_db` to the `ide_db` and removes direct dependency on `base_db` from other crates. The last point is controversial, I guess, but I noticed that in places where `ide_db` is used, `base_db` is also *always* used. Thus I think the dependency on the `base_db` is implied by the fact of `ide_db` interfaces, and thus it makes sense to just provide `base_db` out of the box. Co-authored-by: Josh Mcguigan <[email protected]> Co-authored-by: Igor Aleksanov <[email protected]>
| | * | | | Re-export base_db from ide_dbIgor Aleksanov2020-10-2451-70/+69
| | | | | |
| | * | | | Add tests for traits functions in ide_dbIgor Aleksanov2020-10-241-0/+149
| | | | | |
| | * | | | Make call_info a part of ide_dbIgor Aleksanov2020-10-2410-37/+13
| | | | | |
| | * | | | Remove dependency on 'assists' from 'completion' crateIgor Aleksanov2020-10-2411-128/+151
| | | | | |
| * | | | | correct hover for items with doc attribute with raw stringsJosh Mcguigan2020-10-242-3/+38
| | |_|/ / | |/| | |
* | | | | Merge #6344bors[bot]2020-10-244-6/+6
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6344: Bump deps r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | Bump chalkLaurențiu Nicola2020-10-241-3/+3
| | | | |
| * | | | Bump rustc_lexerLaurențiu Nicola2020-10-241-1/+1
| | | | |
| * | | | Bump depsLaurențiu Nicola2020-10-242-2/+2
| | |/ / | |/| |
* / | | Fix indentation of inserted use statementsFlorian Diebold2020-10-242-37/+135
|/ / /
| | |
| \ \
*-. \ \ Merge #6251 #6310bors[bot]2020-10-2311-32/+464
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6251: Semantic Highlight: Add Callable modifier for variables r=matklad a=GrayJack This PR added the `HighlightModifier::Callable` variant and assigned it to variables and parameters that are fn pointers, closures and implements FnOnce trait. This allows to colorize these variables/parameters when used in call expression. 6310: Rewrite algo::diff to support insertion and deletion r=matklad a=Veykril This in turn also makes `algo::diff` generate finer diffs(maybe even minimal diffs?) as insertions and deletions aren't always represented as as replacements of parent nodes now. Required for #6287 to go on. Co-authored-by: GrayJack <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| | * | | algo::diff testsLukas Wirth2020-10-222-4/+327
| | | | |