This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -921,10 +921,10 @@ impl Config {
921921 tracing:: info!( "updating config from JSON: {:#}" , json) ;
922922
923923 if !( json. is_null ( ) || json. as_object ( ) . is_some_and ( |it| it. is_empty ( ) ) ) {
924- let mut json_errors = vec ! [ ] ;
925924 let detached_files = get_field_json :: < Vec < Utf8PathBuf > > (
926925 & mut json,
927- & mut json_errors,
926+ // Do not record errors here; it is not an error if a field is missing here.
927+ & mut Vec :: new ( ) ,
928928 "detachedFiles" ,
929929 None ,
930930 )
@@ -935,15 +935,16 @@ impl Config {
935935
936936 patch_old_style:: patch_json_for_outdated_configs ( & mut json) ;
937937
938- let mut json_errors = vec ! [ ] ;
939938 let snips = get_field_json :: < FxIndexMap < String , SnippetDef > > (
940939 & mut json,
941- & mut json_errors,
940+ // Do not record errors here; it is not an error if a field is missing here.
941+ & mut Vec :: new ( ) ,
942942 "completion_snippets_custom" ,
943943 None ,
944944 )
945945 . unwrap_or ( self . completion_snippets_custom ( ) . to_owned ( ) ) ;
946946
947+ let mut json_errors = vec ! [ ] ;
947948 // IMPORTANT : This holds as long as ` completion_snippets_custom` is declared `client`.
948949 config. snippets . clear ( ) ;
949950
You can’t perform that action at this time.
0 commit comments