about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-09 08:18:12 +0000
committerbors <bors@rust-lang.org>2023-04-09 08:18:12 +0000
commit51d5862caf428c9e160ccf28d684f0a33faccd7d (patch)
treeafa71e06a0f2b48e34c70f98949a436ea260cd97 /editors/code/src
parent01120f1213ad928de7300a8acf9f41bed72d0422 (diff)
parent98a673c4a89726324e0ef7238181bb85e49ea3e5 (diff)
downloadrust-51d5862caf428c9e160ccf28d684f0a33faccd7d.tar.gz
rust-51d5862caf428c9e160ccf28d684f0a33faccd7d.zip
Auto merge of #14538 - Veykril:project-link-fix, r=Veykril
fix: Fix project linking popup appearing for modules that can be linked to a crate

should fix https://github.com/rust-lang/rust-analyzer/issues/14523
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/client.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index e76710cb247..b27d9f54943 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -125,7 +125,11 @@ export async function createClient(
                         typeof diag.code === "string" || typeof diag.code === "number"
                             ? diag.code
                             : diag.code?.value;
-                    if (value === "unlinked-file" && !unlinkedFiles.includes(uri)) {
+                    if (
+                        value === "unlinked-file" &&
+                        !unlinkedFiles.includes(uri) &&
+                        diag.message !== "file not included in module tree"
+                    ) {
                         const config = vscode.workspace.getConfiguration("rust-analyzer");
                         if (config.get("showUnlinkedFileNotification")) {
                             unlinkedFiles.push(uri);