File tree 2 files changed +6
-1
lines changed
crates/rust-analyzer/src/lsp
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
//! rust-analyzer extensions to the LSP.
2
2
3
+ // Note when adding new resolve payloads, add a #[serde(default)] on boolean fields as some clients
4
+ // might strip `false` values from the JSON payload due to their reserialization logic turning false
5
+ // into null which will then cause them to be omitted in the resolve request. See https://github.com/rust-lang/rust-analyzer/issues/18767
6
+
3
7
#![ allow( clippy:: disallowed_types) ]
4
8
5
9
use std:: ops;
@@ -829,6 +833,7 @@ pub struct CompletionResolveData {
829
833
pub version : Option < i32 > ,
830
834
#[ serde( skip_serializing_if = "Option::is_none" , default ) ]
831
835
pub trigger_character : Option < char > ,
836
+ #[ serde( default ) ]
832
837
pub for_ref : bool ,
833
838
pub hash : String ,
834
839
}
Original file line number Diff line number Diff line change 1
1
<!-- -
2
- lsp/ext.rs hash: 512c06cd8b46a21d
2
+ lsp/ext.rs hash: 6dd762ae19630ec0
3
3
4
4
If you need to change the above hash to make the test pass, please check if you
5
5
need to adjust this doc as well and ping this issue:
You can’t perform that action at this time.
0 commit comments