mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 23:27:24 +00:00
Use FixtureMeta in MockAnalysis
This commit is contained in:
parent
256fb7556e
commit
2dde9b1994
2 changed files with 85 additions and 17 deletions
|
@ -176,7 +176,7 @@ pub struct FileMeta {
|
|||
pub path: RelativePathBuf,
|
||||
pub krate: Option<String>,
|
||||
pub deps: Vec<String>,
|
||||
pub cfg: ra_cfg::CfgOptions,
|
||||
pub cfg: CfgOptions,
|
||||
pub edition: Option<String>,
|
||||
pub env: FxHashMap<String, String>,
|
||||
}
|
||||
|
@ -188,6 +188,13 @@ impl FixtureMeta {
|
|||
FixtureMeta::File(f) => &f.path,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn cfg_options(&self) -> Option<&CfgOptions> {
|
||||
match self {
|
||||
FixtureMeta::File(f) => Some(&f.cfg),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses text which looks like this:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue