mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: make it clearer where IO happens
This commit is contained in:
parent
398ae3e67f
commit
8f3335f5fb
5 changed files with 47 additions and 25 deletions
|
@ -156,7 +156,7 @@ impl ChangeFixture {
|
|||
let crate_root = default_crate_root.unwrap();
|
||||
crate_graph.add_crate_root(
|
||||
crate_root,
|
||||
Edition::Edition2018,
|
||||
Edition::CURRENT,
|
||||
Some(CrateName::new("test").unwrap().into()),
|
||||
default_cfg.clone(),
|
||||
default_cfg,
|
||||
|
@ -227,10 +227,7 @@ impl From<Fixture> for FileMeta {
|
|||
krate: f.krate,
|
||||
deps: f.deps,
|
||||
cfg,
|
||||
edition: f
|
||||
.edition
|
||||
.as_ref()
|
||||
.map_or(Edition::Edition2018, |v| Edition::from_str(v).unwrap()),
|
||||
edition: f.edition.as_ref().map_or(Edition::CURRENT, |v| Edition::from_str(v).unwrap()),
|
||||
env: f.env.into_iter().collect(),
|
||||
introduce_new_source_root: f.introduce_new_source_root,
|
||||
}
|
||||
|
|
|
@ -195,6 +195,10 @@ pub enum Edition {
|
|||
Edition2021,
|
||||
}
|
||||
|
||||
impl Edition {
|
||||
pub const CURRENT: Edition = Edition::Edition2018;
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Env {
|
||||
entries: FxHashMap<String, String>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue