rust-analyzer/crates/ide/src
bors[bot] bf84e4958e
Merge #6331 #6342
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 <joshmcg88@gmail.com>
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
2020-10-24 19:08:12 +00:00
..
diagnostics Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
display Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
references Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
syntax_highlighting Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
typing Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
call_hierarchy.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
diagnostics.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
display.rs Extract call_info and completion into separate crates 2020-10-18 13:09:00 +03:00
doc_links.rs Fix opening module documentation opening parent documentation instead 2020-10-22 17:33:52 +13:00
expand_macro.rs rename mock_analysis -> fixture 2020-10-02 17:49:44 +02:00
extend_selection.rs rename mock_analysis -> fixture 2020-10-02 17:49:44 +02:00
file_structure.rs Switch to expect_test from crates.io 2020-08-21 13:19:31 +02:00
fixture.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
fn_references.rs rename mock_analysis -> fixture 2020-10-02 17:49:44 +02:00
folding_ranges.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
goto_definition.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
goto_implementation.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
goto_type_definition.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
hover.rs Merge #6331 #6342 2020-10-24 19:08:12 +00:00
inlay_hints.rs Hide paramater inlay hints for cloned vars if applicable 2020-10-22 19:44:52 +02:00
join_lines.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
lib.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
markdown_remove.rs add break after codeblocks 2020-10-06 16:34:38 +02:00
markup.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
matching_brace.rs Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
parent_module.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
prime_caches.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
references.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
runnables.rs Emit better #[cfg] diagnostics 2020-10-22 19:19:18 +02:00
status.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
syntax_highlighting.rs Add Callable modifier for variables that implements Fnonce 2020-10-16 07:52:18 -03:00
syntax_tree.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
typing.rs Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00