Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
-rw-r--r--crates/hir-ty/src/tests/simple.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs
index e6ef56b80d..7ea666986a 100644
--- a/crates/hir-ty/src/tests/simple.rs
+++ b/crates/hir-ty/src/tests/simple.rs
@@ -3720,3 +3720,20 @@ fn test() -> bool {
"#]],
);
}
+
+#[test]
+fn macro_semitransparent_hygiene() {
+ check_types(
+ r#"
+macro_rules! m {
+ () => { let bar: i32; };
+}
+fn foo() {
+ let bar: bool;
+ m!();
+ bar;
+ // ^^^ bool
+}
+ "#,
+ );
+}