From 511ae17d07f3be1db0f1d6c43ee4fd51eae881f9 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 23 Jun 2021 18:11:48 +0200 Subject: [PATCH] Improve feature docs for highlight_related --- crates/ide/src/highlight_related.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs index de918ac86f4..d2c6c3c9dc8 100644 --- a/crates/ide/src/highlight_related.rs +++ b/crates/ide/src/highlight_related.rs @@ -21,7 +21,10 @@ pub struct DocumentHighlight { // Feature: Highlight Related // -// Highlights exit points, yield points or the definition and all references of the item at the cursor location in the current file. +// Highlights constructs related to the thing under the cursor: +// - if on an identifier, highlights all references to that identifier in the current file +// - if on an `async` or `await token, highlights all yield points for that async context +// - if on a `return` token, `?` character or `->` return type arrow, highlights all exit points for that context pub(crate) fn highlight_related( sema: &Semantics, position: FilePosition, -- 2.44.0