aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-15 16:03:31 +0100
committerGitHub <[email protected]>2020-06-15 16:03:31 +0100
commitf4f51171ca6d99b693df2ef6fb71f0347999aa9f (patch)
treeb7dcce2438c520dc30cd90b9290e3419054ef55b /crates/rust-analyzer/src/main_loop.rs
parent5b013e5665a34fd757fd6c48dc912606c0915b2c (diff)
parent44f28f65af15371cfe35e3599571e7217d6a9db1 (diff)
Merge #4860
4860: Accept relative paths in rust-project.json r=matklad a=tweksteen If a relative path is found as part of Crate.root_module or Root.path, interpret it as relative to the location of the rust-project.json file. Fixes: #4816 Co-authored-by: ThiĆ©baud Weksteen <[email protected]>
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r--crates/rust-analyzer/src/main_loop.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 8ec571b70..cc9bb1726 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -121,7 +121,12 @@ pub fn main_loop(config: Config, connection: Connection) -> Result<()> {
121 }) 121 })
122 .ok() 122 .ok()
123 } 123 }
124 LinkedProject::JsonProject(it) => Some(it.clone().into()), 124 LinkedProject::InlineJsonProject(it) => {
125 Some(ra_project_model::ProjectWorkspace::Json {
126 project: it.clone(),
127 project_location: config.root_path.clone(),
128 })
129 }
125 }) 130 })
126 .collect::<Vec<_>>() 131 .collect::<Vec<_>>()
127 }; 132 };