aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-12-22 13:42:28 +0000
committerJonas Schievink <[email protected]>2020-12-22 14:02:03 +0000
commit26f604b907f5c23404acec96b14e80064857cd17 (patch)
tree43d0e4e98a00260e72edb5cfd4dc74e73f5c9a02 /crates/ide
parentb98ee075ee8baa6dc4284f04df4c7012baccda28 (diff)
Store invocation site for eager macros
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/goto_definition.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index 431da5d9c..47dd85ceb 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -750,6 +750,31 @@ fn test() {
750 } 750 }
751 751
752 #[test] 752 #[test]
753 fn goto_through_included_file() {
754 check(
755 r#"
756//- /main.rs
757#[rustc_builtin_macro]
758macro_rules! include {}
759
760 include!("foo.rs");
761//^^^^^^^^^^^^^^^^^^^
762
763fn f() {
764 foo<|>();
765}
766
767mod confuse_index {
768 pub fn foo() {}
769}
770
771//- /foo.rs
772fn foo() {}
773 "#,
774 );
775 }
776
777 #[test]
753 fn goto_for_type_param() { 778 fn goto_for_type_param() {
754 check( 779 check(
755 r#" 780 r#"