aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | 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
|/ / / / /
* | | | | Merge #6354bors[bot]2020-10-254-1/+29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6354: Add tracing to main rust-analyzer binary r=flodiebold a=flodiebold This makes `CHALK_DEBUG` logging work again e.g. when running `analysis-stats`, which is very helpful for debugging. This change shouldn't regress compile times at all. The reason for that is that chalk-solve already pulls in these crates, and while that's behind a feature (mostly for our benefit, I think) we never actually disabled that feature :sweat_smile: So alternatively, we could disable the feature and maybe get an improvement in compile times. In my test I just did to see the impact of that, this PR actually compiled faster than the one just removing tracing though, so it's probably not a big deal. Co-authored-by: Florian Diebold <[email protected]>
| * | | | | Add tracing to main rust-analyzer binaryFlorian Diebold2020-10-254-1/+29
|/ / / / /
* | | | | Merge #6353bors[bot]2020-10-251-8/+9
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6353: Get rid of FAKE_PLACEHOLDER r=flodiebold a=flodiebold The lifetime placeholder can be replaced by the static lifetime, and for array sizes we should just be using a concrete const. Co-authored-by: Florian Diebold <[email protected]>
| * | | | 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-2467-259/+421
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2452-74/+69
| | | | | |
| | * | | | Add tests for traits functions in ide_dbIgor Aleksanov2020-10-241-0/+149
| | | | | |
| | * | | | Make call_info a part of ide_dbIgor Aleksanov2020-10-2411-53/+14
| | | | | |
| | * | | | Remove dependency on 'assists' from 'completion' crateIgor Aleksanov2020-10-2412-129/+151
| | | | | |
| * | | | | correct hover for items with doc attribute with raw stringsJosh Mcguigan2020-10-242-3/+38
| | |_|/ / | |/| | |
* | | | | Merge #6344bors[bot]2020-10-245-52/+102
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6344: Bump deps r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | Bump chalkLaurențiu Nicola2020-10-242-11/+11
| | | | |
| * | | | Bump rustc_lexerLaurențiu Nicola2020-10-242-3/+3
| | | | |
| * | | | Bump depsLaurențiu Nicola2020-10-243-38/+88
| | |/ / | |/| |
* | | | Merge #6337bors[bot]2020-10-242-37/+135
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 6337: Fix indentation of inserted use statements r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | Fix indentation of inserted use statementsFlorian Diebold2020-10-242-37/+135
|/ / /
* | | Merge #6330bors[bot]2020-10-241-16/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6330: Textmate grammar: raw IDs, underscore fixes (closes #6293, #6340) r=dustypomerleau a=dustypomerleau Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6293. I've included the possibility of the `r#` prefix in: - function definitions - function/method calls - variables/parameters This way the raw ID will simply get whatever the intended scope was, instead of a unique scope that might be inappropriately themed for its purpose. Will wait a bit for feedback, in case there are other places you might use raw IDs. Co-authored-by: Dusty Pomerleau <[email protected]>
| * | | fix: underscores, raw IDsDusty Pomerleau2020-10-241-16/+17
|/ / / | | | | | | | | | | | | | | | - remove comment scope from ignored params - underscores will automatically receive variable/param scope - add raw ID syntax to modules, functions, and variables
| | |
| \ \
*-. \ \ Merge #6251 #6310bors[bot]2020-10-2313-32/+469
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | |
| | * | | Rewrite algo::diff to support insertion and deletionLukas Wirth2020-10-225-25/+68
| | | | |
| * | | | Add tests for callable modifierGrayJack2020-10-212-0/+38
| | | | |
| * | | | Editor: Code: Add callable to package.jsonGrayJack2020-10-161-0/+4
| | | | |
| * | | | Add Callable modifier for variables that implements FnonceGrayJack2020-10-162-3/+24
| | | | |
| * | | | Add HighlightModifier::Callable and add it for localsGrayJack2020-10-164-0/+8
| | | | |
* | | | | Merge #6339bors[bot]2020-10-239-104/+224
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6339: Diagnose #[cfg]s in bodies r=matklad a=jonas-schievink This PR threads diagnostics through body lowering using the `BodySourceMap`, and emits `InactiveCode` diagnostics for expressions, statements, and match arms that are `#[cfg]`d out. Co-authored-by: Jonas Schievink <[email protected]>
| * | | | | Fix name of InactiveCode diagnosticJonas Schievink2020-10-232-7/+7
| | | | | |
| * | | | | Diagnose #[cfg]s in bodiesJonas Schievink2020-10-239-98/+218
| | | | | |
* | | | | | Merge #6336bors[bot]2020-10-231-7/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6336: Improve Chalk debugging r=matklad a=flodiebold - add panic context for the trait goal if CHALK_DEBUG is set - print the Chalk program even if we're panicking - log goal/solution while TLS is still set Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | Improve Chalk debuggingFlorian Diebold2020-10-231-7/+23
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add panic context for the trait goal if CHALK_DEBUG is set - print the Chalk program even if we're panicking - log goal/solution while TLS is still set
* | | | | | Merge #6341bors[bot]2020-10-231-8/+62
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6341: Complete variants when only enun name is typed r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Complete variants when only enun name is typedAleksey Kladov2020-10-231-8/+62
|/ / / / / | | | | | | | | | | | | | | | | | | | | This allows the client to filter `Foo::Bar` when *either* `Foo` or `Bar` is typed.
* | | | | Merge #6335bors[bot]2020-10-232-5/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6335: Fix panic context r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Fix panic contextAleksey Kladov2020-10-232-5/+5
| | | | | |
* | | | | | Merge #6324bors[bot]2020-10-2315-140/+816
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6324: Improve #[cfg] diagnostics r=jonas-schievink a=jonas-schievink Unfortunately I ran into https://github.com/rust-analyzer/rust-analyzer/issues/4058 while testing this on https://github.com/nrf-rs/nrf-hal/, so I didn't see much of it in action yet, but it does seem to work. Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
| * | | | | cfg: move tests to separate fileJonas Schievink2020-10-234-208/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that way we don't have to re-check the entire project when a test is changed
| * | | | | Reorder itemsJonas Schievink2020-10-231-9/+9
| | | | | |
| * | | | | Use format_toJonas Schievink2020-10-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Update crates/cfg/src/cfg_expr.rsJonas Schievink2020-10-221-1/+1
| | | | | | | | | | | | | | | | | | Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Emit better #[cfg] diagnosticsJonas Schievink2020-10-229-65/+124
| | | | | |
| * | | | | Fix typoJonas Schievink2020-10-222-1/+2
| | | | | |
| * | | | | Implement DNF-based `#[cfg]` introspectionJonas Schievink2020-10-225-2/+622
| | | | | |
| * | | | | Simplify cfg representationJonas Schievink2020-10-213-31/+41
| | | | | |
* | | | | | Merge #6098bors[bot]2020-10-225-26/+132
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6098: Insert ref for completions r=adamrk a=adamrk Follow up to https://github.com/rust-analyzer/rust-analyzer/pull/5846. When we have a local in scope which needs a ref or mutable ref to match the name and type of the active in the completion context then a new completion item with `&` or `&mut ` is inserted. E.g. ```rust fn foo(arg: &i32){}; fn main() { let arg = 1_i32; foo(a<|>) } ``` now offers `&arg` as a completion option with the highest score. Co-authored-by: adamrk <[email protected]>
| * | | | | | Insert ref for completionsadamrk2020-10-225-26/+132
|/ / / / / /
| | | | | |
| \ \ \ \ \
*-. \ \ \ \ \ Merge #6325 #6327bors[bot]2020-10-222-1/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6325: Add generated diagnostic docs to the manual r=matklad a=flodiebold It seemed that we're not actually including the generated diagnostic docs anywhere yet? So I added something to the manual. This is completely untested though. 6327: Update debugging.md r=matklad a=stanciuadrian `on_task` is no longer there. I have used `on_request` instead. Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Adrian Stanciu <[email protected]>
| | * | | | | | Update debugging.mdAdrian Stanciu2020-10-221-1/+1
| | | |/ / / / | | |/| | | |
| * / | | | | Add generated diagnostic docs to the manualFlorian Diebold2020-10-221-0/+7
| |/ / / / /