aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/completions')
-rw-r--r--crates/ide_completion/src/completions/flyimport.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs
index 08df2df3f..f6c7d507f 100644
--- a/crates/ide_completion/src/completions/flyimport.rs
+++ b/crates/ide_completion/src/completions/flyimport.rs
@@ -947,4 +947,36 @@ fn main() {
947 expect![[]], 947 expect![[]],
948 ) 948 )
949 } 949 }
950
951 #[test]
952 fn local_assoc_items_are_omitted() {
953 check(
954 r#"
955mod something {
956 pub trait BaseTrait {
957 fn test_function() -> i32;
958 }
959
960 pub struct Item1;
961 pub struct Item2;
962
963 impl BaseTrait for Item1 {
964 fn test_function() -> i32 {
965 1
966 }
967 }
968
969 impl BaseTrait for Item2 {
970 fn test_function() -> i32 {
971 2
972 }
973 }
974}
975
976fn main() {
977 test_f$0
978}"#,
979 expect![[]],
980 )
981 }
950} 982}