diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/hover.rs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index ea45086ce..f872b68cf 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -3657,4 +3657,42 @@ cosnt _: &str$0 = ""; }"#; | |||
3657 | "#]], | 3657 | "#]], |
3658 | ); | 3658 | ); |
3659 | } | 3659 | } |
3660 | |||
3661 | #[test] | ||
3662 | fn hover_macro_expanded_function() { | ||
3663 | check( | ||
3664 | r#" | ||
3665 | struct S<'a, T>(&'a T); | ||
3666 | trait Clone {} | ||
3667 | macro_rules! foo { | ||
3668 | () => { | ||
3669 | fn bar<'t, T: Clone + 't>(s: &mut S<'t, T>, t: u32) -> *mut u32 where | ||
3670 | 't: 't + 't, | ||
3671 | for<'a> T: Clone + 'a | ||
3672 | { 0 as _ } | ||
3673 | }; | ||
3674 | } | ||
3675 | |||
3676 | foo!(); | ||
3677 | |||
3678 | fn main() { | ||
3679 | bar$0; | ||
3680 | } | ||
3681 | "#, | ||
3682 | expect![[r#" | ||
3683 | *bar* | ||
3684 | |||
3685 | ```rust | ||
3686 | test | ||
3687 | ``` | ||
3688 | |||
3689 | ```rust | ||
3690 | fn bar<'t, T: Clone + 't>(s: &mut S<'t, T>, t: u32) -> *mut u32 | ||
3691 | where | ||
3692 | 't: 't + 't, | ||
3693 | for<'a> T: Clone + 'a, | ||
3694 | ``` | ||
3695 | "#]], | ||
3696 | ) | ||
3697 | } | ||
3660 | } | 3698 | } |