diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index 177038e20664..dfa0f1d973c0 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs @@ -174,6 +174,12 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Optionfoo; }; } ); } + #[test] + fn test_hover_through_literal_string_in_builtin_macro() { + check_hover_no_result( + r#" + //- /lib.rs + #[rustc_builtin_macro] + macro_rules! assert { + ($cond:expr) => {{ /* compiler built-in */ }}; + ($cond:expr,) => {{ /* compiler built-in */ }}; + ($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }}; + } + + fn foo() { + assert!("hel<|>lo"); + } + "#, + ); + } + #[test] fn test_hover_non_ascii_space_doc() { check_hover_result(