diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-17 22:44:44 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-17 22:44:44 +0100 |
commit | c387ab6de1b860cf74655240a3d89ebe144f0e2c (patch) | |
tree | 5e7294a0239837c227b64575257bc4bb94ae0084 /crates/ide | |
parent | 916384a1ea50323e8d44d8024ede1d39244fbb7c (diff) | |
parent | 66673eae2b3d3185607d29ee341d2db8a81a46e0 (diff) |
Merge #9320
9320: internal: retire famous_defs_fixture r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/hover.rs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index e81bcf73e..409f81ca0 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -568,8 +568,6 @@ mod tests { | |||
568 | 568 | ||
569 | use crate::fixture; | 569 | use crate::fixture; |
570 | 570 | ||
571 | use super::*; | ||
572 | |||
573 | fn check_hover_no_result(ra_fixture: &str) { | 571 | fn check_hover_no_result(ra_fixture: &str) { |
574 | let (analysis, position) = fixture::position(ra_fixture); | 572 | let (analysis, position) = fixture::position(ra_fixture); |
575 | assert!(analysis.hover(position, true, true).unwrap().is_none()); | 573 | assert!(analysis.hover(position, true, true).unwrap().is_none()); |
@@ -3813,11 +3811,14 @@ use foo::bar::{self$0}; | |||
3813 | 3811 | ||
3814 | #[test] | 3812 | #[test] |
3815 | fn hover_keyword() { | 3813 | fn hover_keyword() { |
3816 | let ra_fixture = r#"//- /main.rs crate:main deps:std | ||
3817 | fn f() { retur$0n; }"#; | ||
3818 | let fixture = format!("{}\n{}", ra_fixture, FamousDefs::FIXTURE); | ||
3819 | check( | 3814 | check( |
3820 | &fixture, | 3815 | r#" |
3816 | //- /main.rs crate:main deps:std | ||
3817 | fn f() { retur$0n; } | ||
3818 | //- /libstd.rs crate:std | ||
3819 | /// Docs for return_keyword | ||
3820 | mod return_keyword {} | ||
3821 | "#, | ||
3821 | expect![[r#" | 3822 | expect![[r#" |
3822 | *return* | 3823 | *return* |
3823 | 3824 | ||
@@ -3834,11 +3835,15 @@ fn f() { retur$0n; }"#; | |||
3834 | 3835 | ||
3835 | #[test] | 3836 | #[test] |
3836 | fn hover_builtin() { | 3837 | fn hover_builtin() { |
3837 | let ra_fixture = r#"//- /main.rs crate:main deps:std | ||
3838 | cosnt _: &str$0 = ""; }"#; | ||
3839 | let fixture = format!("{}\n{}", ra_fixture, FamousDefs::FIXTURE); | ||
3840 | check( | 3838 | check( |
3841 | &fixture, | 3839 | r#" |
3840 | //- /main.rs crate:main deps:std | ||
3841 | cosnt _: &str$0 = ""; } | ||
3842 | |||
3843 | //- /libstd.rs crate:std | ||
3844 | /// Docs for prim_str | ||
3845 | mod prim_str {} | ||
3846 | "#, | ||
3842 | expect![[r#" | 3847 | expect![[r#" |
3843 | *str* | 3848 | *str* |
3844 | 3849 | ||