diff options
Diffstat (limited to 'crates/test_utils')
-rw-r--r-- | crates/test_utils/src/lib.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 6a8d06ea7..584ca5c39 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -176,7 +176,7 @@ pub struct FileMeta { | |||
176 | pub path: RelativePathBuf, | 176 | pub path: RelativePathBuf, |
177 | pub krate: Option<String>, | 177 | pub krate: Option<String>, |
178 | pub deps: Vec<String>, | 178 | pub deps: Vec<String>, |
179 | pub cfg: ra_cfg::CfgOptions, | 179 | pub cfg: CfgOptions, |
180 | pub edition: Option<String>, | 180 | pub edition: Option<String>, |
181 | pub env: FxHashMap<String, String>, | 181 | pub env: FxHashMap<String, String>, |
182 | } | 182 | } |
@@ -188,6 +188,13 @@ impl FixtureMeta { | |||
188 | FixtureMeta::File(f) => &f.path, | 188 | FixtureMeta::File(f) => &f.path, |
189 | } | 189 | } |
190 | } | 190 | } |
191 | |||
192 | pub fn cfg_options(&self) -> Option<&CfgOptions> { | ||
193 | match self { | ||
194 | FixtureMeta::File(f) => Some(&f.cfg), | ||
195 | _ => None, | ||
196 | } | ||
197 | } | ||
191 | } | 198 | } |
192 | 199 | ||
193 | /// Parses text which looks like this: | 200 | /// Parses text which looks like this: |