aboutsummaryrefslogtreecommitdiff
path: root/src/lsp
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 14:57:42 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 14:57:42 +0330
commit0432ac6aefccbc5a9af25bd4ed2d4451611c4ff4 (patch)
treeba312d92bc223e1a4c500134cf1343f7e1f63180 /src/lsp
parentmerge work/borrow: borrow returns before definition, borrows clause, borrow m... (diff)
analyzer: an outer owner moved into a deeper container can take it back (loop-built lists); block-end frees name the owner (why 9) in messages and LSP related info
Diffstat (limited to 'src/lsp')
-rw-r--r--src/lsp/server.zc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lsp/server.zc b/src/lsp/server.zc
index 65881a9..0fda725 100644
--- a/src/lsp/server.zc
+++ b/src/lsp/server.zc
@@ -278,6 +278,7 @@ int diag_related(int at) {
else if (why == 3) what = " was moved here"; else if (why == 4) what = " was stored into a container here";
else if (why == 5) what = " was returned here"; else if (why == 6) what = " was stored in a global here";
else if (why == 7) what = " was freed by this reassignment"; else if (why == 8) what = " was pushed into an array here";
+ else if (why == 9) what = " was freed at the end of this block";
ws(",\"relatedInformation\":[{\"location\":"); wplace(e[1]); ws(",\"message\":\"owner "); ws(e[4]); ws(what); ws("\"}");
if (e[2]) { ws(",{\"location\":"); wplace(e[2]); ws(",\"message\":\"owner "); ws(e[4]); ws(" is declared here\"}"); }
wc(']');