mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Support setting cargo features
This commit is contained in:
parent
5eb5e80de9
commit
af4eb26645
8 changed files with 118 additions and 21 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue