diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index e6ac0aec3..060814e53 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs | |||
@@ -324,7 +324,7 @@ fn no_such_field_diagnostics() { | |||
324 | fn no_such_field_with_feature_flag_diagnostics() { | 324 | fn no_such_field_with_feature_flag_diagnostics() { |
325 | let diagnostics = TestDB::with_files( | 325 | let diagnostics = TestDB::with_files( |
326 | r#" | 326 | r#" |
327 | //- /lib.rs | 327 | //- /lib.rs crate:foo cfg:feature=foo |
328 | struct MyStruct { | 328 | struct MyStruct { |
329 | my_val: usize, | 329 | my_val: usize, |
330 | #[cfg(feature = "foo")] | 330 | #[cfg(feature = "foo")] |
@@ -336,7 +336,7 @@ fn no_such_field_with_feature_flag_diagnostics() { | |||
336 | pub(crate) fn new(my_val: usize, bar: bool) -> Self { | 336 | pub(crate) fn new(my_val: usize, bar: bool) -> Self { |
337 | Self { my_val, bar } | 337 | Self { my_val, bar } |
338 | } | 338 | } |
339 | 339 | ||
340 | #[cfg(not(feature = "foo"))] | 340 | #[cfg(not(feature = "foo"))] |
341 | pub(crate) fn new(my_val: usize, _bar: bool) -> Self { | 341 | pub(crate) fn new(my_val: usize, _bar: bool) -> Self { |
342 | Self { my_val } | 342 | Self { my_val } |
@@ -344,7 +344,8 @@ fn no_such_field_with_feature_flag_diagnostics() { | |||
344 | } | 344 | } |
345 | "#, | 345 | "#, |
346 | ) | 346 | ) |
347 | .diagnostics(); | 347 | .diagnostics() |
348 | .0; | ||
348 | 349 | ||
349 | assert_snapshot!(diagnostics, ""); | 350 | assert_snapshot!(diagnostics, @r###""###); |
350 | } | 351 | } |