aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/hover.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 9cf02f0a3..acdb51f26 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -3163,4 +3163,34 @@ fn main() { let s<|>t = test().get(); }
3163 "#]], 3163 "#]],
3164 ); 3164 );
3165 } 3165 }
3166
3167 #[test]
3168 fn hover_displays_normalized_crate_names() {
3169 check(
3170 r#"
3171//- /lib.rs crate:name-with-dashes
3172pub mod wrapper {
3173 pub struct Thing { x: u32 }
3174
3175 impl Thing {
3176 pub fn new() -> Thing { Thing { x: 0 } }
3177 }
3178}
3179
3180//- /main.rs crate:main deps:name-with-dashes
3181fn main() { let foo_test = name_with_dashes::wrapper::Thing::new<|>(); }
3182"#,
3183 expect![[r#"
3184 *new*
3185
3186 ```rust
3187 name_with_dashes::wrapper::Thing
3188 ```
3189
3190 ```rust
3191 pub fn new() -> Thing
3192 ```
3193 "#]],
3194 )
3195 }
3166} 3196}