From 98a673c4a89726324e0ef7238181bb85e49ea3e5 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 9 Apr 2023 10:02:30 +0200 Subject: fix: Fix project linking popup appearing for modules that can be linked to a crate --- editors/code/src/client.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'editors/code/src') 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); -- cgit 1.4.1-3-g733a5