Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/tests/body.rs')
-rw-r--r--crates/hir-def/src/expr_store/tests/body.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/hir-def/src/expr_store/tests/body.rs b/crates/hir-def/src/expr_store/tests/body.rs
index e97718ca22..da412a620d 100644
--- a/crates/hir-def/src/expr_store/tests/body.rs
+++ b/crates/hir-def/src/expr_store/tests/body.rs
@@ -688,3 +688,31 @@ fn foo() {
}"#]],
);
}
+
+#[test]
+fn foo() {
+ pretty_print(
+ r#"
+macro_rules! foo {
+ () => {
+ 1
+ };
+}
+
+fn foo() -> i64 {
+ #[cfg(true)]
+ {
+ 5
+ }
+ #[cfg(false)]
+ foo!()
+}
+ "#,
+ expect![[r#"
+ fn foo() {
+ {
+ 5
+ }
+ }"#]],
+ );
+}