mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Propogate fixture meta to AnalysisHost
Except crate name.
This commit is contained in:
parent
2dde9b1994
commit
2c00bd8c6a
5 changed files with 113 additions and 16 deletions
|
@ -254,20 +254,14 @@ impl From<&FixtureMeta> for ParsedMeta {
|
|||
}
|
||||
FixtureMeta::File(f) => Self::File(FileMeta {
|
||||
path: f.path.to_owned().into(),
|
||||
krate: f.krate.to_owned().into(),
|
||||
krate: f.crate_name.to_owned().into(),
|
||||
deps: f.deps.to_owned(),
|
||||
cfg: f.cfg.to_owned(),
|
||||
edition: f
|
||||
.edition
|
||||
.as_ref()
|
||||
.map_or(Edition::Edition2018, |v| Edition::from_str(&v).unwrap()),
|
||||
env: {
|
||||
let mut env = Env::default();
|
||||
for (k, v) in &f.env {
|
||||
env.set(&k, v.to_owned());
|
||||
}
|
||||
env
|
||||
},
|
||||
env: Env::from(f.env.iter()),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue