File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
rust-analyzer/tests/slow-tests Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ impl ProjectManifest {
6868 if path. file_name ( ) . unwrap_or_default ( ) == "rust-project.json" {
6969 return Ok ( ProjectManifest :: ProjectJson ( path) ) ;
7070 }
71+ if path. file_name ( ) . unwrap_or_default ( ) == ".rust-project.json" {
72+ return Ok ( ProjectManifest :: ProjectJson ( path) ) ;
73+ }
7174 if path. file_name ( ) . unwrap_or_default ( ) == "Cargo.toml" {
7275 return Ok ( ProjectManifest :: CargoToml ( path) ) ;
7376 }
@@ -94,6 +97,9 @@ impl ProjectManifest {
9497 if let Some ( project_json) = find_in_parent_dirs ( path, "rust-project.json" ) {
9598 return Ok ( vec ! [ ProjectManifest :: ProjectJson ( project_json) ] ) ;
9699 }
100+ if let Some ( project_json) = find_in_parent_dirs ( path, ".rust-project.json" ) {
101+ return Ok ( vec ! [ ProjectManifest :: ProjectJson ( project_json) ] ) ;
102+ }
97103 return find_cargo_toml ( path)
98104 . map ( |paths| paths. into_iter ( ) . map ( ProjectManifest :: CargoToml ) . collect ( ) ) ;
99105
Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ fn test_missing_module_code_action_in_json_project() {
750750
751751 let code = format ! (
752752 r#"
753- //- /rust-project.json
753+ //- /. rust-project.json
754754{project}
755755
756756//- /src/lib.rs
Original file line number Diff line number Diff line change 7171 " workspaceContains:Cargo.toml" ,
7272 " workspaceContains:*/Cargo.toml" ,
7373 " workspaceContains:rust-project.json" ,
74- " workspaceContains:*/rust-project.json"
74+ " workspaceContains:*/rust-project.json" ,
75+ " workspaceContains:.rust-project.json" ,
76+ " workspaceContains:*/.rust-project.json"
7577 ],
7678 "main" : " ./out/main" ,
7779 "contributes" : {
32113213 {
32123214 "fileMatch" : " rust-project.json" ,
32133215 "url" : " https://json.schemastore.org/rust-project.json"
3216+ },
3217+ {
3218+ "fileMatch" : " .rust-project.json" ,
3219+ "url" : " https://json.schemastore.org/rust-project.json"
32143220 }
32153221 ],
32163222 "walkthroughs" : [
You can’t perform that action at this time.
0 commit comments