diff options
Diffstat (limited to 'guide.md')
-rw-r--r-- | guide.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -515,3 +515,15 @@ construct a mapping from `ExprId`s to types. | |||
515 | [type-inference]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_hir/src/ty.rs#L1208-L1223 | 515 | [type-inference]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_hir/src/ty.rs#L1208-L1223 |
516 | 516 | ||
517 | ## Tying it all together: completion | 517 | ## Tying it all together: completion |
518 | |||
519 | To conclude the overview of the rust analyzer, let's trace the request for | ||
520 | (type-inference powered!) code completion! | ||
521 | |||
522 | We start by [receiving a message] from the language client. We decode the | ||
523 | message as a request for completion and [schedule it on the threadpool]. This is | ||
524 | the place where we [catch] canceled error if, immediately after completion, the | ||
525 | client sends some modification. | ||
526 | |||
527 | [receiving a message]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L203 | ||
528 | [schedule it on the threadpool]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L428 | ||
529 | [catch]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L436-L442 | ||