Support setting cargo features

This commit is contained in:
oxalica 2019-12-13 18:16:34 +08:00
parent 5eb5e80de9
commit af4eb26645
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
8 changed files with 118 additions and 21 deletions

View file

@ -22,7 +22,7 @@ fn vfs_root_to_id(r: ra_vfs::VfsRoot) -> SourceRootId {
pub fn load_cargo(root: &Path) -> Result<(AnalysisHost, FxHashMap<SourceRootId, PackageRoot>)> {
let root = std::env::current_dir()?.join(root);
let ws = ProjectWorkspace::discover(root.as_ref())?;
let ws = ProjectWorkspace::discover(root.as_ref(), &Default::default())?;
let project_roots = ws.to_roots();
let (sender, receiver) = unbounded();
let sender = Box::new(move |t| sender.send(t).unwrap());