rust/crates
bors[bot] 090e013161
Merge #8124
8124: Add basic lifetime completion r=Veykril a=Veykril

This adds basic lifetime completion, basic in the sense that the completions for lifetimes are only shown when the user enters `'` followed by a char. Showing them when nothing is entered is kind of a pain, as we would want them to only show up where they are useful which in turn requires a lot of tree traversal and cursor position checking to verify whether the position is valid for a lifetime. This in itself doesn't seem too bad as usually when you know you want to write a lifetime putting `'` to ask for lifetime completions seems fine.

~~I'll take a look at whether its possible to lift the restriction of having to put a char after `'`.~~ This actually already works so I guess this is the clients responsibility, in which case VSCode doesn't like it.

![TYH9gIlyVo](https://user-images.githubusercontent.com/3757771/111886437-c9b02f80-89cd-11eb-9bee-340f1536b0de.gif)


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-20 22:32:25 +00:00
..
base_db avoid converting types into themselves via .into() (clippy::useless-conversion) 2021-03-17 01:27:56 +01:00
cfg Add runnables::related_tests 2021-02-27 18:00:17 +03:00
flycheck Bump cargo_metadata 2021-03-02 14:27:29 +02:00
hir Turn Obligation into something similar to chalk_ir::DomainGoal 2021-03-20 12:47:12 +01:00
hir_def Add AttrsWithOwner and clean up source_map 2021-03-19 21:23:57 +01:00
hir_expand Return Either from MacroDefId::ast_id 2021-03-19 19:56:13 +01:00
hir_ty Turn Obligation into something similar to chalk_ir::DomainGoal 2021-03-20 12:47:12 +01:00
ide Don't use an untyped String for ActiveParam tracking 2021-03-20 23:22:09 +01:00
ide_assists Merge #8119 2021-03-20 12:58:28 +00:00
ide_completion Merge #8124 2021-03-20 22:32:25 +00:00
ide_db Don't use an untyped String for ActiveParam tracking 2021-03-20 23:22:09 +01:00
ide_ssr don't clone types that are copy (clippy::clone_on_copy) 2021-03-17 01:56:31 +01:00
mbe Reorganize mbe tests 2021-03-18 17:22:52 +08:00
parser Parse extended_key_value_attributes 2021-03-19 02:13:46 +01:00
paths Document paths items 2021-01-22 15:38:33 +01:00
proc_macro_api remove uselessly wrapped ?s. (clippy::meedless_question_mark 2021-03-17 02:19:40 +01:00
proc_macro_srv Add test for proc-macro meta info retrieval 2021-03-15 23:38:22 +08:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile add more counts 2021-01-27 12:39:19 +03:00
project_model some clippy::performance fixes 2021-03-15 10:19:59 +01:00
rust-analyzer Don't return a SourceChange on WillRenameFiles when nothing gets refactored 2021-03-20 13:57:58 +01:00
stdx Cleanup decl_check 2021-02-05 16:09:45 +01:00
syntax Don't use an untyped String for ActiveParam tracking 2021-03-20 23:22:09 +01:00
test_utils Add new_source_root meta to test fixtures 2021-03-16 15:28:02 +01:00
text_edit Avoid turning completion objects into builders 2020-11-16 23:16:41 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt add expand log 2021-03-13 20:14:21 +08:00
vfs Fix slow tests sometimes failing 2021-02-12 16:31:16 +01:00
vfs-notify Fix slow tests sometimes failing 2021-02-12 16:31:16 +01:00