Skip to content

Instantly share code, notes, and snippets.

@nachiketkanore
Last active December 6, 2021 18:04
Show Gist options
  • Save nachiketkanore/3740a8e6c59aa4acca20c6fdf0db761f to your computer and use it in GitHub Desktop.
Save nachiketkanore/3740a8e6c59aa4acca20c6fdf0db761f to your computer and use it in GitHub Desktop.
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.294] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.295] Code complete: 1 results from Sema, 13 from Index, 0 matched, 0 from identifiers, 14 returned.\n"
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.295] --> reply:textDocument/completion(26) 4 ms\n"
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.517] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.669] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:25.862] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.192] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.377] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.382] <-- textDocument/didChange\nI[20:16:26.382] <-- textDocument/completion(27)\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.388] Code complete: sema context ClassOrStructTag, query scopes [] (AnyScope=true), expected type <none>\nI[20:16:26.388] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\nI[20:16:26.388] --> reply:textDocument/completion(27) 6 ms\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.435] <-- textDocument/didChange\nI[20:16:26.436] <-- textDocument/completion(28)\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.440] Code complete: sema context ClassOrStructTag, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.440] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.440] --> reply:textDocument/completion(28) 4 ms\n"
[ERROR][2021-12-06 20:16:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:26.805] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:27.012] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:27.435] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:27.836] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:28.169] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:28.366] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:28.867] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:16:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:28.867] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:28.878] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:29.065] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:29.297] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:29.689] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:30.190] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:30.190] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:30.195] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:31.661] <-- textDocument/didChange\nI[20:16:31.661] <-- textDocument/completion(29)\n"
[ERROR][2021-12-06 20:16:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:31.669] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\nI[20:16:31.670] Code complete: 2 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 2 returned (incomplete).\nI[20:16:31.670] --> reply:textDocument/completion(29) 8 ms\n"
[ERROR][2021-12-06 20:16:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:31.841] <-- textDocument/didChange\nI[20:16:31.842] <-- textDocument/completion(30)\n"
[ERROR][2021-12-06 20:16:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:31.853] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\nI[20:16:31.854] Code complete: 1 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 1 returned.\nI[20:16:31.854] --> reply:textDocument/completion(30) 12 ms\n"
[ERROR][2021-12-06 20:16:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:32.333] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:32.509] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:32.801] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.055] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.338] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.604] <-- textDocument/didChange\nI[20:16:33.605] <-- textDocument/completion(31)\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.613] Code complete: sema context NewName, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.614] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:16:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:33.614] --> reply:textDocument/completion(31) 8 ms\n"
[ERROR][2021-12-06 20:16:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:34.045] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:34.203] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:34.703] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:34.704] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:34.716] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.177] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.212] <-- textDocument/didChange\nI[20:16:36.213] <-- textDocument/completion(32)\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.221] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.222] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.222] --> reply:textDocument/completion(32) 9 ms\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.322] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.322] <-- textDocument/completion(33)\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.331] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.331] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\nI[20:16:36.331] --> reply:textDocument/completion(33) 9 ms\n"
[ERROR][2021-12-06 20:16:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:36.647] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.147] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.147] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.159] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.245] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.469] <-- textDocument/didChange\nI[20:16:37.470] <-- textDocument/completion(34)\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.478] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\nI[20:16:37.478] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\nI[20:16:37.478] --> reply:textDocument/completion(34) 8 ms\n"
[ERROR][2021-12-06 20:16:37] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:37.768] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:38] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:38.269] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:38.269] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:38] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:38.283] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:38] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:38.409] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:38] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:38.745] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.085] <-- textDocument/didChange\nI[20:16:39.085] <-- textDocument/completion(35)\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.089] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.089] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\nI[20:16:39.089] --> reply:textDocument/completion(35) 4 ms\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.301] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.802] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:39.802] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.809] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:39] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:39.816] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:40.155] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:40.449] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:40.695] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:41] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:41.196] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:41.196] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:41] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:41.208] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:41] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:41.233] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:41] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:41.733] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:41.733] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:41] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:41.746] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:42] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:42.491] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:42] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:42.992] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:42.992] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:42] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:43.004] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:43] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:43.701] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:44.141] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:44.642] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:44.642] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:44.654] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:46] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:46.038] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:46] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:46.370] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:46] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:46.866] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:47] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:47.366] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:47.367] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:47] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:47.380] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.172] <-- textDocument/didChange\nI[20:16:50.172] <-- textDocument/completion(36)\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.182] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.182] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned (incomplete).\nI[20:16:50.183] --> reply:textDocument/completion(36) 10 ms\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.246] <-- textDocument/didChange\nI[20:16:50.246] <-- textDocument/completion(37)\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.256] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.257] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned.\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.257] --> reply:textDocument/completion(37) 10 ms\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.746] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.747] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.758] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:50] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:50.900] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:51] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:51.400] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:51.400] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:51] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:51.412] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:54] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:54.970] <-- textDocument/didChange\nI[20:16:54.971] <-- textDocument/completion(38)\n"
[ERROR][2021-12-06 20:16:54] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:54.977] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:54] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:54.977] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\n"
[ERROR][2021-12-06 20:16:54] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:54.977] --> reply:textDocument/completion(38) 6 ms\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.050] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.051] <-- textDocument/completion(39)\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.055] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.055] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.055] --> reply:textDocument/completion(39) 4 ms\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.417] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:55] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:55.634] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:56] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:56.135] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:56.135] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:56] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:56.148] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:57.115] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:57.448] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:57.892] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:16:58] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:58.393] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:16:58.393] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:16:58] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:58.406] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:16:58] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:16:58.679] <-- textDocument/didSave\nI[20:16:58.679] unhandled notification textDocument/didSave\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.352] <-- textDocument/didChange\nI[20:17:00.353] <-- textDocument/completion(40)\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.362] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.363] Code complete: 2 results from Sema, 19 from Index, 0 matched, 0 from identifiers, 21 returned (incomplete).\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.364] --> reply:textDocument/completion(40) 11 ms\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.522] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.523] <-- textDocument/completion(41)\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.533] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.533] Code complete: 1 results from Sema, 13 from Index, 0 matched, 0 from identifiers, 14 returned.\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.534] --> reply:textDocument/completion(41) 11 ms\n"
[ERROR][2021-12-06 20:17:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:00.935] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:01.268] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:01.769] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:01.769] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:01.781] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:01.851] <-- textDocument/didSave\nI[20:17:01.851] unhandled notification textDocument/didSave\n"
[ERROR][2021-12-06 20:17:05] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:05.204] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:05] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:05.558] <-- textDocument/didChange\nI[20:17:05.558] <-- textDocument/completion(42)\n"
[ERROR][2021-12-06 20:17:05] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:05.567] Code complete: sema context NewName, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:05] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:05.568] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\nI[20:17:05.568] --> reply:textDocument/completion(42) 9 ms\n"
[ERROR][2021-12-06 20:17:05] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:05.838] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:06.338] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:06.339] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:06.353] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:06.500] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.000] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:06] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.000] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:07] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.014] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:07] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.097] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:07] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.597] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:07.597] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:07] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.606] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:07] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:07.694] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:08.195] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:08.195] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:08.208] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:08.355] <-- textDocument/didSave\nI[20:17:08.356] unhandled notification textDocument/didSave\n"
[ERROR][2021-12-06 20:17:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:08.958] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.459] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.459] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.471] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.552] <-- textDocument/didChange\nI[20:17:09.553] <-- textDocument/completion(43)\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.560] Code complete: sema context NewName, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.561] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.561] --> reply:textDocument/completion(43) 7 ms\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.798] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:09] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:09.983] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:10.483] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:10.483] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:10.489] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:10.655] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:10.885] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:11.386] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:11.386] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:11.398] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:11.467] <-- textDocument/didSave\nI[20:17:11.467] unhandled notification textDocument/didSave\n"
[ERROR][2021-12-06 20:17:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:12.395] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:12.895] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:12.896] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:12.908] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.048] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.548] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.548] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.560] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.697] <-- textDocument/didChange\nI[20:17:13.697] <-- textDocument/completion(44)\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.706] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.706] Code complete: 2 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 2 returned (incomplete).\nI[20:17:13.707] --> reply:textDocument/completion(44) 9 ms\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.972] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.973] <-- textDocument/completion(45)\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.976] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.977] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:17:13] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:13.977] --> reply:textDocument/completion(45) 4 ms\n"
[ERROR][2021-12-06 20:17:14] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:14.439] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:14] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:14.779] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.274] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.748] <-- textDocument/didChange\nI[20:17:15.749] <-- textDocument/completion(46)\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.758] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\nI[20:17:15.759] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\nI[20:17:15.759] --> reply:textDocument/completion(46) 9 ms\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.826] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.827] <-- textDocument/completion(47)\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.835] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.836] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:17:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:15.836] --> reply:textDocument/completion(47) 9 ms\n"
[ERROR][2021-12-06 20:17:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:16.121] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:16.603] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:17] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:17.103] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:17] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:17.104] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:17] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:17.118] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:17] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:17.879] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:18] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:18.380] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:18] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:18.380] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:18] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:18.397] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:19] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:19.598] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.098] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.099] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.109] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.185] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.686] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.686] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:20.698] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.501] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.607] <-- textDocument/didChange\nI[20:17:21.608] <-- textDocument/completion(48)\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.620] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.620] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.621] --> reply:textDocument/completion(48) 13 ms\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.701] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.701] <-- textDocument/completion(49)\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.711] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.711] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:17:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:21.712] --> reply:textDocument/completion(49) 10 ms\n"
[ERROR][2021-12-06 20:17:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:22.022] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:22.215] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:22.601] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:23] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:23.102] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:23.102] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:23] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:23.114] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.705] <-- textDocument/didChange\nI[20:17:25.705] <-- textDocument/completion(50)\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.716] Code complete: sema context SymbolOrNewName, query scopes [] (AnyScope=true), expected type <none>\nI[20:17:25.716] Code complete: 0 results from Sema, 10 from Index, 0 matched, 0 from identifiers, 10 returned (incomplete).\nI[20:17:25.717] --> reply:textDocument/completion(50) 11 ms\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.827] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.828] <-- textDocument/completion(51)\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.835] Code complete: sema context SymbolOrNewName, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.836] Code complete: 0 results from Sema, 14 from Index, 0 matched, 0 from identifiers, 14 returned.\n"
[ERROR][2021-12-06 20:17:25] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:25.836] --> reply:textDocument/completion(51) 8 ms\n"
[ERROR][2021-12-06 20:17:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:26.191] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:26] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:26.549] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.049] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:27.049] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.050] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.061] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.550] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.550] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:27.562] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:28] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:28.694] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.194] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.194] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.207] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.572] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.652] <-- textDocument/didChange\nI[20:17:29.653] <-- textDocument/completion(52)\n"
[ERROR][2021-12-06 20:17:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:29.657] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\nI[20:17:29.657] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned (incomplete).\nI[20:17:29.658] --> reply:textDocument/completion(52) 4 ms\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.153] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.153] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.157] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.163] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.309] <-- textDocument/didChange\nI[20:17:30.310] <-- textDocument/completion(53)\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.320] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.320] Code complete: 0 results from Sema, 1 from Index, 0 matched, 0 from identifiers, 1 returned (incomplete).\nI[20:17:30.321] --> reply:textDocument/completion(53) 10 ms\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.446] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.447] <-- textDocument/completion(54)\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.457] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type <none>\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.458] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.458] --> reply:textDocument/completion(54) 10 ms\n"
[ERROR][2021-12-06 20:17:30] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:30.677] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:31.178] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:31.178] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:31.185] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:31.304] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:31.804] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:31.804] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:31.816] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.050] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.551] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.551] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.566] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.766] <-- textDocument/didChange\nI[20:17:32.766] <-- textDocument/completion(55)\n"
[ERROR][2021-12-06 20:17:32] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:32.773] Code complete: sema context TypeQualifiers, query scopes [] (AnyScope=true), expected type <none>\nI[20:17:32.774] Code complete: 0 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 0 returned.\nI[20:17:32.774] --> reply:textDocument/completion(55) 7 ms\n"
[ERROR][2021-12-06 20:17:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:33.266] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:33.266] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:33.272] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:33.439] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:33] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:33.744] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:34.022] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:34.523] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:34.523] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:34.528] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:17:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:57.469] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:17:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:57.969] Failed to find compilation database for /home/nachiket/L/hello.c\nI[20:17:57.969] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:17:57] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:17:57.975] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:18:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:00.196] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:18:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:00.697] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:18:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:00.697] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:18:00] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:00.713] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:18:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:01.222] <-- textDocument/didChange\n"
[ERROR][2021-12-06 20:18:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:01.559] <-- textDocument/didSave\nI[20:18:01.559] unhandled notification textDocument/didSave\n"
[ERROR][2021-12-06 20:18:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:01.722] Failed to find compilation database for /home/nachiket/L/hello.c\n"
[ERROR][2021-12-06 20:18:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:01.723] Updating file /home/nachiket/L/hello.c with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/hello.c -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:18:01] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:01.728] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:18:03] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:03.537] <-- textDocument/didOpen\nI[20:18:03.538] Failed to find compilation database for /home/nachiket/L/easy.cpp\nI[20:18:03.538] Updating file /home/nachiket/L/easy.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/easy.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:18:04] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:04.193] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:18:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:08.583] <-- shutdown(56)\nI[20:18:08.583] --> reply:shutdown(56) 0 ms\n"
[ERROR][2021-12-06 20:18:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:08.584] <-- exit\n"
[ERROR][2021-12-06 20:18:08] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:08.584] LSP finished, exiting with status 0\n"
[START][2021-12-06 20:18:14] LSP logging initiated
[START][2021-12-06 20:18:20] LSP logging initiated
[ERROR][2021-12-06 20:18:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:20.263] clangd version 10.0.0-4ubuntu1 \nI[20:18:20.263] PID: 223549\nI[20:18:20.263] Working directory: /home/nachiket/L\nI[20:18:20.263] argv[0]: clangd\nI[20:18:20.263] argv[1]: --background-index\nI[20:18:20.263] Starting LSP over stdin/stdout\nI[20:18:20.263] <-- initialize(1)\nI[20:18:20.264] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 20:18:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:20.455] <-- initialized\nI[20:18:20.455] unhandled notification initialized\n"
[ERROR][2021-12-06 20:18:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:20.455] <-- textDocument/didOpen\n"
[ERROR][2021-12-06 20:18:20] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:20.455] Failed to find compilation database for /home/nachiket/L/lsp.cpp\nI[20:18:20.455] Updating file /home/nachiket/L/lsp.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/lsp.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:18:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:21.427] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:18:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:21.813] <-- shutdown(2)\nI[20:18:21.813] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 20:18:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:21.813] <-- exit\n"
[ERROR][2021-12-06 20:18:21] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:18:21.813] LSP finished, exiting with status 0\n"
[START][2021-12-06 20:18:30] LSP logging initiated
[START][2021-12-06 20:18:42] LSP logging initiated
[START][2021-12-06 20:18:46] LSP logging initiated
[START][2021-12-06 20:20:26] LSP logging initiated
[START][2021-12-06 20:20:35] LSP logging initiated
[START][2021-12-06 20:20:41] LSP logging initiated
[START][2021-12-06 20:22:35] LSP logging initiated
[START][2021-12-06 20:22:51] LSP logging initiated
[START][2021-12-06 20:24:00] LSP logging initiated
[ERROR][2021-12-06 20:24:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:24:40.231] clangd version 10.0.0-4ubuntu1 \nI[20:24:40.231] PID: 224214\nI[20:24:40.231] Working directory: /home/nachiket/cp\nI[20:24:40.231] argv[0]: clangd\nI[20:24:40.231] argv[1]: --background-index\nI[20:24:40.231] Starting LSP over stdin/stdout\nI[20:24:40.232] <-- initialize(1)\nI[20:24:40.233] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 20:24:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:24:40.391] <-- initialized\nI[20:24:40.391] unhandled notification initialized\n"
[ERROR][2021-12-06 20:24:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:24:40.392] <-- textDocument/didOpen\nI[20:24:40.392] Failed to find compilation database for /home/nachiket/cp/convexhulldynamic.sublime-snippet\nI[20:24:40.392] Updating file /home/nachiket/cp/convexhulldynamic.sublime-snippet with command clangd fallback\n[/home/nachiket/cp]\n/usr/lib/llvm-10/bin/clang /home/nachiket/cp/convexhulldynamic.sublime-snippet -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 20:24:40] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "E[20:24:40.395] Could not build CompilerInvocation for file /home/nachiket/cp/convexhulldynamic.sublime-snippet\nI[20:24:40.395] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 20:24:48] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:24:48.150] <-- shutdown(2)\nI[20:24:48.150] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 20:24:48] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[20:24:48.150] <-- exit\nI[20:24:48.150] LSP finished, exiting with status 0\n"
[START][2021-12-06 21:41:36] LSP logging initiated
[ERROR][2021-12-06 21:42:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:15.912] clangd version 10.0.0-4ubuntu1 \nI[21:42:15.912] PID: 227543\n"
[ERROR][2021-12-06 21:42:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:15.912] Working directory: /home/nachiket/cses\nI[21:42:15.912] argv[0]: clangd\nI[21:42:15.912] argv[1]: --background-index\nI[21:42:15.912] Starting LSP over stdin/stdout\n"
[ERROR][2021-12-06 21:42:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:15.912] <-- initialize(1)\n"
[ERROR][2021-12-06 21:42:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:15.913] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 21:42:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:16.090] <-- initialized\nI[21:42:16.090] unhandled notification initialized\n"
[ERROR][2021-12-06 21:42:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:16.090] <-- textDocument/didOpen\n"
[ERROR][2021-12-06 21:42:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:16.091] Failed to find compilation database for /home/nachiket/cses/dynamic_programming/grid_paths.cpp\nI[21:42:16.091] Updating file /home/nachiket/cses/dynamic_programming/grid_paths.cpp with command clangd fallback\n[/home/nachiket/cses/dynamic_programming]\n/usr/lib/llvm-10/bin/clang /home/nachiket/cses/dynamic_programming/grid_paths.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 21:42:16] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:16.970] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 21:42:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:27.710] <-- shutdown(2)\nI[21:42:27.710] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 21:42:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:27.711] <-- exit\nI[21:42:27.711] LSP finished, exiting with status 0\n"
[START][2021-12-06 21:42:31] LSP logging initiated
[ERROR][2021-12-06 21:42:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:31.775] clangd version 10.0.0-4ubuntu1 \nI[21:42:31.776] PID: 227569\nI[21:42:31.776] Working directory: /home/nachiket/L\nI[21:42:31.776] argv[0]: clangd\nI[21:42:31.776] argv[1]: --background-index\nI[21:42:31.776] Starting LSP over stdin/stdout\nI[21:42:31.776] <-- initialize(1)\nI[21:42:31.777] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 21:42:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:31.961] <-- initialized\nI[21:42:31.961] unhandled notification initialized\n"
[ERROR][2021-12-06 21:42:31] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:31.961] <-- textDocument/didOpen\nI[21:42:31.962] Failed to find compilation database for /home/nachiket/L/A.cpp\nI[21:42:31.962] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 21:42:34] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:34.352] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 21:42:35] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:35.069] <-- shutdown(2)\nI[21:42:35.069] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 21:42:35] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[21:42:35.074] <-- exit\nI[21:42:35.074] LSP finished, exiting with status 0\n"
[START][2021-12-06 22:31:36] LSP logging initiated
[ERROR][2021-12-06 22:31:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:36.284] clangd version 10.0.0-4ubuntu1 \nI[22:31:36.284] PID: 230634\nI[22:31:36.284] Working directory: /home/nachiket/L\nI[22:31:36.284] argv[0]: clangd\nI[22:31:36.284] argv[1]: --background-index\nI[22:31:36.284] Starting LSP over stdin/stdout\nI[22:31:36.285] <-- initialize(1)\n"
[ERROR][2021-12-06 22:31:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:36.286] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 22:31:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:36.483] <-- initialized\nI[22:31:36.483] unhandled notification initialized\n"
[ERROR][2021-12-06 22:31:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:36.483] <-- textDocument/didOpen\n"
[ERROR][2021-12-06 22:31:36] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:36.484] Failed to find compilation database for /home/nachiket/L/A.cpp\nI[22:31:36.484] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 22:31:38] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:38.943] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 22:31:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:44.316] <-- shutdown(2)\nI[22:31:44.316] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 22:31:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:44.317] <-- exit\n"
[ERROR][2021-12-06 22:31:44] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:31:44.317] LSP finished, exiting with status 0\n"
[START][2021-12-06 22:31:47] LSP logging initiated
[START][2021-12-06 22:31:59] LSP logging initiated
[START][2021-12-06 22:32:02] LSP logging initiated
[WARN][2021-12-06 22:32:04] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[ERROR][2021-12-06 22:32:06] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:06Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:07] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:07Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:07] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:07Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:07] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:07Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:08] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:08Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:09] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:09Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:10] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:10Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:10] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:10Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:11] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:11Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:12] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:12Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:14] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:14Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:20] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:20Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:20] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:20Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:21] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:21Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:21] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:21Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:21] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:21Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:22] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:22Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:22] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:22Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[ERROR][2021-12-06 22:32:23] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "[2021-12-06T17:02:23Z ERROR rls::actions] failed to fetch project model, using fallback: failed to parse manifest at `/home/nachiket/L/Cargo.toml`\n"
[START][2021-12-06 22:32:34] LSP logging initiated
[WARN][2021-12-06 22:32:34] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 22:33:17] LSP logging initiated
[START][2021-12-06 22:33:28] LSP logging initiated
[WARN][2021-12-06 22:33:28] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 22:35:25] LSP logging initiated
[START][2021-12-06 22:35:46] LSP logging initiated
[START][2021-12-06 22:35:54] LSP logging initiated
[START][2021-12-06 22:36:34] LSP logging initiated
[START][2021-12-06 22:36:42] LSP logging initiated
[START][2021-12-06 22:42:18] LSP logging initiated
[START][2021-12-06 22:42:37] LSP logging initiated
[START][2021-12-06 22:43:05] LSP logging initiated
[START][2021-12-06 22:43:23] LSP logging initiated
[START][2021-12-06 22:43:47] LSP logging initiated
[WARN][2021-12-06 22:43:47] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 22:45:34] LSP logging initiated
[WARN][2021-12-06 22:45:35] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 22:50:43] LSP logging initiated
[WARN][2021-12-06 22:50:44] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 22:51:10] LSP logging initiated
[ERROR][2021-12-06 22:51:10] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:10.673] clangd version 10.0.0-4ubuntu1 \nI[22:51:10.673] PID: 233101\nI[22:51:10.673] Working directory: /home/nachiket/L\nI[22:51:10.673] argv[0]: clangd\nI[22:51:10.673] argv[1]: --background-index\nI[22:51:10.673] Starting LSP over stdin/stdout\nI[22:51:10.674] <-- initialize(1)\nI[22:51:10.675] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 22:51:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:11.022] <-- initialized\nI[22:51:11.022] unhandled notification initialized\n"
[ERROR][2021-12-06 22:51:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:11.023] <-- textDocument/didOpen\n"
[ERROR][2021-12-06 22:51:11] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:11.024] Failed to find compilation database for /home/nachiket/L/A.cpp\nI[22:51:11.024] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 22:51:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:12.052] <-- textDocument/formatting(2)\n"
[ERROR][2021-12-06 22:51:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:12.173] --> reply:textDocument/formatting(2) 120 ms\n"
[ERROR][2021-12-06 22:51:12] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:12.337] <-- textDocument/didChange\n"
[ERROR][2021-12-06 22:51:14] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:14.964] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 22:51:14] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:14.964] Failed to find compilation database for /home/nachiket/L/A.cpp\n"
[ERROR][2021-12-06 22:51:14] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:14.964] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 22:51:15] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:15.176] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 22:51:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:22.104] <-- textDocument/didChange\n"
[ERROR][2021-12-06 22:51:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:22.606] Failed to find compilation database for /home/nachiket/L/A.cpp\nI[22:51:22.607] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 22:51:22] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:22.832] --> textDocument/publishDiagnostics\n"
[ERROR][2021-12-06 22:51:23] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:23.552] <-- shutdown(3)\nI[22:51:23.552] --> reply:shutdown(3) 0 ms\n"
[ERROR][2021-12-06 22:51:23] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:23.552] <-- exit\nI[22:51:23.552] LSP finished, exiting with status 0\n"
[START][2021-12-06 22:51:27] LSP logging initiated
[ERROR][2021-12-06 22:51:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:27.270] clangd version 10.0.0-4ubuntu1 \nI[22:51:27.270] PID: 233134\nI[22:51:27.270] Working directory: /home/nachiket/L\nI[22:51:27.270] argv[0]: clangd\nI[22:51:27.270] argv[1]: --background-index\nI[22:51:27.270] Starting LSP over stdin/stdout\nI[22:51:27.271] <-- initialize(1)\nI[22:51:27.272] --> reply:initialize(1) 0 ms\n"
[ERROR][2021-12-06 22:51:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:27.580] <-- initialized\nI[22:51:27.580] unhandled notification initialized\n"
[ERROR][2021-12-06 22:51:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:27.581] <-- textDocument/didOpen\n"
[ERROR][2021-12-06 22:51:27] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:27.582] Failed to find compilation database for /home/nachiket/L/A.cpp\nI[22:51:27.582] Updating file /home/nachiket/L/A.cpp with command clangd fallback\n[/home/nachiket/L]\n/usr/lib/llvm-10/bin/clang /home/nachiket/L/A.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-10/lib/clang/10.0.0\n"
[ERROR][2021-12-06 22:51:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:29.743] <-- shutdown(2)\nI[22:51:29.743] --> reply:shutdown(2) 0 ms\n"
[ERROR][2021-12-06 22:51:29] .../vim/lsp/rpc.lua:417 "rpc" "clangd" "stderr" "I[22:51:29.744] <-- exit\nI[22:51:29.744] LSP finished, exiting with status 0\n"
[START][2021-12-06 22:51:30] LSP logging initiated
[WARN][2021-12-06 22:51:31] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:01:04] LSP logging initiated
[WARN][2021-12-06 23:01:04] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:01:14] LSP logging initiated
[START][2021-12-06 23:01:21] LSP logging initiated
[START][2021-12-06 23:01:31] LSP logging initiated
[START][2021-12-06 23:01:52] LSP logging initiated
[START][2021-12-06 23:02:04] LSP logging initiated
[WARN][2021-12-06 23:02:05] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:02:58] LSP logging initiated
[WARN][2021-12-06 23:02:58] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:03:15] LSP logging initiated
[WARN][2021-12-06 23:03:16] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:10:36] LSP logging initiated
[WARN][2021-12-06 23:10:36] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[ERROR][2021-12-06 23:10:39] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "thread 'request-worker-3' panicked at 'explicit panic', /cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_errors-705.0.0/src/diagnostic_builder.rs:460:13\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"
[START][2021-12-06 23:22:46] LSP logging initiated
[START][2021-12-06 23:24:47] LSP logging initiated
[WARN][2021-12-06 23:24:48] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[START][2021-12-06 23:26:00] LSP logging initiated
[START][2021-12-06 23:26:16] LSP logging initiated
[INFO][2021-12-06 23:26:57] .../lua/vim/lsp.lua:1272 "exit_handler" {}
[START][2021-12-06 23:27:00] LSP logging initiated
[INFO][2021-12-06 23:27:03] .../lua/vim/lsp.lua:1272 "exit_handler" {}
[START][2021-12-06 23:27:12] LSP logging initiated
[INFO][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:258 "Starting RPC client" { args = {}, cmd = "rls", extra = { cwd = "/home/nachiket/rusty/hello_world" }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 1, jsonrpc = "2.0", method = "initialize", params = { capabilities = { callHierarchy = { dynamicRegistration = false }, textDocument = { codeAction = { codeActionLiteralSupport = { codeActionKind = { valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } } }, dataSupport = true, dynamicRegistration = false, resolveSupport = { properties = { "edit" } } }, completion = { completionItem = { commitCharactersSupport = true, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, labelDetailsSupport = true, preselectSupport = true, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionItemKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } }, contextSupport = false, dynamicRegistration = false }, declaration = { linkSupport = true }, definition = { linkSupport = true }, documentHighlight = { dynamicRegistration = false }, documentSymbol = { dynamicRegistration = false, hierarchicalDocumentSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, hover = { contentFormat = { "markdown", "plaintext" }, dynamicRegistration = false }, implementation = { linkSupport = true }, publishDiagnostics = { relatedInformation = true, tagSupport = { valueSet = { 1, 2 } } }, references = { dynamicRegistration = false }, rename = { dynamicRegistration = false, prepareSupport = true }, signatureHelp = { dynamicRegistration = false, signatureInformation = { activeParameterSupport = true, documentationFormat = { "markdown", "plaintext" }, parameterInformation = { labelOffsetSupport = true } } }, synchronization = { didSave = true, dynamicRegistration = false, willSave = false, willSaveWaitUntil = false }, typeDefinition = { linkSupport = true } }, window = { showDocument = { support = false }, showMessage = { messageActionItem = { additionalPropertiesSupport = false } }, workDoneProgress = true }, workspace = { applyEdit = true, configuration = true, symbol = { dynamicRegistration = false, hierarchicalWorkspaceSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, workspaceEdit = { resourceOperations = { "rename", "create", "delete" } }, workspaceFolders = true } }, clientInfo = { name = "Neovim", version = "0.7.0" }, initializationOptions = vim.empty_dict(), processId = 240945, rootPath = "/home/nachiket/rusty/hello_world", rootUri = "file:///home/nachiket/rusty/hello_world", trace = "off", workspaceFolders = { { name = "/home/nachiket/rusty/hello_world", uri = "file:///home/nachiket/rusty/hello_world" } } }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 1, jsonrpc = "2.0", result = { capabilities = { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-240948", "rls.deglobImports-240948" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true } }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "initialized", params = vim.empty_dict()}
[DEBUG][2021-12-06 23:27:12] .../lua/vim/lsp.lua:914 "LSP[rls]" "server_capabilities" { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-240948", "rls.deglobImports-240948" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true}
[INFO][2021-12-06 23:27:12] .../lua/vim/lsp.lua:915 "LSP[rls]" "initialized" { resolved_capabilities = { call_hierarchy = false, code_action = true, code_lens = true, code_lens_resolve = false, completion = true, declaration = false, document_formatting = true, document_highlight = true, document_range_formatting = false, document_symbol = true, execute_command = true, find_references = true, goto_definition = true, hover = true, implementation = true, rename = true, signature_help = false, signature_help_trigger_characters = {}, text_document_did_change = 2, text_document_open_close = true, text_document_save = true, text_document_save_include_text = false, text_document_will_save = false, text_document_will_save_wait_until = false, type_definition = false, workspace_folder_properties = { changeNotifications = false, supported = false }, workspace_symbol = true }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didOpen", params = { textDocument = { languageId = "rust", text = 'fn test(a: i32, b: i32) -> i32 {\n a + b\n}\n\nfn main() {\n println!("Hello, world!");\n println!("{}", test(10, 20));\n}\n', uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 0 } }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", title = "Building" }}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 1, jsonrpc = "2.0", method = "client/registerCapability", params = { registrations = { { id = "rls-watch", method = "workspace/didChangeWatchedFiles", registerOptions = { watchers = { { globPattern = "/home/nachiket/rusty/hello_world/Cargo.lock" }, { globPattern = "/home/nachiket/rusty/hello_world/target", kind = 4 }, { globPattern = "/home/nachiket/rusty/hello_world/Cargo.toml" } } } } } }}
[WARN][2021-12-06 23:27:12] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:461 "server_request: callback result" { result = vim.NIL, status = true}
[DEBUG][2021-12-06 23:27:12] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 1, jsonrpc = "2.0", result = vim.NIL}
[DEBUG][2021-12-06 23:27:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:27:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:27:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_1", title = "Building" }}
[DEBUG][2021-12-06 23:27:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_0", title = "Indexing" }}
[INFO][2021-12-06 23:27:13] .../lua/vim/lsp.lua:1272 "exit_handler" { { _on_attach = <function 1>, attached_buffers = { true }, cancel_request = <function 2>, commands = {}, config = { _on_attach = <function 3>, autostart = true, capabilities = { callHierarchy = { dynamicRegistration = false }, textDocument = { codeAction = { codeActionLiteralSupport = { codeActionKind = { valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } } }, dataSupport = true, dynamicRegistration = false, resolveSupport = { properties = { "edit" } } }, completion = { completionItem = { commitCharactersSupport = true, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, labelDetailsSupport = true, preselectSupport = true, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionItemKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } }, contextSupport = false, dynamicRegistration = false }, declaration = { linkSupport = true }, definition = { linkSupport = true }, documentHighlight = { dynamicRegistration = false }, documentSymbol = { dynamicRegistration = false, hierarchicalDocumentSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, hover = { contentFormat = { "markdown", "plaintext" }, dynamicRegistration = false }, implementation = { linkSupport = true }, publishDiagnostics = { relatedInformation = true, tagSupport = { valueSet = { 1, 2 } } }, references = { dynamicRegistration = false }, rename = { dynamicRegistration = false, prepareSupport = true }, signatureHelp = { dynamicRegistration = false, signatureInformation = { activeParameterSupport = true, documentationFormat = { "markdown", "plaintext" }, parameterInformation = { labelOffsetSupport = true } } }, synchronization = { didSave = true, dynamicRegistration = false, willSave = false, willSaveWaitUntil = false }, typeDefinition = { linkSupport = true } }, window = { showDocument = { support = false }, showMessage = { messageActionItem = { additionalPropertiesSupport = false } }, workDoneProgress = true }, workspace = { applyEdit = true, configuration = true, symbol = { dynamicRegistration = false, hierarchicalWorkspaceSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, workspaceEdit = { resourceOperations = { "rename", "create", "delete" } }, workspaceFolders = true } }, cmd = { "rls" }, cmd_cwd = "/home/nachiket/rusty/hello_world", filetypes = { "rust" }, flags = { debounce_text_changes = 150 }, get_language_id = <function 4>, handlers = <1>{}, init_options = vim.empty_dict(), log_level = 2, message_level = 2, name = "rls", on_attach = <function 5>, on_exit = <function 6>, on_init = <function 7>, root_dir = "/home/nachiket/rusty/hello_world", settings = vim.empty_dict(), ts_settings = <function 8>, workspace_folders = <2>{ { name = "/home/nachiket/rusty/hello_world", uri = "file:///home/nachiket/rusty/hello_world" } }, <metatable> = <3>{ __tostring = <function 9> } }, handlers = <table 1>, id = 1, initialized = true, is_stopped = <function 10>, messages = { messages = {}, name = "rls", progress = {}, status = {} }, name = "rls", notify = <function 11>, offset_encoding = "utf-16", request = <function 12>, request_sync = <function 13>, requests = {}, resolved_capabilities = { call_hierarchy = false, code_action = true, code_lens = true, code_lens_resolve = false, completion = true, declaration = false, document_formatting = true, document_highlight = true, document_range_formatting = false, document_symbol = true, execute_command = true, find_references = true, goto_definition = true, hover = true, implementation = true, rename = true, signature_help = false, signature_help_trigger_characters = {}, text_document_did_change = 2, text_document_open_close = true, text_document_save = true, text_document_save_include_text = false, text_document_will_save = false, text_document_will_save_wait_until = false, type_definition = false, workspace_folder_properties = { changeNotifications = false, supported = false }, workspace_symbol = true }, rpc = { handle = <userdata 1>, notify = <function 14>, pid = 240948, request = <function 15> }, server_capabilities = { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-240948", "rls.deglobImports-240948" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true }, stop = <function 16>, supports_method = <function 17>, workspaceFolders = <table 2>, workspace_did_change_configuration = <function 18>, workspace_folders = <table 2> } }
[DEBUG][2021-12-06 23:27:14] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 2, jsonrpc = "2.0", method = "shutdown"}
[START][2021-12-06 23:27:36] LSP logging initiated
[INFO][2021-12-06 23:27:55] .../lua/vim/lsp.lua:1272 "exit_handler" {}
[START][2021-12-06 23:28:01] LSP logging initiated
[INFO][2021-12-06 23:30:32] .../lua/vim/lsp.lua:1272 "exit_handler" {}
[START][2021-12-06 23:30:37] LSP logging initiated
[INFO][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:258 "Starting RPC client" { args = {}, cmd = "rls", extra = { cwd = "/home/nachiket/rusty/hello_world" }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 1, jsonrpc = "2.0", method = "initialize", params = { capabilities = { callHierarchy = { dynamicRegistration = false }, textDocument = { codeAction = { codeActionLiteralSupport = { codeActionKind = { valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } } }, dataSupport = true, dynamicRegistration = false, resolveSupport = { properties = { "edit" } } }, completion = { completionItem = { commitCharactersSupport = true, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, labelDetailsSupport = true, preselectSupport = true, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionItemKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } }, contextSupport = false, dynamicRegistration = false }, declaration = { linkSupport = true }, definition = { linkSupport = true }, documentHighlight = { dynamicRegistration = false }, documentSymbol = { dynamicRegistration = false, hierarchicalDocumentSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, hover = { contentFormat = { "markdown", "plaintext" }, dynamicRegistration = false }, implementation = { linkSupport = true }, publishDiagnostics = { relatedInformation = true, tagSupport = { valueSet = { 1, 2 } } }, references = { dynamicRegistration = false }, rename = { dynamicRegistration = false, prepareSupport = true }, signatureHelp = { dynamicRegistration = false, signatureInformation = { activeParameterSupport = true, documentationFormat = { "markdown", "plaintext" }, parameterInformation = { labelOffsetSupport = true } } }, synchronization = { didSave = true, dynamicRegistration = false, willSave = false, willSaveWaitUntil = false }, typeDefinition = { linkSupport = true } }, window = { showDocument = { support = false }, showMessage = { messageActionItem = { additionalPropertiesSupport = false } }, workDoneProgress = true }, workspace = { applyEdit = true, configuration = true, symbol = { dynamicRegistration = false, hierarchicalWorkspaceSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, workspaceEdit = { resourceOperations = { "rename", "create", "delete" } }, workspaceFolders = true } }, clientInfo = { name = "Neovim", version = "0.7.0" }, initializationOptions = vim.empty_dict(), processId = 241178, rootPath = "/home/nachiket/rusty/hello_world", rootUri = "file:///home/nachiket/rusty/hello_world", trace = "off", workspaceFolders = { { name = "/home/nachiket/rusty/hello_world", uri = "file:///home/nachiket/rusty/hello_world" } } }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 1, jsonrpc = "2.0", result = { capabilities = { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-241181", "rls.deglobImports-241181" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true } }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", title = "Building" }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "initialized", params = vim.empty_dict()}
[DEBUG][2021-12-06 23:30:37] .../lua/vim/lsp.lua:914 "LSP[rls]" "server_capabilities" { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-241181", "rls.deglobImports-241181" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true}
[INFO][2021-12-06 23:30:37] .../lua/vim/lsp.lua:915 "LSP[rls]" "initialized" { resolved_capabilities = { call_hierarchy = false, code_action = true, code_lens = true, code_lens_resolve = false, completion = true, declaration = false, document_formatting = true, document_highlight = true, document_range_formatting = false, document_symbol = true, execute_command = true, find_references = true, goto_definition = true, hover = true, implementation = true, rename = true, signature_help = false, signature_help_trigger_characters = {}, text_document_did_change = 2, text_document_open_close = true, text_document_save = true, text_document_save_include_text = false, text_document_will_save = false, text_document_will_save_wait_until = false, type_definition = false, workspace_folder_properties = { changeNotifications = false, supported = false }, workspace_symbol = true }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didOpen", params = { textDocument = { languageId = "rust", text = 'fn test(a: i32, b: i32) -> i32 {\n a + b\n}\n\nfn main() {\n println!("Hello, world!");\n println!("{}", test(10, 20));\n}\n', uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 0 } }}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 1, jsonrpc = "2.0", method = "client/registerCapability", params = { registrations = { { id = "rls-watch", method = "workspace/didChangeWatchedFiles", registerOptions = { watchers = { { globPattern = "/home/nachiket/rusty/hello_world/Cargo.lock" }, { globPattern = "/home/nachiket/rusty/hello_world/target", kind = 4 }, { globPattern = "/home/nachiket/rusty/hello_world/Cargo.toml" } } } } } }}
[WARN][2021-12-06 23:30:37] ...lsp/handlers.lua:109 "The language server rls triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:461 "server_request: callback result" { result = vim.NIL, status = true}
[DEBUG][2021-12-06 23:30:37] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 1, jsonrpc = "2.0", result = vim.NIL}
[DEBUG][2021-12-06 23:30:38] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:38] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_1", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:38] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_1", title = "Building" }}
[DEBUG][2021-12-06 23:30:38] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_0", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:39] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_0", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 3 }, start = { character = 0, line = 3 } }, rangeLength = 0, text = "\n" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 4 } }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_3", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_3", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 3 }, start = { character = 0, line = 3 } }, rangeLength = 0, text = "\n" }, { range = { end = { character = 0, line = 4 }, start = { character = 0, line = 4 } }, rangeLength = 0, text = "v" }, { range = { end = { character = 1, line = 4 }, start = { character = 1, line = 4 } }, rangeLength = 0, text = "o" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 7 } }}
[DEBUG][2021-12-06 23:30:40] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 2, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_3", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_3", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_2", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_5", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_5", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_5", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_5", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_4", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } }, rangeLength = 0, text = "i" }, { range = { end = { character = 3, line = 4 }, start = { character = 3, line = 4 } }, rangeLength = 0, text = "d" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 9 } }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_7", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_7", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_7", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_7", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_6", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 4, line = 4 }, start = { character = 4, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_4", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 2, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 4, line = 4 }, start = { character = 4, line = 4 } }, rangeLength = 0, text = " " }, { range = { end = { character = 5, line = 4 }, start = { character = 5, line = 4 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 6, line = 4 }, start = { character = 6, line = 4 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 12 } }}
[DEBUG][2021-12-06 23:30:40] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 7, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 3, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 7, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_9", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_9", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_9", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_9", title = "Building" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_8", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `te`\n\nexpected one of `!` or `::`", range = { end = { character = 7, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 7, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_6", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:40] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 3, jsonrpc = "2.0", result = { { detail = "term", insertText = "term", insertTextFormat = 2, kind = 9, label = "term" }, { detail = "test", insertText = "test", insertTextFormat = 2, kind = 9, label = "test" }, { detail = "fn test(a: i32, b: i32) -> i32", insertText = "test(${1:a: i32}, ${2:b: i32})", insertTextFormat = 2, kind = 3, label = "test" } }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_2", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 7, line = 4 }, start = { character = 7, line = 4 } }, rangeLength = 0, text = "s" }, { range = { end = { character = 8, line = 4 }, start = { character = 8, line = 4 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 9, line = 4 }, start = { character = 9, line = 4 } }, rangeLength = 0, text = ")" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 15 } }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_11", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_11", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_11", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_11", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_10", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "unexpected closing delimiter: `)`\n\nunexpected closing delimiter", range = { end = { character = 10, line = 4 }, start = { character = 9, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 32, line = 0 }, start = { character = 31, line = 0 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "this opening brace..." }, { location = { range = { end = { character = 1, line = 2 }, start = { character = 0, line = 2 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "...matches this closing brace" }, { location = { range = { end = { character = 10, line = 4 }, start = { character = 9, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected closing delimiter" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 10, line = 4 }, start = { character = 10, line = 4 } }, rangeLength = 0, text = "(" }, { range = { end = { character = 11, line = 4 }, start = { character = 11, line = 4 } }, rangeLength = 0, text = ")" }, { range = { end = { character = 11, line = 4 }, start = { character = 11, line = 4 } }, rangeLength = 0, text = " " }, { range = { end = { character = 12, line = 4 }, start = { character = 12, line = 4 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 19 } }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_13", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_13", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_13", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_13", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_12", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "unexpected closing delimiter: `)`\n\nunexpected closing delimiter", range = { end = { character = 10, line = 4 }, start = { character = 9, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 32, line = 0 }, start = { character = 31, line = 0 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "this opening brace..." }, { location = { range = { end = { character = 1, line = 2 }, start = { character = 0, line = 2 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "...matches this closing brace" }, { location = { range = { end = { character = 10, line = 4 }, start = { character = 9, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected closing delimiter" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_10", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_8", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 13, line = 4 }, start = { character = 12, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 12, line = 4 }, start = { character = 11, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 11, line = 4 }, start = { character = 10, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 11, line = 4 }, start = { character = 10, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 10, line = 4 }, start = { character = 9, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 24 } }}
[DEBUG][2021-12-06 23:30:41] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 9, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 4, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 9, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_15", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_15", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_15", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_15", title = "Building" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_14", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:41] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 4, jsonrpc = "2.0", result = { { detail = "test", insertText = "test", insertTextFormat = 2, kind = 9, label = "test" }, { detail = "fn test(a: i32, b: i32) -> i32", insertText = "test(${1:a: i32}, ${2:b: i32})", insertTextFormat = 2, kind = 3, label = "test" } }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_12", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 9, line = 4 }, start = { character = 9, line = 4 } }, rangeLength = 0, text = "(" }, { range = { end = { character = 10, line = 4 }, start = { character = 10, line = 4 } }, rangeLength = 0, text = ")" }, { range = { end = { character = 11, line = 4 }, start = { character = 11, line = 4 } }, rangeLength = 0, text = " " }, { range = { end = { character = 12, line = 4 }, start = { character = 12, line = 4 } }, rangeLength = 0, text = "{" }, { range = { end = { character = 13, line = 4 }, start = { character = 13, line = 4 } }, rangeLength = 0, text = "}" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 29 } }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_17", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_17", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_17", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_17", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_16", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 14, line = 4 }, start = { character = 13, line = 4 } }, rangeLength = 1, text = "\n}" }, { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = "\n" }, { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 32 } }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_19", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_19", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_19", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_19", title = "Building" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_18", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_16", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:42] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_14", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_18", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 4, line = 5 }, start = { character = 4, line = 5 } }, rangeLength = 0, text = "m" }, { range = { end = { character = 5, line = 5 }, start = { character = 5, line = 5 } }, rangeLength = 0, text = "a" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 34 } }}
[DEBUG][2021-12-06 23:30:43] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 6, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 5, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 6, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_21", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_21", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_21", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 5, jsonrpc = "2.0", result = { { detail = "/home/nachiket/rusty/hello_world/src/main.rs", insertText = "main", insertTextFormat = 2, kind = 9, label = "main" }, { detail = "fn main()", insertText = "main()", insertTextFormat = 2, kind = 3, label = "main" }, { detail = "macro_rules! matches {", documentation = { kind = "markdown", value = "Returns whether the given expression matches any of the given patterns.\n\nLike in a `match` expression, the pattern can be optionally followed by `if`\nand a guard expression that has access to names bound by the pattern.\n\n# Examples\n\n```rust\nlet foo = 'f';\nassert!(matches!(foo, 'A'..='Z' | 'a'..='z'));\n\nlet bar = Some(4);\nassert!(matches!(bar, Some(x) if x > 2));\n```" }, insertText = "matches!", insertTextFormat = 2, kind = 3, label = "matches!" } }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_21", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_20", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 6, line = 5 }, start = { character = 6, line = 5 } }, rangeLength = 0, text = "i" }, { range = { end = { character = 7, line = 5 }, start = { character = 7, line = 5 } }, rangeLength = 0, text = "n" }, { range = { end = { character = 8, line = 5 }, start = { character = 8, line = 5 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 37 } }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_23", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_23", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_23", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_23", title = "Building" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_22", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:43] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 9, line = 5 }, start = { character = 9, line = 5 } }, rangeLength = 0, text = "(" }, { range = { end = { character = 10, line = 5 }, start = { character = 10, line = 5 } }, rangeLength = 0, text = ")" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 39 } }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_25", title = "Building" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_25", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_25", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_25", title = "Building" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_24", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_22", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_20", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:44] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_24", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 11, line = 5 }, start = { character = 11, line = 5 } }, rangeLength = 0, text = ";" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 40 } }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_27", title = "Building" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_27", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_27", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_27", title = "Building" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_26", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `test`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:45] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_26", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, rangeLength = 4, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 41 } }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_29", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_29", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_29", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_29", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_28", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `(`\n\nexpected one of `!` or `::`", range = { end = { character = 6, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 6, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_28", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 5, line = 4 }, start = { character = 5, line = 4 } }, rangeLength = 0, text = "h" }, { range = { end = { character = 6, line = 4 }, start = { character = 6, line = 4 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 43 } }}
[DEBUG][2021-12-06 23:30:48] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 7, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 6, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 7, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_31", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_31", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 6, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_31", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_31", title = "Building" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_30", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:48] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `he`\n\nexpected one of `!` or `::`", range = { end = { character = 7, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 7, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 7, line = 4 }, start = { character = 7, line = 4 } }, rangeLength = 0, text = "l" }, { range = { end = { character = 8, line = 4 }, start = { character = 8, line = 4 } }, rangeLength = 0, text = "l" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 45 } }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_33", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_33", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_33", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_33", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_32", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `hell`\n\nexpected one of `!` or `::`", range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 9, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 9, line = 4 }, start = { character = 9, line = 4 } }, rangeLength = 0, text = "o" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 46 } }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_35", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_35", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_35", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_35", title = "Building" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_34", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `hello`\n\nexpected one of `!` or `::`", range = { end = { character = 10, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 10, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_32", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_30", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:49] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_34", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:54] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didSave", params = { textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 14, line = 4 }, start = { character = 14, line = 4 } }, rangeLength = 0, text = " main ();" }, { range = { end = { character = 0, line = 6 }, start = { character = 0, line = 5 } }, rangeLength = 13, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 49 } }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_37", title = "Building" }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_37", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_37", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_37", title = "Building" }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_36", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:56] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found `hello`\n\nexpected one of `!` or `::`", range = { end = { character = 10, line = 4 }, start = { character = 5, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 10, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:57] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_36", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 6 }, start = { character = 0, line = 5 } }, rangeLength = 2, text = "" }, { range = { end = { character = 23, line = 4 }, start = { character = 0, line = 4 } }, rangeLength = 23, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 51 } }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_39", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_39", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_39", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_39", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_38", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = {}, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 4 }, start = { character = 0, line = 4 } }, rangeLength = 0, text = "n" }, { range = { end = { character = 1, line = 4 }, start = { character = 1, line = 4 } }, rangeLength = 0, text = "f" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 53 } }}
[DEBUG][2021-12-06 23:30:58] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 7, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_41", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_41", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 7, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_41", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_41", title = "Building" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_40", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!` or `::`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `!` or `::`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:58] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_38", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 2, line = 4 }, start = { character = 1, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 1, line = 4 }, start = { character = 0, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 0, line = 4 }, start = { character = 0, line = 4 } }, rangeLength = 0, text = "f" }, { range = { end = { character = 1, line = 4 }, start = { character = 1, line = 4 } }, rangeLength = 0, text = "n" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 57 } }}
[DEBUG][2021-12-06 23:30:59] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 8, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 2, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_43", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_43", message = "hello_world", title = "Building" }}
[ERROR][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:417 "rpc" "rls" "stderr" "thread 'request-worker-6' panicked at 'explicit panic', /cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_errors-705.0.0/src/diagnostic_builder.rs:460:13\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 8, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_43", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_43", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_42", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected identifier, found keyword `fn`\n\nexpected identifier, found keyword", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected identifier, found keyword" } }, severity = 1, source = "rustc" }, { code = "", message = "expected one of `(` or `<`, found `main`\n\nexpected one of `(` or `<`", range = { end = { character = 7, line = 6 }, start = { character = 3, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 7, line = 6 }, start = { character = 3, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_40", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 2, line = 4 }, start = { character = 2, line = 4 } }, rangeLength = 0, text = " " }, { range = { end = { character = 3, line = 4 }, start = { character = 3, line = 4 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 4, line = 4 }, start = { character = 4, line = 4 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 60 } }}
[DEBUG][2021-12-06 23:30:59] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 5, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 9, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 5, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_45", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_45", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 9, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_45", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_45", title = "Building" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_44", title = "Indexing" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `(` or `<`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 5, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:30:59] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_42", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 5, line = 4 }, start = { character = 4, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 4, line = 4 }, start = { character = 3, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 62 } }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_47", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_47", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_47", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_47", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_46", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected identifier, found keyword `fn`\n\nexpected identifier, found keyword", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected identifier, found keyword" } }, severity = 1, source = "rustc" }, { code = "", message = "expected one of `(` or `<`, found `main`\n\nexpected one of `(` or `<`", range = { end = { character = 7, line = 6 }, start = { character = 3, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 7, line = 6 }, start = { character = 3, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 3, line = 4 }, start = { character = 3, line = 4 } }, rangeLength = 0, text = "n" }, { range = { end = { character = 4, line = 4 }, start = { character = 4, line = 4 } }, rangeLength = 0, text = "a" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 64 } }}
[DEBUG][2021-12-06 23:31:00] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 5, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 10, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 5, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_49", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_49", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 10, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_49", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_49", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_48", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `(` or `<`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 5, line = 4 }, start = { character = 5, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_46", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_44", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 5, line = 4 }, start = { character = 5, line = 4 } }, rangeLength = 0, text = "c" }, { range = { end = { character = 6, line = 4 }, start = { character = 6, line = 4 } }, rangeLength = 0, text = "h" }, { range = { end = { character = 7, line = 4 }, start = { character = 7, line = 4 } }, rangeLength = 0, text = "i" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 67 } }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_51", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_51", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_51", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_51", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_50", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `(` or `<`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 8, line = 4 }, start = { character = 8, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 8, line = 4 }, start = { character = 8, line = 4 } }, rangeLength = 0, text = "k" }, { range = { end = { character = 9, line = 4 }, start = { character = 9, line = 4 } }, rangeLength = 0, text = "e" }, { range = { end = { character = 10, line = 4 }, start = { character = 10, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 70 } }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_53", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_53", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_53", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_53", title = "Building" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_52", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `(` or `<`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 11, line = 4 }, start = { character = 11, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `(` or `<`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_50", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:00] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_48", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 11, line = 4 }, start = { character = 11, line = 4 } }, rangeLength = 0, text = "(" }, { range = { end = { character = 12, line = 4 }, start = { character = 12, line = 4 } }, rangeLength = 0, text = ")" }, { range = { end = { character = 13, line = 4 }, start = { character = 13, line = 4 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 73 } }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_55", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_55", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_55", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_55", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_54", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `->`, `;`, `where`, or `{`, found keyword `fn`\n\nunexpected token", range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, relatedInformation = { { location = { range = { end = { character = 13, line = 4 }, start = { character = 13, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `->`, `;`, `where`, or `{`" }, { location = { range = { end = { character = 2, line = 6 }, start = { character = 0, line = 6 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "unexpected token" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 14, line = 4 }, start = { character = 14, line = 4 } }, rangeLength = 0, text = "{" }, { range = { end = { character = 15, line = 4 }, start = { character = 15, line = 4 } }, rangeLength = 0, text = "}" }, { range = { end = { character = 16, line = 4 }, start = { character = 15, line = 4 } }, rangeLength = 1, text = "\n}" }, { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = "\n" }, { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 78 } }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_57", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_57", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_57", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_52", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_57", title = "Building" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_56", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:01] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "dead_code", message = "function is never used: `nachiket`\n\nnote: `#[warn(dead_code)]` on by default", range = { end = { character = 11, line = 4 }, start = { character = 3, line = 4 } }, relatedInformation = {}, severity = 2, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_54", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 4, line = 5 }, start = { character = 3, line = 5 } }, rangeLength = 1, text = "" }, { range = { end = { character = 3, line = 5 }, start = { character = 2, line = 5 } }, rangeLength = 1, text = "" }, { range = { end = { character = 2, line = 5 }, start = { character = 1, line = 5 } }, rangeLength = 1, text = "" }, { range = { end = { character = 1, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 82 } }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_59", title = "Building" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_59", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_59", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_59", title = "Building" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_58", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "dead_code", message = "function is never used: `nachiket`\n\nnote: `#[warn(dead_code)]` on by default", range = { end = { character = 11, line = 4 }, start = { character = 3, line = 4 } }, relatedInformation = {}, severity = 2, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:02] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_56", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_58", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 14, line = 4 }, start = { character = 14, line = 4 } }, rangeLength = 0, text = "-" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 83 } }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_61", title = "Building" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_61", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_61", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_61", title = "Building" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_60", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:03] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `->`, `;`, `where`, or `{`, found `-`\n\nexpected one of `->`, `;`, `where`, or `{`", range = { end = { character = 15, line = 4 }, start = { character = 14, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 15, line = 4 }, start = { character = 14, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `->`, `;`, `where`, or `{`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 15, line = 4 }, start = { character = 15, line = 4 } }, rangeLength = 0, text = ">" }, { range = { end = { character = 16, line = 4 }, start = { character = 16, line = 4 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 85 } }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_63", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_63", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_63", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_63", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_62", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected type, found `{`\n\nexpected type", range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected type" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_60", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 17, line = 4 }, start = { character = 17, line = 4 } }, rangeLength = 0, text = "b" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 86 } }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_65", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_65", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 18, line = 4 }, start = { character = 18, line = 4 } }, rangeLength = 0, text = "o" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 87 } }}
[DEBUG][2021-12-06 23:31:04] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 11, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 11, jsonrpc = "2.0", result = { { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/primitive_docs.rs", insertText = "bool", insertTextFormat = 2, kind = 14, label = "bool" } }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_65", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_65", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_64", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0412", message = "cannot find type `b` in this scope\n\nnot found in this scope", range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "not found in this scope" } }, severity = 1, source = "rustc" }, { code = "E0412", message = "cannot find type `bo` in this scope\n\nnot found in this scope", range = { end = { character = 19, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 19, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "not found in this scope" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_67", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_67", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_67", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_67", title = "Building" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_66", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0412", message = "cannot find type `bo` in this scope\n\nnot found in this scope", range = { end = { character = 19, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 19, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "not found in this scope" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_64", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:04] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_62", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 19, line = 4 }, start = { character = 19, line = 4 } }, rangeLength = 0, text = "o" }, { range = { end = { character = 20, line = 4 }, start = { character = 20, line = 4 } }, rangeLength = 0, text = "l" }, { range = { end = { character = 21, line = 4 }, start = { character = 21, line = 4 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 90 } }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_69", title = "Building" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_69", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_69", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_69", title = "Building" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_68", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0308", message = "mismatched types\n\nexpected `bool`, found `()`", range = { end = { character = 21, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 11, line = 4 }, start = { character = 3, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "implicitly returns `()` as its body has no tail or `return` expression" }, { location = { range = { end = { character = 21, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected `bool`, found `()`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:05] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_66", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_68", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = "" }, { range = { end = { character = 0, line = 5 }, start = { character = 0, line = 5 } }, rangeLength = 0, text = " " } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 92 } }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_71", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_71", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_71", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 4, line = 5 }, start = { character = 4, line = 5 } }, rangeLength = 0, text = "r" }, { range = { end = { character = 5, line = 5 }, start = { character = 5, line = 5 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 94 } }}
[DEBUG][2021-12-06 23:31:06] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 6, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 12, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 6, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_71", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_70", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0308", message = "mismatched types\n\nexpected `bool`, found `()`", range = { end = { character = 21, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 11, line = 4 }, start = { character = 3, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "implicitly returns `()` as its body has no tail or `return` expression" }, { location = { range = { end = { character = 21, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected `bool`, found `()`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_73", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_73", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 12, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_73", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_73", title = "Building" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_72", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:06] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0425", message = "cannot find value `re` in this scope\n\nnot found in this scope", range = { end = { character = 6, line = 5 }, start = { character = 4, line = 5 } }, relatedInformation = { { location = { range = { end = { character = 6, line = 5 }, start = { character = 4, line = 5 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "not found in this scope" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_70", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 6, line = 5 }, start = { character = 6, line = 5 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 7, line = 5 }, start = { character = 7, line = 5 } }, rangeLength = 0, text = "u" }, { range = { end = { character = 8, line = 5 }, start = { character = 8, line = 5 } }, rangeLength = 0, text = "r" }, { range = { end = { character = 9, line = 5 }, start = { character = 9, line = 5 } }, rangeLength = 0, text = "n" }, { range = { end = { character = 10, line = 5 }, start = { character = 10, line = 5 } }, rangeLength = 0, text = " " }, { range = { end = { character = 11, line = 5 }, start = { character = 11, line = 5 } }, rangeLength = 0, text = "f" }, { range = { end = { character = 12, line = 5 }, start = { character = 12, line = 5 } }, rangeLength = 0, text = "a" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 101 } }}
[DEBUG][2021-12-06 23:31:07] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 13, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 13, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 13, line = 5 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_75", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_75", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 13, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_75", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_75", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_74", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "E0425", message = "cannot find value `fa` in this scope\n\nnot found in this scope", range = { end = { character = 13, line = 5 }, start = { character = 11, line = 5 } }, relatedInformation = { { location = { range = { end = { character = 13, line = 5 }, start = { character = 11, line = 5 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "not found in this scope" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 13, line = 5 }, start = { character = 13, line = 5 } }, rangeLength = 0, text = "l" }, { range = { end = { character = 14, line = 5 }, start = { character = 14, line = 5 } }, rangeLength = 0, text = "s" }, { range = { end = { character = 15, line = 5 }, start = { character = 15, line = 5 } }, rangeLength = 0, text = "e" }, { range = { end = { character = 16, line = 5 }, start = { character = 16, line = 5 } }, rangeLength = 0, text = ";" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 105 } }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_77", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_77", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_77", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_72", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_77", title = "Building" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_76", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:07] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "dead_code", message = "function is never used: `nachiket`\n\nnote: `#[warn(dead_code)]` on by default", range = { end = { character = 11, line = 4 }, start = { character = 3, line = 4 } }, relatedInformation = {}, severity = 2, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:08] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_74", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:08] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_76", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 12, line = 4 }, start = { character = 12, line = 4 } }, rangeLength = 0, text = "s" }, { range = { end = { character = 13, line = 4 }, start = { character = 13, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 107 } }}
[DEBUG][2021-12-06 23:31:12] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 14, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 14, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 14, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_79", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_79", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 14, jsonrpc = "2.0", result = { { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs", insertText = "std", insertTextFormat = 2, kind = 9, label = "std" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/primitive_docs.rs", insertText = "str", insertTextFormat = 2, kind = 14, label = "str" } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_79", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_79", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_78", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `:`, `@`, or `|`, found `)`\n\nexpected one of `:`, `@`, or `|`\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 15, line = 4 }, start = { character = 14, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 15, line = 4 }, start = { character = 14, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `:`, `@`, or `|`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 14, line = 4 }, start = { character = 14, line = 4 } }, rangeLength = 0, text = "d" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 108 } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_81", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_81", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_81", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 15, line = 4 }, start = { character = 15, line = 4 } }, rangeLength = 0, text = ":" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 109 } }}
[DEBUG][2021-12-06 23:31:12] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 16, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 15, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 16, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 15, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_81", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_80", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `:`, `@`, or `|`, found `)`\n\nexpected one of `:`, `@`, or `|`\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 16, line = 4 }, start = { character = 15, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 16, line = 4 }, start = { character = 15, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of `:`, `@`, or `|`" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_83", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_83", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_83", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_83", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_82", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected type, found `)`\n\nexpected type", range = { end = { character = 17, line = 4 }, start = { character = 16, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 17, line = 4 }, start = { character = 16, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected type" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_80", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 16, line = 4 }, start = { character = 16, line = 4 } }, rangeLength = 0, text = ":" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 110 } }}
[DEBUG][2021-12-06 23:31:12] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 17, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 16, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 17, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_85", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_85", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_85", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_85", title = "Building" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_84", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected identifier, found `)`\n\nexpected identifier", range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 18, line = 4 }, start = { character = 17, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected identifier" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_82", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 16, jsonrpc = "2.0", result = { { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/alloc.rs", documentation = { kind = "markdown", value = "Memory allocation APIs.\n\nIn a given program, the standard library has one “global” memory allocator\nthat is used for example by `Box<T>` and `Vec<T>`.\n\nCurrently the default global allocator is unspecified. Libraries, however,\nlike `cdylib`s and `staticlib`s are guaranteed to use the [`System`] by\ndefault.\n\n# The `#[global_allocator]` attribute\n\nThis attribute allows configuring the choice of global allocator.\nYou can use this to implement a completely custom global allocator\nto route all default allocation requests to a custom object.\n\n```rust\nuse std::alloc::{GlobalAlloc, System, Layout};\n\nstruct MyAllocator;\n\nunsafe impl GlobalAlloc for MyAllocator {\n unsafe fn alloc(&self, layout: Layout) -> *mut u8 {\n System.alloc(layout)\n }\n\n unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {\n System.dealloc(ptr, layout)\n }\n}\n\n#[global_allocator]\nstatic GLOBAL: MyAllocator = MyAllocator;\n\nfn main() {\n // This `Vec` will allocate memory through `GLOBAL` above\n let mut v = Vec::new();\n v.push(1);\n}\n```\n\nThe attribute is used on a `static` item whose type implements the\n[`GlobalAlloc`] trait. This type can be provided by an external library:\n\n```rust\nextern crate jemallocator;\n\nuse jemallocator::Jemalloc;\n\n#[global_allocator]\nstatic GLOBAL: Jemalloc = Jemalloc;\n\nfn main() {}\n```\n\nThe `#[global_allocator]` can only be used once in a crate\nor its recursive dependencies." }, insertText = "alloc", insertTextFormat = 2, kind = 9, label = "alloc" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/lib.rs", documentation = { kind = "markdown", value = "# The Rust core allocation and collections library\n\nThis library provides smart pointers and collections for managing\nheap-allocated values.\n\nThis library, like libcore, normally doesn’t need to be used directly\nsince its contents are re-exported in the [`std` crate](../std/index.html).\nCrates that use the `#![no_std]` attribute however will typically\nnot depend on `std`, so they’d use this crate instead.\n\n## Boxed values\n\nThe [`Box`] type is a smart pointer type. There can only be one owner of a\n[`Box`], and the owner can decide to mutate the contents, which live on the\nheap.\n\nThis type can be sent among threads efficiently as the size of a `Box` value\nis the same as that of a pointer. Tree-like data structures are often built\nwith boxes because each node often has only one owner, the parent.\n\n## Reference counted pointers\n\nThe [`Rc`] type is a non-threadsafe reference-counted pointer type intended\nfor sharing memory within a thread. An [`Rc`] pointer wraps a type, `T`, and\nonly allows access to `&T`, a shared reference.\n\nThis type is useful when inherited mutability (such as using [`Box`]) is too\nconstraining for an application, and is often paired with the [`Cell`] or\n[`RefCell`] types in order to allow mutation.\n\n## Atomically reference counted pointers\n\nThe [`Arc`] type is the threadsafe equivalent of the [`Rc`] type. It\nprovides all the same functionality of [`Rc`], except it requires that the\ncontained type `T` is shareable. Additionally, [`Arc<T>`][`Arc`] is itself\nsendable while [`Rc<T>`][`Rc`] is not.\n\nThis type allows for shared access to the contained data, and is often\npaired with synchronization primitives such as mutexes to allow mutation of\nshared resources.\n\n## Collections\n\nImplementations of the most common general purpose data structures are\ndefined in this library. They are re-exported through the\n[standard collections library](../std/collections/index.html).\n\n## Heap interfaces\n\nThe [`alloc`](alloc/index.html) module defines the low-level interface to the\ndefault global allocator. It is not compatible with the libc allocator API.\n\n[`Arc`]: sync\n[`Box`]: boxed\n[`Cell`]: core::cell\n[`Rc`]: rc\n[`RefCell`]: core::cell" }, insertText = "alloc_crate", insertTextFormat = 2, kind = 9, label = "alloc_crate" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/any.rs", documentation = { kind = "markdown", value = "This module implements the `Any` trait, which enables dynamic typing\nof any `'static` type through runtime reflection.\n\n`Any` itself can be used to get a `TypeId`, and has more features when used\nas a trait object. As `&dyn Any` (a borrowed trait object), it has the `is`\nand `downcast_ref` methods, to test if the contained value is of a given type,\nand to get a reference to the inner value as a type. As `&mut dyn Any`, there\nis also the `downcast_mut` method, for getting a mutable reference to the\ninner value. `Box<dyn Any>` adds the `downcast` method, which attempts to\nconvert to a `Box<T>`. See the [`Box`] documentation for the full details.\n\nNote that `&dyn Any` is limited to testing whether a value is of a specified\nconcrete type, and cannot be used to test whether a type implements a trait.\n\n[`Box`]: ../../std/boxed/struct.Box.html\n\n# Smart pointers and `dyn Any`\n\nOne piece of behavior to keep in mind when using `Any` as a trait object,\nespecially with types like `Box<dyn Any>` or `Arc<dyn Any>`, is that simply\ncalling `.type_id()` on the value will produce the `TypeId` of the\n*container*, not the underlying trait object. This can be avoided by\nconverting the smart pointer into a `&dyn Any` instead, which will return\nthe object's `TypeId`. For example:\n\n```rust\nuse std::any::{Any, TypeId};\n\nlet boxed: Box<dyn Any> = Box::new(3_i32);\n\n// You're more likely to want this:\nlet actual_id = (&*boxed).type_id();\n// ... than this:\nlet boxed_id = boxed.type_id();\n\nassert_eq!(actual_id, TypeId::of::<i32>());\nassert_eq!(boxed_id, TypeId::of::<Box<dyn Any>>());\n```\n\n# Examples\n\nConsider a situation where we want to log out a value passed to a function.\nWe know the value we're working on implements Debug, but we don't know its\nconcrete type. We want to give special treatment to certain types: in this\ncase printing out the length of String values prior to their value.\nWe don't know the concrete type of our value at compile time, so we need to\nuse runtime reflection instead.\n\n```rust\nuse std::fmt::Debug;\nuse std::any::Any;\n\n// Logger function for any type that implements Debug.\nfn log<T: Any + Debug>(value: &T) {\n let value_any = value as &dyn Any;\n\n // Try to convert our value to a `String`. If successful, we want to\n // output the String`'s length as well as its value. If not, it's a\n // different type: just print it out unadorned.\n match value_any.downcast_ref::<String>() {\n Some(as_string) => {\n println!(\"String ({}): {}\", as_string.len(), as_string);\n }\n None => {\n println!(\"{:?}\", value);\n }\n }\n}\n\n// This function wants to log its parameter out prior to doing work with it.\nfn do_work<T: Any + Debug>(value: &T) {\n log(value);\n // ...do some other work\n}\n\nfn main() {\n let my_string = \"Hello World\".to_string();\n do_work(&my_string);\n\n let my_i8: i8 = 100;\n do_work(&my_i8);\n}\n```" }, insertText = "any", insertTextFormat = 2, kind = 9, label = "any" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/array/mod.rs", documentation = { kind = "markdown", value = "Implementations of things like `Eq` for fixed-length arrays\nup to a certain length. Eventually, we should be able to generalize\nto all lengths.\n\n*[See also the array primitive type](array).*" }, insertText = "array", insertTextFormat = 2, kind = 9, label = "array" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/ascii.rs", documentation = { kind = "markdown", value = "Operations on ASCII strings and characters.\n\nMost string operations in Rust act on UTF-8 strings. However, at times it\nmakes more sense to only consider the ASCII character set for a specific\noperation.\n\nThe [`AsciiExt`] trait provides methods that allow for character\noperations that only act on the ASCII subset and leave non-ASCII characters\nalone.\n\nThe [`escape_default`] function provides an iterator over the bytes of an\nescaped version of the character given." }, insertText = "ascii", insertTextFormat = 2, kind = 9, label = "ascii" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/backtrace.rs", documentation = { kind = "markdown", value = "Support for capturing a stack backtrace of an OS thread\n\nThis module contains the support necessary to capture a stack backtrace of a\nrunning OS thread from the OS thread itself. The `Backtrace` type supports\ncapturing a stack trace via the `Backtrace::capture` and\n`Backtrace::force_capture` functions.\n\nA backtrace is typically quite handy to attach to errors (e.g. types\nimplementing `std::error::Error`) to get a causal chain of where an error\nwas generated.\n\n> **Note**: this module is unstable and is designed in [RFC 2504], and you\n> can learn more about its status in the [tracking issue].\n\n[RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md\n[tracking issue]: https://github.com/rust-lang/rust/issues/53487\n\n## Accuracy\n\nBacktraces are attempted to be as accurate as possible, but no guarantees\nare provided about the exact accuracy of a backtrace. Instruction pointers,\nsymbol names, filenames, line numbers, etc, may all be incorrect when\nreported. Accuracy is attempted on a best-effort basis, however, and bugs\nare always welcome to indicate areas of improvement!\n\nFor most platforms a backtrace with a filename/line number requires that\nprograms be compiled with debug information. Without debug information\nfilenames/line numbers will not be reported.\n\n## Platform support\n\nNot all platforms that libstd compiles for support capturing backtraces.\nSome platforms simply do nothing when capturing a backtrace. To check\nwhether the platform supports capturing backtraces you can consult the\n`BacktraceStatus` enum as a result of `Backtrace::status`.\n\nLike above with accuracy platform support is done on a best effort basis.\nSometimes libraries may not be available at runtime or something may go\nwrong which would cause a backtrace to not be captured. Please feel free to\nreport issues with platforms where a backtrace cannot be captured though!\n\n## Environment Variables\n\nThe `Backtrace::capture` function may not actually capture a backtrace by\ndefault. Its behavior is governed by two environment variables:\n\n* `RUST_LIB_BACKTRACE` - if this is set to `0` then `Backtrace::capture`\n will never capture a backtrace. Any other value this is set to will enable\n `Backtrace::capture`.\n\n* `RUST_BACKTRACE` - if `RUST_LIB_BACKTRACE` is not set, then this variable\n is consulted with the same rules of `RUST_LIB_BACKTRACE`.\n\n* If neither of the above env vars are set, then `Backtrace::capture` will\n be disabled.\n\nCapturing a backtrace can be a quite expensive runtime operation, so the\nenvironment variables allow either forcibly disabling this runtime\nperformance hit or allow selectively enabling it in some programs.\n\nNote that the `Backtrace::force_capture` function can be used to ignore\nthese environment variables. Also note that the state of environment\nvariables is cached once the first backtrace is created, so altering\n`RUST_LIB_BACKTRACE` or `RUST_BACKTRACE` at runtime may not actually change\nhow backtraces are captured." }, insertText = "backtrace", insertTextFormat = 2, kind = 9, label = "backtrace" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/borrow.rs", documentation = { kind = "markdown", value = "A module for working with borrowed data." }, insertText = "borrow", insertTextFormat = 2, kind = 9, label = "borrow" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs", documentation = { kind = "markdown", value = "A pointer type for heap allocation.\n\n[`Box<T>`], casually referred to as a 'box', provides the simplest form of\nheap allocation in Rust. Boxes provide ownership for this allocation, and\ndrop their contents when they go out of scope. Boxes also ensure that they\nnever allocate more than `isize::MAX` bytes.\n\n# Examples\n\nMove a value from the stack to the heap by creating a [`Box`]:\n\n```rust\nlet val: u8 = 5;\nlet boxed: Box<u8> = Box::new(val);\n```\n\nMove a value from a [`Box`] back to the stack by [dereferencing]:\n\n```rust\nlet boxed: Box<u8> = Box::new(5);\nlet val: u8 = *boxed;\n```\n\nCreating a recursive data structure:\n\n```rust\n#[derive(Debug)]\nenum List<T> {\n Cons(T, Box<List<T>>),\n Nil,\n}\n\nlet list: List<i32> = List::Cons(1, Box::new(List::Cons(2, Box::new(List::Nil))));\nprintln!(\"{:?}\", list);\n```\n\nThis will print `Cons(1, Cons(2, Nil))`.\n\nRecursive structures must be boxed, because if the definition of `Cons`\nlooked like this:\n\n```rust\nCons(T, List<T>),\n```\n\nIt wouldn't work. This is because the size of a `List` depends on how many\nelements are in the list, and so we don't know how much memory to allocate\nfor a `Cons`. By introducing a [`Box<T>`], which has a defined size, we know how\nbig `Cons` needs to be.\n\n# Memory layout\n\nFor non-zero-sized values, a [`Box`] will use the [`Global`] allocator for\nits allocation. It is valid to convert both ways between a [`Box`] and a\nraw pointer allocated with the [`Global`] allocator, given that the\n[`Layout`] used with the allocator is correct for the type. More precisely,\na `value: *mut T` that has been allocated with the [`Global`] allocator\nwith `Layout::for_value(&*value)` may be converted into a box using\n[`Box::<T>::from_raw(value)`]. Conversely, the memory backing a `value: *mut\nT` obtained from [`Box::<T>::into_raw`] may be deallocated using the\n[`Global`] allocator with [`Layout::for_value(&*value)`].\n\nFor zero-sized values, the `Box` pointer still has to be [valid] for reads\nand writes and sufficiently aligned. In particular, casting any aligned\nnon-zero integer literal to a raw pointer produces a valid pointer, but a\npointer pointing into previously allocated memory that since got freed is\nnot valid. The recommended way to build a Box to a ZST if `Box::new` cannot\nbe used is to use [`ptr::NonNull::dangling`].\n\nSo long as `T: Sized`, a `Box<T>` is guaranteed to be represented\nas a single pointer and is also ABI-compatible with C pointers\n(i.e. the C type `T*`). This means that if you have extern \"C\"\nRust functions that will be called from C, you can define those\nRust functions using `Box<T>` types, and use `T*` as corresponding\ntype on the C side. As an example, consider this C header which\ndeclares functions that create and destroy some kind of `Foo`\nvalue:\n\n```c\n/* C header */\n\n/* Returns ownership to the caller */\nstruct Foo* foo_new(void);\n\n/* Takes ownership from the caller; no-op when invoked with NULL */\nvoid foo_delete(struct Foo*);\n```\n\nThese two functions might be implemented in Rust as follows. Here, the\n`struct Foo*` type from C is translated to `Box<Foo>`, which captures\nthe ownership constraints. Note also that the nullable argument to\n`foo_delete` is represented in Rust as `Option<Box<Foo>>`, since `Box<Foo>`\ncannot be null.\n\n```rust\n#[repr(C)]\npub struct Foo;\n\n#[no_mangle]\npub extern \"C\" fn foo_new() -> Box<Foo> {\n Box::new(Foo)\n}\n\n#[no_mangle]\npub extern \"C\" fn foo_delete(_: Option<Box<Foo>>) {}\n```\n\nEven though `Box<T>` has the same representation and C ABI as a C pointer,\nthis does not mean that you can convert an arbitrary `T*` into a `Box<T>`\nand expect things to work. `Box<T>` values will always be fully aligned,\nnon-null pointers. Moreover, the destructor for `Box<T>` will attempt to\nfree the value with the global allocator. In general, the best practice\nis to only use `Box<T>` for pointers that originated from the global\nallocator.\n\n**Important.** At least at present, you should avoid using\n`Box<T>` types for functions that are defined in C but invoked\nfrom Rust. In those cases, you should directly mirror the C types\nas closely as possible. Using types like `Box<T>` where the C\ndefinition is just using `T*` can lead to undefined behavior, as\ndescribed in [rust-lang/unsafe-code-guidelines#198][ucg#198].\n\n[ucg#198]: https://github.com/rust-lang/unsafe-code-guidelines/issues/198\n[dereferencing]: core::ops::Deref\n[`Box::<T>::from_raw(value)`]: Box::from_raw\n[`Global`]: crate::alloc::Global\n[`Layout`]: crate::alloc::Layout\n[`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value\n[valid]: ptr#safety" }, insertText = "boxed", insertTextFormat = 2, kind = 9, label = "boxed" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cell.rs", documentation = { kind = "markdown", value = "Shareable mutable containers.\n\nRust memory safety is based on this rule: Given an object `T`, it is only possible to\nhave one of the following:\n\n- Having several immutable references (`&T`) to the object (also known as **aliasing**).\n- Having one mutable reference (`&mut T`) to the object (also known as **mutability**).\n\nThis is enforced by the Rust compiler. However, there are situations where this rule is not\nflexible enough. Sometimes it is required to have multiple references to an object and yet\nmutate it.\n\nShareable mutable containers exist to permit mutability in a controlled manner, even in the\npresence of aliasing. Both [`Cell<T>`] and [`RefCell<T>`] allow doing this in a single-threaded\nway. However, neither `Cell<T>` nor `RefCell<T>` are thread safe (they do not implement\n[`Sync`]). If you need to do aliasing and mutation between multiple threads it is possible to\nuse [`Mutex<T>`], [`RwLock<T>`] or [`atomic`] types.\n\nValues of the `Cell<T>` and `RefCell<T>` types may be mutated through shared references (i.e.\nthe common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`)\nreferences. We say that `Cell<T>` and `RefCell<T>` provide 'interior mutability', in contrast\nwith typical Rust types that exhibit 'inherited mutability'.\n\nCell types come in two flavors: `Cell<T>` and `RefCell<T>`. `Cell<T>` implements interior\nmutability by moving values in and out of the `Cell<T>`. To use references instead of values,\none must use the `RefCell<T>` type, acquiring a write lock before mutating. `Cell<T>` provides\nmethods to retrieve and change the current interior value:\n\n - For types that implement [`Copy`], the [`get`](Cell::get) method retrieves the current\n interior value.\n - For types that implement [`Default`], the [`take`](Cell::take) method replaces the current\n interior value with [`Default::default()`] and returns the replaced value.\n - For all types, the [`replace`](Cell::replace) method replaces the current interior value and\n returns the replaced value and the [`into_inner`](Cell::into_inner) method consumes the\n `Cell<T>` and returns the interior value. Additionally, the [`set`](Cell::set) method\n replaces the interior value, dropping the replaced value.\n\n`RefCell<T>` uses Rust's lifetimes to implement 'dynamic borrowing', a process whereby one can\nclaim temporary, exclusive, mutable access to the inner value. Borrows for `RefCell<T>`s are\ntracked 'at runtime', unlike Rust's native reference types which are entirely tracked\nstatically, at compile time. Because `RefCell<T>` borrows are dynamic it is possible to attempt\nto borrow a value that is already mutably borrowed; when this happens it results in thread\npanic.\n\n# When to choose interior mutability\n\nThe more common inherited mutability, where one must have unique access to mutate a value, is\none of the key language elements that enables Rust to reason strongly about pointer aliasing,\nstatically preventing crash bugs. Because of that, inherited mutability is preferred, and\ninterior mutability is something of a last resort. Since cell types enable mutation where it\nwould otherwise be disallowed though, there are occasions when interior mutability might be\nappropriate, or even *must* be used, e.g.\n\n* Introducing mutability 'inside' of something immutable\n* Implementation details of logically-immutable methods.\n* Mutating implementations of [`Clone`].\n\n## Introducing mutability 'inside' of something immutable\n\nMany shared smart pointer types, including [`Rc<T>`] and [`Arc<T>`], provide containers that can\nbe cloned and shared between multiple parties. Because the contained values may be\nmultiply-aliased, they can only be borrowed with `&`, not `&mut`. Without cells it would be\nimpossible to mutate data inside of these smart pointers at all.\n\nIt's very common then to put a `RefCell<T>` inside shared pointer types to reintroduce\nmutability:\n\n```rust\nuse std::cell::{RefCell, RefMut};\nuse std::collections::HashMap;\nuse std::rc::Rc;\n\nfn main() {\n let shared_map: Rc<RefCell<_>> = Rc::new(RefCell::new(HashMap::new()));\n // Create a new block to limit the scope of the dynamic borrow\n {\n let mut map: RefMut<_> = shared_map.borrow_mut();\n map.insert(\"africa\", 92388);\n map.insert(\"kyoto\", 11837);\n map.insert(\"piccadilly\", 11826);\n map.insert(\"marbles\", 38);\n }\n\n // Note that if we had not let the previous borrow of the cache fall out\n // of scope then the subsequent borrow would cause a dynamic thread panic.\n // This is the major hazard of using `RefCell`.\n let total: i32 = shared_map.borrow().values().sum();\n println!(\"{}\", total);\n}\n```\n\nNote that this example uses `Rc<T>` and not `Arc<T>`. `RefCell<T>`s are for single-threaded\nscenarios. Consider using [`RwLock<T>`] or [`Mutex<T>`] if you need shared mutability in a\nmulti-threaded situation.\n\n## Implementation details of logically-immutable methods\n\nOccasionally it may be desirable not to expose in an API that there is mutation happening\n\"under the hood\". This may be because logically the operation is immutable, but e.g., caching\nforces the implementation to perform mutation; or because you must employ mutation to implement\na trait method that was originally defined to take `&self`.\n\n```rust\nuse std::cell::RefCell;\n\nstruct Graph {\n edges: Vec<(i32, i32)>,\n span_tree_cache: RefCell<Option<Vec<(i32, i32)>>>\n}\n\nimpl Graph {\n fn minimum_spanning_tree(&self) -> Vec<(i32, i32)> {\n self.span_tree_cache.borrow_mut()\n .get_or_insert_with(|| self.calc_span_tree())\n .clone()\n }\n\n fn calc_span_tree(&self) -> Vec<(i32, i32)> {\n // Expensive computation goes here\n vec![]\n }\n}\n```\n\n## Mutating implementations of `Clone`\n\nThis is simply a special - but common - case of the previous: hiding mutability for operations\nthat appear to be immutable. The [`clone`](Clone::clone) method is expected to not change the\nsource value, and is declared to take `&self`, not `&mut self`. Therefore, any mutation that\nhappens in the `clone` method must use cell types. For example, [`Rc<T>`] maintains its\nreference counts within a `Cell<T>`.\n\n```rust\nuse std::cell::Cell;\nuse std::ptr::NonNull;\nuse std::process::abort;\nuse std::marker::PhantomData;\n\nstruct Rc<T: ?Sized> {\n ptr: NonNull<RcBox<T>>,\n phantom: PhantomData<RcBox<T>>,\n}\n\nstruct RcBox<T: ?Sized> {\n strong: Cell<usize>,\n refcount: Cell<usize>,\n value: T,\n}\n\nimpl<T: ?Sized> Clone for Rc<T> {\n fn clone(&self) -> Rc<T> {\n self.inc_strong();\n Rc {\n ptr: self.ptr,\n phantom: PhantomData,\n }\n }\n}\n\ntrait RcBoxPtr<T: ?Sized> {\n\n fn inner(&self) -> &RcBox<T>;\n\n fn strong(&self) -> usize {\n self.inner().strong.get()\n }\n\n fn inc_strong(&self) {\n self.inner()\n .strong\n .set(self.strong()\n .checked_add(1)\n .unwrap_or_else(|| abort() ));\n }\n}\n\nimpl<T: ?Sized> RcBoxPtr<T> for Rc<T> {\n fn inner(&self) -> &RcBox<T> {\n unsafe {\n self.ptr.as_ref()\n }\n }\n}\n```\n\n[`Arc<T>`]: ../../std/sync/struct.Arc.html\n[`Rc<T>`]: ../../std/rc/struct.Rc.html\n[`RwLock<T>`]: ../../std/sync/struct.RwLock.html\n[`Mutex<T>`]: ../../std/sync/struct.Mutex.html\n[`atomic`]: ../../core/sync/atomic/index.html" }, insertText = "cell", insertTextFormat = 2, kind = 9, label = "cell" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/mod.rs", documentation = { kind = "markdown", value = "A character type.\n\nThe `char` type represents a single character. More specifically, since\n'character' isn't a well-defined concept in Unicode, `char` is a '[Unicode\nscalar value]', which is similar to, but not the same as, a '[Unicode code\npoint]'.\n\n[Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value\n[Unicode code point]: http://www.unicode.org/glossary/#code_point\n\nThis module exists for technical reasons, the primary documentation for\n`char` is directly on [the `char` primitive type][char] itself.\n\nThis module is the home of the iterator implementations for the iterators\nimplemented on `char`, as well as some useful constants and conversion\nfunctions that convert various types to `char`." }, insertText = "char", insertTextFormat = 2, kind = 9, label = "char" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/clone.rs", documentation = { kind = "markdown", value = "The `Clone` trait for types that cannot be 'implicitly copied'.\n\nIn Rust, some simple types are \"implicitly copyable\" and when you\nassign them or pass them as arguments, the receiver will get a copy,\nleaving the original value in place. These types do not require\nallocation to copy and do not have finalizers (i.e., they do not\ncontain owned boxes or implement [`Drop`]), so the compiler considers\nthem cheap and safe to copy. For other types copies must be made\nexplicitly, by convention implementing the [`Clone`] trait and calling\nthe [`clone`] method.\n\n[`clone`]: Clone::clone\n\nBasic usage example:\n\n```rust\nlet s = String::new(); // String type implements Clone\nlet copy = s.clone(); // so we can clone it\n```\n\nTo easily implement the Clone trait, you can also use\n`#[derive(Clone)]`. Example:\n\n```rust\n#[derive(Clone)] // we add the Clone trait to Morpheus struct\nstruct Morpheus {\n blue_pill: f32,\n red_pill: i64,\n}\n\nfn main() {\n let f = Morpheus { blue_pill: 0.0, red_pill: 0 };\n let copy = f.clone(); // and now we can clone it!\n}\n```" }, insertText = "clone", insertTextFormat = 2, kind = 9, label = "clone" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs", documentation = { kind = "markdown", value = "Functionality for ordering and comparison.\n\nThis module contains various tools for ordering and comparing values. In\nsummary:\n\n* [`Eq`] and [`PartialEq`] are traits that allow you to define total and\n partial equality between values, respectively. Implementing them overloads\n the `==` and `!=` operators.\n* [`Ord`] and [`PartialOrd`] are traits that allow you to define total and\n partial orderings between values, respectively. Implementing them overloads\n the `<`, `<=`, `>`, and `>=` operators.\n* [`Ordering`] is an enum returned by the main functions of [`Ord`] and\n [`PartialOrd`], and describes an ordering.\n* [`Reverse`] is a struct that allows you to easily reverse an ordering.\n* [`max`] and [`min`] are functions that build off of [`Ord`] and allow you\n to find the maximum or minimum of two values.\n\nFor more details, see the respective documentation of each item in the list.\n\n[`max`]: Ord::max\n[`min`]: Ord::min" }, insertText = "cmp", insertTextFormat = 2, kind = 9, label = "cmp" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/mod.rs", documentation = { kind = "markdown", value = "Collection types.\n\nRust's standard collection library provides efficient implementations of the\nmost common general purpose programming data structures. By using the\nstandard implementations, it should be possible for two libraries to\ncommunicate without significant data conversion.\n\nTo get this out of the way: you should probably just use [`Vec`] or [`HashMap`].\nThese two collections cover most use cases for generic data storage and\nprocessing. They are exceptionally good at doing what they do. All the other\ncollections in the standard library have specific use cases where they are\nthe optimal choice, but these cases are borderline *niche* in comparison.\nEven when `Vec` and `HashMap` are technically suboptimal, they're probably a\ngood enough choice to get started.\n\nRust's collections can be grouped into four major categories:\n\n* Sequences: [`Vec`], [`VecDeque`], [`LinkedList`]\n* Maps: [`HashMap`], [`BTreeMap`]\n* Sets: [`HashSet`], [`BTreeSet`]\n* Misc: [`BinaryHeap`]\n\n# When Should You Use Which Collection?\n\nThese are fairly high-level and quick break-downs of when each collection\nshould be considered. Detailed discussions of strengths and weaknesses of\nindividual collections can be found on their own documentation pages.\n\n### Use a `Vec` when:\n* You want to collect items up to be processed or sent elsewhere later, and\n don't care about any properties of the actual values being stored.\n* You want a sequence of elements in a particular order, and will only be\n appending to (or near) the end.\n* You want a stack.\n* You want a resizable array.\n* You want a heap-allocated array.\n\n### Use a `VecDeque` when:\n* You want a [`Vec`] that supports efficient insertion at both ends of the\n sequence.\n* You want a queue.\n* You want a double-ended queue (deque).\n\n### Use a `LinkedList` when:\n* You want a [`Vec`] or [`VecDeque`] of unknown size, and can't tolerate\n amortization.\n* You want to efficiently split and append lists.\n* You are *absolutely* certain you *really*, *truly*, want a doubly linked\n list.\n\n### Use a `HashMap` when:\n* You want to associate arbitrary keys with an arbitrary value.\n* You want a cache.\n* You want a map, with no extra functionality.\n\n### Use a `BTreeMap` when:\n* You want a map sorted by its keys.\n* You want to be able to get a range of entries on-demand.\n* You're interested in what the smallest or largest key-value pair is.\n* You want to find the largest or smallest key that is smaller or larger\n than something.\n\n### Use the `Set` variant of any of these `Map`s when:\n* You just want to remember which keys you've seen.\n* There is no meaningful value to associate with your keys.\n* You just want a set.\n\n### Use a `BinaryHeap` when:\n\n* You want to store a bunch of elements, but only ever want to process the\n \"biggest\" or \"most important\" one at any given time.\n* You want a priority queue.\n\n# Performance\n\nChoosing the right collection for the job requires an understanding of what\neach collection is good at. Here we briefly summarize the performance of\ndifferent collections for certain important operations. For further details,\nsee each type's documentation, and note that the names of actual methods may\ndiffer from the tables below on certain collections.\n\nThroughout the documentation, we will follow a few conventions. For all\noperations, the collection's size is denoted by n. If another collection is\ninvolved in the operation, it contains m elements. Operations which have an\n*amortized* cost are suffixed with a `*`. Operations with an *expected*\ncost are suffixed with a `~`.\n\nAll amortized costs are for the potential need to resize when capacity is\nexhausted. If a resize occurs it will take *O*(*n*) time. Our collections never\nautomatically shrink, so removal operations aren't amortized. Over a\nsufficiently large series of operations, the average cost per operation will\ndeterministically equal the given cost.\n\nOnly [`HashMap`] has expected costs, due to the probabilistic nature of hashing.\nIt is theoretically possible, though very unlikely, for [`HashMap`] to\nexperience worse performance.\n\n## Sequences\n\n| | get(i) | insert(i) | remove(i) | append | split_off(i) |\n|----------------|----------------|-----------------|----------------|--------|----------------|\n| [`Vec`] | O(1) | O(n-i)* | O(n-i) | O(m)* | O(n-i) |\n| [`VecDeque`] | O(1) | O(min(i, n-i))* | O(min(i, n-i)) | O(m)* | O(min(i, n-i)) |\n| [`LinkedList`] | O(min(i, n-i)) | O(min(i, n-i)) | O(min(i, n-i)) | O(1) | O(min(i, n-i)) |\n\nNote that where ties occur, [`Vec`] is generally going to be faster than [`VecDeque`], and\n[`VecDeque`] is generally going to be faster than [`LinkedList`].\n\n## Maps\n\nFor Sets, all operations have the cost of the equivalent Map operation.\n\n| | get | insert | remove | range | append |\n|--------------|-----------|-----------|-----------|-----------|--------|\n| [`HashMap`] | O(1)~ | O(1)~* | O(1)~ | N/A | N/A |\n| [`BTreeMap`] | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n+m) |\n\n# Correct and Efficient Usage of Collections\n\nOf course, knowing which collection is the right one for the job doesn't\ninstantly permit you to use it correctly. Here are some quick tips for\nefficient and correct usage of the standard collections in general. If\nyou're interested in how to use a specific collection in particular, consult\nits documentation for detailed discussion and code examples.\n\n## Capacity Management\n\nMany collections provide several constructors and methods that refer to\n\"capacity\". These collections are generally built on top of an array.\nOptimally, this array would be exactly the right size to fit only the\nelements stored in the collection, but for the collection to do this would\nbe very inefficient. If the backing array was exactly the right size at all\ntimes, then every time an element is inserted, the collection would have to\ngrow the array to fit it. Due to the way memory is allocated and managed on\nmost computers, this would almost surely require allocating an entirely new\narray and copying every single element from the old one into the new one.\nHopefully you can see that this wouldn't be very efficient to do on every\noperation.\n\nMost collections therefore use an *amortized* allocation strategy. They\ngenerally let themselves have a fair amount of unoccupied space so that they\nonly have to grow on occasion. When they do grow, they allocate a\nsubstantially larger array to move the elements into so that it will take a\nwhile for another grow to be required. While this strategy is great in\ngeneral, it would be even better if the collection *never* had to resize its\nbacking array. Unfortunately, the collection itself doesn't have enough\ninformation to do this itself. Therefore, it is up to us programmers to give\nit hints.\n\nAny `with_capacity` constructor will instruct the collection to allocate\nenough space for the specified number of elements. Ideally this will be for\nexactly that many elements, but some implementation details may prevent\nthis. See collection-specific documentation for details. In general, use\n`with_capacity` when you know exactly how many elements will be inserted, or\nat least have a reasonable upper-bound on that number.\n\nWhen anticipating a large influx of elements, the `reserve` family of\nmethods can be used to hint to the collection how much room it should make\nfor the coming items. As with `with_capacity`, the precise behavior of\nthese methods will be specific to the collection of interest.\n\nFor optimal performance, collections will generally avoid shrinking\nthemselves. If you believe that a collection will not soon contain any more\nelements, or just really need the memory, the `shrink_to_fit` method prompts\nthe collection to shrink the backing array to the minimum size capable of\nholding its elements.\n\nFinally, if ever you're interested in what the actual capacity of the\ncollection is, most collections provide a `capacity` method to query this\ninformation on demand. This can be useful for debugging purposes, or for\nuse with the `reserve` methods.\n\n## Iterators\n\nIterators are a powerful and robust mechanism used throughout Rust's\nstandard libraries. Iterators provide a sequence of values in a generic,\nsafe, efficient and convenient way. The contents of an iterator are usually\n*lazily* evaluated, so that only the values that are actually needed are\never actually produced, and no allocation need be done to temporarily store\nthem. Iterators are primarily consumed using a `for` loop, although many\nfunctions also take iterators where a collection or sequence of values is\ndesired.\n\nAll of the standard collections provide several iterators for performing\nbulk manipulation of their contents. The three primary iterators almost\nevery collection should provide are `iter`, `iter_mut`, and `into_iter`.\nSome of these are not provided on collections where it would be unsound or\nunreasonable to provide them.\n\n`iter` provides an iterator of immutable references to all the contents of a\ncollection in the most \"natural\" order. For sequence collections like [`Vec`],\nthis means the items will be yielded in increasing order of index starting\nat 0. For ordered collections like [`BTreeMap`], this means that the items\nwill be yielded in sorted order. For unordered collections like [`HashMap`],\nthe items will be yielded in whatever order the internal representation made\nmost convenient. This is great for reading through all the contents of the\ncollection.\n\n```rust\nlet vec = vec![1, 2, 3, 4];\nfor x in vec.iter() {\n println!(\"vec contained {}\", x);\n}\n```\n\n`iter_mut` provides an iterator of *mutable* references in the same order as\n`iter`. This is great for mutating all the contents of the collection.\n\n```rust\nlet mut vec = vec![1, 2, 3, 4];\nfor x in vec.iter_mut() {\n *x += 1;\n}\n```\n\n`into_iter` transforms the actual collection into an iterator over its\ncontents by-value. This is great when the collection itself is no longer\nneeded, and the values are needed elsewhere. Using `extend` with `into_iter`\nis the main way that contents of one collection are moved into another.\n`extend` automatically calls `into_iter`, and takes any `T: `[`IntoIterator`].\nCalling `collect` on an iterator itself is also a great way to convert one\ncollection into another. Both of these methods should internally use the\ncapacity management tools discussed in the previous section to do this as\nefficiently as possible.\n\n```rust\nlet mut vec1 = vec![1, 2, 3, 4];\nlet vec2 = vec![10, 20, 30, 40];\nvec1.extend(vec2);\n```\n\n```rust\nuse std::collections::VecDeque;\n\nlet vec = vec![1, 2, 3, 4];\nlet buf: VecDeque<_> = vec.into_iter().collect();\n```\n\nIterators also provide a series of *adapter* methods for performing common\nthreads to sequences. Among the adapters are functional favorites like `map`,\n`fold`, `skip` and `take`. Of particular interest to collections is the\n`rev` adapter, that reverses any iterator that supports this operation. Most\ncollections provide reversible iterators as the way to iterate over them in\nreverse order.\n\n```rust\nlet vec = vec![1, 2, 3, 4];\nfor x in vec.iter().rev() {\n println!(\"vec contained {}\", x);\n}\n```\n\nSeveral other collection methods also return iterators to yield a sequence\nof results but avoid allocating an entire collection to store the result in.\nThis provides maximum flexibility as `collect` or `extend` can be called to\n\"pipe\" the sequence into any collection if desired. Otherwise, the sequence\ncan be looped over with a `for` loop. The iterator can also be discarded\nafter partial use, preventing the computation of the unused items.\n\n## Entries\n\nThe `entry` API is intended to provide an efficient mechanism for\nmanipulating the contents of a map conditionally on the presence of a key or\nnot. The primary motivating use case for this is to provide efficient\naccumulator maps. For instance, if one wishes to maintain a count of the\nnumber of times each key has been seen, they will have to perform some\nconditional logic on whether this is the first time the key has been seen or\nnot. Normally, this would require a `find` followed by an `insert`,\neffectively duplicating the search effort on each insertion.\n\nWhen a user calls `map.entry(&key)`, the map will search for the key and\nthen yield a variant of the `Entry` enum.\n\nIf a `Vacant(entry)` is yielded, then the key *was not* found. In this case\nthe only valid operation is to `insert` a value into the entry. When this is\ndone, the vacant entry is consumed and converted into a mutable reference to\nthe value that was inserted. This allows for further manipulation of the\nvalue beyond the lifetime of the search itself. This is useful if complex\nlogic needs to be performed on the value regardless of whether the value was\njust inserted.\n\nIf an `Occupied(entry)` is yielded, then the key *was* found. In this case,\nthe user has several options: they can `get`, `insert` or `remove` the\nvalue of the occupied entry. Additionally, they can convert the occupied\nentry into a mutable reference to its value, providing symmetry to the\nvacant `insert` case.\n\n### Examples\n\nHere are the two primary ways in which `entry` is used. First, a simple\nexample where the logic performed on the values is trivial.\n\n#### Counting the number of times each character in a string occurs\n\n```rust\nuse std::collections::btree_map::BTreeMap;\n\nlet mut count = BTreeMap::new();\nlet message = \"she sells sea shells by the sea shore\";\n\nfor c in message.chars() {\n *count.entry(c).or_insert(0) += 1;\n}\n\nassert_eq!(count.get(&'s'), Some(&8));\n\nprintln!(\"Number of occurrences of each character\");\nfor (char, count) in &count {\n println!(\"{}: {}\", char, count);\n}\n```\n\nWhen the logic to be performed on the value is more complex, we may simply\nuse the `entry` API to ensure that the value is initialized and perform the\nlogic afterwards.\n\n#### Tracking the inebriation of customers at a bar\n\n```rust\nuse std::collections::btree_map::BTreeMap;\n\n// A client of the bar. They have a blood alcohol level.\nstruct Person { blood_alcohol: f32 }\n\n// All the orders made to the bar, by client ID.\nlet orders = vec![1, 2, 1, 2, 3, 4, 1, 2, 2, 3, 4, 1, 1, 1];\n\n// Our clients.\nlet mut blood_alcohol = BTreeMap::new();\n\nfor id in orders {\n // If this is the first time we've seen this customer, initialize them\n // with no blood alcohol. Otherwise, just retrieve them.\n let person = blood_alcohol.entry(id).or_insert(Person { blood_alcohol: 0.0 });\n\n // Reduce their blood alcohol level. It takes time to order and drink a beer!\n person.blood_alcohol *= 0.9;\n\n // Check if they're sober enough to have another beer.\n if person.blood_alcohol > 0.3 {\n // Too drunk... for now.\n println!(\"Sorry {}, I have to cut you off\", id);\n } else {\n // Have another!\n person.blood_alcohol += 0.1;\n }\n}\n```\n\n# Insert and complex keys\n\nIf we have a more complex key, calls to `insert` will\nnot update the value of the key. For example:\n\n```rust\nuse std::cmp::Ordering;\nuse std::collections::BTreeMap;\nuse std::hash::{Hash, Hasher};\n\n#[derive(Debug)]\nstruct Foo {\n a: u32,\n b: &'static str,\n}\n\n// we will compare `Foo`s by their `a` value only.\nimpl PartialEq for Foo {\n fn eq(&self, other: &Self) -> bool { self.a == other.a }\n}\n\nimpl Eq for Foo {}\n\n// we will hash `Foo`s by their `a` value only.\nimpl Hash for Foo {\n fn hash<H: Hasher>(&self, h: &mut H) { self.a.hash(h); }\n}\n\nimpl PartialOrd for Foo {\n fn partial_cmp(&self, other: &Self) -> Option<Ordering> { self.a.partial_cmp(&other.a) }\n}\n\nimpl Ord for Foo {\n fn cmp(&self, other: &Self) -> Ordering { self.a.cmp(&other.a) }\n}\n\nlet mut map = BTreeMap::new();\nmap.insert(Foo { a: 1, b: \"baz\" }, 99);\n\n// We already have a Foo with an a of 1, so this will be updating the value.\nmap.insert(Foo { a: 1, b: \"xyz\" }, 100);\n\n// The value has been updated...\nassert_eq!(map.values().next().unwrap(), &100);\n\n// ...but the key hasn't changed. b is still \"baz\", not \"xyz\".\nassert_eq!(map.keys().next().unwrap().b, \"baz\");\n```\n\n[`IntoIterator`]: crate::iter::IntoIterator" }, insertText = "collections", insertTextFormat = 2, kind = 9, label = "collections" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs", documentation = { kind = "markdown", value = "Traits for conversions between types.\n\nThe traits in this module provide a way to convert from one type to another type.\nEach trait serves a different purpose:\n\n- Implement the [`AsRef`] trait for cheap reference-to-reference conversions\n- Implement the [`AsMut`] trait for cheap mutable-to-mutable conversions\n- Implement the [`From`] trait for consuming value-to-value conversions\n- Implement the [`Into`] trait for consuming value-to-value conversions to types\n outside the current crate\n- The [`TryFrom`] and [`TryInto`] traits behave like [`From`] and [`Into`],\n but should be implemented when the conversion can fail.\n\nThe traits in this module are often used as trait bounds for generic functions such that to\narguments of multiple types are supported. See the documentation of each trait for examples.\n\nAs a library author, you should always prefer implementing [`From<T>`][`From`] or\n[`TryFrom<T>`][`TryFrom`] rather than [`Into<U>`][`Into`] or [`TryInto<U>`][`TryInto`],\nas [`From`] and [`TryFrom`] provide greater flexibility and offer\nequivalent [`Into`] or [`TryInto`] implementations for free, thanks to a\nblanket implementation in the standard library. When targeting a version prior to Rust 1.41, it\nmay be necessary to implement [`Into`] or [`TryInto`] directly when converting to a type\noutside the current crate.\n\n# Generic Implementations\n\n- [`AsRef`] and [`AsMut`] auto-dereference if the inner type is a reference\n- [`From`]`<U> for T` implies [`Into`]`<T> for U`\n- [`TryFrom`]`<U> for T` implies [`TryInto`]`<T> for U`\n- [`From`] and [`Into`] are reflexive, which means that all types can\n `into` themselves and `from` themselves\n\nSee each trait for usage examples." }, insertText = "convert", insertTextFormat = 2, kind = 9, label = "convert" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/default.rs", documentation = { kind = "markdown", value = "The `Default` trait for types which may have meaningful default values." }, insertText = "default", insertTextFormat = 2, kind = 9, label = "default" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/env.rs", documentation = { kind = "markdown", value = "Inspection and manipulation of the process's environment.\n\nThis module contains functions to inspect various aspects such as\nenvironment variables, process arguments, the current directory, and various\nother important directories.\n\nThere are several functions and structs in this module that have a\ncounterpart ending in `os`. Those ending in `os` will return an [`OsString`]\nand those without will return a [`String`]." }, insertText = "env", insertTextFormat = 2, kind = 9, label = "env" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/error.rs", documentation = { kind = "markdown", value = "Traits for working with Errors." }, insertText = "error", insertTextFormat = 2, kind = 9, label = "error" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/f32.rs", documentation = { kind = "markdown", value = "Constants specific to the `f32` single-precision floating point type.\n\n*[See also the `f32` primitive type](primitive@f32).*\n\nMathematically significant numbers are provided in the `consts` sub-module.\n\nFor the constants defined directly in this module\n(as distinct from those defined in the `consts` sub-module),\nnew code should instead use the associated constants\ndefined directly on the `f32` type." }, insertText = "f32", insertTextFormat = 2, kind = 9, label = "f32" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/f64.rs", documentation = { kind = "markdown", value = "Constants specific to the `f64` double-precision floating point type.\n\n*[See also the `f64` primitive type](primitive@f64).*\n\nMathematically significant numbers are provided in the `consts` sub-module.\n\nFor the constants defined directly in this module\n(as distinct from those defined in the `consts` sub-module),\nnew code should instead use the associated constants\ndefined directly on the `f64` type." }, insertText = "f64", insertTextFormat = 2, kind = 9, label = "f64" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/ffi/mod.rs", documentation = { kind = "markdown", value = "Utilities related to FFI bindings.\n\nThis module provides utilities to handle data across non-Rust\ninterfaces, like other programming languages and the underlying\noperating system. It is mainly of use for FFI (Foreign Function\nInterface) bindings and code that needs to exchange C-like strings\nwith other languages.\n\n# Overview\n\nRust represents owned strings with the [`String`] type, and\nborrowed slices of strings with the [`str`] primitive. Both are\nalways in UTF-8 encoding, and may contain nul bytes in the middle,\ni.e., if you look at the bytes that make up the string, there may\nbe a `\\0` among them. Both `String` and `str` store their length\nexplicitly; there are no nul terminators at the end of strings\nlike in C.\n\nC strings are different from Rust strings:\n\n* **Encodings** - Rust strings are UTF-8, but C strings may use\nother encodings. If you are using a string from C, you should\ncheck its encoding explicitly, rather than just assuming that it\nis UTF-8 like you can do in Rust.\n\n* **Character size** - C strings may use `char` or `wchar_t`-sized\ncharacters; please **note** that C's `char` is different from Rust's.\nThe C standard leaves the actual sizes of those types open to\ninterpretation, but defines different APIs for strings made up of\neach character type. Rust strings are always UTF-8, so different\nUnicode characters will be encoded in a variable number of bytes\neach. The Rust type [`char`] represents a '[Unicode scalar\nvalue]', which is similar to, but not the same as, a '[Unicode\ncode point]'.\n\n* **Nul terminators and implicit string lengths** - Often, C\nstrings are nul-terminated, i.e., they have a `\\0` character at the\nend. The length of a string buffer is not stored, but has to be\ncalculated; to compute the length of a string, C code must\nmanually call a function like `strlen()` for `char`-based strings,\nor `wcslen()` for `wchar_t`-based ones. Those functions return\nthe number of characters in the string excluding the nul\nterminator, so the buffer length is really `len+1` characters.\nRust strings don't have a nul terminator; their length is always\nstored and does not need to be calculated. While in Rust\naccessing a string's length is a `O(1)` operation (because the\nlength is stored); in C it is an `O(length)` operation because the\nlength needs to be computed by scanning the string for the nul\nterminator.\n\n* **Internal nul characters** - When C strings have a nul\nterminator character, this usually means that they cannot have nul\ncharacters in the middle — a nul character would essentially\ntruncate the string. Rust strings *can* have nul characters in\nthe middle, because nul does not have to mark the end of the\nstring in Rust.\n\n# Representations of non-Rust strings\n\n[`CString`] and [`CStr`] are useful when you need to transfer\nUTF-8 strings to and from languages with a C ABI, like Python.\n\n* **From Rust to C:** [`CString`] represents an owned, C-friendly\nstring: it is nul-terminated, and has no internal nul characters.\nRust code can create a [`CString`] out of a normal string (provided\nthat the string doesn't have nul characters in the middle), and\nthen use a variety of methods to obtain a raw `*mut `[`u8`] that can\nthen be passed as an argument to functions which use the C\nconventions for strings.\n\n* **From C to Rust:** [`CStr`] represents a borrowed C string; it\nis what you would use to wrap a raw `*const `[`u8`] that you got from\na C function. A [`CStr`] is guaranteed to be a nul-terminated array\nof bytes. Once you have a [`CStr`], you can convert it to a Rust\n[`&str`][`str`] if it's valid UTF-8, or lossily convert it by adding\nreplacement characters.\n\n[`OsString`] and [`OsStr`] are useful when you need to transfer\nstrings to and from the operating system itself, or when capturing\nthe output of external commands. Conversions between [`OsString`],\n[`OsStr`] and Rust strings work similarly to those for [`CString`]\nand [`CStr`].\n\n* [`OsString`] represents an owned string in whatever\nrepresentation the operating system prefers. In the Rust standard\nlibrary, various APIs that transfer strings to/from the operating\nsystem use [`OsString`] instead of plain strings. For example,\n[`env::var_os()`] is used to query environment variables; it\nreturns an [`Option`]`<`[`OsString`]`>`. If the environment variable\nexists you will get a [`Some`]`(os_string)`, which you can *then* try to\nconvert to a Rust string. This yields a [`Result`], so that\nyour code can detect errors in case the environment variable did\nnot in fact contain valid Unicode data.\n\n* [`OsStr`] represents a borrowed reference to a string in a\nformat that can be passed to the operating system. It can be\nconverted into an UTF-8 Rust string slice in a similar way to\n[`OsString`].\n\n# Conversions\n\n## On Unix\n\nOn Unix, [`OsStr`] implements the\n`std::os::unix::ffi::`[`OsStrExt`][unix.OsStrExt] trait, which\naugments it with two methods, [`from_bytes`] and [`as_bytes`].\nThese do inexpensive conversions from and to UTF-8 byte slices.\n\nAdditionally, on Unix [`OsString`] implements the\n`std::os::unix::ffi::`[`OsStringExt`][unix.OsStringExt] trait,\nwhich provides [`from_vec`] and [`into_vec`] methods that consume\ntheir arguments, and take or produce vectors of [`u8`].\n\n## On Windows\n\nOn Windows, [`OsStr`] implements the\n`std::os::windows::ffi::`[`OsStrExt`][windows.OsStrExt] trait,\nwhich provides an [`encode_wide`] method. This provides an\niterator that can be [`collect`]ed into a vector of [`u16`].\n\nAdditionally, on Windows [`OsString`] implements the\n`std::os::windows:ffi::`[`OsStringExt`][windows.OsStringExt]\ntrait, which provides a [`from_wide`] method. The result of this\nmethod is an [`OsString`] which can be round-tripped to a Windows\nstring losslessly.\n\n[Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value\n[Unicode code point]: http://www.unicode.org/glossary/#code_point\n[`env::set_var()`]: crate::env::set_var\n[`env::var_os()`]: crate::env::var_os\n[unix.OsStringExt]: crate::os::unix::ffi::OsStringExt\n[`from_vec`]: crate::os::unix::ffi::OsStringExt::from_vec\n[`into_vec`]: crate::os::unix::ffi::OsStringExt::into_vec\n[unix.OsStrExt]: crate::os::unix::ffi::OsStrExt\n[`from_bytes`]: crate::os::unix::ffi::OsStrExt::from_bytes\n[`as_bytes`]: crate::os::unix::ffi::OsStrExt::as_bytes\n[`OsStrExt`]: crate::os::unix::ffi::OsStrExt\n[windows.OsStrExt]: crate::os::windows::ffi::OsStrExt\n[`encode_wide`]: crate::os::windows::ffi::OsStrExt::encode_wide\n[`collect`]: crate::iter::Iterator::collect\n[windows.OsStringExt]: crate::os::windows::ffi::OsStringExt\n[`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide" }, insertText = "ffi", insertTextFormat = 2, kind = 9, label = "ffi" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/fmt.rs", documentation = { kind = "markdown", value = "Utilities for formatting and printing `String`s.\n\nThis module contains the runtime support for the [`format!`] syntax extension.\nThis macro is implemented in the compiler to emit calls to this module in\norder to format arguments at runtime into strings.\n\n# Usage\n\nThe [`format!`] macro is intended to be familiar to those coming from C's\n`printf`/`fprintf` functions or Python's `str.format` function.\n\nSome examples of the [`format!`] extension are:\n\n```rust\nformat!(\"Hello\"); // => \"Hello\"\nformat!(\"Hello, {}!\", \"world\"); // => \"Hello, world!\"\nformat!(\"The number is {}\", 1); // => \"The number is 1\"\nformat!(\"{:?}\", (3, 4)); // => \"(3, 4)\"\nformat!(\"{value}\", value=4); // => \"4\"\nformat!(\"{} {}\", 1, 2); // => \"1 2\"\nformat!(\"{:04}\", 42); // => \"0042\" with leading zeros\n```\n\nFrom these, you can see that the first argument is a format string. It is\nrequired by the compiler for this to be a string literal; it cannot be a\nvariable passed in (in order to perform validity checking). The compiler\nwill then parse the format string and determine if the list of arguments\nprovided is suitable to pass to this format string.\n\nTo convert a single value to a string, use the [`to_string`] method. This\nwill use the [`Display`] formatting trait.\n\n## Positional parameters\n\nEach formatting argument is allowed to specify which value argument it's\nreferencing, and if omitted it is assumed to be \"the next argument\". For\nexample, the format string `{} {} {}` would take three parameters, and they\nwould be formatted in the same order as they're given. The format string\n`{2} {1} {0}`, however, would format arguments in reverse order.\n\nThings can get a little tricky once you start intermingling the two types of\npositional specifiers. The \"next argument\" specifier can be thought of as an\niterator over the argument. Each time a \"next argument\" specifier is seen,\nthe iterator advances. This leads to behavior like this:\n\n```rust\nformat!(\"{1} {} {0} {}\", 1, 2); // => \"2 1 1 2\"\n```\n\nThe internal iterator over the argument has not been advanced by the time\nthe first `{}` is seen, so it prints the first argument. Then upon reaching\nthe second `{}`, the iterator has advanced forward to the second argument.\nEssentially, parameters that explicitly name their argument do not affect\nparameters that do not name an argument in terms of positional specifiers.\n\nA format string is required to use all of its arguments, otherwise it is a\ncompile-time error. You may refer to the same argument more than once in the\nformat string.\n\n## Named parameters\n\nRust itself does not have a Python-like equivalent of named parameters to a\nfunction, but the [`format!`] macro is a syntax extension that allows it to\nleverage named parameters. Named parameters are listed at the end of the\nargument list and have the syntax:\n\n```text\nidentifier '=' expression\n```\n\nFor example, the following [`format!`] expressions all use named argument:\n\n```rust\nformat!(\"{argument}\", argument = \"test\"); // => \"test\"\nformat!(\"{name} {}\", 1, name = 2); // => \"2 1\"\nformat!(\"{a} {c} {b}\", a=\"a\", b='b', c=3); // => \"a 3 b\"\n```\n\nIt is not valid to put positional parameters (those without names) after\narguments that have names. Like with positional parameters, it is not\nvalid to provide named parameters that are unused by the format string.\n\n# Formatting Parameters\n\nEach argument being formatted can be transformed by a number of formatting\nparameters (corresponding to `format_spec` in [the syntax](#syntax)). These\nparameters affect the string representation of what's being formatted.\n\n## Width\n\n```rust\n// All of these print \"Hello x !\"\nprintln!(\"Hello {:5}!\", \"x\");\nprintln!(\"Hello {:1$}!\", \"x\", 5);\nprintln!(\"Hello {1:0$}!\", 5, \"x\");\nprintln!(\"Hello {:width$}!\", \"x\", width = 5);\n```\n\nThis is a parameter for the \"minimum width\" that the format should take up.\nIf the value's string does not fill up this many characters, then the\npadding specified by fill/alignment will be used to take up the required\nspace (see below).\n\nThe value for the width can also be provided as a [`usize`] in the list of\nparameters by adding a postfix `$`, indicating that the second argument is\na [`usize`] specifying the width.\n\nReferring to an argument with the dollar syntax does not affect the \"next\nargument\" counter, so it's usually a good idea to refer to arguments by\nposition, or use named arguments.\n\n## Fill/Alignment\n\n```rust\nassert_eq!(format!(\"Hello {:<5}!\", \"x\"), \"Hello x !\");\nassert_eq!(format!(\"Hello {:-<5}!\", \"x\"), \"Hello x----!\");\nassert_eq!(format!(\"Hello {:^5}!\", \"x\"), \"Hello x !\");\nassert_eq!(format!(\"Hello {:>5}!\", \"x\"), \"Hello x!\");\n```\n\nThe optional fill character and alignment is provided normally in conjunction with the\n[`width`](#width) parameter. It must be defined before `width`, right after the `:`.\nThis indicates that if the value being formatted is smaller than\n`width` some extra characters will be printed around it.\nFilling comes in the following variants for different alignments:\n\n* `[fill]<` - the argument is left-aligned in `width` columns\n* `[fill]^` - the argument is center-aligned in `width` columns\n* `[fill]>` - the argument is right-aligned in `width` columns\n\nThe default [fill/alignment](#fillalignment) for non-numerics is a space and\nleft-aligned. The\ndefault for numeric formatters is also a space character but with right-alignment. If\nthe `0` flag (see below) is specified for numerics, then the implicit fill character is\n`0`.\n\nNote that alignment may not be implemented by some types. In particular, it\nis not generally implemented for the `Debug` trait. A good way to ensure\npadding is applied is to format your input, then pad this resulting string\nto obtain your output:\n\n```rust\nprintln!(\"Hello {:^15}!\", format!(\"{:?}\", Some(\"hi\"))); // => \"Hello Some(\"hi\") !\"\n```\n\n## Sign/`#`/`0`\n\n```rust\nassert_eq!(format!(\"Hello {:+}!\", 5), \"Hello +5!\");\nassert_eq!(format!(\"{:#x}!\", 27), \"0x1b!\");\nassert_eq!(format!(\"Hello {:05}!\", 5), \"Hello 00005!\");\nassert_eq!(format!(\"Hello {:05}!\", -5), \"Hello -0005!\");\nassert_eq!(format!(\"{:#010x}!\", 27), \"0x0000001b!\");\n```\n\nThese are all flags altering the behavior of the formatter.\n\n* `+` - This is intended for numeric types and indicates that the sign\n should always be printed. Positive signs are never printed by\n default, and the negative sign is only printed by default for the\n `Signed` trait. This flag indicates that the correct sign (`+` or `-`)\n should always be printed.\n* `-` - Currently not used\n* `#` - This flag indicates that the \"alternate\" form of printing should\n be used. The alternate forms are:\n * `#?` - pretty-print the [`Debug`] formatting\n * `#x` - precedes the argument with a `0x`\n * `#X` - precedes the argument with a `0x`\n * `#b` - precedes the argument with a `0b`\n * `#o` - precedes the argument with a `0o`\n* `0` - This is used to indicate for integer formats that the padding to `width` should\n both be done with a `0` character as well as be sign-aware. A format\n like `{:08}` would yield `00000001` for the integer `1`, while the\n same format would yield `-0000001` for the integer `-1`. Notice that\n the negative version has one fewer zero than the positive version.\n Note that padding zeros are always placed after the sign (if any)\n and before the digits. When used together with the `#` flag, a similar\n rule applies: padding zeros are inserted after the prefix but before\n the digits. The prefix is included in the total width.\n\n## Precision\n\nFor non-numeric types, this can be considered a \"maximum width\". If the resulting string is\nlonger than this width, then it is truncated down to this many characters and that truncated\nvalue is emitted with proper `fill`, `alignment` and `width` if those parameters are set.\n\nFor integral types, this is ignored.\n\nFor floating-point types, this indicates how many digits after the decimal point should be\nprinted.\n\nThere are three possible ways to specify the desired `precision`:\n\n1. An integer `.N`:\n\n the integer `N` itself is the precision.\n\n2. An integer or name followed by dollar sign `.N$`:\n\n use format *argument* `N` (which must be a `usize`) as the precision.\n\n3. An asterisk `.*`:\n\n `.*` means that this `{...}` is associated with *two* format inputs rather than one: the\n first input holds the `usize` precision, and the second holds the value to print. Note that\n in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers\n to the *value* to print, and the `precision` must come in the input preceding `<arg>`.\n\nFor example, the following calls all print the same thing `Hello x is 0.01000`:\n\n```rust\n// Hello {arg 0 (\"x\")} is {arg 1 (0.01) with precision specified inline (5)}\nprintln!(\"Hello {0} is {1:.5}\", \"x\", 0.01);\n\n// Hello {arg 1 (\"x\")} is {arg 2 (0.01) with precision specified in arg 0 (5)}\nprintln!(\"Hello {1} is {2:.0$}\", 5, \"x\", 0.01);\n\n// Hello {arg 0 (\"x\")} is {arg 2 (0.01) with precision specified in arg 1 (5)}\nprintln!(\"Hello {0} is {2:.1$}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {second of next two args (0.01) with precision\n// specified in first of next two args (5)}\nprintln!(\"Hello {} is {:.*}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {arg 2 (0.01) with precision\n// specified in its predecessor (5)}\nprintln!(\"Hello {} is {2:.*}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {arg \"number\" (0.01) with precision specified\n// in arg \"prec\" (5)}\nprintln!(\"Hello {} is {number:.prec$}\", \"x\", prec = 5, number = 0.01);\n```\n\nWhile these:\n\n```rust\nprintln!(\"{}, `{name:.*}` has 3 fractional digits\", \"Hello\", 3, name=1234.56);\nprintln!(\"{}, `{name:.*}` has 3 characters\", \"Hello\", 3, name=\"1234.56\");\nprintln!(\"{}, `{name:>8.*}` has 3 right-aligned characters\", \"Hello\", 3, name=\"1234.56\");\n```\n\nprint three significantly different things:\n\n```text\nHello, `1234.560` has 3 fractional digits\nHello, `123` has 3 characters\nHello, ` 123` has 3 right-aligned characters\n```\n\n## Localization\n\nIn some programming languages, the behavior of string formatting functions\ndepends on the operating system's locale setting. The format functions\nprovided by Rust's standard library do not have any concept of locale and\nwill produce the same results on all systems regardless of user\nconfiguration.\n\nFor example, the following code will always print `1.5` even if the system\nlocale uses a decimal separator other than a dot.\n\n```rust\nprintln!(\"The value is {}\", 1.5);\n```\n\n# Escaping\n\nThe literal characters `{` and `}` may be included in a string by preceding\nthem with the same character. For example, the `{` character is escaped with\n`{{` and the `}` character is escaped with `}}`.\n\n```rust\nassert_eq!(format!(\"Hello {{}}\"), \"Hello {}\");\nassert_eq!(format!(\"{{ Hello\"), \"{ Hello\");\n```\n\n# Syntax\n\nTo summarize, here you can find the full grammar of format strings.\nThe syntax for the formatting language used is drawn from other languages,\nso it should not be too alien. Arguments are formatted with Python-like\nsyntax, meaning that arguments are surrounded by `{}` instead of the C-like\n`%`. The actual grammar for the formatting syntax is:\n\n```text\nformat_string := text [ maybe_format text ] *\nmaybe_format := '{' '{' | '}' '}' | format\nformat := '{' [ argument ] [ ':' format_spec ] '}'\nargument := integer | identifier\n\nformat_spec := [[fill]align][sign]['#']['0'][width]['.' precision]type\nfill := character\nalign := '<' | '^' | '>'\nsign := '+' | '-'\nwidth := count\nprecision := count | '*'\ntype := '' | '?' | 'x?' | 'X?' | identifier\ncount := parameter | integer\nparameter := argument '$'\n```\nIn the above grammar, `text` may not contain any `'{'` or `'}'` characters.\n\n# Formatting traits\n\nWhen requesting that an argument be formatted with a particular type, you\nare actually requesting that an argument ascribes to a particular trait.\nThis allows multiple actual types to be formatted via `{:x}` (like [`i8`] as\nwell as [`isize`]). The current mapping of types to traits is:\n\n* *nothing* ⇒ [`Display`]\n* `?` ⇒ [`Debug`]\n* `x?` ⇒ [`Debug`] with lower-case hexadecimal integers\n* `X?` ⇒ [`Debug`] with upper-case hexadecimal integers\n* `o` ⇒ [`Octal`]\n* `x` ⇒ [`LowerHex`]\n* `X` ⇒ [`UpperHex`]\n* `p` ⇒ [`Pointer`]\n* `b` ⇒ [`Binary`]\n* `e` ⇒ [`LowerExp`]\n* `E` ⇒ [`UpperExp`]\n\nWhat this means is that any type of argument which implements the\n[`fmt::Binary`][`Binary`] trait can then be formatted with `{:b}`. Implementations\nare provided for these traits for a number of primitive types by the\nstandard library as well. If no format is specified (as in `{}` or `{:6}`),\nthen the format trait used is the [`Display`] trait.\n\nWhen implementing a format trait for your own type, you will have to\nimplement a method of the signature:\n\n```rust\nfn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n```\n\nYour type will be passed as `self` by-reference, and then the function\nshould emit output into the `f.buf` stream. It is up to each format trait\nimplementation to correctly adhere to the requested formatting parameters.\nThe values of these parameters will be listed in the fields of the\n[`Formatter`] struct. In order to help with this, the [`Formatter`] struct also\nprovides some helper methods.\n\nAdditionally, the return value of this function is [`fmt::Result`] which is a\ntype alias of [`Result`]`<(), `[`std::fmt::Error`]`>`. Formatting implementations\nshould ensure that they propagate errors from the [`Formatter`] (e.g., when\ncalling [`write!`]). However, they should never return errors spuriously. That\nis, a formatting implementation must and may only return an error if the\npassed-in [`Formatter`] returns an error. This is because, contrary to what\nthe function signature might suggest, string formatting is an infallible\noperation. This function only returns a result because writing to the\nunderlying stream might fail and it must provide a way to propagate the fact\nthat an error has occurred back up the stack.\n\nAn example of implementing the formatting traits would look\nlike:\n\n```rust\nuse std::fmt;\n\n#[derive(Debug)]\nstruct Vector2D {\n x: isize,\n y: isize,\n}\n\nimpl fmt::Display for Vector2D {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n // The `f` value implements the `Write` trait, which is what the\n // write! macro is expecting. Note that this formatting ignores the\n // various flags provided to format strings.\n write!(f, \"({}, {})\", self.x, self.y)\n }\n}\n\n// Different traits allow different forms of output of a type. The meaning\n// of this format is to print the magnitude of a vector.\nimpl fmt::Binary for Vector2D {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n let magnitude = (self.x * self.x + self.y * self.y) as f64;\n let magnitude = magnitude.sqrt();\n\n // Respect the formatting flags by using the helper method\n // `pad_integral` on the Formatter object. See the method\n // documentation for details, and the function `pad` can be used\n // to pad strings.\n let decimals = f.precision().unwrap_or(3);\n let string = format!(\"{:.*}\", decimals, magnitude);\n f.pad_integral(true, \"\", &string)\n }\n}\n\nfn main() {\n let myvector = Vector2D { x: 3, y: 4 };\n\n println!(\"{}\", myvector); // => \"(3, 4)\"\n println!(\"{:?}\", myvector); // => \"Vector2D {x: 3, y:4}\"\n println!(\"{:10.3b}\", myvector); // => \" 5.000\"\n}\n```\n\n### `fmt::Display` vs `fmt::Debug`\n\nThese two formatting traits have distinct purposes:\n\n- [`fmt::Display`][`Display`] implementations assert that the type can be faithfully\n represented as a UTF-8 string at all times. It is **not** expected that\n all types implement the [`Display`] trait.\n- [`fmt::Debug`][`Debug`] implementations should be implemented for **all** public types.\n Output will typically represent the internal state as faithfully as possible.\n The purpose of the [`Debug`] trait is to facilitate debugging Rust code. In\n most cases, using `#[derive(Debug)]` is sufficient and recommended.\n\nSome examples of the output from both traits:\n\n```rust\nassert_eq!(format!(\"{} {:?}\", 3, 4), \"3 4\");\nassert_eq!(format!(\"{} {:?}\", 'a', 'b'), \"a 'b'\");\nassert_eq!(format!(\"{} {:?}\", \"foo\\n\", \"bar\\n\"), \"foo\\n \\\"bar\\\\n\\\"\");\n```\n\n# Related macros\n\nThere are a number of related macros in the [`format!`] family. The ones that\nare currently implemented are:\n\n```rust\nformat! // described above\nwrite! // first argument is a &mut io::Write, the destination\nwriteln! // same as write but appends a newline\nprint! // the format string is printed to the standard output\nprintln! // same as print but appends a newline\neprint! // the format string is printed to the standard error\neprintln! // same as eprint but appends a newline\nformat_args! // described below.\n```\n\n### `write!`\n\nThis and [`writeln!`] are two macros which are used to emit the format string\nto a specified stream. This is used to prevent intermediate allocations of\nformat strings and instead directly write the output. Under the hood, this\nfunction is actually invoking the [`write_fmt`] function defined on the\n[`std::io::Write`] trait. Example usage is:\n\n```rust\nuse std::io::Write;\nlet mut w = Vec::new();\nwrite!(&mut w, \"Hello {}!\", \"world\");\n```\n\n### `print!`\n\nThis and [`println!`] emit their output to stdout. Similarly to the [`write!`]\nmacro, the goal of these macros is to avoid intermediate allocations when\nprinting output. Example usage is:\n\n```rust\nprint!(\"Hello {}!\", \"world\");\nprintln!(\"I have a newline {}\", \"character at the end\");\n```\n### `eprint!`\n\nThe [`eprint!`] and [`eprintln!`] macros are identical to\n[`print!`] and [`println!`], respectively, except they emit their\noutput to stderr.\n\n### `format_args!`\n\nThis is a curious macro used to safely pass around\nan opaque object describing the format string. This object\ndoes not require any heap allocations to create, and it only\nreferences information on the stack. Under the hood, all of\nthe related macros are implemented in terms of this. First\noff, some example usage is:\n\n```rust\nuse std::fmt;\nuse std::io::{self, Write};\n\nlet mut some_writer = io::stdout();\nwrite!(&mut some_writer, \"{}\", format_args!(\"print with a {}\", \"macro\"));\n\nfn my_fmt_fn(args: fmt::Arguments) {\n write!(&mut io::stdout(), \"{}\", args);\n}\nmy_fmt_fn(format_args!(\", or a {} too\", \"function\"));\n```\n\nThe result of the [`format_args!`] macro is a value of type [`fmt::Arguments`].\nThis structure can then be passed to the [`write`] and [`format`] functions\ninside this module in order to process the format string.\nThe goal of this macro is to even further prevent intermediate allocations\nwhen dealing with formatting strings.\n\nFor example, a logging library could use the standard formatting syntax, but\nit would internally pass around this structure until it has been determined\nwhere output should go to.\n\n[`fmt::Result`]: Result\n[`Result`]: core::result::Result\n[`std::fmt::Error`]: Error\n[`write!`]: core::write\n[`write`]: core::write\n[`format!`]: crate::format\n[`to_string`]: crate::string::ToString\n[`writeln!`]: core::writeln\n[`write_fmt`]: ../../std/io/trait.Write.html#method.write_fmt\n[`std::io::Write`]: ../../std/io/trait.Write.html\n[`print!`]: ../../std/macro.print.html\n[`println!`]: ../../std/macro.println.html\n[`eprint!`]: ../../std/macro.eprint.html\n[`eprintln!`]: ../../std/macro.eprintln.html\n[`format_args!`]: core::format_args\n[`fmt::Arguments`]: Arguments\n[`format`]: crate::format" }, insertText = "fmt", insertTextFormat = 2, kind = 9, label = "fmt" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs", documentation = { kind = "markdown", value = "Filesystem manipulation operations.\n\nThis module contains basic methods to manipulate the contents of the local\nfilesystem. All methods in this module represent cross-platform filesystem\noperations. Extra platform-specific functionality can be found in the\nextension traits of `std::os::$platform`." }, insertText = "fs", insertTextFormat = 2, kind = 9, label = "fs" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs", insertText = "future", insertTextFormat = 2, kind = 9, label = "future" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/mod.rs", documentation = { kind = "markdown", value = 'Generic hashing support.\n\nThis module provides a generic way to compute the [hash] of a value.\nHashes are most commonly used with [`HashMap`] and [`HashSet`].\n\n[hash]: https://en.wikipedia.org/wiki/Hash_function\n[`HashMap`]: ../../std/collections/struct.HashMap.html\n[`HashSet`]: ../../std/collections/struct.HashSet.html\n\nThe simplest way to make a type hashable is to use `#[derive(Hash)]`:\n\n# Examples\n\n```rust\nuse std::collections::hash_map::DefaultHasher;\nuse std::hash::{Hash, Hasher};\n\n#[derive(Hash)]\nstruct Person {\n id: u32,\n name: String,\n phone: u64,\n}\n\nlet person1 = Person {\n id: 5,\n name: "Janet".to_string(),\n phone: 555_666_7777,\n};\nlet person2 = Person {\n id: 5,\n name: "Bob".to_string(),\n phone: 555_666_7777,\n};\n\nassert!(calculate_hash(&person1) != calculate_hash(&person2));\n\nfn calculate_hash<T: Hash>(t: &T) -> u64 {\n let mut s = DefaultHasher::new();\n t.hash(&mut s);\n s.finish()\n}\n```\n\nIf you need more control over how a value is hashed, you need to implement\nthe [`Hash`] trait:\n\n```rust\nuse std::collections::hash_map::DefaultHasher;\nuse std::hash::{Hash, Hasher};\n\nstruct Person {\n id: u32,\n name: String,\n phone: u64,\n}\n\nimpl Hash for Person {\n fn hash<H: Hasher>(&self, state: &mut H) {\n self.id.hash(state);\n self.phone.hash(state);\n }\n}\n\nlet person1 = Person {\n id: 5,\n name: "Janet".to_string(),\n phone: 555_666_7777,\n};\nlet person2 = Person {\n id: 5,\n name: "Bob".to_string(),\n phone: 555_666_7777,\n};\n\nassert_eq!(calculate_hash(&person1), calculate_hash(&person2));\n\nfn calculate_hash<T: Hash>(t: &T) -> u64 {\n let mut s = DefaultHasher::new();\n t.hash(&mut s);\n s.finish()\n}\n```' }, insertText = "hash", insertTextFormat = 2, kind = 9, label = "hash" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hint.rs", insertText = "hint", insertTextFormat = 2, kind = 9, label = "hint" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/i128.rs", documentation = { kind = "markdown", value = "Constants for the 128-bit signed integer type.\n\n*[See also the `i128` primitive type][i128].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "i128", insertTextFormat = 2, kind = 9, label = "i128" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/i16.rs", documentation = { kind = "markdown", value = "Constants for the 16-bit signed integer type.\n\n*[See also the `i16` primitive type][i16].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "i16", insertTextFormat = 2, kind = 9, label = "i16" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/i32.rs", documentation = { kind = "markdown", value = "Constants for the 32-bit signed integer type.\n\n*[See also the `i32` primitive type][i32].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "i32", insertTextFormat = 2, kind = 9, label = "i32" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/i64.rs", documentation = { kind = "markdown", value = "Constants for the 64-bit signed integer type.\n\n*[See also the `i64` primitive type][i64].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "i64", insertTextFormat = 2, kind = 9, label = "i64" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/i8.rs", documentation = { kind = "markdown", value = "Constants for the 8-bit signed integer type.\n\n*[See also the `i8` primitive type][i8].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "i8", insertTextFormat = 2, kind = 9, label = "i8" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics.rs", documentation = { kind = "markdown", value = "Compiler intrinsics.\n\nThe corresponding definitions are in `compiler/rustc_codegen_llvm/src/intrinsic.rs`.\nThe corresponding const implementations are in `compiler/rustc_mir/src/interpret/intrinsics.rs`\n\n# Const intrinsics\n\nNote: any changes to the constness of intrinsics should be discussed with the language team.\nThis includes changes in the stability of the constness.\n\nIn order to make an intrinsic usable at compile-time, one needs to copy the implementation\nfrom <https://github.com/rust-lang/miri/blob/master/src/shims/intrinsics.rs> to\n`compiler/rustc_mir/src/interpret/intrinsics.rs` and add a\n`#[rustc_const_unstable(feature = \"foo\", issue = \"01234\")]` to the intrinsic.\n\nIf an intrinsic is supposed to be used from a `const fn` with a `rustc_const_stable` attribute,\nthe intrinsic's attribute must be `rustc_const_stable`, too. Such a change should not be done\nwithout T-lang consultation, because it bakes a feature into the language that cannot be\nreplicated in user code without compiler support.\n\n# Volatiles\n\nThe volatile intrinsics provide operations intended to act on I/O\nmemory, which are guaranteed to not be reordered by the compiler\nacross other volatile intrinsics. See the LLVM documentation on\n[[volatile]].\n\n[volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses\n\n# Atomics\n\nThe atomic intrinsics provide common atomic operations on machine\nwords, with multiple possible memory orderings. They obey the same\nsemantics as C++11. See the LLVM documentation on [[atomics]].\n\n[atomics]: http://llvm.org/docs/Atomics.html\n\nA quick refresher on memory ordering:\n\n* Acquire - a barrier for acquiring a lock. Subsequent reads and writes\n take place after the barrier.\n* Release - a barrier for releasing a lock. Preceding reads and writes\n take place before the barrier.\n* Sequentially consistent - sequentially consistent operations are\n guaranteed to happen in order. This is the standard mode for working\n with atomic types and is equivalent to Java's `volatile`." }, insertText = "intrinsics", insertTextFormat = 2, kind = 9, label = "intrinsics" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/io/mod.rs", documentation = { kind = "markdown", value = "Traits, helpers, and type definitions for core I/O functionality.\n\nThe `std::io` module contains a number of common things you'll need\nwhen doing input and output. The most core part of this module is\nthe [`Read`] and [`Write`] traits, which provide the\nmost general interface for reading and writing input and output.\n\n# Read and Write\n\nBecause they are traits, [`Read`] and [`Write`] are implemented by a number\nof other types, and you can implement them for your types too. As such,\nyou'll see a few different types of I/O throughout the documentation in\nthis module: [`File`]s, [`TcpStream`]s, and sometimes even [`Vec<T>`]s. For\nexample, [`Read`] adds a [`read`][`Read::read`] method, which we can use on\n[`File`]s:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let mut buffer = [0; 10];\n\n // read up to 10 bytes\n let n = f.read(&mut buffer)?;\n\n println!(\"The bytes: {:?}\", &buffer[..n]);\n Ok(())\n}\n```\n\n[`Read`] and [`Write`] are so important, implementors of the two traits have a\nnickname: readers and writers. So you'll sometimes see 'a reader' instead\nof 'a type that implements the [`Read`] trait'. Much easier!\n\n## Seek and BufRead\n\nBeyond that, there are two important traits that are provided: [`Seek`]\nand [`BufRead`]. Both of these build on top of a reader to control\nhow the reading happens. [`Seek`] lets you control where the next byte is\ncoming from:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\nuse std::io::SeekFrom;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let mut buffer = [0; 10];\n\n // skip to the last 10 bytes of the file\n f.seek(SeekFrom::End(-10))?;\n\n // read up to 10 bytes\n let n = f.read(&mut buffer)?;\n\n println!(\"The bytes: {:?}\", &buffer[..n]);\n Ok(())\n}\n```\n\n[`BufRead`] uses an internal buffer to provide a number of other ways to read, but\nto show it off, we'll need to talk about buffers in general. Keep reading!\n\n## BufReader and BufWriter\n\nByte-based interfaces are unwieldy and can be inefficient, as we'd need to be\nmaking near-constant calls to the operating system. To help with this,\n`std::io` comes with two structs, [`BufReader`] and [`BufWriter`], which wrap\nreaders and writers. The wrapper uses a buffer, reducing the number of\ncalls and providing nicer methods for accessing exactly what you want.\n\nFor example, [`BufReader`] works with the [`BufRead`] trait to add extra\nmethods to any reader:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\nuse std::io::BufReader;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n let mut reader = BufReader::new(f);\n let mut buffer = String::new();\n\n // read a line into buffer\n reader.read_line(&mut buffer)?;\n\n println!(\"{}\", buffer);\n Ok(())\n}\n```\n\n[`BufWriter`] doesn't add any new ways of writing; it just buffers every call\nto [`write`][`Write::write`]:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\nuse std::io::BufWriter;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let f = File::create(\"foo.txt\")?;\n {\n let mut writer = BufWriter::new(f);\n\n // write a byte to the buffer\n writer.write(&[42])?;\n\n } // the buffer is flushed once writer goes out of scope\n\n Ok(())\n}\n```\n\n## Standard input and output\n\nA very common source of input is standard input:\n\n```rust\nuse std::io;\n\nfn main() -> io::Result<()> {\n let mut input = String::new();\n\n io::stdin().read_line(&mut input)?;\n\n println!(\"You typed: {}\", input.trim());\n Ok(())\n}\n```\n\nNote that you cannot use the [`?` operator] in functions that do not return\na [`Result<T, E>`][`Result`]. Instead, you can call [`.unwrap()`]\nor `match` on the return value to catch any possible errors:\n\n```rust\nuse std::io;\n\nlet mut input = String::new();\n\nio::stdin().read_line(&mut input).unwrap();\n```\n\nAnd a very common source of output is standard output:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\n\nfn main() -> io::Result<()> {\n io::stdout().write(&[42])?;\n Ok(())\n}\n```\n\nOf course, using [`io::stdout`] directly is less common than something like\n[`println!`].\n\n## Iterator types\n\nA large number of the structures provided by `std::io` are for various\nways of iterating over I/O. For example, [`Lines`] is used to split over\nlines:\n\n```rust\nuse std::io;\nuse std::io::prelude::*;\nuse std::io::BufReader;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n let reader = BufReader::new(f);\n\n for line in reader.lines() {\n println!(\"{}\", line?);\n }\n Ok(())\n}\n```\n\n## Functions\n\nThere are a number of [functions][functions-list] that offer access to various\nfeatures. For example, we can use three of these functions to copy everything\nfrom standard input to standard output:\n\n```rust\nuse std::io;\n\nfn main() -> io::Result<()> {\n io::copy(&mut io::stdin(), &mut io::stdout())?;\n Ok(())\n}\n```\n\n[functions-list]: #functions-1\n\n## io::Result\n\nLast, but certainly not least, is [`io::Result`]. This type is used\nas the return type of many `std::io` functions that can cause an error, and\ncan be returned from your own functions as well. Many of the examples in this\nmodule use the [`?` operator]:\n\n```rust\nuse std::io;\n\nfn read_input() -> io::Result<()> {\n let mut input = String::new();\n\n io::stdin().read_line(&mut input)?;\n\n println!(\"You typed: {}\", input.trim());\n\n Ok(())\n}\n```\n\nThe return type of `read_input()`, [`io::Result<()>`][`io::Result`], is a very\ncommon type for functions which don't have a 'real' return value, but do want to\nreturn errors if they happen. In this case, the only purpose of this function is\nto read the line and print it, so we use `()`.\n\n## Platform-specific behavior\n\nMany I/O functions throughout the standard library are documented to indicate\nwhat various library or syscalls they are delegated to. This is done to help\napplications both understand what's happening under the hood as well as investigate\nany possibly unclear semantics. Note, however, that this is informative, not a binding\ncontract. The implementation of many of these functions are subject to change over\ntime and may call fewer or more syscalls/library functions.\n\n[`File`]: crate::fs::File\n[`TcpStream`]: crate::net::TcpStream\n[`io::stdout`]: stdout\n[`io::Result`]: self::Result\n[`?` operator]: ../../book/appendix-02-operators.html\n[`Result`]: crate::result::Result\n[`.unwrap()`]: crate::result::Result::unwrap" }, insertText = "io", insertTextFormat = 2, kind = 9, label = "io" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/isize.rs", documentation = { kind = "markdown", value = "Constants for the pointer-sized signed integer type.\n\n*[See also the `isize` primitive type][isize].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "isize", insertTextFormat = 2, kind = 9, label = "isize" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/mod.rs", documentation = { kind = "markdown", value = "Composable external iteration.\n\nIf you've found yourself with a collection of some kind, and needed to\nperform an operation on the elements of said collection, you'll quickly run\ninto 'iterators'. Iterators are heavily used in idiomatic Rust code, so\nit's worth becoming familiar with them.\n\nBefore explaining more, let's talk about how this module is structured:\n\n# Organization\n\nThis module is largely organized by type:\n\n* [Traits] are the core portion: these traits define what kind of iterators\n exist and what you can do with them. The methods of these traits are worth\n putting some extra study time into.\n* [Functions] provide some helpful ways to create some basic iterators.\n* [Structs] are often the return types of the various methods on this\n module's traits. You'll usually want to look at the method that creates\n the `struct`, rather than the `struct` itself. For more detail about why,\n see '[Implementing Iterator](#implementing-iterator)'.\n\n[Traits]: #traits\n[Functions]: #functions\n[Structs]: #structs\n\nThat's it! Let's dig into iterators.\n\n# Iterator\n\nThe heart and soul of this module is the [`Iterator`] trait. The core of\n[`Iterator`] looks like this:\n\n```rust\ntrait Iterator {\n type Item;\n fn next(&mut self) -> Option<Self::Item>;\n}\n```\n\nAn iterator has a method, [`next`], which when called, returns an\n[`Option`]`<Item>`. [`next`] will return [`Some(Item)`] as long as there\nare elements, and once they've all been exhausted, will return `None` to\nindicate that iteration is finished. Individual iterators may choose to\nresume iteration, and so calling [`next`] again may or may not eventually\nstart returning [`Some(Item)`] again at some point (for example, see [`TryIter`]).\n\n[`Iterator`]'s full definition includes a number of other methods as well,\nbut they are default methods, built on top of [`next`], and so you get\nthem for free.\n\nIterators are also composable, and it's common to chain them together to do\nmore complex forms of processing. See the [Adapters](#adapters) section\nbelow for more details.\n\n[`Some(Item)`]: Some\n[`next`]: Iterator::next\n[`TryIter`]: ../../std/sync/mpsc/struct.TryIter.html\n\n# The three forms of iteration\n\nThere are three common methods which can create iterators from a collection:\n\n* `iter()`, which iterates over `&T`.\n* `iter_mut()`, which iterates over `&mut T`.\n* `into_iter()`, which iterates over `T`.\n\nVarious things in the standard library may implement one or more of the\nthree, where appropriate.\n\n# Implementing Iterator\n\nCreating an iterator of your own involves two steps: creating a `struct` to\nhold the iterator's state, and then implementing [`Iterator`] for that `struct`.\nThis is why there are so many `struct`s in this module: there is one for\neach iterator and iterator adapter.\n\nLet's make an iterator named `Counter` which counts from `1` to `5`:\n\n```rust\n// First, the struct:\n\n/// An iterator which counts from one to five\nstruct Counter {\n count: usize,\n}\n\n// we want our count to start at one, so let's add a new() method to help.\n// This isn't strictly necessary, but is convenient. Note that we start\n// `count` at zero, we'll see why in `next()`'s implementation below.\nimpl Counter {\n fn new() -> Counter {\n Counter { count: 0 }\n }\n}\n\n// Then, we implement `Iterator` for our `Counter`:\n\nimpl Iterator for Counter {\n // we will be counting with usize\n type Item = usize;\n\n // next() is the only required method\n fn next(&mut self) -> Option<Self::Item> {\n // Increment our count. This is why we started at zero.\n self.count += 1;\n\n // Check to see if we've finished counting or not.\n if self.count < 6 {\n Some(self.count)\n } else {\n None\n }\n }\n}\n\n// And now we can use it!\n\nlet mut counter = Counter::new();\n\nassert_eq!(counter.next(), Some(1));\nassert_eq!(counter.next(), Some(2));\nassert_eq!(counter.next(), Some(3));\nassert_eq!(counter.next(), Some(4));\nassert_eq!(counter.next(), Some(5));\nassert_eq!(counter.next(), None);\n```\n\nCalling [`next`] this way gets repetitive. Rust has a construct which can\ncall [`next`] on your iterator, until it reaches `None`. Let's go over that\nnext.\n\nAlso note that `Iterator` provides a default implementation of methods such as `nth` and `fold`\nwhich call `next` internally. However, it is also possible to write a custom implementation of\nmethods like `nth` and `fold` if an iterator can compute them more efficiently without calling\n`next`.\n\n# `for` loops and `IntoIterator`\n\nRust's `for` loop syntax is actually sugar for iterators. Here's a basic\nexample of `for`:\n\n```rust\nlet values = vec![1, 2, 3, 4, 5];\n\nfor x in values {\n println!(\"{}\", x);\n}\n```\n\nThis will print the numbers one through five, each on their own line. But\nyou'll notice something here: we never called anything on our vector to\nproduce an iterator. What gives?\n\nThere's a trait in the standard library for converting something into an\niterator: [`IntoIterator`]. This trait has one method, [`into_iter`],\nwhich converts the thing implementing [`IntoIterator`] into an iterator.\nLet's take a look at that `for` loop again, and what the compiler converts\nit into:\n\n[`into_iter`]: IntoIterator::into_iter\n\n```rust\nlet values = vec![1, 2, 3, 4, 5];\n\nfor x in values {\n println!(\"{}\", x);\n}\n```\n\nRust de-sugars this into:\n\n```rust\nlet values = vec![1, 2, 3, 4, 5];\n{\n let result = match IntoIterator::into_iter(values) {\n mut iter => loop {\n let next;\n match iter.next() {\n Some(val) => next = val,\n None => break,\n };\n let x = next;\n let () = { println!(\"{}\", x); };\n },\n };\n result\n}\n```\n\nFirst, we call `into_iter()` on the value. Then, we match on the iterator\nthat returns, calling [`next`] over and over until we see a `None`. At\nthat point, we `break` out of the loop, and we're done iterating.\n\nThere's one more subtle bit here: the standard library contains an\ninteresting implementation of [`IntoIterator`]:\n\n```rust\nimpl<I: Iterator> IntoIterator for I\n```\n\nIn other words, all [`Iterator`]s implement [`IntoIterator`], by just\nreturning themselves. This means two things:\n\n1. If you're writing an [`Iterator`], you can use it with a `for` loop.\n2. If you're creating a collection, implementing [`IntoIterator`] for it\n will allow your collection to be used with the `for` loop.\n\n# Iterating by reference\n\nSince [`into_iter()`] takes `self` by value, using a `for` loop to iterate\nover a collection consumes that collection. Often, you may want to iterate\nover a collection without consuming it. Many collections offer methods that\nprovide iterators over references, conventionally called `iter()` and\n`iter_mut()` respectively:\n\n```rust\nlet mut values = vec![41];\nfor x in values.iter_mut() {\n *x += 1;\n}\nfor x in values.iter() {\n assert_eq!(*x, 42);\n}\nassert_eq!(values.len(), 1); // `values` is still owned by this function.\n```\n\nIf a collection type `C` provides `iter()`, it usually also implements\n`IntoIterator` for `&C`, with an implementation that just calls `iter()`.\nLikewise, a collection `C` that provides `iter_mut()` generally implements\n`IntoIterator` for `&mut C` by delegating to `iter_mut()`. This enables a\nconvenient shorthand:\n\n```rust\nlet mut values = vec![41];\nfor x in &mut values { // same as `values.iter_mut()`\n *x += 1;\n}\nfor x in &values { // same as `values.iter()`\n assert_eq!(*x, 42);\n}\nassert_eq!(values.len(), 1);\n```\n\nWhile many collections offer `iter()`, not all offer `iter_mut()`. For\nexample, mutating the keys of a [`HashSet<T>`] or [`HashMap<K, V>`] could\nput the collection into an inconsistent state if the key hashes change, so\nthese collections only offer `iter()`.\n\n[`into_iter()`]: IntoIterator::into_iter\n[`HashSet<T>`]: ../../std/collections/struct.HashSet.html\n[`HashMap<K, V>`]: ../../std/collections/struct.HashMap.html\n\n# Adapters\n\nFunctions which take an [`Iterator`] and return another [`Iterator`] are\noften called 'iterator adapters', as they're a form of the 'adapter\npattern'.\n\nCommon iterator adapters include [`map`], [`take`], and [`filter`].\nFor more, see their documentation.\n\nIf an iterator adapter panics, the iterator will be in an unspecified (but\nmemory safe) state. This state is also not guaranteed to stay the same\nacross versions of Rust, so you should avoid relying on the exact values\nreturned by an iterator which panicked.\n\n[`map`]: Iterator::map\n[`take`]: Iterator::take\n[`filter`]: Iterator::filter\n\n# Laziness\n\nIterators (and iterator [adapters](#adapters)) are *lazy*. This means that\njust creating an iterator doesn't _do_ a whole lot. Nothing really happens\nuntil you call [`next`]. This is sometimes a source of confusion when\ncreating an iterator solely for its side effects. For example, the [`map`]\nmethod calls a closure on each element it iterates over:\n\n```rust\nlet v = vec![1, 2, 3, 4, 5];\nv.iter().map(|x| println!(\"{}\", x));\n```\n\nThis will not print any values, as we only created an iterator, rather than\nusing it. The compiler will warn us about this kind of behavior:\n\n```text\nwarning: unused result that must be used: iterators are lazy and\ndo nothing unless consumed\n```\n\nThe idiomatic way to write a [`map`] for its side effects is to use a\n`for` loop or call the [`for_each`] method:\n\n```rust\nlet v = vec![1, 2, 3, 4, 5];\n\nv.iter().for_each(|x| println!(\"{}\", x));\n// or\nfor x in &v {\n println!(\"{}\", x);\n}\n```\n\n[`map`]: Iterator::map\n[`for_each`]: Iterator::for_each\n\nAnother common way to evaluate an iterator is to use the [`collect`]\nmethod to produce a new collection.\n\n[`collect`]: Iterator::collect\n\n# Infinity\n\nIterators do not have to be finite. As an example, an open-ended range is\nan infinite iterator:\n\n```rust\nlet numbers = 0..;\n```\n\nIt is common to use the [`take`] iterator adapter to turn an infinite\niterator into a finite one:\n\n```rust\nlet numbers = 0..;\nlet five_numbers = numbers.take(5);\n\nfor number in five_numbers {\n println!(\"{}\", number);\n}\n```\n\nThis will print the numbers `0` through `4`, each on their own line.\n\nBear in mind that methods on infinite iterators, even those for which a\nresult can be determined mathematically in finite time, may not terminate.\nSpecifically, methods such as [`min`], which in the general case require\ntraversing every element in the iterator, are likely not to return\nsuccessfully for any infinite iterators.\n\n```rust\nlet ones = std::iter::repeat(1);\nlet least = ones.min().unwrap(); // Oh no! An infinite loop!\n// `ones.min()` causes an infinite loop, so we won't reach this point!\nprintln!(\"The smallest number one is {}.\", least);\n```\n\n[`take`]: Iterator::take\n[`min`]: Iterator::min" }, insertText = "iter", insertTextFormat = 2, kind = 9, label = "iter" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lazy.rs", documentation = { kind = "markdown", value = "Lazy values and one-time initialization of static data." }, insertText = "lazy", insertTextFormat = 2, kind = 9, label = "lazy" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs", documentation = { kind = "markdown", value = "Primitive traits and types representing basic properties of types.\n\nRust types can be classified in various useful ways according to\ntheir intrinsic properties. These classifications are represented\nas traits." }, insertText = "marker", insertTextFormat = 2, kind = 9, label = "marker" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs", documentation = { kind = "markdown", value = "Basic functions for dealing with memory.\n\nThis module contains functions for querying the size and alignment of\ntypes, initializing and manipulating memory." }, insertText = "mem", insertTextFormat = 2, kind = 9, label = "mem" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/net/mod.rs", documentation = { kind = "markdown", value = "Networking primitives for TCP/UDP communication.\n\nThis module provides networking functionality for the Transmission Control and User\nDatagram Protocols, as well as types for IP and socket addresses.\n\n# Organization\n\n* [`TcpListener`] and [`TcpStream`] provide functionality for communication over TCP\n* [`UdpSocket`] provides functionality for communication over UDP\n* [`IpAddr`] represents IP addresses of either IPv4 or IPv6; [`Ipv4Addr`] and\n [`Ipv6Addr`] are respectively IPv4 and IPv6 addresses\n* [`SocketAddr`] represents socket addresses of either IPv4 or IPv6; [`SocketAddrV4`]\n and [`SocketAddrV6`] are respectively IPv4 and IPv6 socket addresses\n* [`ToSocketAddrs`] is a trait that used for generic address resolution when interacting\n with networking objects like [`TcpListener`], [`TcpStream`] or [`UdpSocket`]\n* Other types are return or parameter types for various methods in this module" }, insertText = "net", insertTextFormat = 2, kind = 9, label = "net" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/num.rs", documentation = { kind = "markdown", value = "Additional functionality for numerics.\n\nThis module provides some extra types that are useful when doing numerical\nwork. See the individual documentation for each piece for more information." }, insertText = "num", insertTextFormat = 2, kind = 9, label = "num" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/mod.rs", documentation = { kind = "markdown", value = "Overloadable operators.\n\nImplementing these traits allows you to overload certain operators.\n\nSome of these traits are imported by the prelude, so they are available in\nevery Rust program. Only operators backed by traits can be overloaded. For\nexample, the addition operator (`+`) can be overloaded through the [`Add`]\ntrait, but since the assignment operator (`=`) has no backing trait, there\nis no way of overloading its semantics. Additionally, this module does not\nprovide any mechanism to create new operators. If traitless overloading or\ncustom operators are required, you should look toward macros or compiler\nplugins to extend Rust's syntax.\n\nImplementations of operator traits should be unsurprising in their\nrespective contexts, keeping in mind their usual meanings and\n[operator precedence]. For example, when implementing [`Mul`], the operation\nshould have some resemblance to multiplication (and share expected\nproperties like associativity).\n\nNote that the `&&` and `||` operators short-circuit, i.e., they only\nevaluate their second operand if it contributes to the result. Since this\nbehavior is not enforceable by traits, `&&` and `||` are not supported as\noverloadable operators.\n\nMany of the operators take their operands by value. In non-generic\ncontexts involving built-in types, this is usually not a problem.\nHowever, using these operators in generic code, requires some\nattention if values have to be reused as opposed to letting the operators\nconsume them. One option is to occasionally use [`clone`].\nAnother option is to rely on the types involved providing additional\noperator implementations for references. For example, for a user-defined\ntype `T` which is supposed to support addition, it is probably a good\nidea to have both `T` and `&T` implement the traits [`Add<T>`][`Add`] and\n[`Add<&T>`][`Add`] so that generic code can be written without unnecessary\ncloning.\n\n# Examples\n\nThis example creates a `Point` struct that implements [`Add`] and [`Sub`],\nand then demonstrates adding and subtracting two `Point`s.\n\n```rust\nuse std::ops::{Add, Sub};\n\n#[derive(Debug, Copy, Clone, PartialEq)]\nstruct Point {\n x: i32,\n y: i32,\n}\n\nimpl Add for Point {\n type Output = Self;\n\n fn add(self, other: Self) -> Self {\n Self {x: self.x + other.x, y: self.y + other.y}\n }\n}\n\nimpl Sub for Point {\n type Output = Self;\n\n fn sub(self, other: Self) -> Self {\n Self {x: self.x - other.x, y: self.y - other.y}\n }\n}\n\nassert_eq!(Point {x: 3, y: 3}, Point {x: 1, y: 0} + Point {x: 2, y: 3});\nassert_eq!(Point {x: -1, y: -3}, Point {x: 1, y: 0} - Point {x: 2, y: 3});\n```\n\nSee the documentation for each trait for an example implementation.\n\nThe [`Fn`], [`FnMut`], and [`FnOnce`] traits are implemented by types that can be\ninvoked like functions. Note that [`Fn`] takes `&self`, [`FnMut`] takes `&mut\nself` and [`FnOnce`] takes `self`. These correspond to the three kinds of\nmethods that can be invoked on an instance: call-by-reference,\ncall-by-mutable-reference, and call-by-value. The most common use of these\ntraits is to act as bounds to higher-level functions that take functions or\nclosures as arguments.\n\nTaking a [`Fn`] as a parameter:\n\n```rust\nfn call_with_one<F>(func: F) -> usize\n where F: Fn(usize) -> usize\n{\n func(1)\n}\n\nlet double = |x| x * 2;\nassert_eq!(call_with_one(double), 2);\n```\n\nTaking a [`FnMut`] as a parameter:\n\n```rust\nfn do_twice<F>(mut func: F)\n where F: FnMut()\n{\n func();\n func();\n}\n\nlet mut x: usize = 1;\n{\n let add_two_to_x = || x += 2;\n do_twice(add_two_to_x);\n}\n\nassert_eq!(x, 5);\n```\n\nTaking a [`FnOnce`] as a parameter:\n\n```rust\nfn consume_with_relish<F>(func: F)\n where F: FnOnce() -> String\n{\n // `func` consumes its captured variables, so it cannot be run more\n // than once\n println!(\"Consumed: {}\", func());\n\n println!(\"Delicious!\");\n\n // Attempting to invoke `func()` again will throw a `use of moved\n // value` error for `func`\n}\n\nlet x = String::from(\"x\");\nlet consume_and_return_x = move || x;\nconsume_with_relish(consume_and_return_x);\n\n// `consume_and_return_x` can no longer be invoked at this point\n```\n\n[`clone`]: Clone::clone\n[operator precedence]: ../../reference/expressions.html#expression-precedence" }, insertText = "ops", insertTextFormat = 2, kind = 9, label = "ops" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", documentation = { kind = "markdown", value = "Optional values.\n\nType [`Option`] represents an optional value: every [`Option`]\nis either [`Some`] and contains a value, or [`None`], and\ndoes not. [`Option`] types are very common in Rust code, as\nthey have a number of uses:\n\n* Initial values\n* Return values for functions that are not defined\n over their entire input range (partial functions)\n* Return value for otherwise reporting simple errors, where [`None`] is\n returned on error\n* Optional struct fields\n* Struct fields that can be loaned or \"taken\"\n* Optional function arguments\n* Nullable pointers\n* Swapping things out of difficult situations\n\n[`Option`]s are commonly paired with pattern matching to query the presence\nof a value and take action, always accounting for the [`None`] case.\n\n```rust\nfn divide(numerator: f64, denominator: f64) -> Option<f64> {\n if denominator == 0.0 {\n None\n } else {\n Some(numerator / denominator)\n }\n}\n\n// The return value of the function is an option\nlet result = divide(2.0, 3.0);\n\n// Pattern match to retrieve the value\nmatch result {\n // The division was valid\n Some(x) => println!(\"Result: {}\", x),\n // The division was invalid\n None => println!(\"Cannot divide by 0\"),\n}\n```\n\n# Options and pointers (\"nullable\" pointers)\n\nRust's pointer types must always point to a valid location; there are\nno \"null\" references. Instead, Rust has *optional* pointers, like\nthe optional owned box, [`Option`]`<`[`Box<T>`]`>`.\n\nThe following example uses [`Option`] to create an optional box of\n[`i32`]. Notice that in order to use the inner [`i32`] value first, the\n`check_optional` function needs to use pattern matching to\ndetermine whether the box has a value (i.e., it is [`Some(...)`][`Some`]) or\nnot ([`None`]).\n\n```rust\nlet optional = None;\ncheck_optional(optional);\n\nlet optional = Some(Box::new(9000));\ncheck_optional(optional);\n\nfn check_optional(optional: Option<Box<i32>>) {\n match optional {\n Some(p) => println!(\"has value {}\", p),\n None => println!(\"has no value\"),\n }\n}\n```\n\n# Representation\n\nRust guarantees to optimize the following types `T` such that\n[`Option<T>`] has the same size as `T`:\n\n* [`Box<U>`]\n* `&U`\n* `&mut U`\n* `fn`, `extern \"C\" fn`\n* [`num::NonZero*`]\n* [`ptr::NonNull<U>`]\n* `#[repr(transparent)]` struct around one of the types in this list.\n\nIt is further guaranteed that, for the cases above, one can\n[`mem::transmute`] from all valid values of `T` to `Option<T>` and\nfrom `Some::<T>(_)` to `T` (but transmuting `None::<T>` to `T`\nis undefined behaviour).\n\n# Examples\n\nBasic pattern matching on [`Option`]:\n\n```rust\nlet msg = Some(\"howdy\");\n\n// Take a reference to the contained string\nif let Some(m) = &msg {\n println!(\"{}\", *m);\n}\n\n// Remove the contained string, destroying the Option\nlet unwrapped_msg = msg.unwrap_or(\"default message\");\n```\n\nInitialize a result to [`None`] before a loop:\n\n```rust\nenum Kingdom { Plant(u32, &'static str), Animal(u32, &'static str) }\n\n// A list of data to search through.\nlet all_the_big_things = [\n Kingdom::Plant(250, \"redwood\"),\n Kingdom::Plant(230, \"noble fir\"),\n Kingdom::Plant(229, \"sugar pine\"),\n Kingdom::Animal(25, \"blue whale\"),\n Kingdom::Animal(19, \"fin whale\"),\n Kingdom::Animal(15, \"north pacific right whale\"),\n];\n\n// We're going to search for the name of the biggest animal,\n// but to start with we've just got `None`.\nlet mut name_of_biggest_animal = None;\nlet mut size_of_biggest_animal = 0;\nfor big_thing in &all_the_big_things {\n match *big_thing {\n Kingdom::Animal(size, name) if size > size_of_biggest_animal => {\n // Now we've found the name of some big animal\n size_of_biggest_animal = size;\n name_of_biggest_animal = Some(name);\n }\n Kingdom::Animal(..) | Kingdom::Plant(..) => ()\n }\n}\n\nmatch name_of_biggest_animal {\n Some(name) => println!(\"the biggest animal is {}\", name),\n None => println!(\"there are no animals :(\"),\n}\n```\n\n[`Box<T>`]: ../../std/boxed/struct.Box.html\n[`Box<U>`]: ../../std/boxed/struct.Box.html\n[`num::NonZero*`]: crate::num\n[`ptr::NonNull<U>`]: crate::ptr::NonNull" }, insertText = "option", insertTextFormat = 2, kind = 9, label = "option" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs", documentation = { kind = "markdown", value = "OS-specific functionality." }, insertText = "os", insertTextFormat = 2, kind = 9, label = "os" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs", documentation = { kind = "markdown", value = "Panic support in the standard library." }, insertText = "panic", insertTextFormat = 2, kind = 9, label = "panic" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", documentation = { kind = "markdown", value = "Cross-platform path manipulation.\n\nThis module provides two types, [`PathBuf`] and [`Path`] (akin to [`String`]\nand [`str`]), for working with paths abstractly. These types are thin wrappers\naround [`OsString`] and [`OsStr`] respectively, meaning that they work directly\non strings according to the local platform's path syntax.\n\nPaths can be parsed into [`Component`]s by iterating over the structure\nreturned by the [`components`] method on [`Path`]. [`Component`]s roughly\ncorrespond to the substrings between path separators (`/` or `\\`). You can\nreconstruct an equivalent path from components with the [`push`] method on\n[`PathBuf`]; note that the paths may differ syntactically by the\nnormalization described in the documentation for the [`components`] method.\n\n## Simple usage\n\nPath manipulation includes both parsing components from slices and building\nnew owned paths.\n\nTo parse a path, you can create a [`Path`] slice from a [`str`]\nslice and start asking questions:\n\n```rust\nuse std::path::Path;\nuse std::ffi::OsStr;\n\nlet path = Path::new(\"/tmp/foo/bar.txt\");\n\nlet parent = path.parent();\nassert_eq!(parent, Some(Path::new(\"/tmp/foo\")));\n\nlet file_stem = path.file_stem();\nassert_eq!(file_stem, Some(OsStr::new(\"bar\")));\n\nlet extension = path.extension();\nassert_eq!(extension, Some(OsStr::new(\"txt\")));\n```\n\nTo build or modify paths, use [`PathBuf`]:\n\n```rust\nuse std::path::PathBuf;\n\n// This way works...\nlet mut path = PathBuf::from(\"c:\\\\\");\n\npath.push(\"windows\");\npath.push(\"system32\");\n\npath.set_extension(\"dll\");\n\n// ... but push is best used if you don't know everything up\n// front. If you do, this way is better:\nlet path: PathBuf = [\"c:\\\\\", \"windows\", \"system32.dll\"].iter().collect();\n```\n\n[`components`]: Path::components\n[`push`]: PathBuf::push" }, insertText = "path", insertTextFormat = 2, kind = 9, label = "path" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/pin.rs", documentation = { kind = "markdown", value = "Types that pin data to its location in memory.\n\nIt is sometimes useful to have objects that are guaranteed not to move,\nin the sense that their placement in memory does not change, and can thus be relied upon.\nA prime example of such a scenario would be building self-referential structs,\nas moving an object with pointers to itself will invalidate them, which could cause undefined\nbehavior.\n\nAt a high level, a [`Pin<P>`] ensures that the pointee of any pointer type\n`P` has a stable location in memory, meaning it cannot be moved elsewhere\nand its memory cannot be deallocated until it gets dropped. We say that the\npointee is \"pinned\". Things get more subtle when discussing types that\ncombine pinned with non-pinned data; [see below](#projections-and-structural-pinning)\nfor more details.\n\nBy default, all types in Rust are movable. Rust allows passing all types by-value,\nand common smart-pointer types such as [`Box<T>`] and `&mut T` allow replacing and\nmoving the values they contain: you can move out of a [`Box<T>`], or you can use [`mem::swap`].\n[`Pin<P>`] wraps a pointer type `P`, so [`Pin`]`<`[`Box`]`<T>>` functions much like a regular\n[`Box<T>`]: when a [`Pin`]`<`[`Box`]`<T>>` gets dropped, so do its contents, and the memory gets\ndeallocated. Similarly, [`Pin`]`<&mut T>` is a lot like `&mut T`. However, [`Pin<P>`] does\nnot let clients actually obtain a [`Box<T>`] or `&mut T` to pinned data, which implies that you\ncannot use operations such as [`mem::swap`]:\n\n```rust\nuse std::pin::Pin;\nfn swap_pins<T>(x: Pin<&mut T>, y: Pin<&mut T>) {\n // `mem::swap` needs `&mut T`, but we cannot get it.\n // We are stuck, we cannot swap the contents of these references.\n // We could use `Pin::get_unchecked_mut`, but that is unsafe for a reason:\n // we are not allowed to use it for moving things out of the `Pin`.\n}\n```\n\nIt is worth reiterating that [`Pin<P>`] does *not* change the fact that a Rust compiler\nconsiders all types movable. [`mem::swap`] remains callable for any `T`. Instead, [`Pin<P>`]\nprevents certain *values* (pointed to by pointers wrapped in [`Pin<P>`]) from being\nmoved by making it impossible to call methods that require `&mut T` on them\n(like [`mem::swap`]).\n\n[`Pin<P>`] can be used to wrap any pointer type `P`, and as such it interacts with\n[`Deref`] and [`DerefMut`]. A [`Pin<P>`] where `P: Deref` should be considered\nas a \"`P`-style pointer\" to a pinned `P::Target` -- so, a [`Pin`]`<`[`Box`]`<T>>` is\nan owned pointer to a pinned `T`, and a [`Pin`]`<`[`Rc`]`<T>>` is a reference-counted\npointer to a pinned `T`.\nFor correctness, [`Pin<P>`] relies on the implementations of [`Deref`] and\n[`DerefMut`] not to move out of their `self` parameter, and only ever to\nreturn a pointer to pinned data when they are called on a pinned pointer.\n\n# `Unpin`\n\nMany types are always freely movable, even when pinned, because they do not\nrely on having a stable address. This includes all the basic types (like\n[`bool`], [`i32`], and references) as well as types consisting solely of these\ntypes. Types that do not care about pinning implement the [`Unpin`]\nauto-trait, which cancels the effect of [`Pin<P>`]. For `T: Unpin`,\n[`Pin`]`<`[`Box`]`<T>>` and [`Box<T>`] function identically, as do [`Pin`]`<&mut T>` and\n`&mut T`.\n\nNote that pinning and [`Unpin`] only affect the pointed-to type `P::Target`, not the pointer\ntype `P` itself that got wrapped in [`Pin<P>`]. For example, whether or not [`Box<T>`] is\n[`Unpin`] has no effect on the behavior of [`Pin`]`<`[`Box`]`<T>>` (here, `T` is the\npointed-to type).\n\n# Example: self-referential struct\n\nBefore we go into more details to explain the guarantees and choices\nassociated with `Pin<T>`, we discuss some examples for how it might be used.\nFeel free to [skip to where the theoretical discussion continues](#drop-guarantee).\n\n```rust\nuse std::pin::Pin;\nuse std::marker::PhantomPinned;\nuse std::ptr::NonNull;\n\n// This is a self-referential struct because the slice field points to the data field.\n// We cannot inform the compiler about that with a normal reference,\n// as this pattern cannot be described with the usual borrowing rules.\n// Instead we use a raw pointer, though one which is known not to be null,\n// as we know it's pointing at the string.\nstruct Unmovable {\n data: String,\n slice: NonNull<String>,\n _pin: PhantomPinned,\n}\n\nimpl Unmovable {\n // To ensure the data doesn't move when the function returns,\n // we place it in the heap where it will stay for the lifetime of the object,\n // and the only way to access it would be through a pointer to it.\n fn new(data: String) -> Pin<Box<Self>> {\n let res = Unmovable {\n data,\n // we only create the pointer once the data is in place\n // otherwise it will have already moved before we even started\n slice: NonNull::dangling(),\n _pin: PhantomPinned,\n };\n let mut boxed = Box::pin(res);\n\n let slice = NonNull::from(&boxed.data);\n // we know this is safe because modifying a field doesn't move the whole struct\n unsafe {\n let mut_ref: Pin<&mut Self> = Pin::as_mut(&mut boxed);\n Pin::get_unchecked_mut(mut_ref).slice = slice;\n }\n boxed\n }\n}\n\nlet unmoved = Unmovable::new(\"hello\".to_string());\n// The pointer should point to the correct location,\n// so long as the struct hasn't moved.\n// Meanwhile, we are free to move the pointer around.\nlet mut still_unmoved = unmoved;\nassert_eq!(still_unmoved.slice, NonNull::from(&still_unmoved.data));\n\n// Since our type doesn't implement Unpin, this will fail to compile:\n// let mut new_unmoved = Unmovable::new(\"world\".to_string());\n// std::mem::swap(&mut *still_unmoved, &mut *new_unmoved);\n```\n\n# Example: intrusive doubly-linked list\n\nIn an intrusive doubly-linked list, the collection does not actually allocate\nthe memory for the elements itself. Allocation is controlled by the clients,\nand elements can live on a stack frame that lives shorter than the collection does.\n\nTo make this work, every element has pointers to its predecessor and successor in\nthe list. Elements can only be added when they are pinned, because moving the elements\naround would invalidate the pointers. Moreover, the [`Drop`] implementation of a linked\nlist element will patch the pointers of its predecessor and successor to remove itself\nfrom the list.\n\nCrucially, we have to be able to rely on [`drop`] being called. If an element\ncould be deallocated or otherwise invalidated without calling [`drop`], the pointers into it\nfrom its neighboring elements would become invalid, which would break the data structure.\n\nTherefore, pinning also comes with a [`drop`]-related guarantee.\n\n# `Drop` guarantee\n\nThe purpose of pinning is to be able to rely on the placement of some data in memory.\nTo make this work, not just moving the data is restricted; deallocating, repurposing, or\notherwise invalidating the memory used to store the data is restricted, too.\nConcretely, for pinned data you have to maintain the invariant\nthat *its memory will not get invalidated or repurposed from the moment it gets pinned until\nwhen [`drop`] is called*. Only once [`drop`] returns or panics, the memory may be reused.\n\nMemory can be \"invalidated\" by deallocation, but also by\nreplacing a [`Some(v)`] by [`None`], or calling [`Vec::set_len`] to \"kill\" some elements\noff of a vector. It can be repurposed by using [`ptr::write`] to overwrite it without\ncalling the destructor first. None of this is allowed for pinned data without calling [`drop`].\n\nThis is exactly the kind of guarantee that the intrusive linked list from the previous\nsection needs to function correctly.\n\nNotice that this guarantee does *not* mean that memory does not leak! It is still\ncompletely okay not ever to call [`drop`] on a pinned element (e.g., you can still\ncall [`mem::forget`] on a [`Pin`]`<`[`Box`]`<T>>`). In the example of the doubly-linked\nlist, that element would just stay in the list. However you may not free or reuse the storage\n*without calling [`drop`]*.\n\n# `Drop` implementation\n\nIf your type uses pinning (such as the two examples above), you have to be careful\nwhen implementing [`Drop`]. The [`drop`] function takes `&mut self`, but this\nis called *even if your type was previously pinned*! It is as if the\ncompiler automatically called [`Pin::get_unchecked_mut`].\n\nThis can never cause a problem in safe code because implementing a type that\nrelies on pinning requires unsafe code, but be aware that deciding to make\nuse of pinning in your type (for example by implementing some operation on\n[`Pin`]`<&Self>` or [`Pin`]`<&mut Self>`) has consequences for your [`Drop`]\nimplementation as well: if an element of your type could have been pinned,\nyou must treat [`Drop`] as implicitly taking [`Pin`]`<&mut Self>`.\n\nFor example, you could implement `Drop` as follows:\n\n```rust\nimpl Drop for Type {\n fn drop(&mut self) {\n // `new_unchecked` is okay because we know this value is never used\n // again after being dropped.\n inner_drop(unsafe { Pin::new_unchecked(self)});\n fn inner_drop(this: Pin<&mut Type>) {\n // Actual drop code goes here.\n }\n }\n}\n```\n\nThe function `inner_drop` has the type that [`drop`] *should* have, so this makes sure that\nyou do not accidentally use `self`/`this` in a way that is in conflict with pinning.\n\nMoreover, if your type is `#[repr(packed)]`, the compiler will automatically\nmove fields around to be able to drop them. It might even do\nthat for fields that happen to be sufficiently aligned. As a consequence, you cannot use\npinning with a `#[repr(packed)]` type.\n\n# Projections and Structural Pinning\n\nWhen working with pinned structs, the question arises how one can access the\nfields of that struct in a method that takes just [`Pin`]`<&mut Struct>`.\nThe usual approach is to write helper methods (so called *projections*)\nthat turn [`Pin`]`<&mut Struct>` into a reference to the field, but what\ntype should that reference have? Is it [`Pin`]`<&mut Field>` or `&mut Field`?\nThe same question arises with the fields of an `enum`, and also when considering\ncontainer/wrapper types such as [`Vec<T>`], [`Box<T>`], or [`RefCell<T>`].\n(This question applies to both mutable and shared references, we just\nuse the more common case of mutable references here for illustration.)\n\nIt turns out that it is actually up to the author of the data structure\nto decide whether the pinned projection for a particular field turns\n[`Pin`]`<&mut Struct>` into [`Pin`]`<&mut Field>` or `&mut Field`. There are some\nconstraints though, and the most important constraint is *consistency*:\nevery field can be *either* projected to a pinned reference, *or* have\npinning removed as part of the projection. If both are done for the same field,\nthat will likely be unsound!\n\nAs the author of a data structure you get to decide for each field whether pinning\n\"propagates\" to this field or not. Pinning that propagates is also called \"structural\",\nbecause it follows the structure of the type.\nIn the following subsections, we describe the considerations that have to be made\nfor either choice.\n\n## Pinning *is not* structural for `field`\n\nIt may seem counter-intuitive that the field of a pinned struct might not be pinned,\nbut that is actually the easiest choice: if a [`Pin`]`<&mut Field>` is never created,\nnothing can go wrong! So, if you decide that some field does not have structural pinning,\nall you have to ensure is that you never create a pinned reference to that field.\n\nFields without structural pinning may have a projection method that turns\n[`Pin`]`<&mut Struct>` into `&mut Field`:\n\n```rust\nimpl Struct {\n fn pin_get_field(self: Pin<&mut Self>) -> &mut Field {\n // This is okay because `field` is never considered pinned.\n unsafe { &mut self.get_unchecked_mut().field }\n }\n}\n```\n\nYou may also `impl Unpin for Struct` *even if* the type of `field`\nis not [`Unpin`]. What that type thinks about pinning is not relevant\nwhen no [`Pin`]`<&mut Field>` is ever created.\n\n## Pinning *is* structural for `field`\n\nThe other option is to decide that pinning is \"structural\" for `field`,\nmeaning that if the struct is pinned then so is the field.\n\nThis allows writing a projection that creates a [`Pin`]`<&mut Field>`, thus\nwitnessing that the field is pinned:\n\n```rust\nimpl Struct {\n fn pin_get_field(self: Pin<&mut Self>) -> Pin<&mut Field> {\n // This is okay because `field` is pinned when `self` is.\n unsafe { self.map_unchecked_mut(|s| &mut s.field) }\n }\n}\n```\n\nHowever, structural pinning comes with a few extra requirements:\n\n1. The struct must only be [`Unpin`] if all the structural fields are\n [`Unpin`]. This is the default, but [`Unpin`] is a safe trait, so as the author of\n the struct it is your responsibility *not* to add something like\n `impl<T> Unpin for Struct<T>`. (Notice that adding a projection operation\n requires unsafe code, so the fact that [`Unpin`] is a safe trait does not break\n the principle that you only have to worry about any of this if you use `unsafe`.)\n2. The destructor of the struct must not move structural fields out of its argument. This\n is the exact point that was raised in the [previous section][drop-impl]: `drop` takes\n `&mut self`, but the struct (and hence its fields) might have been pinned before.\n You have to guarantee that you do not move a field inside your [`Drop`] implementation.\n In particular, as explained previously, this means that your struct must *not*\n be `#[repr(packed)]`.\n See that section for how to write [`drop`] in a way that the compiler can help you\n not accidentally break pinning.\n3. You must make sure that you uphold the [`Drop` guarantee][drop-guarantee]:\n once your struct is pinned, the memory that contains the\n content is not overwritten or deallocated without calling the content's destructors.\n This can be tricky, as witnessed by [`VecDeque<T>`]: the destructor of [`VecDeque<T>`]\n can fail to call [`drop`] on all elements if one of the destructors panics. This violates\n the [`Drop`] guarantee, because it can lead to elements being deallocated without\n their destructor being called. ([`VecDeque<T>`] has no pinning projections, so this\n does not cause unsoundness.)\n4. You must not offer any other operations that could lead to data being moved out of\n the structural fields when your type is pinned. For example, if the struct contains an\n [`Option<T>`] and there is a `take`-like operation with type\n `fn(Pin<&mut Struct<T>>) -> Option<T>`,\n that operation can be used to move a `T` out of a pinned `Struct<T>` -- which means\n pinning cannot be structural for the field holding this data.\n\n For a more complex example of moving data out of a pinned type, imagine if [`RefCell<T>`]\n had a method `fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>`.\n Then we could do the following:\n```rust\n fn exploit_ref_cell<T>(rc: Pin<&mut RefCell<T>>) {\n { let p = rc.as_mut().get_pin_mut(); } // Here we get pinned access to the `T`.\n let rc_shr: &RefCell<T> = rc.into_ref().get_ref();\n let b = rc_shr.borrow_mut();\n let content = &mut *b; // And here we have `&mut T` to the same data.\n }\n ```\n This is catastrophic, it means we can first pin the content of the [`RefCell<T>`]\n (using `RefCell::get_pin_mut`) and then move that content using the mutable\n reference we got later.\n\n## Examples\n\nFor a type like [`Vec<T>`], both possibilities (structural pinning or not) make sense.\nA [`Vec<T>`] with structural pinning could have `get_pin`/`get_pin_mut` methods to get\npinned references to elements. However, it could *not* allow calling\n[`pop`][Vec::pop] on a pinned [`Vec<T>`] because that would move the (structurally pinned)\ncontents! Nor could it allow [`push`][Vec::push], which might reallocate and thus also move the\ncontents.\n\nA [`Vec<T>`] without structural pinning could `impl<T> Unpin for Vec<T>`, because the contents\nare never pinned and the [`Vec<T>`] itself is fine with being moved as well.\nAt that point pinning just has no effect on the vector at all.\n\nIn the standard library, pointer types generally do not have structural pinning,\nand thus they do not offer pinning projections. This is why `Box<T>: Unpin` holds for all `T`.\nIt makes sense to do this for pointer types, because moving the `Box<T>`\ndoes not actually move the `T`: the [`Box<T>`] can be freely movable (aka `Unpin`) even if\nthe `T` is not. In fact, even [`Pin`]`<`[`Box`]`<T>>` and [`Pin`]`<&mut T>` are always\n[`Unpin`] themselves, for the same reason: their contents (the `T`) are pinned, but the\npointers themselves can be moved without moving the pinned data. For both [`Box<T>`] and\n[`Pin`]`<`[`Box`]`<T>>`, whether the content is pinned is entirely independent of whether the\npointer is pinned, meaning pinning is *not* structural.\n\nWhen implementing a [`Future`] combinator, you will usually need structural pinning\nfor the nested futures, as you need to get pinned references to them to call [`poll`].\nBut if your combinator contains any other data that does not need to be pinned,\nyou can make those fields not structural and hence freely access them with a\nmutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own\n[`poll`] implementation).\n\n[`Deref`]: crate::ops::Deref\n[`DerefMut`]: crate::ops::DerefMut\n[`mem::swap`]: crate::mem::swap\n[`mem::forget`]: crate::mem::forget\n[`Box<T>`]: ../../std/boxed/struct.Box.html\n[`Vec<T>`]: ../../std/vec/struct.Vec.html\n[`Vec::set_len`]: ../../std/vec/struct.Vec.html#method.set_len\n[`Box`]: ../../std/boxed/struct.Box.html\n[Vec::pop]: ../../std/vec/struct.Vec.html#method.pop\n[Vec::push]: ../../std/vec/struct.Vec.html#method.push\n[`Rc`]: ../../std/rc/struct.Rc.html\n[`RefCell<T>`]: crate::cell::RefCell\n[`drop`]: Drop::drop\n[`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html\n[`Some(v)`]: Some\n[`ptr::write`]: crate::ptr::write\n[`Future`]: crate::future::Future\n[drop-impl]: #drop-implementation\n[drop-guarantee]: #drop-guarantee\n[`poll`]: crate::future::Future::poll" }, insertText = "pin", insertTextFormat = 2, kind = 9, label = "pin" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs", documentation = { kind = "markdown", value = "# The Rust Prelude\n\nRust comes with a variety of things in its standard library. However, if\nyou had to manually import every single thing that you used, it would be\nvery verbose. But importing a lot of things that a program never uses isn't\ngood either. A balance needs to be struck.\n\nThe *prelude* is the list of things that Rust automatically imports into\nevery Rust program. It's kept as small as possible, and is focused on\nthings, particularly traits, which are used in almost every single Rust\nprogram.\n\n# Other preludes\n\nPreludes can be seen as a pattern to make using multiple types more\nconvenient. As such, you'll find other preludes in the standard library,\nsuch as [`std::io::prelude`]. Various libraries in the Rust ecosystem may\nalso define their own preludes.\n\n[`std::io::prelude`]: crate::io::prelude\n\nThe difference between 'the prelude' and these other preludes is that they\nare not automatically `use`'d, and must be imported manually. This is still\neasier than importing all of their constituent components.\n\n# Prelude contents\n\nThe current version of the prelude (version 1) lives in\n[`std::prelude::v1`], and re-exports the following:\n\n* [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`], [`Unpin`]}:\n marker traits that indicate fundamental properties of types.\n* [`std::ops`]::{[`Drop`], [`Fn`], [`FnMut`], [`FnOnce`]}: various\n operations for both destructors and overloading `()`.\n* [`std::mem`]::[`drop`][`mem::drop`]: a convenience function for explicitly\n dropping a value.\n* [`std::boxed`]::[`Box`]: a way to allocate values on the heap.\n* [`std::borrow`]::[`ToOwned`]: the conversion trait that defines\n [`to_owned`], the generic method for creating an owned type from a\n borrowed type.\n* [`std::clone`]::[`Clone`]: the ubiquitous trait that defines\n [`clone`][`Clone::clone`], the method for producing a copy of a value.\n* [`std::cmp`]::{[`PartialEq`], [`PartialOrd`], [`Eq`], [`Ord`]}: the\n comparison traits, which implement the comparison operators and are often\n seen in trait bounds.\n* [`std::convert`]::{[`AsRef`], [`AsMut`], [`Into`], [`From`]}: generic\n conversions, used by savvy API authors to create overloaded methods.\n* [`std::default`]::[`Default`], types that have default values.\n* [`std::iter`]::{[`Iterator`], [`Extend`], [`IntoIterator`],\n [`DoubleEndedIterator`], [`ExactSizeIterator`]}: iterators of various\n kinds.\n* [`std::option`]::[`Option`]::{[`self`][`Option`], [`Some`], [`None`]}, a\n type which expresses the presence or absence of a value. This type is so\n commonly used, its variants are also exported.\n* [`std::result`]::[`Result`]::{[`self`][`Result`], [`Ok`], [`Err`]}: a type\n for functions that may succeed or fail. Like [`Option`], its variants are\n exported as well.\n* [`std::string`]::{[`String`], [`ToString`]}: heap-allocated strings.\n* [`std::vec`]::[`Vec`]: a growable, heap-allocated vector.\n\n[`mem::drop`]: crate::mem::drop\n[`std::borrow`]: crate::borrow\n[`std::boxed`]: crate::boxed\n[`std::clone`]: crate::clone\n[`std::cmp`]: crate::cmp\n[`std::convert`]: crate::convert\n[`std::default`]: crate::default\n[`std::iter`]: crate::iter\n[`std::marker`]: crate::marker\n[`std::mem`]: crate::mem\n[`std::ops`]: crate::ops\n[`std::option`]: crate::option\n[`std::prelude::v1`]: v1\n[`std::result`]: crate::result\n[`std::slice`]: crate::slice\n[`std::string`]: crate::string\n[`std::vec`]: mod@crate::vec\n[`to_owned`]: crate::borrow::ToOwned::to_owned\n[book-closures]: ../../book/ch13-01-closures.html\n[book-dtor]: ../../book/ch15-03-drop.html\n[book-enums]: ../../book/ch06-01-defining-an-enum.html\n[book-iter]: ../../book/ch13-02-iterators.html" }, insertText = "prelude", insertTextFormat = 2, kind = 9, label = "prelude" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/primitive.rs", documentation = { kind = "markdown", value = "This module reexports the primitive types to allow usage that is not\npossibly shadowed by other declared types.\n\nThis is normally only useful in macro generated code.\n\nAn example of this is when generating a new struct and an impl for it:\n\n```rust\npub struct bool;\n\nimpl QueryId for bool {\n const SOME_PROPERTY: bool = true;\n}\n\n```\n\nNote that the `SOME_PROPERTY` associated constant would not compile, as its\ntype `bool` refers to the struct, rather than to the primitive bool type.\n\nA correct implementation could look like:\n\n```rust\npub struct bool;\n\nimpl QueryId for bool {\n const SOME_PROPERTY: core::primitive::bool = true;\n}\n\n```" }, insertText = "primitive", insertTextFormat = 2, kind = 9, label = "primitive" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs", documentation = { kind = "markdown", value = "A module for working with processes.\n\nThis module is mostly concerned with spawning and interacting with child\nprocesses, but it also provides [`abort`] and [`exit`] for terminating the\ncurrent process.\n\n# Spawning a process\n\nThe [`Command`] struct is used to configure and spawn processes:\n\n```rust\nuse std::process::Command;\n\nlet output = Command::new(\"echo\")\n .arg(\"Hello world\")\n .output()\n .expect(\"Failed to execute command\");\n\nassert_eq!(b\"Hello world\\n\", output.stdout.as_slice());\n```\n\nSeveral methods on [`Command`], such as [`spawn`] or [`output`], can be used\nto spawn a process. In particular, [`output`] spawns the child process and\nwaits until the process terminates, while [`spawn`] will return a [`Child`]\nthat represents the spawned child process.\n\n# Handling I/O\n\nThe [`stdout`], [`stdin`], and [`stderr`] of a child process can be\nconfigured by passing an [`Stdio`] to the corresponding method on\n[`Command`]. Once spawned, they can be accessed from the [`Child`]. For\nexample, piping output from one command into another command can be done\nlike so:\n\n```rust\nuse std::process::{Command, Stdio};\n\n// stdout must be configured with `Stdio::piped` in order to use\n// `echo_child.stdout`\nlet echo_child = Command::new(\"echo\")\n .arg(\"Oh no, a tpyo!\")\n .stdout(Stdio::piped())\n .spawn()\n .expect(\"Failed to start echo process\");\n\n// Note that `echo_child` is moved here, but we won't be needing\n// `echo_child` anymore\nlet echo_out = echo_child.stdout.expect(\"Failed to open echo stdout\");\n\nlet mut sed_child = Command::new(\"sed\")\n .arg(\"s/tpyo/typo/\")\n .stdin(Stdio::from(echo_out))\n .stdout(Stdio::piped())\n .spawn()\n .expect(\"Failed to start sed process\");\n\nlet output = sed_child.wait_with_output().expect(\"Failed to wait on sed\");\nassert_eq!(b\"Oh no, a typo!\\n\", output.stdout.as_slice());\n```\n\nNote that [`ChildStderr`] and [`ChildStdout`] implement [`Read`] and\n[`ChildStdin`] implements [`Write`]:\n\n```rust\nuse std::process::{Command, Stdio};\nuse std::io::Write;\n\nlet mut child = Command::new(\"/bin/cat\")\n .stdin(Stdio::piped())\n .stdout(Stdio::piped())\n .spawn()\n .expect(\"failed to execute child\");\n\n// If the child process fills its stdout buffer, it may end up\n// waiting until the parent reads the stdout, and not be able to\n// read stdin in the meantime, causing a deadlock.\n// Writing from another thread ensures that stdout is being read\n// at the same time, avoiding the problem.\nlet mut stdin = child.stdin.take().expect(\"failed to get stdin\");\nstd::thread::spawn(move || {\n stdin.write_all(b\"test\").expect(\"failed to write to stdin\");\n});\n\nlet output = child\n .wait_with_output()\n .expect(\"failed to wait on child\");\n\nassert_eq!(b\"test\", output.stdout.as_slice());\n```\n\n[`spawn`]: Command::spawn\n[`output`]: Command::output\n\n[`stdout`]: Command::stdout\n[`stdin`]: Command::stdin\n[`stderr`]: Command::stderr\n\n[`Write`]: io::Write\n[`Read`]: io::Read" }, insertText = "process", insertTextFormat = 2, kind = 9, label = "process" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs", documentation = { kind = "markdown", value = 'Manually manage memory through raw pointers.\n\n*[See also the pointer primitive types](pointer).*\n\n# Safety\n\nMany functions in this module take raw pointers as arguments and read from\nor write to them. For this to be safe, these pointers must be *valid*.\nWhether a pointer is valid depends on the operation it is used for\n(read or write), and the extent of the memory that is accessed (i.e.,\nhow many bytes are read/written). Most functions use `*mut T` and `*const T`\nto access only a single value, in which case the documentation omits the size\nand implicitly assumes it to be `size_of::<T>()` bytes.\n\nThe precise rules for validity are not determined yet. The guarantees that are\nprovided at this point are very minimal:\n\n* A [null] pointer is *never* valid, not even for accesses of [size zero][zst].\n* For a pointer to be valid, it is necessary, but not always sufficient, that the pointer\n be *dereferenceable*: the memory range of the given size starting at the pointer must all be\n within the bounds of a single allocated object. Note that in Rust,\n every (stack-allocated) variable is considered a separate allocated object.\n* Even for operations of [size zero][zst], the pointer must not be pointing to deallocated\n memory, i.e., deallocation makes pointers invalid even for zero-sized operations. However,\n casting any non-zero integer *literal* to a pointer is valid for zero-sized accesses, even if\n some memory happens to exist at that address and gets deallocated. This corresponds to writing\n your own allocator: allocating zero-sized objects is not very hard. The canonical way to\n obtain a pointer that is valid for zero-sized accesses is [`NonNull::dangling`].\n* All accesses performed by functions in this module are *non-atomic* in the sense\n of [atomic operations] used to synchronize between threads. This means it is\n undefined behavior to perform two concurrent accesses to the same location from different\n threads unless both accesses only read from memory. Notice that this explicitly\n includes [`read_volatile`] and [`write_volatile`]: Volatile accesses cannot\n be used for inter-thread synchronization.\n* The result of casting a reference to a pointer is valid for as long as the\n underlying object is live and no reference (just raw pointers) is used to\n access the same memory.\n\nThese axioms, along with careful use of [`offset`] for pointer arithmetic,\nare enough to correctly implement many useful things in unsafe code. Stronger guarantees\nwill be provided eventually, as the [aliasing] rules are being determined. For more\ninformation, see the [book] as well as the section in the reference devoted\nto [undefined behavior][ub].\n\n## Alignment\n\nValid raw pointers as defined above are not necessarily properly aligned (where\n"proper" alignment is defined by the pointee type, i.e., `*const T` must be\naligned to `mem::align_of::<T>()`). However, most functions require their\narguments to be properly aligned, and will explicitly state\nthis requirement in their documentation. Notable exceptions to this are\n[`read_unaligned`] and [`write_unaligned`].\n\nWhen a function requires proper alignment, it does so even if the access\nhas size 0, i.e., even if memory is not actually touched. Consider using\n[`NonNull::dangling`] in such cases.\n\n[aliasing]: ../../nomicon/aliasing.html\n[book]: ../../book/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer\n[ub]: ../../reference/behavior-considered-undefined.html\n[zst]: ../../nomicon/exotic-sizes.html#zero-sized-types-zsts\n[atomic operations]: crate::sync::atomic\n[`offset`]: pointer::offset' }, insertText = "ptr", insertTextFormat = 2, kind = 9, label = "ptr" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/raw.rs", insertText = "raw", insertTextFormat = 2, kind = 9, label = "raw" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/rc.rs", documentation = { kind = "markdown", value = "Single-threaded reference-counting pointers. 'Rc' stands for 'Reference\nCounted'.\n\nThe type [`Rc<T>`][`Rc`] provides shared ownership of a value of type `T`,\nallocated in the heap. Invoking [`clone`][clone] on [`Rc`] produces a new\npointer to the same allocation in the heap. When the last [`Rc`] pointer to a\ngiven allocation is destroyed, the value stored in that allocation (often\nreferred to as \"inner value\") is also dropped.\n\nShared references in Rust disallow mutation by default, and [`Rc`]\nis no exception: you cannot generally obtain a mutable reference to\nsomething inside an [`Rc`]. If you need mutability, put a [`Cell`]\nor [`RefCell`] inside the [`Rc`]; see [an example of mutability\ninside an `Rc`][mutability].\n\n[`Rc`] uses non-atomic reference counting. This means that overhead is very\nlow, but an [`Rc`] cannot be sent between threads, and consequently [`Rc`]\ndoes not implement [`Send`][send]. As a result, the Rust compiler\nwill check *at compile time* that you are not sending [`Rc`]s between\nthreads. If you need multi-threaded, atomic reference counting, use\n[`sync::Arc`][arc].\n\nThe [`downgrade`][downgrade] method can be used to create a non-owning\n[`Weak`] pointer. A [`Weak`] pointer can be [`upgrade`][upgrade]d\nto an [`Rc`], but this will return [`None`] if the value stored in the allocation has\nalready been dropped. In other words, `Weak` pointers do not keep the value\ninside the allocation alive; however, they *do* keep the allocation\n(the backing store for the inner value) alive.\n\nA cycle between [`Rc`] pointers will never be deallocated. For this reason,\n[`Weak`] is used to break cycles. For example, a tree could have strong\n[`Rc`] pointers from parent nodes to children, and [`Weak`] pointers from\nchildren back to their parents.\n\n`Rc<T>` automatically dereferences to `T` (via the [`Deref`] trait),\nso you can call `T`'s methods on a value of type [`Rc<T>`][`Rc`]. To avoid name\nclashes with `T`'s methods, the methods of [`Rc<T>`][`Rc`] itself are associated\nfunctions, called using [fully qualified syntax]:\n\n```rust\nuse std::rc::Rc;\n\nlet my_rc = Rc::new(());\nRc::downgrade(&my_rc);\n```\n\n`Rc<T>`'s implementations of traits like `Clone` may also be called using\nfully qualified syntax. Some people prefer to use fully qualified syntax,\nwhile others prefer using method-call syntax.\n\n```rust\nuse std::rc::Rc;\n\nlet rc = Rc::new(());\n// Method-call syntax\nlet rc2 = rc.clone();\n// Fully qualified syntax\nlet rc3 = Rc::clone(&rc);\n```\n\n[`Weak<T>`][`Weak`] does not auto-dereference to `T`, because the inner value may have\nalready been dropped.\n\n# Cloning references\n\nCreating a new reference to the same allocation as an existing reference counted pointer\nis done using the `Clone` trait implemented for [`Rc<T>`][`Rc`] and [`Weak<T>`][`Weak`].\n\n```rust\nuse std::rc::Rc;\n\nlet foo = Rc::new(vec![1.0, 2.0, 3.0]);\n// The two syntaxes below are equivalent.\nlet a = foo.clone();\nlet b = Rc::clone(&foo);\n// a and b both point to the same memory location as foo.\n```\n\nThe `Rc::clone(&from)` syntax is the most idiomatic because it conveys more explicitly\nthe meaning of the code. In the example above, this syntax makes it easier to see that\nthis code is creating a new reference rather than copying the whole content of foo.\n\n# Examples\n\nConsider a scenario where a set of `Gadget`s are owned by a given `Owner`.\nWe want to have our `Gadget`s point to their `Owner`. We can't do this with\nunique ownership, because more than one gadget may belong to the same\n`Owner`. [`Rc`] allows us to share an `Owner` between multiple `Gadget`s,\nand have the `Owner` remain allocated as long as any `Gadget` points at it.\n\n```rust\nuse std::rc::Rc;\n\nstruct Owner {\n name: String,\n // ...other fields\n}\n\nstruct Gadget {\n id: i32,\n owner: Rc<Owner>,\n // ...other fields\n}\n\nfn main() {\n // Create a reference-counted `Owner`.\n let gadget_owner: Rc<Owner> = Rc::new(\n Owner {\n name: \"Gadget Man\".to_string(),\n }\n );\n\n // Create `Gadget`s belonging to `gadget_owner`. Cloning the `Rc<Owner>`\n // gives us a new pointer to the same `Owner` allocation, incrementing\n // the reference count in the process.\n let gadget1 = Gadget {\n id: 1,\n owner: Rc::clone(&gadget_owner),\n };\n let gadget2 = Gadget {\n id: 2,\n owner: Rc::clone(&gadget_owner),\n };\n\n // Dispose of our local variable `gadget_owner`.\n drop(gadget_owner);\n\n // Despite dropping `gadget_owner`, we're still able to print out the name\n // of the `Owner` of the `Gadget`s. This is because we've only dropped a\n // single `Rc<Owner>`, not the `Owner` it points to. As long as there are\n // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain\n // live. The field projection `gadget1.owner.name` works because\n // `Rc<Owner>` automatically dereferences to `Owner`.\n println!(\"Gadget {} owned by {}\", gadget1.id, gadget1.owner.name);\n println!(\"Gadget {} owned by {}\", gadget2.id, gadget2.owner.name);\n\n // At the end of the function, `gadget1` and `gadget2` are destroyed, and\n // with them the last counted references to our `Owner`. Gadget Man now\n // gets destroyed as well.\n}\n```\n\nIf our requirements change, and we also need to be able to traverse from\n`Owner` to `Gadget`, we will run into problems. An [`Rc`] pointer from `Owner`\nto `Gadget` introduces a cycle. This means that their\nreference counts can never reach 0, and the allocation will never be destroyed:\na memory leak. In order to get around this, we can use [`Weak`]\npointers.\n\nRust actually makes it somewhat difficult to produce this loop in the first\nplace. In order to end up with two values that point at each other, one of\nthem needs to be mutable. This is difficult because [`Rc`] enforces\nmemory safety by only giving out shared references to the value it wraps,\nand these don't allow direct mutation. We need to wrap the part of the\nvalue we wish to mutate in a [`RefCell`], which provides *interior\nmutability*: a method to achieve mutability through a shared reference.\n[`RefCell`] enforces Rust's borrowing rules at runtime.\n\n```rust\nuse std::rc::Rc;\nuse std::rc::Weak;\nuse std::cell::RefCell;\n\nstruct Owner {\n name: String,\n gadgets: RefCell<Vec<Weak<Gadget>>>,\n // ...other fields\n}\n\nstruct Gadget {\n id: i32,\n owner: Rc<Owner>,\n // ...other fields\n}\n\nfn main() {\n // Create a reference-counted `Owner`. Note that we've put the `Owner`'s\n // vector of `Gadget`s inside a `RefCell` so that we can mutate it through\n // a shared reference.\n let gadget_owner: Rc<Owner> = Rc::new(\n Owner {\n name: \"Gadget Man\".to_string(),\n gadgets: RefCell::new(vec![]),\n }\n );\n\n // Create `Gadget`s belonging to `gadget_owner`, as before.\n let gadget1 = Rc::new(\n Gadget {\n id: 1,\n owner: Rc::clone(&gadget_owner),\n }\n );\n let gadget2 = Rc::new(\n Gadget {\n id: 2,\n owner: Rc::clone(&gadget_owner),\n }\n );\n\n // Add the `Gadget`s to their `Owner`.\n {\n let mut gadgets = gadget_owner.gadgets.borrow_mut();\n gadgets.push(Rc::downgrade(&gadget1));\n gadgets.push(Rc::downgrade(&gadget2));\n\n // `RefCell` dynamic borrow ends here.\n }\n\n // Iterate over our `Gadget`s, printing their details out.\n for gadget_weak in gadget_owner.gadgets.borrow().iter() {\n\n // `gadget_weak` is a `Weak<Gadget>`. Since `Weak` pointers can't\n // guarantee the allocation still exists, we need to call\n // `upgrade`, which returns an `Option<Rc<Gadget>>`.\n //\n // In this case we know the allocation still exists, so we simply\n // `unwrap` the `Option`. In a more complicated program, you might\n // need graceful error handling for a `None` result.\n\n let gadget = gadget_weak.upgrade().unwrap();\n println!(\"Gadget {} owned by {}\", gadget.id, gadget.owner.name);\n }\n\n // At the end of the function, `gadget_owner`, `gadget1`, and `gadget2`\n // are destroyed. There are now no strong (`Rc`) pointers to the\n // gadgets, so they are destroyed. This zeroes the reference count on\n // Gadget Man, so he gets destroyed as well.\n}\n```\n\n[clone]: Clone::clone\n[`Cell`]: core::cell::Cell\n[`RefCell`]: core::cell::RefCell\n[send]: core::marker::Send\n[arc]: crate::sync::Arc\n[`Deref`]: core::ops::Deref\n[downgrade]: Rc::downgrade\n[upgrade]: Weak::upgrade\n[mutability]: core::cell#introducing-mutability-inside-of-something-immutable\n[fully qualified syntax]: https://doc.rust-lang.org/book/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name" }, insertText = "rc", insertTextFormat = 2, kind = 9, label = "rc" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs", documentation = { kind = "markdown", value = "# The Rust Standard Library\n\nThe Rust Standard Library is the foundation of portable Rust software, a\nset of minimal and battle-tested shared abstractions for the [broader Rust\necosystem][crates.io]. It offers core types, like [`Vec<T>`] and\n[`Option<T>`], library-defined [operations on language\nprimitives](#primitives), [standard macros](#macros), [I/O] and\n[multithreading], among [many other things][other].\n\n`std` is available to all Rust crates by default. Therefore, the\nstandard library can be accessed in [`use`] statements through the path\n`std`, as in [`use std::env`].\n\n# How to read this documentation\n\nIf you already know the name of what you are looking for, the fastest way to\nfind it is to use the <a href=\"#\" onclick=\"focusSearchBar();\">search\nbar</a> at the top of the page.\n\nOtherwise, you may want to jump to one of these useful sections:\n\n* [`std::*` modules](#modules)\n* [Primitive types](#primitives)\n* [Standard macros](#macros)\n* [The Rust Prelude]\n\nIf this is your first time, the documentation for the standard library is\nwritten to be casually perused. Clicking on interesting things should\ngenerally lead you to interesting places. Still, there are important bits\nyou don't want to miss, so read on for a tour of the standard library and\nits documentation!\n\nOnce you are familiar with the contents of the standard library you may\nbegin to find the verbosity of the prose distracting. At this stage in your\ndevelopment you may want to press the `[-]` button near the top of the\npage to collapse it into a more skimmable view.\n\nWhile you are looking at that `[-]` button also notice the `[src]`\nbutton. Rust's API documentation comes with the source code and you are\nencouraged to read it. The standard library source is generally high\nquality and a peek behind the curtains is often enlightening.\n\n# What is in the standard library documentation?\n\nFirst of all, The Rust Standard Library is divided into a number of focused\nmodules, [all listed further down this page](#modules). These modules are\nthe bedrock upon which all of Rust is forged, and they have mighty names\nlike [`std::slice`] and [`std::cmp`]. Modules' documentation typically\nincludes an overview of the module along with examples, and are a smart\nplace to start familiarizing yourself with the library.\n\nSecond, implicit methods on [primitive types] are documented here. This can\nbe a source of confusion for two reasons:\n\n1. While primitives are implemented by the compiler, the standard library\n implements methods directly on the primitive types (and it is the only\n library that does so), which are [documented in the section on\n primitives](#primitives).\n2. The standard library exports many modules *with the same name as\n primitive types*. These define additional items related to the primitive\n type, but not the all-important methods.\n\nSo for example there is a [page for the primitive type\n`i32`](primitive::i32) that lists all the methods that can be called on\n32-bit integers (very useful), and there is a [page for the module\n`std::i32`] that documents the constant values [`MIN`] and [`MAX`] (rarely\nuseful).\n\nNote the documentation for the primitives [`str`] and [`[T]`][prim@slice] (also\ncalled 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually\ncalls to methods on [`str`] and [`[T]`][prim@slice] respectively, via [deref\ncoercions][deref-coercions].\n\nThird, the standard library defines [The Rust Prelude], a small collection\nof items - mostly traits - that are imported into every module of every\ncrate. The traits in the prelude are pervasive, making the prelude\ndocumentation a good entry point to learning about the library.\n\nAnd finally, the standard library exports a number of standard macros, and\n[lists them on this page](#macros) (technically, not all of the standard\nmacros are defined by the standard library - some are defined by the\ncompiler - but they are documented here the same). Like the prelude, the\nstandard macros are imported by default into all crates.\n\n# Contributing changes to the documentation\n\nCheck out the rust contribution guidelines [here](\nhttps://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).\nThe source for this documentation can be found on\n[GitHub](https://github.com/rust-lang/rust).\nTo contribute changes, make sure you read the guidelines first, then submit\npull-requests for your suggested changes.\n\nContributions are appreciated! If you see a part of the docs that can be\nimproved, submit a PR, or chat with us first on [Discord][rust-discord]\n#docs.\n\n# A Tour of The Rust Standard Library\n\nThe rest of this crate documentation is dedicated to pointing out notable\nfeatures of The Rust Standard Library.\n\n## Containers and collections\n\nThe [`option`] and [`result`] modules define optional and error-handling\ntypes, [`Option<T>`] and [`Result<T, E>`]. The [`iter`] module defines\nRust's iterator trait, [`Iterator`], which works with the [`for`] loop to\naccess collections.\n\nThe standard library exposes three common ways to deal with contiguous\nregions of memory:\n\n* [`Vec<T>`] - A heap-allocated *vector* that is resizable at runtime.\n* [`[T; N]`][prim@array] - An inline *array* with a fixed size at compile time.\n* [`[T]`][prim@slice] - A dynamically sized *slice* into any other kind of contiguous\n storage, whether heap-allocated or not.\n\nSlices can only be handled through some kind of *pointer*, and as such come\nin many flavors such as:\n\n* `&[T]` - *shared slice*\n* `&mut [T]` - *mutable slice*\n* [`Box<[T]>`][owned slice] - *owned slice*\n\n[`str`], a UTF-8 string slice, is a primitive type, and the standard library\ndefines many methods for it. Rust [`str`]s are typically accessed as\nimmutable references: `&str`. Use the owned [`String`] for building and\nmutating strings.\n\nFor converting to strings use the [`format!`] macro, and for converting from\nstrings use the [`FromStr`] trait.\n\nData may be shared by placing it in a reference-counted box or the [`Rc`]\ntype, and if further contained in a [`Cell`] or [`RefCell`], may be mutated\nas well as shared. Likewise, in a concurrent setting it is common to pair an\natomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same\neffect.\n\nThe [`collections`] module defines maps, sets, linked lists and other\ntypical collection types, including the common [`HashMap<K, V>`].\n\n## Platform abstractions and I/O\n\nBesides basic data types, the standard library is largely concerned with\nabstracting over differences in common platforms, most notably Windows and\nUnix derivatives.\n\nCommon types of I/O, including [files], [TCP], [UDP], are defined in the\n[`io`], [`fs`], and [`net`] modules.\n\nThe [`thread`] module contains Rust's threading abstractions. [`sync`]\ncontains further primitive shared memory types, including [`atomic`] and\n[`mpsc`], which contains the channel types for message passing.\n\n[I/O]: io\n[`MIN`]: i32::MIN\n[`MAX`]: i32::MAX\n[page for the module `std::i32`]: crate::i32\n[TCP]: net::TcpStream\n[The Rust Prelude]: prelude\n[UDP]: net::UdpSocket\n[`Arc`]: sync::Arc\n[owned slice]: boxed\n[`Cell`]: cell::Cell\n[`FromStr`]: str::FromStr\n[`HashMap<K, V>`]: collections::HashMap\n[`Mutex`]: sync::Mutex\n[`Option<T>`]: option::Option\n[`Rc`]: rc::Rc\n[`RefCell`]: cell::RefCell\n[`Result<T, E>`]: result::Result\n[`Vec<T>`]: vec::Vec\n[`atomic`]: sync::atomic\n[`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for\n[`str`]: prim@str\n[`mpsc`]: sync::mpsc\n[`std::cmp`]: cmp\n[`std::slice`]: mod@slice\n[`use std::env`]: env/index.html\n[`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html\n[crates.io]: https://crates.io\n[deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods\n[files]: fs::File\n[multithreading]: thread\n[other]: #what-is-in-the-standard-library-documentation\n[primitive types]: ../book/ch03-02-data-types.html\n[rust-discord]: https://discord.gg/rust-lang\n[array]: prim@array\n[slice]: prim@slice" }, insertText = "realstd", insertTextFormat = 2, kind = 9, label = "realstd" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", documentation = { kind = "markdown", value = "Error handling with the `Result` type.\n\n[`Result<T, E>`][`Result`] is the type used for returning and propagating\nerrors. It is an enum with the variants, [`Ok(T)`], representing\nsuccess and containing a value, and [`Err(E)`], representing error\nand containing an error value.\n\n```rust\nenum Result<T, E> {\n Ok(T),\n Err(E),\n}\n```\n\nFunctions return [`Result`] whenever errors are expected and\nrecoverable. In the `std` crate, [`Result`] is most prominently used\nfor [I/O](../../std/io/index.html).\n\nA simple function returning [`Result`] might be\ndefined and used like so:\n\n```rust\n#[derive(Debug)]\nenum Version { Version1, Version2 }\n\nfn parse_version(header: &[u8]) -> Result<Version, &'static str> {\n match header.get(0) {\n None => Err(\"invalid header length\"),\n Some(&1) => Ok(Version::Version1),\n Some(&2) => Ok(Version::Version2),\n Some(_) => Err(\"invalid version\"),\n }\n}\n\nlet version = parse_version(&[1, 2, 3, 4]);\nmatch version {\n Ok(v) => println!(\"working with version: {:?}\", v),\n Err(e) => println!(\"error parsing header: {:?}\", e),\n}\n```\n\nPattern matching on [`Result`]s is clear and straightforward for\nsimple cases, but [`Result`] comes with some convenience methods\nthat make working with it more succinct.\n\n```rust\nlet good_result: Result<i32, i32> = Ok(10);\nlet bad_result: Result<i32, i32> = Err(10);\n\n// The `is_ok` and `is_err` methods do what they say.\nassert!(good_result.is_ok() && !good_result.is_err());\nassert!(bad_result.is_err() && !bad_result.is_ok());\n\n// `map` consumes the `Result` and produces another.\nlet good_result: Result<i32, i32> = good_result.map(|i| i + 1);\nlet bad_result: Result<i32, i32> = bad_result.map(|i| i - 1);\n\n// Use `and_then` to continue the computation.\nlet good_result: Result<bool, i32> = good_result.and_then(|i| Ok(i == 11));\n\n// Use `or_else` to handle the error.\nlet bad_result: Result<i32, i32> = bad_result.or_else(|i| Ok(i + 20));\n\n// Consume the result and return the contents with `unwrap`.\nlet final_awesome_result = good_result.unwrap();\n```\n\n# Results must be used\n\nA common problem with using return values to indicate errors is\nthat it is easy to ignore the return value, thus failing to handle\nthe error. [`Result`] is annotated with the `#[must_use]` attribute,\nwhich will cause the compiler to issue a warning when a Result\nvalue is ignored. This makes [`Result`] especially useful with\nfunctions that may encounter errors but don't otherwise return a\nuseful value.\n\nConsider the [`write_all`] method defined for I/O types\nby the [`Write`] trait:\n\n```rust\nuse std::io;\n\ntrait Write {\n fn write_all(&mut self, bytes: &[u8]) -> Result<(), io::Error>;\n}\n```\n\n*Note: The actual definition of [`Write`] uses [`io::Result`], which\nis just a synonym for [`Result`]`<T, `[`io::Error`]`>`.*\n\nThis method doesn't produce a value, but the write may\nfail. It's crucial to handle the error case, and *not* write\nsomething like this:\n\n```rust\nuse std::fs::File;\nuse std::io::prelude::*;\n\nlet mut file = File::create(\"valuable_data.txt\").unwrap();\n// If `write_all` errors, then we'll never know, because the return\n// value is ignored.\nfile.write_all(b\"important message\");\n```\n\nIf you *do* write that in Rust, the compiler will give you a\nwarning (by default, controlled by the `unused_must_use` lint).\n\nYou might instead, if you don't want to handle the error, simply\nassert success with [`expect`]. This will panic if the\nwrite fails, providing a marginally useful message indicating why:\n\n```rust\nuse std::fs::File;\nuse std::io::prelude::*;\n\nlet mut file = File::create(\"valuable_data.txt\").unwrap();\nfile.write_all(b\"important message\").expect(\"failed to write message\");\n```\n\nYou might also simply assert success:\n\n```rust\nassert!(file.write_all(b\"important message\").is_ok());\n```\n\nOr propagate the error up the call stack with [`?`]:\n\n```rust\nfn write_message() -> io::Result<()> {\n let mut file = File::create(\"valuable_data.txt\")?;\n file.write_all(b\"important message\")?;\n Ok(())\n}\n```\n\n# The question mark operator, `?`\n\nWhen writing code that calls many functions that return the\n[`Result`] type, the error handling can be tedious. The question mark\noperator, [`?`], hides some of the boilerplate of propagating errors\nup the call stack.\n\nIt replaces this:\n\n```rust\nuse std::fs::File;\nuse std::io::prelude::*;\nuse std::io;\n\nstruct Info {\n name: String,\n age: i32,\n rating: i32,\n}\n\nfn write_info(info: &Info) -> io::Result<()> {\n // Early return on error\n let mut file = match File::create(\"my_best_friends.txt\") {\n Err(e) => return Err(e),\n Ok(f) => f,\n };\n if let Err(e) = file.write_all(format!(\"name: {}\\n\", info.name).as_bytes()) {\n return Err(e)\n }\n if let Err(e) = file.write_all(format!(\"age: {}\\n\", info.age).as_bytes()) {\n return Err(e)\n }\n if let Err(e) = file.write_all(format!(\"rating: {}\\n\", info.rating).as_bytes()) {\n return Err(e)\n }\n Ok(())\n}\n```\n\nWith this:\n\n```rust\nuse std::fs::File;\nuse std::io::prelude::*;\nuse std::io;\n\nstruct Info {\n name: String,\n age: i32,\n rating: i32,\n}\n\nfn write_info(info: &Info) -> io::Result<()> {\n let mut file = File::create(\"my_best_friends.txt\")?;\n // Early return on error\n file.write_all(format!(\"name: {}\\n\", info.name).as_bytes())?;\n file.write_all(format!(\"age: {}\\n\", info.age).as_bytes())?;\n file.write_all(format!(\"rating: {}\\n\", info.rating).as_bytes())?;\n Ok(())\n}\n```\n\n*It's much nicer!*\n\nEnding the expression with [`?`] will result in the unwrapped\nsuccess ([`Ok`]) value, unless the result is [`Err`], in which case\n[`Err`] is returned early from the enclosing function.\n\n[`?`] can only be used in functions that return [`Result`] because of the\nearly return of [`Err`] that it provides.\n\n[`expect`]: Result::expect\n[`Write`]: ../../std/io/trait.Write.html\n[`write_all`]: ../../std/io/trait.Write.html#method.write_all\n[`io::Result`]: ../../std/io/type.Result.html\n[`?`]: crate::ops::Try\n[`Ok(T)`]: Ok\n[`Err(E)`]: Err\n[`io::Error`]: ../../std/io/struct.Error.html" }, insertText = "result", insertTextFormat = 2, kind = 9, label = "result" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs", documentation = { kind = "markdown", value = "Runtime services\n\nThe `rt` module provides a narrow set of runtime services,\nincluding the global heap (exported in `heap`) and unwinding and\nbacktrace support. The APIs in this module are highly unstable,\nand should be considered as private implementation details for the\ntime being." }, insertText = "rt", insertTextFormat = 2, kind = 9, label = "rt" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/slice.rs", documentation = { kind = "markdown", value = "A dynamically-sized view into a contiguous sequence, `[T]`.\n\n*[See also the slice primitive type](slice).*\n\nSlices are a view into a block of memory represented as a pointer and a\nlength.\n\n```rust\n// slicing a Vec\nlet vec = vec![1, 2, 3];\nlet int_slice = &vec[..];\n// coercing an array to a slice\nlet str_slice: &[&str] = &[\"one\", \"two\", \"three\"];\n```\n\nSlices are either mutable or shared. The shared slice type is `&[T]`,\nwhile the mutable slice type is `&mut [T]`, where `T` represents the element\ntype. For example, you can mutate the block of memory that a mutable slice\npoints to:\n\n```rust\nlet x = &mut [1, 2, 3];\nx[1] = 7;\nassert_eq!(x, &[1, 7, 3]);\n```\n\nHere are some of the things this module contains:\n\n## Structs\n\nThere are several structs that are useful for slices, such as [`Iter`], which\nrepresents iteration over a slice.\n\n## Trait Implementations\n\nThere are several implementations of common traits for slices. Some examples\ninclude:\n\n* [`Clone`]\n* [`Eq`], [`Ord`] - for slices whose element type are [`Eq`] or [`Ord`].\n* [`Hash`] - for slices whose element type is [`Hash`].\n\n## Iteration\n\nThe slices implement `IntoIterator`. The iterator yields references to the\nslice elements.\n\n```rust\nlet numbers = &[0, 1, 2];\nfor n in numbers {\n println!(\"{} is a number!\", n);\n}\n```\n\nThe mutable slice yields mutable references to the elements:\n\n```rust\nlet mut scores = [7, 8, 9];\nfor score in &mut scores[..] {\n *score += 1;\n}\n```\n\nThis iterator yields mutable references to the slice's elements, so while\nthe element type of the slice is `i32`, the element type of the iterator is\n`&mut i32`.\n\n* [`.iter`] and [`.iter_mut`] are the explicit methods to return the default\n iterators.\n* Further methods that return iterators are [`.split`], [`.splitn`],\n [`.chunks`], [`.windows`] and more.\n\n[`Hash`]: core::hash::Hash\n[`.iter`]: slice::iter\n[`.iter_mut`]: slice::iter_mut\n[`.split`]: slice::split\n[`.splitn`]: slice::splitn\n[`.chunks`]: slice::chunks\n[`.windows`]: slice::windows" }, insertText = "slice", insertTextFormat = 2, kind = 9, label = "slice" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/str.rs", documentation = { kind = "markdown", value = "Unicode string slices.\n\n*[See also the `str` primitive type](str).*\n\nThe `&str` type is one of the two main string types, the other being `String`.\nUnlike its `String` counterpart, its contents are borrowed.\n\n# Basic Usage\n\nA basic string declaration of `&str` type:\n\n```rust\nlet hello_world = \"Hello, World!\";\n```\n\nHere we have declared a string literal, also known as a string slice.\nString literals have a static lifetime, which means the string `hello_world`\nis guaranteed to be valid for the duration of the entire program.\nWe can explicitly specify `hello_world`'s lifetime as well:\n\n```rust\nlet hello_world: &'static str = \"Hello, world!\";\n```" }, insertText = "str", insertTextFormat = 2, kind = 9, label = "str" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/stream/mod.rs", documentation = { kind = "markdown", value = "Composable asynchronous iteration.\n\nIf futures are asynchronous values, then streams are asynchronous\niterators. If you've found yourself with an asynchronous collection of some kind,\nand needed to perform an operation on the elements of said collection,\nyou'll quickly run into 'streams'. Streams are heavily used in idiomatic\nasynchronous Rust code, so it's worth becoming familiar with them.\n\nBefore explaining more, let's talk about how this module is structured:\n\n# Organization\n\nThis module is largely organized by type:\n\n* [Traits] are the core portion: these traits define what kind of streams\n exist and what you can do with them. The methods of these traits are worth\n putting some extra study time into.\n* Functions provide some helpful ways to create some basic streams.\n* Structs are often the return types of the various methods on this\n module's traits. You'll usually want to look at the method that creates\n the `struct`, rather than the `struct` itself. For more detail about why,\n see '[Implementing Stream](#implementing-stream)'.\n\n[Traits]: #traits\n\nThat's it! Let's dig into streams.\n\n# Stream\n\nThe heart and soul of this module is the [`Stream`] trait. The core of\n[`Stream`] looks like this:\n\n```rust\ntrait Stream {\n type Item;\n fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>;\n}\n```\n\nUnlike `Iterator`, `Stream` makes a distinction between the [`poll_next`]\nmethod which is used when implementing a `Stream`, and a (to-be-implemented)\n`next` method which is used when consuming a stream. Consumers of `Stream`\nonly need to consider `next`, which when called, returns a future which\nyields `Option<Stream::Item>`.\n\nThe future returned by `next` will yield `Some(Item)` as long as there are\nelements, and once they've all been exhausted, will yield `None` to indicate\nthat iteration is finished. If we're waiting on something asynchronous to\nresolve, the future will wait until the stream is ready to yield again.\n\nIndividual streams may choose to resume iteration, and so calling `next`\nagain may or may not eventually yield `Some(Item)` again at some point.\n\n[`Stream`]'s full definition includes a number of other methods as well,\nbut they are default methods, built on top of [`poll_next`], and so you get\nthem for free.\n\n[`Poll`]: super::task::Poll\n[`poll_next`]: Stream::poll_next\n\n# Implementing Stream\n\nCreating a stream of your own involves two steps: creating a `struct` to\nhold the stream's state, and then implementing [`Stream`] for that\n`struct`.\n\nLet's make a stream named `Counter` which counts from `1` to `5`:\n\n```rust\n#![feature(async_stream)]\n// First, the struct:\n\n/// A stream which counts from one to five\nstruct Counter {\n count: usize,\n}\n\n// we want our count to start at one, so let's add a new() method to help.\n// This isn't strictly necessary, but is convenient. Note that we start\n// `count` at zero, we'll see why in `poll_next()`'s implementation below.\nimpl Counter {\n fn new() -> Counter {\n Counter { count: 0 }\n }\n}\n\n// Then, we implement `Stream` for our `Counter`:\n\nimpl Stream for Counter {\n // we will be counting with usize\n type Item = usize;\n\n // poll_next() is the only required method\n fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {\n // Increment our count. This is why we started at zero.\n self.count += 1;\n\n // Check to see if we've finished counting or not.\n if self.count < 6 {\n Poll::Ready(Some(self.count))\n } else {\n Poll::Ready(None)\n }\n }\n}\n```\n\n# Laziness\n\nStreams are *lazy*. This means that just creating a stream doesn't _do_ a\nwhole lot. Nothing really happens until you call `next`. This is sometimes a\nsource of confusion when creating a stream solely for its side effects. The\ncompiler will warn us about this kind of behavior:\n\n```text\nwarning: unused result that must be used: streams do nothing unless polled\n```" }, insertText = "stream", insertTextFormat = 2, kind = 9, label = "stream" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", documentation = { kind = "markdown", value = "A UTF-8–encoded, growable string.\n\nThis module contains the [`String`] type, the [`ToString`] trait for\nconverting to strings, and several error types that may result from\nworking with [`String`]s.\n\n# Examples\n\nThere are multiple ways to create a new [`String`] from a string literal:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet s = String::from(\"world\");\nlet s: String = \"also this\".into();\n```\n\nYou can create a new [`String`] from an existing one by concatenating with\n`+`:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet message = s + \" world!\";\n```\n\nIf you have a vector of valid UTF-8 bytes, you can make a [`String`] out of\nit. You can do the reverse too.\n\n```rust\nlet sparkle_heart = vec![240, 159, 146, 150];\n\n// We know these bytes are valid, so we'll use `unwrap()`.\nlet sparkle_heart = String::from_utf8(sparkle_heart).unwrap();\n\nassert_eq!(\"💖\", sparkle_heart);\n\nlet bytes = sparkle_heart.into_bytes();\n\nassert_eq!(bytes, [240, 159, 146, 150]);\n```" }, insertText = "string", insertTextFormat = 2, kind = 9, label = "string" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/mod.rs", documentation = { kind = "markdown", value = "Useful synchronization primitives.\n\n## The need for synchronization\n\nConceptually, a Rust program is a series of operations which will\nbe executed on a computer. The timeline of events happening in the\nprogram is consistent with the order of the operations in the code.\n\nConsider the following code, operating on some global static variables:\n\n```rust\nstatic mut A: u32 = 0;\nstatic mut B: u32 = 0;\nstatic mut C: u32 = 0;\n\nfn main() {\n unsafe {\n A = 3;\n B = 4;\n A = A + B;\n C = B;\n println!(\"{} {} {}\", A, B, C);\n C = A;\n }\n}\n```\n\nIt appears as if some variables stored in memory are changed, an addition\nis performed, result is stored in `A` and the variable `C` is\nmodified twice.\n\nWhen only a single thread is involved, the results are as expected:\nthe line `7 4 4` gets printed.\n\nAs for what happens behind the scenes, when optimizations are enabled the\nfinal generated machine code might look very different from the code:\n\n- The first store to `C` might be moved before the store to `A` or `B`,\n _as if_ we had written `C = 4; A = 3; B = 4`.\n\n- Assignment of `A + B` to `A` might be removed, since the sum can be stored\n in a temporary location until it gets printed, with the global variable\n never getting updated.\n\n- The final result could be determined just by looking at the code\n at compile time, so [constant folding] might turn the whole\n block into a simple `println!(\"7 4 4\")`.\n\nThe compiler is allowed to perform any combination of these\noptimizations, as long as the final optimized code, when executed,\nproduces the same results as the one without optimizations.\n\nDue to the [concurrency] involved in modern computers, assumptions\nabout the program's execution order are often wrong. Access to\nglobal variables can lead to nondeterministic results, **even if**\ncompiler optimizations are disabled, and it is **still possible**\nto introduce synchronization bugs.\n\nNote that thanks to Rust's safety guarantees, accessing global (static)\nvariables requires `unsafe` code, assuming we don't use any of the\nsynchronization primitives in this module.\n\n[constant folding]: https://en.wikipedia.org/wiki/Constant_folding\n[concurrency]: https://en.wikipedia.org/wiki/Concurrency_(computer_science)\n\n## Out-of-order execution\n\nInstructions can execute in a different order from the one we define, due to\nvarious reasons:\n\n- The **compiler** reordering instructions: If the compiler can issue an\n instruction at an earlier point, it will try to do so. For example, it\n might hoist memory loads at the top of a code block, so that the CPU can\n start [prefetching] the values from memory.\n\n In single-threaded scenarios, this can cause issues when writing\n signal handlers or certain kinds of low-level code.\n Use [compiler fences] to prevent this reordering.\n\n- A **single processor** executing instructions [out-of-order]:\n Modern CPUs are capable of [superscalar] execution,\n i.e., multiple instructions might be executing at the same time,\n even though the machine code describes a sequential process.\n\n This kind of reordering is handled transparently by the CPU.\n\n- A **multiprocessor** system executing multiple hardware threads\n at the same time: In multi-threaded scenarios, you can use two\n kinds of primitives to deal with synchronization:\n - [memory fences] to ensure memory accesses are made visible to\n other CPUs in the right order.\n - [atomic operations] to ensure simultaneous access to the same\n memory location doesn't lead to undefined behavior.\n\n[prefetching]: https://en.wikipedia.org/wiki/Cache_prefetching\n[compiler fences]: crate::sync::atomic::compiler_fence\n[out-of-order]: https://en.wikipedia.org/wiki/Out-of-order_execution\n[superscalar]: https://en.wikipedia.org/wiki/Superscalar_processor\n[memory fences]: crate::sync::atomic::fence\n[atomic operations]: crate::sync::atomic\n\n## Higher-level synchronization objects\n\nMost of the low-level synchronization primitives are quite error-prone and\ninconvenient to use, which is why the standard library also exposes some\nhigher-level synchronization objects.\n\nThese abstractions can be built out of lower-level primitives.\nFor efficiency, the sync objects in the standard library are usually\nimplemented with help from the operating system's kernel, which is\nable to reschedule the threads while they are blocked on acquiring\na lock.\n\nThe following is an overview of the available synchronization\nobjects:\n\n- [`Arc`]: Atomically Reference-Counted pointer, which can be used\n in multithreaded environments to prolong the lifetime of some\n data until all the threads have finished using it.\n\n- [`Barrier`]: Ensures multiple threads will wait for each other\n to reach a point in the program, before continuing execution all\n together.\n\n- [`Condvar`]: Condition Variable, providing the ability to block\n a thread while waiting for an event to occur.\n\n- [`mpsc`]: Multi-producer, single-consumer queues, used for\n message-based communication. Can provide a lightweight\n inter-thread synchronisation mechanism, at the cost of some\n extra memory.\n\n- [`Mutex`]: Mutual Exclusion mechanism, which ensures that at\n most one thread at a time is able to access some data.\n\n- [`Once`]: Used for thread-safe, one-time initialization of a\n global variable.\n\n- [`RwLock`]: Provides a mutual exclusion mechanism which allows\n multiple readers at the same time, while allowing only one\n writer at a time. In some cases, this can be more efficient than\n a mutex.\n\n[`Arc`]: crate::sync::Arc\n[`Barrier`]: crate::sync::Barrier\n[`Condvar`]: crate::sync::Condvar\n[`mpsc`]: crate::sync::mpsc\n[`Mutex`]: crate::sync::Mutex\n[`Once`]: crate::sync::Once\n[`RwLock`]: crate::sync::RwLock" }, insertText = "sync", insertTextFormat = 2, kind = 9, label = "sync" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs", insertText = "task", insertTextFormat = 2, kind = 9, label = "task" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test/src/lib.rs", documentation = { kind = "markdown", value = "Support code for rustc's built in unit-test and micro-benchmarking\nframework.\n\nAlmost all user code will only be interested in `Bencher` and\n`black_box`. All other interactions (such as writing tests and\nbenchmarks themselves) should be done via the `#[test]` and\n`#[bench]` attributes.\n\nSee the [Testing Chapter](../book/ch11-00-testing.html) of the book for more details." }, insertText = "test", insertTextFormat = 2, kind = 9, label = "test" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs", documentation = { kind = "markdown", value = "Native threads.\n\n## The threading model\n\nAn executing Rust program consists of a collection of native OS threads,\neach with their own stack and local state. Threads can be named, and\nprovide some built-in support for low-level synchronization.\n\nCommunication between threads can be done through\n[channels], Rust's message-passing types, along with [other forms of thread\nsynchronization](../../std/sync/index.html) and shared-memory data\nstructures. In particular, types that are guaranteed to be\nthreadsafe are easily shared between threads using the\natomically-reference-counted container, [`Arc`].\n\nFatal logic errors in Rust cause *thread panic*, during which\na thread will unwind the stack, running destructors and freeing\nowned resources. While not meant as a 'try/catch' mechanism, panics\nin Rust can nonetheless be caught (unless compiling with `panic=abort`) with\n[`catch_unwind`](../../std/panic/fn.catch_unwind.html) and recovered\nfrom, or alternatively be resumed with\n[`resume_unwind`](../../std/panic/fn.resume_unwind.html). If the panic\nis not caught the thread will exit, but the panic may optionally be\ndetected from a different thread with [`join`]. If the main thread panics\nwithout the panic being caught, the application will exit with a\nnon-zero exit code.\n\nWhen the main thread of a Rust program terminates, the entire program shuts\ndown, even if other threads are still running. However, this module provides\nconvenient facilities for automatically waiting for the termination of a\nchild thread (i.e., join).\n\n## Spawning a thread\n\nA new thread can be spawned using the [`thread::spawn`][`spawn`] function:\n\n```rust\nuse std::thread;\n\nthread::spawn(move || {\n // some work here\n});\n```\n\nIn this example, the spawned thread is \"detached\" from the current\nthread. This means that it can outlive its parent (the thread that spawned\nit), unless this parent is the main thread.\n\nThe parent thread can also wait on the completion of the child\nthread; a call to [`spawn`] produces a [`JoinHandle`], which provides\na `join` method for waiting:\n\n```rust\nuse std::thread;\n\nlet child = thread::spawn(move || {\n // some work here\n});\n// some work here\nlet res = child.join();\n```\n\nThe [`join`] method returns a [`thread::Result`] containing [`Ok`] of the final\nvalue produced by the child thread, or [`Err`] of the value given to\na call to [`panic!`] if the child panicked.\n\n## Configuring threads\n\nA new thread can be configured before it is spawned via the [`Builder`] type,\nwhich currently allows you to set the name and stack size for the child thread:\n\n```rust\nuse std::thread;\n\nthread::Builder::new().name(\"child1\".to_string()).spawn(move || {\n println!(\"Hello, world!\");\n});\n```\n\n## The `Thread` type\n\nThreads are represented via the [`Thread`] type, which you can get in one of\ntwo ways:\n\n* By spawning a new thread, e.g., using the [`thread::spawn`][`spawn`]\n function, and calling [`thread`][`JoinHandle::thread`] on the [`JoinHandle`].\n* By requesting the current thread, using the [`thread::current`] function.\n\nThe [`thread::current`] function is available even for threads not spawned\nby the APIs of this module.\n\n## Thread-local storage\n\nThis module also provides an implementation of thread-local storage for Rust\nprograms. Thread-local storage is a method of storing data into a global\nvariable that each thread in the program will have its own copy of.\nThreads do not share this data, so accesses do not need to be synchronized.\n\nA thread-local key owns the value it contains and will destroy the value when the\nthread exits. It is created with the [`thread_local!`] macro and can contain any\nvalue that is `'static` (no borrowed pointers). It provides an accessor function,\n[`with`], that yields a shared reference to the value to the specified\nclosure. Thread-local keys allow only shared access to values, as there would be no\nway to guarantee uniqueness if mutable borrows were allowed. Most values\nwill want to make use of some form of **interior mutability** through the\n[`Cell`] or [`RefCell`] types.\n\n## Naming threads\n\nThreads are able to have associated names for identification purposes. By default, spawned\nthreads are unnamed. To specify a name for a thread, build the thread with [`Builder`] and pass\nthe desired thread name to [`Builder::name`]. To retrieve the thread name from within the\nthread, use [`Thread::name`]. A couple examples of where the name of a thread gets used:\n\n* If a panic occurs in a named thread, the thread name will be printed in the panic message.\n* The thread name is provided to the OS where applicable (e.g., `pthread_setname_np` in\n unix-like platforms).\n\n## Stack size\n\nThe default stack size for spawned threads is 2 MiB, though this particular stack size is\nsubject to change in the future. There are two ways to manually specify the stack size for\nspawned threads:\n\n* Build the thread with [`Builder`] and pass the desired stack size to [`Builder::stack_size`].\n* Set the `RUST_MIN_STACK` environment variable to an integer representing the desired stack\n size (in bytes). Note that setting [`Builder::stack_size`] will override this.\n\nNote that the stack size of the main thread is *not* determined by Rust.\n\n[channels]: crate::sync::mpsc\n[`join`]: JoinHandle::join\n[`Result`]: crate::result::Result\n[`Ok`]: crate::result::Result::Ok\n[`Err`]: crate::result::Result::Err\n[`thread::current`]: current\n[`thread::Result`]: Result\n[`unpark`]: Thread::unpark\n[`thread::park_timeout`]: park_timeout\n[`Cell`]: crate::cell::Cell\n[`RefCell`]: crate::cell::RefCell\n[`with`]: LocalKey::with" }, insertText = "thread", insertTextFormat = 2, kind = 9, label = "thread" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/time.rs", documentation = { kind = "markdown", value = "Temporal quantification.\n\nExample:\n\n```rust\nuse std::time::Duration;\n\nlet five_seconds = Duration::new(5, 0);\n// both declarations are equivalent\nassert_eq!(Duration::new(5, 0), Duration::from_secs(5));\n```" }, insertText = "time", insertTextFormat = 2, kind = 9, label = "time" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/u128.rs", documentation = { kind = "markdown", value = "Constants for the 128-bit unsigned integer type.\n\n*[See also the `u128` primitive type][u128].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "u128", insertTextFormat = 2, kind = 9, label = "u128" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/u16.rs", documentation = { kind = "markdown", value = "Constants for the 16-bit unsigned integer type.\n\n*[See also the `u16` primitive type][u16].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "u16", insertTextFormat = 2, kind = 9, label = "u16" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/u32.rs", documentation = { kind = "markdown", value = "Constants for the 32-bit unsigned integer type.\n\n*[See also the `u32` primitive type][u32].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "u32", insertTextFormat = 2, kind = 9, label = "u32" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/u64.rs", documentation = { kind = "markdown", value = "Constants for the 64-bit unsigned integer type.\n\n*[See also the `u64` primitive type][u64].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "u64", insertTextFormat = 2, kind = 9, label = "u64" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/u8.rs", documentation = { kind = "markdown", value = "Constants for the 8-bit unsigned integer type.\n\n*[See also the `u8` primitive type][u8].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "u8", insertTextFormat = 2, kind = 9, label = "u8" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind/src/lib.rs", insertText = "unwind", insertTextFormat = 2, kind = 9, label = "unwind" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/shells/usize.rs", documentation = { kind = "markdown", value = "Constants for the pointer-sized unsigned integer type.\n\n*[See also the `usize` primitive type][usize].*\n\nNew code should use the associated constants directly on the primitive type." }, insertText = "usize", insertTextFormat = 2, kind = 9, label = "usize" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", documentation = { kind = "markdown", value = "A contiguous growable array type with heap-allocated contents, written\n`Vec<T>`.\n\nVectors have `O(1)` indexing, amortized `O(1)` push (to the end) and\n`O(1)` pop (from the end).\n\nVectors ensure they never allocate more than `isize::MAX` bytes.\n\n# Examples\n\nYou can explicitly create a [`Vec`] with [`Vec::new`]:\n\n```rust\nlet v: Vec<i32> = Vec::new();\n```\n\n...or by using the [`vec!`] macro:\n\n```rust\nlet v: Vec<i32> = vec![];\n\nlet v = vec![1, 2, 3, 4, 5];\n\nlet v = vec![0; 10]; // ten zeroes\n```\n\nYou can [`push`] values onto the end of a vector (which will grow the vector\nas needed):\n\n```rust\nlet mut v = vec![1, 2];\n\nv.push(3);\n```\n\nPopping values works in much the same way:\n\n```rust\nlet mut v = vec![1, 2];\n\nlet two = v.pop();\n```\n\nVectors also support indexing (through the [`Index`] and [`IndexMut`] traits):\n\n```rust\nlet mut v = vec![1, 2, 3];\nlet three = v[2];\nv[1] = v[1] + 5;\n```\n\n[`push`]: Vec::push" }, insertText = "vec", insertTextFormat = 2, kind = 9, label = "vec" } }}
[DEBUG][2021-12-06 23:31:12] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_78", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_84", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 17, line = 4 }, start = { character = 17, line = 4 } }, rangeLength = 0, text = "f" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 111 } }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_87", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_87", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_87", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_87", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_86", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 19, line = 4 }, start = { character = 18, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 19, line = 4 }, start = { character = 18, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 18, line = 4 }, start = { character = 18, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 112 } }}
[DEBUG][2021-12-06 23:31:13] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 17, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_89", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_89", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 17, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_89", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_89", title = "Building" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_88", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:13] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 19, line = 4 }, start = { character = 18, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 113 } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_91", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_91", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 18, line = 4 }, start = { character = 18, line = 4 } }, rangeLength = 0, text = "m" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 114 } }}
[DEBUG][2021-12-06 23:31:14] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 18, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 19, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 18, jsonrpc = "2.0", result = { { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/fmt.rs", documentation = { kind = "markdown", value = "Utilities for formatting and printing `String`s.\n\nThis module contains the runtime support for the [`format!`] syntax extension.\nThis macro is implemented in the compiler to emit calls to this module in\norder to format arguments at runtime into strings.\n\n# Usage\n\nThe [`format!`] macro is intended to be familiar to those coming from C's\n`printf`/`fprintf` functions or Python's `str.format` function.\n\nSome examples of the [`format!`] extension are:\n\n```rust\nformat!(\"Hello\"); // => \"Hello\"\nformat!(\"Hello, {}!\", \"world\"); // => \"Hello, world!\"\nformat!(\"The number is {}\", 1); // => \"The number is 1\"\nformat!(\"{:?}\", (3, 4)); // => \"(3, 4)\"\nformat!(\"{value}\", value=4); // => \"4\"\nformat!(\"{} {}\", 1, 2); // => \"1 2\"\nformat!(\"{:04}\", 42); // => \"0042\" with leading zeros\n```\n\nFrom these, you can see that the first argument is a format string. It is\nrequired by the compiler for this to be a string literal; it cannot be a\nvariable passed in (in order to perform validity checking). The compiler\nwill then parse the format string and determine if the list of arguments\nprovided is suitable to pass to this format string.\n\nTo convert a single value to a string, use the [`to_string`] method. This\nwill use the [`Display`] formatting trait.\n\n## Positional parameters\n\nEach formatting argument is allowed to specify which value argument it's\nreferencing, and if omitted it is assumed to be \"the next argument\". For\nexample, the format string `{} {} {}` would take three parameters, and they\nwould be formatted in the same order as they're given. The format string\n`{2} {1} {0}`, however, would format arguments in reverse order.\n\nThings can get a little tricky once you start intermingling the two types of\npositional specifiers. The \"next argument\" specifier can be thought of as an\niterator over the argument. Each time a \"next argument\" specifier is seen,\nthe iterator advances. This leads to behavior like this:\n\n```rust\nformat!(\"{1} {} {0} {}\", 1, 2); // => \"2 1 1 2\"\n```\n\nThe internal iterator over the argument has not been advanced by the time\nthe first `{}` is seen, so it prints the first argument. Then upon reaching\nthe second `{}`, the iterator has advanced forward to the second argument.\nEssentially, parameters that explicitly name their argument do not affect\nparameters that do not name an argument in terms of positional specifiers.\n\nA format string is required to use all of its arguments, otherwise it is a\ncompile-time error. You may refer to the same argument more than once in the\nformat string.\n\n## Named parameters\n\nRust itself does not have a Python-like equivalent of named parameters to a\nfunction, but the [`format!`] macro is a syntax extension that allows it to\nleverage named parameters. Named parameters are listed at the end of the\nargument list and have the syntax:\n\n```text\nidentifier '=' expression\n```\n\nFor example, the following [`format!`] expressions all use named argument:\n\n```rust\nformat!(\"{argument}\", argument = \"test\"); // => \"test\"\nformat!(\"{name} {}\", 1, name = 2); // => \"2 1\"\nformat!(\"{a} {c} {b}\", a=\"a\", b='b', c=3); // => \"a 3 b\"\n```\n\nIt is not valid to put positional parameters (those without names) after\narguments that have names. Like with positional parameters, it is not\nvalid to provide named parameters that are unused by the format string.\n\n# Formatting Parameters\n\nEach argument being formatted can be transformed by a number of formatting\nparameters (corresponding to `format_spec` in [the syntax](#syntax)). These\nparameters affect the string representation of what's being formatted.\n\n## Width\n\n```rust\n// All of these print \"Hello x !\"\nprintln!(\"Hello {:5}!\", \"x\");\nprintln!(\"Hello {:1$}!\", \"x\", 5);\nprintln!(\"Hello {1:0$}!\", 5, \"x\");\nprintln!(\"Hello {:width$}!\", \"x\", width = 5);\n```\n\nThis is a parameter for the \"minimum width\" that the format should take up.\nIf the value's string does not fill up this many characters, then the\npadding specified by fill/alignment will be used to take up the required\nspace (see below).\n\nThe value for the width can also be provided as a [`usize`] in the list of\nparameters by adding a postfix `$`, indicating that the second argument is\na [`usize`] specifying the width.\n\nReferring to an argument with the dollar syntax does not affect the \"next\nargument\" counter, so it's usually a good idea to refer to arguments by\nposition, or use named arguments.\n\n## Fill/Alignment\n\n```rust\nassert_eq!(format!(\"Hello {:<5}!\", \"x\"), \"Hello x !\");\nassert_eq!(format!(\"Hello {:-<5}!\", \"x\"), \"Hello x----!\");\nassert_eq!(format!(\"Hello {:^5}!\", \"x\"), \"Hello x !\");\nassert_eq!(format!(\"Hello {:>5}!\", \"x\"), \"Hello x!\");\n```\n\nThe optional fill character and alignment is provided normally in conjunction with the\n[`width`](#width) parameter. It must be defined before `width`, right after the `:`.\nThis indicates that if the value being formatted is smaller than\n`width` some extra characters will be printed around it.\nFilling comes in the following variants for different alignments:\n\n* `[fill]<` - the argument is left-aligned in `width` columns\n* `[fill]^` - the argument is center-aligned in `width` columns\n* `[fill]>` - the argument is right-aligned in `width` columns\n\nThe default [fill/alignment](#fillalignment) for non-numerics is a space and\nleft-aligned. The\ndefault for numeric formatters is also a space character but with right-alignment. If\nthe `0` flag (see below) is specified for numerics, then the implicit fill character is\n`0`.\n\nNote that alignment may not be implemented by some types. In particular, it\nis not generally implemented for the `Debug` trait. A good way to ensure\npadding is applied is to format your input, then pad this resulting string\nto obtain your output:\n\n```rust\nprintln!(\"Hello {:^15}!\", format!(\"{:?}\", Some(\"hi\"))); // => \"Hello Some(\"hi\") !\"\n```\n\n## Sign/`#`/`0`\n\n```rust\nassert_eq!(format!(\"Hello {:+}!\", 5), \"Hello +5!\");\nassert_eq!(format!(\"{:#x}!\", 27), \"0x1b!\");\nassert_eq!(format!(\"Hello {:05}!\", 5), \"Hello 00005!\");\nassert_eq!(format!(\"Hello {:05}!\", -5), \"Hello -0005!\");\nassert_eq!(format!(\"{:#010x}!\", 27), \"0x0000001b!\");\n```\n\nThese are all flags altering the behavior of the formatter.\n\n* `+` - This is intended for numeric types and indicates that the sign\n should always be printed. Positive signs are never printed by\n default, and the negative sign is only printed by default for the\n `Signed` trait. This flag indicates that the correct sign (`+` or `-`)\n should always be printed.\n* `-` - Currently not used\n* `#` - This flag indicates that the \"alternate\" form of printing should\n be used. The alternate forms are:\n * `#?` - pretty-print the [`Debug`] formatting\n * `#x` - precedes the argument with a `0x`\n * `#X` - precedes the argument with a `0x`\n * `#b` - precedes the argument with a `0b`\n * `#o` - precedes the argument with a `0o`\n* `0` - This is used to indicate for integer formats that the padding to `width` should\n both be done with a `0` character as well as be sign-aware. A format\n like `{:08}` would yield `00000001` for the integer `1`, while the\n same format would yield `-0000001` for the integer `-1`. Notice that\n the negative version has one fewer zero than the positive version.\n Note that padding zeros are always placed after the sign (if any)\n and before the digits. When used together with the `#` flag, a similar\n rule applies: padding zeros are inserted after the prefix but before\n the digits. The prefix is included in the total width.\n\n## Precision\n\nFor non-numeric types, this can be considered a \"maximum width\". If the resulting string is\nlonger than this width, then it is truncated down to this many characters and that truncated\nvalue is emitted with proper `fill`, `alignment` and `width` if those parameters are set.\n\nFor integral types, this is ignored.\n\nFor floating-point types, this indicates how many digits after the decimal point should be\nprinted.\n\nThere are three possible ways to specify the desired `precision`:\n\n1. An integer `.N`:\n\n the integer `N` itself is the precision.\n\n2. An integer or name followed by dollar sign `.N$`:\n\n use format *argument* `N` (which must be a `usize`) as the precision.\n\n3. An asterisk `.*`:\n\n `.*` means that this `{...}` is associated with *two* format inputs rather than one: the\n first input holds the `usize` precision, and the second holds the value to print. Note that\n in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers\n to the *value* to print, and the `precision` must come in the input preceding `<arg>`.\n\nFor example, the following calls all print the same thing `Hello x is 0.01000`:\n\n```rust\n// Hello {arg 0 (\"x\")} is {arg 1 (0.01) with precision specified inline (5)}\nprintln!(\"Hello {0} is {1:.5}\", \"x\", 0.01);\n\n// Hello {arg 1 (\"x\")} is {arg 2 (0.01) with precision specified in arg 0 (5)}\nprintln!(\"Hello {1} is {2:.0$}\", 5, \"x\", 0.01);\n\n// Hello {arg 0 (\"x\")} is {arg 2 (0.01) with precision specified in arg 1 (5)}\nprintln!(\"Hello {0} is {2:.1$}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {second of next two args (0.01) with precision\n// specified in first of next two args (5)}\nprintln!(\"Hello {} is {:.*}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {arg 2 (0.01) with precision\n// specified in its predecessor (5)}\nprintln!(\"Hello {} is {2:.*}\", \"x\", 5, 0.01);\n\n// Hello {next arg (\"x\")} is {arg \"number\" (0.01) with precision specified\n// in arg \"prec\" (5)}\nprintln!(\"Hello {} is {number:.prec$}\", \"x\", prec = 5, number = 0.01);\n```\n\nWhile these:\n\n```rust\nprintln!(\"{}, `{name:.*}` has 3 fractional digits\", \"Hello\", 3, name=1234.56);\nprintln!(\"{}, `{name:.*}` has 3 characters\", \"Hello\", 3, name=\"1234.56\");\nprintln!(\"{}, `{name:>8.*}` has 3 right-aligned characters\", \"Hello\", 3, name=\"1234.56\");\n```\n\nprint three significantly different things:\n\n```text\nHello, `1234.560` has 3 fractional digits\nHello, `123` has 3 characters\nHello, ` 123` has 3 right-aligned characters\n```\n\n## Localization\n\nIn some programming languages, the behavior of string formatting functions\ndepends on the operating system's locale setting. The format functions\nprovided by Rust's standard library do not have any concept of locale and\nwill produce the same results on all systems regardless of user\nconfiguration.\n\nFor example, the following code will always print `1.5` even if the system\nlocale uses a decimal separator other than a dot.\n\n```rust\nprintln!(\"The value is {}\", 1.5);\n```\n\n# Escaping\n\nThe literal characters `{` and `}` may be included in a string by preceding\nthem with the same character. For example, the `{` character is escaped with\n`{{` and the `}` character is escaped with `}}`.\n\n```rust\nassert_eq!(format!(\"Hello {{}}\"), \"Hello {}\");\nassert_eq!(format!(\"{{ Hello\"), \"{ Hello\");\n```\n\n# Syntax\n\nTo summarize, here you can find the full grammar of format strings.\nThe syntax for the formatting language used is drawn from other languages,\nso it should not be too alien. Arguments are formatted with Python-like\nsyntax, meaning that arguments are surrounded by `{}` instead of the C-like\n`%`. The actual grammar for the formatting syntax is:\n\n```text\nformat_string := text [ maybe_format text ] *\nmaybe_format := '{' '{' | '}' '}' | format\nformat := '{' [ argument ] [ ':' format_spec ] '}'\nargument := integer | identifier\n\nformat_spec := [[fill]align][sign]['#']['0'][width]['.' precision]type\nfill := character\nalign := '<' | '^' | '>'\nsign := '+' | '-'\nwidth := count\nprecision := count | '*'\ntype := '' | '?' | 'x?' | 'X?' | identifier\ncount := parameter | integer\nparameter := argument '$'\n```\nIn the above grammar, `text` may not contain any `'{'` or `'}'` characters.\n\n# Formatting traits\n\nWhen requesting that an argument be formatted with a particular type, you\nare actually requesting that an argument ascribes to a particular trait.\nThis allows multiple actual types to be formatted via `{:x}` (like [`i8`] as\nwell as [`isize`]). The current mapping of types to traits is:\n\n* *nothing* ⇒ [`Display`]\n* `?` ⇒ [`Debug`]\n* `x?` ⇒ [`Debug`] with lower-case hexadecimal integers\n* `X?` ⇒ [`Debug`] with upper-case hexadecimal integers\n* `o` ⇒ [`Octal`]\n* `x` ⇒ [`LowerHex`]\n* `X` ⇒ [`UpperHex`]\n* `p` ⇒ [`Pointer`]\n* `b` ⇒ [`Binary`]\n* `e` ⇒ [`LowerExp`]\n* `E` ⇒ [`UpperExp`]\n\nWhat this means is that any type of argument which implements the\n[`fmt::Binary`][`Binary`] trait can then be formatted with `{:b}`. Implementations\nare provided for these traits for a number of primitive types by the\nstandard library as well. If no format is specified (as in `{}` or `{:6}`),\nthen the format trait used is the [`Display`] trait.\n\nWhen implementing a format trait for your own type, you will have to\nimplement a method of the signature:\n\n```rust\nfn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n```\n\nYour type will be passed as `self` by-reference, and then the function\nshould emit output into the `f.buf` stream. It is up to each format trait\nimplementation to correctly adhere to the requested formatting parameters.\nThe values of these parameters will be listed in the fields of the\n[`Formatter`] struct. In order to help with this, the [`Formatter`] struct also\nprovides some helper methods.\n\nAdditionally, the return value of this function is [`fmt::Result`] which is a\ntype alias of [`Result`]`<(), `[`std::fmt::Error`]`>`. Formatting implementations\nshould ensure that they propagate errors from the [`Formatter`] (e.g., when\ncalling [`write!`]). However, they should never return errors spuriously. That\nis, a formatting implementation must and may only return an error if the\npassed-in [`Formatter`] returns an error. This is because, contrary to what\nthe function signature might suggest, string formatting is an infallible\noperation. This function only returns a result because writing to the\nunderlying stream might fail and it must provide a way to propagate the fact\nthat an error has occurred back up the stack.\n\nAn example of implementing the formatting traits would look\nlike:\n\n```rust\nuse std::fmt;\n\n#[derive(Debug)]\nstruct Vector2D {\n x: isize,\n y: isize,\n}\n\nimpl fmt::Display for Vector2D {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n // The `f` value implements the `Write` trait, which is what the\n // write! macro is expecting. Note that this formatting ignores the\n // various flags provided to format strings.\n write!(f, \"({}, {})\", self.x, self.y)\n }\n}\n\n// Different traits allow different forms of output of a type. The meaning\n// of this format is to print the magnitude of a vector.\nimpl fmt::Binary for Vector2D {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n let magnitude = (self.x * self.x + self.y * self.y) as f64;\n let magnitude = magnitude.sqrt();\n\n // Respect the formatting flags by using the helper method\n // `pad_integral` on the Formatter object. See the method\n // documentation for details, and the function `pad` can be used\n // to pad strings.\n let decimals = f.precision().unwrap_or(3);\n let string = format!(\"{:.*}\", decimals, magnitude);\n f.pad_integral(true, \"\", &string)\n }\n}\n\nfn main() {\n let myvector = Vector2D { x: 3, y: 4 };\n\n println!(\"{}\", myvector); // => \"(3, 4)\"\n println!(\"{:?}\", myvector); // => \"Vector2D {x: 3, y:4}\"\n println!(\"{:10.3b}\", myvector); // => \" 5.000\"\n}\n```\n\n### `fmt::Display` vs `fmt::Debug`\n\nThese two formatting traits have distinct purposes:\n\n- [`fmt::Display`][`Display`] implementations assert that the type can be faithfully\n represented as a UTF-8 string at all times. It is **not** expected that\n all types implement the [`Display`] trait.\n- [`fmt::Debug`][`Debug`] implementations should be implemented for **all** public types.\n Output will typically represent the internal state as faithfully as possible.\n The purpose of the [`Debug`] trait is to facilitate debugging Rust code. In\n most cases, using `#[derive(Debug)]` is sufficient and recommended.\n\nSome examples of the output from both traits:\n\n```rust\nassert_eq!(format!(\"{} {:?}\", 3, 4), \"3 4\");\nassert_eq!(format!(\"{} {:?}\", 'a', 'b'), \"a 'b'\");\nassert_eq!(format!(\"{} {:?}\", \"foo\\n\", \"bar\\n\"), \"foo\\n \\\"bar\\\\n\\\"\");\n```\n\n# Related macros\n\nThere are a number of related macros in the [`format!`] family. The ones that\nare currently implemented are:\n\n```rust\nformat! // described above\nwrite! // first argument is a &mut io::Write, the destination\nwriteln! // same as write but appends a newline\nprint! // the format string is printed to the standard output\nprintln! // same as print but appends a newline\neprint! // the format string is printed to the standard error\neprintln! // same as eprint but appends a newline\nformat_args! // described below.\n```\n\n### `write!`\n\nThis and [`writeln!`] are two macros which are used to emit the format string\nto a specified stream. This is used to prevent intermediate allocations of\nformat strings and instead directly write the output. Under the hood, this\nfunction is actually invoking the [`write_fmt`] function defined on the\n[`std::io::Write`] trait. Example usage is:\n\n```rust\nuse std::io::Write;\nlet mut w = Vec::new();\nwrite!(&mut w, \"Hello {}!\", \"world\");\n```\n\n### `print!`\n\nThis and [`println!`] emit their output to stdout. Similarly to the [`write!`]\nmacro, the goal of these macros is to avoid intermediate allocations when\nprinting output. Example usage is:\n\n```rust\nprint!(\"Hello {}!\", \"world\");\nprintln!(\"I have a newline {}\", \"character at the end\");\n```\n### `eprint!`\n\nThe [`eprint!`] and [`eprintln!`] macros are identical to\n[`print!`] and [`println!`], respectively, except they emit their\noutput to stderr.\n\n### `format_args!`\n\nThis is a curious macro used to safely pass around\nan opaque object describing the format string. This object\ndoes not require any heap allocations to create, and it only\nreferences information on the stack. Under the hood, all of\nthe related macros are implemented in terms of this. First\noff, some example usage is:\n\n```rust\nuse std::fmt;\nuse std::io::{self, Write};\n\nlet mut some_writer = io::stdout();\nwrite!(&mut some_writer, \"{}\", format_args!(\"print with a {}\", \"macro\"));\n\nfn my_fmt_fn(args: fmt::Arguments) {\n write!(&mut io::stdout(), \"{}\", args);\n}\nmy_fmt_fn(format_args!(\", or a {} too\", \"function\"));\n```\n\nThe result of the [`format_args!`] macro is a value of type [`fmt::Arguments`].\nThis structure can then be passed to the [`write`] and [`format`] functions\ninside this module in order to process the format string.\nThe goal of this macro is to even further prevent intermediate allocations\nwhen dealing with formatting strings.\n\nFor example, a logging library could use the standard formatting syntax, but\nit would internally pass around this structure until it has been determined\nwhere output should go to.\n\n[`fmt::Result`]: Result\n[`Result`]: core::result::Result\n[`std::fmt::Error`]: Error\n[`write!`]: core::write\n[`write`]: core::write\n[`format!`]: crate::format\n[`to_string`]: crate::string::ToString\n[`writeln!`]: core::writeln\n[`write_fmt`]: ../../std/io/trait.Write.html#method.write_fmt\n[`std::io::Write`]: ../../std/io/trait.Write.html\n[`print!`]: ../../std/macro.print.html\n[`println!`]: ../../std/macro.println.html\n[`eprint!`]: ../../std/macro.eprint.html\n[`eprintln!`]: ../../std/macro.eprintln.html\n[`format_args!`]: core::format_args\n[`fmt::Arguments`]: Arguments\n[`format`]: crate::format" }, insertText = "fmt", insertTextFormat = 2, kind = 9, label = "fmt" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_91", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_91", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_90", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 19, line = 4 }, start = { character = 18, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 19, line = 4 }, start = { character = 18, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" }, { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_88", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_93", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_93", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_93", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_93", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_92", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 20, line = 4 }, start = { character = 19, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_90", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_86", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 19, line = 4 }, start = { character = 19, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 115 } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_95", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_95", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 20, line = 4 }, start = { character = 20, line = 4 } }, rangeLength = 0, text = ":" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 116 } }}
[DEBUG][2021-12-06 23:31:14] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 21, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 19, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 21, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 19, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_95", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_95", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_94", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 21, line = 4 }, start = { character = 20, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 21, line = 4 }, start = { character = 20, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" }, { code = "", message = "expected type, found `)`\n\nexpected type", range = { end = { character = 22, line = 4 }, start = { character = 21, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 22, line = 4 }, start = { character = 21, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected type" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_97", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_97", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_97", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_97", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_96", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected type, found `)`\n\nexpected type", range = { end = { character = 22, line = 4 }, start = { character = 21, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 22, line = 4 }, start = { character = 21, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected type" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_94", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 21, line = 4 }, start = { character = 21, line = 4 } }, rangeLength = 0, text = ":" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 117 } }}
[DEBUG][2021-12-06 23:31:14] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 22, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 20, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 22, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_99", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_99", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_99", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_99", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_98", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected identifier, found `)`\n\nexpected identifier", range = { end = { character = 23, line = 4 }, start = { character = 22, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 23, line = 4 }, start = { character = 22, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected identifier" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_96", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 20, jsonrpc = "2.0", result = { { detail = "pub enum Alignment {", documentation = { kind = "markdown", value = "Possible alignments returned by `Formatter::align`" }, insertText = "Alignment", insertTextFormat = 2, kind = 13, label = "Alignment" }, { detail = "pub struct ArgumentV1<'a>", documentation = { kind = "markdown", value = 'This struct represents the generic "argument" which is taken by the Xprintf\nfamily of functions. It contains a function to format the given value. At\ncompile time it is ensured that the function and the value have the correct\ntypes, and then this struct is used to canonicalize arguments to one type.' }, insertText = "ArgumentV1", insertTextFormat = 2, kind = 22, label = "ArgumentV1" }, { detail = "pub struct Arguments<'a>", documentation = { kind = "markdown", value = "This structure represents a safely precompiled version of a format string\nand its arguments. This cannot be generated at runtime because it cannot\nsafely be done, so no constructors are given and the fields are private\nto prevent modification.\n\nThe [`format_args!`] macro will safely create an instance of this structure.\nThe macro validates the format string at compile-time so usage of the\n[`write()`] and [`format()`] functions can be safely performed.\n\nYou can use the `Arguments<'a>` that [`format_args!`] returns in `Debug`\nand `Display` contexts as seen below. The example also shows that `Debug`\nand `Display` format to the same thing: the interpolated format string\nin `format_args!`.\n\n```rust\nlet debug = format!(\"{:?}\", format_args!(\"{} foo {:?}\", 1, 2));\nlet display = format!(\"{}\", format_args!(\"{} foo {:?}\", 1, 2));\nassert_eq!(\"1 foo 2\", display);\nassert_eq!(display, debug);\n```\n\n[`format()`]: ../../std/fmt/fn.format.html" }, insertText = "Arguments", insertTextFormat = 2, kind = 22, label = "Arguments" }, { detail = "pub trait Binary", documentation = { kind = "markdown", value = "`b` formatting.\n\nThe `Binary` trait should format its output as a number in binary.\n\nFor primitive signed integers ([`i8`] to [`i128`], and [`isize`]),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0b` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with [`i32`]:\n\n```rust\nlet x = 42; // 42 is '101010' in binary\n\nassert_eq!(format!(\"{:b}\", x), \"101010\");\nassert_eq!(format!(\"{:#b}\", x), \"0b101010\");\n\nassert_eq!(format!(\"{:b}\", -16), \"11111111111111111111111111110000\");\n```\n\nImplementing `Binary` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Binary for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::Binary::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(107);\n\nassert_eq!(format!(\"l as binary is: {:b}\", l), \"l as binary is: 1101011\");\n\nassert_eq!(\n format!(\"l as binary is: {:#032b}\", l),\n \"l as binary is: 0b000000000000000000000001101011\"\n);\n```" }, insertText = "Binary", insertTextFormat = 2, kind = 8, label = "Binary" }, { detail = "pub trait Debug", insertText = "Debug", insertTextFormat = 2, kind = 8, label = "Debug" }, { detail = "pub struct DebugList<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted list of items as a part\nof your [`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_list`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<i32>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_list().entries(self.0.iter()).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![10, 11])),\n "[10, 11]",\n);\n```' }, insertText = "DebugList", insertTextFormat = 2, kind = 22, label = "DebugList" }, { detail = "pub struct DebugMap<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted map as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_map`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<(String, i32)>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_map().entries(self.0.iter().map(|&(ref k, ref v)| (k, v))).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![("A".to_string(), 10), ("B".to_string(), 11)])),\n "{\\"A\\": 10, \\"B\\": 11}",\n);\n```' }, insertText = "DebugMap", insertTextFormat = 2, kind = 22, label = "DebugMap" }, { detail = "pub struct DebugSet<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted set of items as a part\nof your [`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_set`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<i32>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_set().entries(self.0.iter()).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![10, 11])),\n "{10, 11}",\n);\n```' }, insertText = "DebugSet", insertTextFormat = 2, kind = 22, label = "DebugSet" }, { detail = "pub struct DebugStruct<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted struct as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_struct`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo {\n bar: i32,\n baz: String,\n}\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_struct("Foo")\n .field("bar", &self.bar)\n .field("baz", &self.baz)\n .finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo { bar: 10, baz: "Hello World".to_string() }),\n "Foo { bar: 10, baz: \\"Hello World\\" }",\n);\n```' }, insertText = "DebugStruct", insertTextFormat = 2, kind = 22, label = "DebugStruct" }, { detail = "pub struct DebugTuple<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted tuple as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_tuple`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(i32, String);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_tuple("Foo")\n .field(&self.0)\n .field(&self.1)\n .finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(10, "Hello World".to_string())),\n "Foo(10, \\"Hello World\\")",\n);\n```' }, insertText = "DebugTuple", insertTextFormat = 2, kind = 22, label = "DebugTuple" }, { detail = "pub trait Display", insertText = "Display", insertTextFormat = 2, kind = 8, label = "Display" }, { detail = "pub struct Error;", documentation = { kind = "markdown", value = 'The error type which is returned from formatting a message into a stream.\n\nThis type does not support transmission of an error other than that an error\noccurred. Any extra information must be arranged to be transmitted through\nsome other means.\n\nAn important thing to remember is that the type `fmt::Error` should not be\nconfused with [`std::io::Error`] or [`std::error::Error`], which you may also\nhave in scope.\n\n[`std::io::Error`]: ../../std/io/struct.Error.html\n[`std::error::Error`]: ../../std/error/trait.Error.html\n\n# Examples\n\n```rust\nuse std::fmt::{self, write};\n\nlet mut output = String::new();\nif let Err(fmt::Error) = write(&mut output, format_args!("Hello {}!", "world")) {\n panic!("An error occurred");\n}\n```' }, insertText = "Error", insertTextFormat = 2, kind = 22, label = "Error" }, { detail = "pub struct Formatter<'a>", documentation = { kind = "markdown", value = "Configuration for formatting.\n\nA `Formatter` represents various options related to formatting. Users do not\nconstruct `Formatter`s directly; a mutable reference to one is passed to\nthe `fmt` method of all formatting traits, like [`Debug`] and [`Display`].\n\nTo interact with a `Formatter`, you'll call various methods to change the\nvarious options related to formatting. For examples, please see the\ndocumentation of the methods defined on `Formatter` below." }, insertText = "Formatter", insertTextFormat = 2, kind = 22, label = "Formatter" }, { detail = "pub trait LowerExp", documentation = { kind = "markdown", value = "`e` formatting.\n\nThe `LowerExp` trait should format its output in scientific notation with a lower-case `e`.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `f64`:\n\n```rust\nlet x = 42.0; // 42.0 is '4.2e1' in scientific notation\n\nassert_eq!(format!(\"{:e}\", x), \"4.2e1\");\n```\n\nImplementing `LowerExp` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::LowerExp for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = f64::from(self.0);\n fmt::LowerExp::fmt(&val, f) // delegate to f64's implementation\n }\n}\n\nlet l = Length(100);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:e}\", l),\n \"l in scientific notation is: 1e2\"\n);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:05e}\", l),\n \"l in scientific notation is: 001e2\"\n);\n```" }, insertText = "LowerExp", insertTextFormat = 2, kind = 8, label = "LowerExp" }, { detail = "pub trait LowerHex", documentation = { kind = "markdown", value = "`x` formatting.\n\nThe `LowerHex` trait should format its output as a number in hexadecimal, with `a` through `f`\nin lower case.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0x` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '2a' in hex\n\nassert_eq!(format!(\"{:x}\", x), \"2a\");\nassert_eq!(format!(\"{:#x}\", x), \"0x2a\");\n\nassert_eq!(format!(\"{:x}\", -16), \"fffffff0\");\n```\n\nImplementing `LowerHex` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::LowerHex for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::LowerHex::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(9);\n\nassert_eq!(format!(\"l as hex is: {:x}\", l), \"l as hex is: 9\");\n\nassert_eq!(format!(\"l as hex is: {:#010x}\", l), \"l as hex is: 0x00000009\");\n```" }, insertText = "LowerHex", insertTextFormat = 2, kind = 8, label = "LowerHex" }, { detail = "pub trait Octal", documentation = { kind = "markdown", value = "`o` formatting.\n\nThe `Octal` trait should format its output as a number in base-8.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0o` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '52' in octal\n\nassert_eq!(format!(\"{:o}\", x), \"52\");\nassert_eq!(format!(\"{:#o}\", x), \"0o52\");\n\nassert_eq!(format!(\"{:o}\", -16), \"37777777760\");\n```\n\nImplementing `Octal` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Octal for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::Octal::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(9);\n\nassert_eq!(format!(\"l as octal is: {:o}\", l), \"l as octal is: 11\");\n\nassert_eq!(format!(\"l as octal is: {:#06o}\", l), \"l as octal is: 0o0011\");\n```" }, insertText = "Octal", insertTextFormat = 2, kind = 8, label = "Octal" }, { detail = "pub trait Pointer", documentation = { kind = "markdown", value = "`p` formatting.\n\nThe `Pointer` trait should format its output as a memory location. This is commonly presented\nas hexadecimal.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `&i32`:\n\n```rust\nlet x = &42;\n\nlet address = format!(\"{:p}\", x); // this produces something like '0x7f06092ac6d0'\n```\n\nImplementing `Pointer` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Pointer for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // use `as` to convert to a `*const T`, which implements Pointer, which we can use\n\n let ptr = self as *const Self;\n fmt::Pointer::fmt(&ptr, f)\n }\n}\n\nlet l = Length(42);\n\nprintln!(\"l is in memory here: {:p}\", l);\n\nlet l_ptr = format!(\"{:018p}\", l);\nassert_eq!(l_ptr.len(), 18);\nassert_eq!(&l_ptr[..2], \"0x\");\n```" }, insertText = "Pointer", insertTextFormat = 2, kind = 8, label = "Pointer" }, { detail = "pub type Result = result::Result<(), Error>;", documentation = { kind = "markdown", value = "The type returned by formatter methods.\n\n# Examples\n\n```rust\nuse std::fmt;\n\n#[derive(Debug)]\nstruct Triangle {\n a: f32,\n b: f32,\n c: f32\n}\n\nimpl fmt::Display for Triangle {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n write!(f, \"({}, {}, {})\", self.a, self.b, self.c)\n }\n}\n\nlet pythagorean_triple = Triangle { a: 3.0, b: 4.0, c: 5.0 };\n\nassert_eq!(format!(\"{}\", pythagorean_triple), \"(3, 4, 5)\");\n```" }, insertText = "Result", insertTextFormat = 2, kind = 8, label = "Result" }, { detail = "pub trait UpperExp", documentation = { kind = "markdown", value = "`E` formatting.\n\nThe `UpperExp` trait should format its output in scientific notation with an upper-case `E`.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `f64`:\n\n```rust\nlet x = 42.0; // 42.0 is '4.2E1' in scientific notation\n\nassert_eq!(format!(\"{:E}\", x), \"4.2E1\");\n```\n\nImplementing `UpperExp` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::UpperExp for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = f64::from(self.0);\n fmt::UpperExp::fmt(&val, f) // delegate to f64's implementation\n }\n}\n\nlet l = Length(100);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:E}\", l),\n \"l in scientific notation is: 1E2\"\n);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:05E}\", l),\n \"l in scientific notation is: 001E2\"\n);\n```" }, insertText = "UpperExp", insertTextFormat = 2, kind = 8, label = "UpperExp" }, { detail = "pub trait UpperHex", documentation = { kind = "markdown", value = "`X` formatting.\n\nThe `UpperHex` trait should format its output as a number in hexadecimal, with `A` through `F`\nin upper case.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0x` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '2A' in hex\n\nassert_eq!(format!(\"{:X}\", x), \"2A\");\nassert_eq!(format!(\"{:#X}\", x), \"0x2A\");\n\nassert_eq!(format!(\"{:X}\", -16), \"FFFFFFF0\");\n```\n\nImplementing `UpperHex` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::UpperHex for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::UpperHex::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(i32::MAX);\n\nassert_eq!(format!(\"l as hex is: {:X}\", l), \"l as hex is: 7FFFFFFF\");\n\nassert_eq!(format!(\"l as hex is: {:#010X}\", l), \"l as hex is: 0x7FFFFFFF\");\n```" }, insertText = "UpperHex", insertTextFormat = 2, kind = 8, label = "UpperHex" }, { detail = "pub trait Write", documentation = { kind = "markdown", value = "A trait for writing or formatting into Unicode-accepting buffers or streams.\n\nThis trait only accepts UTF-8–encoded data and is not [flushable]. If you only\nwant to accept Unicode and you don't need flushing, you should implement this trait;\notherwise you should implement [`std::io::Write`].\n\n[`std::io::Write`]: ../../std/io/trait.Write.html\n[flushable]: ../../std/io/trait.Write.html#tymethod.flush" }, insertText = "Write", insertTextFormat = 2, kind = 8, label = "Write" }, { detail = "pub fn format(args: Arguments<'_>) -> string::String", documentation = { kind = "markdown", value = 'The `format` function takes an [`Arguments`] struct and returns the resulting\nformatted string.\n\nThe [`Arguments`] instance can be created with the [`format_args!`] macro.\n\n# Examples\n\nBasic usage:\n\n```rust\nuse std::fmt;\n\nlet s = fmt::format(format_args!("Hello, {}!", "world"));\nassert_eq!(s, "Hello, world!");\n```\n\nPlease note that using [`format!`] might be preferable.\nExample:\n\n```rust\nlet s = format!("Hello, {}!", "world");\nassert_eq!(s, "Hello, world!");\n```\n\n[`format_args!`]: core::format_args\n[`format!`]: crate::format' }, insertText = "format(${1:args: Arguments<'_>})", insertTextFormat = 2, kind = 3, label = "format" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs", insertText = "rt", insertTextFormat = 2, kind = 9, label = "rt" }, { detail = "pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result", documentation = { kind = "markdown", value = 'The `write` function takes an output stream, and an `Arguments` struct\nthat can be precompiled with the `format_args!` macro.\n\nThe arguments will be formatted according to the specified format string\ninto the output stream provided.\n\n# Examples\n\nBasic usage:\n\n```rust\nuse std::fmt;\n\nlet mut output = String::new();\nfmt::write(&mut output, format_args!("Hello {}!", "world"))\n .expect("Error occurred while trying to write in String");\nassert_eq!(output, "Hello world!");\n```\n\nPlease note that using [`write!`] might be preferable. Example:\n\n```rust\nuse std::fmt::Write;\n\nlet mut output = String::new();\nwrite!(&mut output, "Hello {}!", "world")\n .expect("Error occurred while trying to write in String");\nassert_eq!(output, "Hello world!");\n```\n\n[`write!`]: crate::write!' }, insertText = "write(${1:output: &mut dyn Write}, ${2:args: Arguments<'_>})", insertTextFormat = 2, kind = 3, label = "write" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_92", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 22, line = 4 }, start = { character = 22, line = 4 } }, rangeLength = 0, text = " " }, { range = { end = { character = 23, line = 4 }, start = { character = 23, line = 4 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 24, line = 4 }, start = { character = 24, line = 4 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 120 } }}
[DEBUG][2021-12-06 23:31:14] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 25, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 21, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 25, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_101", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_101", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:14] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 21, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_101", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_101", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_100", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 25, line = 4 }, start = { character = 25, line = 4 } }, rangeLength = 0, text = "s" }, { range = { end = { character = 26, line = 4 }, start = { character = 26, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 122 } }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_103", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_103", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_103", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_103", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_102", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 28, line = 4 }, start = { character = 27, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 28, line = 4 }, start = { character = 27, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_100", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_98", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 27, line = 4 }, start = { character = 26, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 124 } }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_105", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_105", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_105", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_105", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_104", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 25, line = 4 }, start = { character = 24, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 125 } }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_107", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_107", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_107", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_107", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_106", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 25, line = 4 }, start = { character = 24, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 25, line = 4 }, start = { character = 24, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_104", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 24, line = 4 }, start = { character = 23, line = 4 } }, rangeLength = 1, text = "" }, { range = { end = { character = 23, line = 4 }, start = { character = 22, line = 4 } }, rangeLength = 1, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 127 } }}
[DEBUG][2021-12-06 23:31:15] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 22, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 22, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerCharacter = ":", triggerKind = 2 }, position = { character = 22, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_109", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_109", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_109", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_109", title = "Building" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_108", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected identifier, found `)`\n\nexpected identifier", range = { end = { character = 23, line = 4 }, start = { character = 22, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 23, line = 4 }, start = { character = 22, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected identifier" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_106", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 22, jsonrpc = "2.0", result = { { detail = "pub enum Alignment {", documentation = { kind = "markdown", value = "Possible alignments returned by `Formatter::align`" }, insertText = "Alignment", insertTextFormat = 2, kind = 13, label = "Alignment" }, { detail = "pub struct ArgumentV1<'a>", documentation = { kind = "markdown", value = 'This struct represents the generic "argument" which is taken by the Xprintf\nfamily of functions. It contains a function to format the given value. At\ncompile time it is ensured that the function and the value have the correct\ntypes, and then this struct is used to canonicalize arguments to one type.' }, insertText = "ArgumentV1", insertTextFormat = 2, kind = 22, label = "ArgumentV1" }, { detail = "pub struct Arguments<'a>", documentation = { kind = "markdown", value = "This structure represents a safely precompiled version of a format string\nand its arguments. This cannot be generated at runtime because it cannot\nsafely be done, so no constructors are given and the fields are private\nto prevent modification.\n\nThe [`format_args!`] macro will safely create an instance of this structure.\nThe macro validates the format string at compile-time so usage of the\n[`write()`] and [`format()`] functions can be safely performed.\n\nYou can use the `Arguments<'a>` that [`format_args!`] returns in `Debug`\nand `Display` contexts as seen below. The example also shows that `Debug`\nand `Display` format to the same thing: the interpolated format string\nin `format_args!`.\n\n```rust\nlet debug = format!(\"{:?}\", format_args!(\"{} foo {:?}\", 1, 2));\nlet display = format!(\"{}\", format_args!(\"{} foo {:?}\", 1, 2));\nassert_eq!(\"1 foo 2\", display);\nassert_eq!(display, debug);\n```\n\n[`format()`]: ../../std/fmt/fn.format.html" }, insertText = "Arguments", insertTextFormat = 2, kind = 22, label = "Arguments" }, { detail = "pub trait Binary", documentation = { kind = "markdown", value = "`b` formatting.\n\nThe `Binary` trait should format its output as a number in binary.\n\nFor primitive signed integers ([`i8`] to [`i128`], and [`isize`]),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0b` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with [`i32`]:\n\n```rust\nlet x = 42; // 42 is '101010' in binary\n\nassert_eq!(format!(\"{:b}\", x), \"101010\");\nassert_eq!(format!(\"{:#b}\", x), \"0b101010\");\n\nassert_eq!(format!(\"{:b}\", -16), \"11111111111111111111111111110000\");\n```\n\nImplementing `Binary` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Binary for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::Binary::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(107);\n\nassert_eq!(format!(\"l as binary is: {:b}\", l), \"l as binary is: 1101011\");\n\nassert_eq!(\n format!(\"l as binary is: {:#032b}\", l),\n \"l as binary is: 0b000000000000000000000001101011\"\n);\n```" }, insertText = "Binary", insertTextFormat = 2, kind = 8, label = "Binary" }, { detail = "pub trait Debug", insertText = "Debug", insertTextFormat = 2, kind = 8, label = "Debug" }, { detail = "pub struct DebugList<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted list of items as a part\nof your [`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_list`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<i32>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_list().entries(self.0.iter()).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![10, 11])),\n "[10, 11]",\n);\n```' }, insertText = "DebugList", insertTextFormat = 2, kind = 22, label = "DebugList" }, { detail = "pub struct DebugMap<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted map as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_map`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<(String, i32)>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_map().entries(self.0.iter().map(|&(ref k, ref v)| (k, v))).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![("A".to_string(), 10), ("B".to_string(), 11)])),\n "{\\"A\\": 10, \\"B\\": 11}",\n);\n```' }, insertText = "DebugMap", insertTextFormat = 2, kind = 22, label = "DebugMap" }, { detail = "pub struct DebugSet<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted set of items as a part\nof your [`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_set`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(Vec<i32>);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_set().entries(self.0.iter()).finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(vec![10, 11])),\n "{10, 11}",\n);\n```' }, insertText = "DebugSet", insertTextFormat = 2, kind = 22, label = "DebugSet" }, { detail = "pub struct DebugStruct<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted struct as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_struct`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo {\n bar: i32,\n baz: String,\n}\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_struct("Foo")\n .field("bar", &self.bar)\n .field("baz", &self.baz)\n .finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo { bar: 10, baz: "Hello World".to_string() }),\n "Foo { bar: 10, baz: \\"Hello World\\" }",\n);\n```' }, insertText = "DebugStruct", insertTextFormat = 2, kind = 22, label = "DebugStruct" }, { detail = "pub struct DebugTuple<'a, 'b: 'a>", documentation = { kind = "markdown", value = 'A struct to help with [`fmt::Debug`](Debug) implementations.\n\nThis is useful when you wish to output a formatted tuple as a part of your\n[`Debug::fmt`] implementation.\n\nThis can be constructed by the [`Formatter::debug_tuple`] method.\n\n# Examples\n\n```rust\nuse std::fmt;\n\nstruct Foo(i32, String);\n\nimpl fmt::Debug for Foo {\n fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n fmt.debug_tuple("Foo")\n .field(&self.0)\n .field(&self.1)\n .finish()\n }\n}\n\nassert_eq!(\n format!("{:?}", Foo(10, "Hello World".to_string())),\n "Foo(10, \\"Hello World\\")",\n);\n```' }, insertText = "DebugTuple", insertTextFormat = 2, kind = 22, label = "DebugTuple" }, { detail = "pub trait Display", insertText = "Display", insertTextFormat = 2, kind = 8, label = "Display" }, { detail = "pub struct Error;", documentation = { kind = "markdown", value = 'The error type which is returned from formatting a message into a stream.\n\nThis type does not support transmission of an error other than that an error\noccurred. Any extra information must be arranged to be transmitted through\nsome other means.\n\nAn important thing to remember is that the type `fmt::Error` should not be\nconfused with [`std::io::Error`] or [`std::error::Error`], which you may also\nhave in scope.\n\n[`std::io::Error`]: ../../std/io/struct.Error.html\n[`std::error::Error`]: ../../std/error/trait.Error.html\n\n# Examples\n\n```rust\nuse std::fmt::{self, write};\n\nlet mut output = String::new();\nif let Err(fmt::Error) = write(&mut output, format_args!("Hello {}!", "world")) {\n panic!("An error occurred");\n}\n```' }, insertText = "Error", insertTextFormat = 2, kind = 22, label = "Error" }, { detail = "pub struct Formatter<'a>", documentation = { kind = "markdown", value = "Configuration for formatting.\n\nA `Formatter` represents various options related to formatting. Users do not\nconstruct `Formatter`s directly; a mutable reference to one is passed to\nthe `fmt` method of all formatting traits, like [`Debug`] and [`Display`].\n\nTo interact with a `Formatter`, you'll call various methods to change the\nvarious options related to formatting. For examples, please see the\ndocumentation of the methods defined on `Formatter` below." }, insertText = "Formatter", insertTextFormat = 2, kind = 22, label = "Formatter" }, { detail = "pub trait LowerExp", documentation = { kind = "markdown", value = "`e` formatting.\n\nThe `LowerExp` trait should format its output in scientific notation with a lower-case `e`.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `f64`:\n\n```rust\nlet x = 42.0; // 42.0 is '4.2e1' in scientific notation\n\nassert_eq!(format!(\"{:e}\", x), \"4.2e1\");\n```\n\nImplementing `LowerExp` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::LowerExp for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = f64::from(self.0);\n fmt::LowerExp::fmt(&val, f) // delegate to f64's implementation\n }\n}\n\nlet l = Length(100);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:e}\", l),\n \"l in scientific notation is: 1e2\"\n);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:05e}\", l),\n \"l in scientific notation is: 001e2\"\n);\n```" }, insertText = "LowerExp", insertTextFormat = 2, kind = 8, label = "LowerExp" }, { detail = "pub trait LowerHex", documentation = { kind = "markdown", value = "`x` formatting.\n\nThe `LowerHex` trait should format its output as a number in hexadecimal, with `a` through `f`\nin lower case.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0x` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '2a' in hex\n\nassert_eq!(format!(\"{:x}\", x), \"2a\");\nassert_eq!(format!(\"{:#x}\", x), \"0x2a\");\n\nassert_eq!(format!(\"{:x}\", -16), \"fffffff0\");\n```\n\nImplementing `LowerHex` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::LowerHex for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::LowerHex::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(9);\n\nassert_eq!(format!(\"l as hex is: {:x}\", l), \"l as hex is: 9\");\n\nassert_eq!(format!(\"l as hex is: {:#010x}\", l), \"l as hex is: 0x00000009\");\n```" }, insertText = "LowerHex", insertTextFormat = 2, kind = 8, label = "LowerHex" }, { detail = "pub trait Octal", documentation = { kind = "markdown", value = "`o` formatting.\n\nThe `Octal` trait should format its output as a number in base-8.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0o` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '52' in octal\n\nassert_eq!(format!(\"{:o}\", x), \"52\");\nassert_eq!(format!(\"{:#o}\", x), \"0o52\");\n\nassert_eq!(format!(\"{:o}\", -16), \"37777777760\");\n```\n\nImplementing `Octal` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Octal for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::Octal::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(9);\n\nassert_eq!(format!(\"l as octal is: {:o}\", l), \"l as octal is: 11\");\n\nassert_eq!(format!(\"l as octal is: {:#06o}\", l), \"l as octal is: 0o0011\");\n```" }, insertText = "Octal", insertTextFormat = 2, kind = 8, label = "Octal" }, { detail = "pub trait Pointer", documentation = { kind = "markdown", value = "`p` formatting.\n\nThe `Pointer` trait should format its output as a memory location. This is commonly presented\nas hexadecimal.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `&i32`:\n\n```rust\nlet x = &42;\n\nlet address = format!(\"{:p}\", x); // this produces something like '0x7f06092ac6d0'\n```\n\nImplementing `Pointer` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::Pointer for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n // use `as` to convert to a `*const T`, which implements Pointer, which we can use\n\n let ptr = self as *const Self;\n fmt::Pointer::fmt(&ptr, f)\n }\n}\n\nlet l = Length(42);\n\nprintln!(\"l is in memory here: {:p}\", l);\n\nlet l_ptr = format!(\"{:018p}\", l);\nassert_eq!(l_ptr.len(), 18);\nassert_eq!(&l_ptr[..2], \"0x\");\n```" }, insertText = "Pointer", insertTextFormat = 2, kind = 8, label = "Pointer" }, { detail = "pub type Result = result::Result<(), Error>;", documentation = { kind = "markdown", value = "The type returned by formatter methods.\n\n# Examples\n\n```rust\nuse std::fmt;\n\n#[derive(Debug)]\nstruct Triangle {\n a: f32,\n b: f32,\n c: f32\n}\n\nimpl fmt::Display for Triangle {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n write!(f, \"({}, {}, {})\", self.a, self.b, self.c)\n }\n}\n\nlet pythagorean_triple = Triangle { a: 3.0, b: 4.0, c: 5.0 };\n\nassert_eq!(format!(\"{}\", pythagorean_triple), \"(3, 4, 5)\");\n```" }, insertText = "Result", insertTextFormat = 2, kind = 8, label = "Result" }, { detail = "pub trait UpperExp", documentation = { kind = "markdown", value = "`E` formatting.\n\nThe `UpperExp` trait should format its output in scientific notation with an upper-case `E`.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `f64`:\n\n```rust\nlet x = 42.0; // 42.0 is '4.2E1' in scientific notation\n\nassert_eq!(format!(\"{:E}\", x), \"4.2E1\");\n```\n\nImplementing `UpperExp` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::UpperExp for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = f64::from(self.0);\n fmt::UpperExp::fmt(&val, f) // delegate to f64's implementation\n }\n}\n\nlet l = Length(100);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:E}\", l),\n \"l in scientific notation is: 1E2\"\n);\n\nassert_eq!(\n format!(\"l in scientific notation is: {:05E}\", l),\n \"l in scientific notation is: 001E2\"\n);\n```" }, insertText = "UpperExp", insertTextFormat = 2, kind = 8, label = "UpperExp" }, { detail = "pub trait UpperHex", documentation = { kind = "markdown", value = "`X` formatting.\n\nThe `UpperHex` trait should format its output as a number in hexadecimal, with `A` through `F`\nin upper case.\n\nFor primitive signed integers (`i8` to `i128`, and `isize`),\nnegative values are formatted as the two’s complement representation.\n\nThe alternate flag, `#`, adds a `0x` in front of the output.\n\nFor more information on formatters, see [the module-level documentation][module].\n\n[module]: ../../std/fmt/index.html\n\n# Examples\n\nBasic usage with `i32`:\n\n```rust\nlet x = 42; // 42 is '2A' in hex\n\nassert_eq!(format!(\"{:X}\", x), \"2A\");\nassert_eq!(format!(\"{:#X}\", x), \"0x2A\");\n\nassert_eq!(format!(\"{:X}\", -16), \"FFFFFFF0\");\n```\n\nImplementing `UpperHex` on a type:\n\n```rust\nuse std::fmt;\n\nstruct Length(i32);\n\nimpl fmt::UpperHex for Length {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n let val = self.0;\n\n fmt::UpperHex::fmt(&val, f) // delegate to i32's implementation\n }\n}\n\nlet l = Length(i32::MAX);\n\nassert_eq!(format!(\"l as hex is: {:X}\", l), \"l as hex is: 7FFFFFFF\");\n\nassert_eq!(format!(\"l as hex is: {:#010X}\", l), \"l as hex is: 0x7FFFFFFF\");\n```" }, insertText = "UpperHex", insertTextFormat = 2, kind = 8, label = "UpperHex" }, { detail = "pub trait Write", documentation = { kind = "markdown", value = "A trait for writing or formatting into Unicode-accepting buffers or streams.\n\nThis trait only accepts UTF-8–encoded data and is not [flushable]. If you only\nwant to accept Unicode and you don't need flushing, you should implement this trait;\notherwise you should implement [`std::io::Write`].\n\n[`std::io::Write`]: ../../std/io/trait.Write.html\n[flushable]: ../../std/io/trait.Write.html#tymethod.flush" }, insertText = "Write", insertTextFormat = 2, kind = 8, label = "Write" }, { detail = "pub fn format(args: Arguments<'_>) -> string::String", documentation = { kind = "markdown", value = 'The `format` function takes an [`Arguments`] struct and returns the resulting\nformatted string.\n\nThe [`Arguments`] instance can be created with the [`format_args!`] macro.\n\n# Examples\n\nBasic usage:\n\n```rust\nuse std::fmt;\n\nlet s = fmt::format(format_args!("Hello, {}!", "world"));\nassert_eq!(s, "Hello, world!");\n```\n\nPlease note that using [`format!`] might be preferable.\nExample:\n\n```rust\nlet s = format!("Hello, {}!", "world");\nassert_eq!(s, "Hello, world!");\n```\n\n[`format_args!`]: core::format_args\n[`format!`]: crate::format' }, insertText = "format(${1:args: Arguments<'_>})", insertTextFormat = 2, kind = 3, label = "format" }, { detail = "/home/nachiket/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs", insertText = "rt", insertTextFormat = 2, kind = 9, label = "rt" }, { detail = "pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result", documentation = { kind = "markdown", value = 'The `write` function takes an output stream, and an `Arguments` struct\nthat can be precompiled with the `format_args!` macro.\n\nThe arguments will be formatted according to the specified format string\ninto the output stream provided.\n\n# Examples\n\nBasic usage:\n\n```rust\nuse std::fmt;\n\nlet mut output = String::new();\nfmt::write(&mut output, format_args!("Hello {}!", "world"))\n .expect("Error occurred while trying to write in String");\nassert_eq!(output, "Hello world!");\n```\n\nPlease note that using [`write!`] might be preferable. Example:\n\n```rust\nuse std::fmt::Write;\n\nlet mut output = String::new();\nwrite!(&mut output, "Hello {}!", "world")\n .expect("Error occurred while trying to write in String");\nassert_eq!(output, "Hello world!");\n```\n\n[`write!`]: crate::write!' }, insertText = "write(${1:output: &mut dyn Write}, ${2:args: Arguments<'_>})", insertTextFormat = 2, kind = 3, label = "write" } }}
[DEBUG][2021-12-06 23:31:15] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_102", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 22, line = 4 }, start = { character = 22, line = 4 } }, rangeLength = 0, text = "t" }, { range = { end = { character = 23, line = 4 }, start = { character = 23, line = 4 } }, rangeLength = 0, text = "e" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 129 } }}
[DEBUG][2021-12-06 23:31:16] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 24, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 23, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 24, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_111", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_111", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 23, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_111", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_111", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_110", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 25, line = 4 }, start = { character = 24, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 25, line = 4 }, start = { character = 24, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 24, line = 4 }, start = { character = 24, line = 4 } }, rangeLength = 0, text = "s" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 130 } }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_113", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_113", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_113", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_113", title = "Building" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_112", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 26, line = 4 }, start = { character = 25, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_110", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:16] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_108", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:17] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didSave", params = { textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:17] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_112", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 25, line = 4 }, start = { character = 25, line = 4 } }, rangeLength = 0, text = "t" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 132 } }}
[DEBUG][2021-12-06 23:31:18] .../lua/vim/lsp.lua:955 "LSP[rls]" "client.request" 1 "textDocument/completion" { context = { triggerKind = 1 }, position = { character = 26, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }} <function 1> 1
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 24, jsonrpc = "2.0", method = "textDocument/completion", params = { context = { triggerKind = 1 }, position = { character = 26, line = 4 }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_115", title = "Building" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_115", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 24, jsonrpc = "2.0", result = {}}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_115", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_115", title = "Building" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_114", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = { { code = "", message = "expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`\n\nexpected one of 9 possible tokens\n\nnote: anonymous parameters are removed in the 2018 edition (see RFC 1685)", range = { end = { character = 27, line = 4 }, start = { character = 26, line = 4 } }, relatedInformation = { { location = { range = { end = { character = 27, line = 4 }, start = { character = 26, line = 4 } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }, message = "expected one of 9 possible tokens" } }, severity = 1, source = "rustc" } }, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:18] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_114", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:19] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didSave", params = { textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:21] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 7 }, start = { character = 0, line = 3 } }, rangeLength = 59, text = "" } }, textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs", version = 134 } }}
[DEBUG][2021-12-06 23:31:21] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_117", title = "Building" }}
[DEBUG][2021-12-06 23:31:21] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_117", message = "hello_world cfg(test)", title = "Building" }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_117", message = "hello_world", title = "Building" }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_117", title = "Building" }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { id = "progress_116", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "textDocument/publishDiagnostics", params = { diagnostics = {}, uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didSave", params = { textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[DEBUG][2021-12-06 23:31:22] .../vim/lsp/rpc.lua:451 "rpc.receive" { jsonrpc = "2.0", method = "window/progress", params = { done = true, id = "progress_116", title = "Indexing" }}
[DEBUG][2021-12-06 23:31:23] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "textDocument/didSave", params = { textDocument = { uri = "file:///home/nachiket/rusty/hello_world/src/main.rs" } }}
[INFO][2021-12-06 23:31:23] .../lua/vim/lsp.lua:1272 "exit_handler" { { _on_attach = <function 1>, attached_buffers = { true }, cancel_request = <function 2>, commands = {}, config = { _on_attach = <function 3>, autostart = true, capabilities = { callHierarchy = { dynamicRegistration = false }, textDocument = { codeAction = { codeActionLiteralSupport = { codeActionKind = { valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } } }, dataSupport = true, dynamicRegistration = false, resolveSupport = { properties = { "edit" } } }, completion = { completionItem = { commitCharactersSupport = true, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, labelDetailsSupport = true, preselectSupport = true, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionItemKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } }, contextSupport = false, dynamicRegistration = false }, declaration = { linkSupport = true }, definition = { linkSupport = true }, documentHighlight = { dynamicRegistration = false }, documentSymbol = { dynamicRegistration = false, hierarchicalDocumentSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, hover = { contentFormat = { "markdown", "plaintext" }, dynamicRegistration = false }, implementation = { linkSupport = true }, publishDiagnostics = { relatedInformation = true, tagSupport = { valueSet = { 1, 2 } } }, references = { dynamicRegistration = false }, rename = { dynamicRegistration = false, prepareSupport = true }, signatureHelp = { dynamicRegistration = false, signatureInformation = { activeParameterSupport = true, documentationFormat = { "markdown", "plaintext" }, parameterInformation = { labelOffsetSupport = true } } }, synchronization = { didSave = true, dynamicRegistration = false, willSave = false, willSaveWaitUntil = false }, typeDefinition = { linkSupport = true } }, window = { showDocument = { support = false }, showMessage = { messageActionItem = { additionalPropertiesSupport = false } }, workDoneProgress = true }, workspace = { applyEdit = true, configuration = true, symbol = { dynamicRegistration = false, hierarchicalWorkspaceSymbolSupport = true, symbolKind = { valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } } }, workspaceEdit = { resourceOperations = { "rename", "create", "delete" } }, workspaceFolders = true } }, cmd = { "rls" }, cmd_cwd = "/home/nachiket/rusty/hello_world", filetypes = { "rust" }, flags = { debounce_text_changes = 150 }, get_language_id = <function 4>, handlers = <1>{}, init_options = vim.empty_dict(), log_level = 2, message_level = 2, name = "rls", on_attach = <function 5>, on_exit = <function 6>, on_init = <function 7>, root_dir = "/home/nachiket/rusty/hello_world", settings = vim.empty_dict(), ts_settings = <function 8>, workspace_folders = <2>{ { name = "/home/nachiket/rusty/hello_world", uri = "file:///home/nachiket/rusty/hello_world" } }, <metatable> = <3>{ __tostring = <function 9> } }, handlers = <table 1>, id = 1, initialized = true, is_stopped = <function 10>, messages = { messages = {}, name = "rls", progress = {}, status = {} }, name = "rls", notify = <function 11>, offset_encoding = "utf-16", request = <function 12>, request_sync = <function 13>, requests = {}, resolved_capabilities = { call_hierarchy = false, code_action = true, code_lens = true, code_lens_resolve = false, completion = true, declaration = false, document_formatting = true, document_highlight = true, document_range_formatting = false, document_symbol = true, execute_command = true, find_references = true, goto_definition = true, hover = true, implementation = true, rename = true, signature_help = false, signature_help_trigger_characters = {}, text_document_did_change = 2, text_document_open_close = true, text_document_save = true, text_document_save_include_text = false, text_document_will_save = false, text_document_will_save_wait_until = false, type_definition = false, workspace_folder_properties = { changeNotifications = false, supported = false }, workspace_symbol = true }, rpc = { handle = <userdata 1>, notify = <function 14>, pid = 241181, request = <function 15> }, server_capabilities = { codeActionProvider = true, codeLensProvider = { resolveProvider = false }, completionProvider = { resolveProvider = true, triggerCharacters = { ".", ":" } }, definitionProvider = true, documentFormattingProvider = true, documentHighlightProvider = true, documentRangeFormattingProvider = false, documentSymbolProvider = true, executeCommandProvider = { commands = { "rls.applySuggestion-241181", "rls.deglobImports-241181" } }, hoverProvider = true, implementationProvider = true, referencesProvider = true, renameProvider = true, textDocumentSync = 2, workspaceSymbolProvider = true }, stop = <function 16>, supports_method = <function 17>, workspaceFolders = <table 2>, workspace_did_change_configuration = <function 18>, workspace_folders = <table 2> } }
[DEBUG][2021-12-06 23:31:23] .../vim/lsp/rpc.lua:344 "rpc.send" { id = 25, jsonrpc = "2.0", method = "shutdown"}
[DEBUG][2021-12-06 23:31:23] .../vim/lsp/rpc.lua:451 "rpc.receive" { id = 25, jsonrpc = "2.0"}
[DEBUG][2021-12-06 23:31:23] .../vim/lsp/rpc.lua:344 "rpc.send" { jsonrpc = "2.0", method = "exit"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment