File tree 3 files changed +14
-2
lines changed
rust-analyzer/tests/slow-tests
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ impl ProjectManifest {
68
68
if path. file_name ( ) . unwrap_or_default ( ) == "rust-project.json" {
69
69
return Ok ( ProjectManifest :: ProjectJson ( path) ) ;
70
70
}
71
+ if path. file_name ( ) . unwrap_or_default ( ) == ".rust-project.json" {
72
+ return Ok ( ProjectManifest :: ProjectJson ( path) ) ;
73
+ }
71
74
if path. file_name ( ) . unwrap_or_default ( ) == "Cargo.toml" {
72
75
return Ok ( ProjectManifest :: CargoToml ( path) ) ;
73
76
}
@@ -94,6 +97,9 @@ impl ProjectManifest {
94
97
if let Some ( project_json) = find_in_parent_dirs ( path, "rust-project.json" ) {
95
98
return Ok ( vec ! [ ProjectManifest :: ProjectJson ( project_json) ] ) ;
96
99
}
100
+ if let Some ( project_json) = find_in_parent_dirs ( path, ".rust-project.json" ) {
101
+ return Ok ( vec ! [ ProjectManifest :: ProjectJson ( project_json) ] ) ;
102
+ }
97
103
return find_cargo_toml ( path)
98
104
. map ( |paths| paths. into_iter ( ) . map ( ProjectManifest :: CargoToml ) . collect ( ) ) ;
99
105
Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ fn test_missing_module_code_action_in_json_project() {
750
750
751
751
let code = format ! (
752
752
r#"
753
- //- /rust-project.json
753
+ //- /. rust-project.json
754
754
{project}
755
755
756
756
//- /src/lib.rs
Original file line number Diff line number Diff line change 71
71
" workspaceContains:Cargo.toml" ,
72
72
" workspaceContains:*/Cargo.toml" ,
73
73
" workspaceContains:rust-project.json" ,
74
- " workspaceContains:*/rust-project.json"
74
+ " workspaceContains:*/rust-project.json" ,
75
+ " workspaceContains:.rust-project.json" ,
76
+ " workspaceContains:*/.rust-project.json"
75
77
],
76
78
"main" : " ./out/main" ,
77
79
"contributes" : {
3211
3213
{
3212
3214
"fileMatch" : " rust-project.json" ,
3213
3215
"url" : " https://json.schemastore.org/rust-project.json"
3216
+ },
3217
+ {
3218
+ "fileMatch" : " .rust-project.json" ,
3219
+ "url" : " https://json.schemastore.org/rust-project.json"
3214
3220
}
3215
3221
],
3216
3222
"walkthroughs" : [
You can’t perform that action at this time.
0 commit comments