Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r--crates/ide/src/references.rs24
1 files changed, 15 insertions, 9 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index 38ee097033..102eb91b74 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -513,26 +513,32 @@ fn test() {
}
#[test]
- fn test_access() {
+ fn exclude_tests_macro_refs() {
check(
r#"
-struct S { f$0: u32 }
+macro_rules! my_macro {
+ ($e:expr) => { $e };
+}
+
+fn foo$0() -> i32 { 42 }
+
+fn bar() {
+ foo();
+}
#[test]
-fn test() {
- let mut x = S { f: 92 };
- x.f = 92;
+fn t2() {
+ my_macro!(foo());
}
"#,
expect![[r#"
- f Field FileId(0) 11..17 11..12
+ foo Function FileId(0) 52..74 55..58
- FileId(0) 61..62 read test
- FileId(0) 76..77 write test
+ FileId(0) 91..94
+ FileId(0) 133..136 test
"#]],
);
}
-
#[test]
fn test_struct_literal_after_space() {
check(