diff options
author | Kirill Bulatov <[email protected]> | 2021-04-15 21:31:42 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-04-16 09:13:17 +0100 |
commit | 739edfd5cf6d1f5ac1ec6dbc28fc7943b3936e24 (patch) | |
tree | 8c628030493854e197af2f65bfc53a80ad9f1f71 /crates/ide_completion | |
parent | 75371eb0fa015ba8834ae2b66cda68eba5d83874 (diff) |
Exclude inherent traits from flyimports
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/completions/flyimport.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs index 5e61ecb4d..8e211ae1e 100644 --- a/crates/ide_completion/src/completions/flyimport.rs +++ b/crates/ide_completion/src/completions/flyimport.rs | |||
@@ -1127,4 +1127,27 @@ impl Bar for Foo { | |||
1127 | expect![[r#""#]], | 1127 | expect![[r#""#]], |
1128 | ); | 1128 | ); |
1129 | } | 1129 | } |
1130 | |||
1131 | #[test] | ||
1132 | fn no_inherent_candidates_proposed() { | ||
1133 | check( | ||
1134 | r#" | ||
1135 | mod baz { | ||
1136 | pub trait DefDatabase { | ||
1137 | fn method1(&self); | ||
1138 | } | ||
1139 | pub trait HirDatabase: DefDatabase { | ||
1140 | fn method2(&self); | ||
1141 | } | ||
1142 | } | ||
1143 | |||
1144 | mod bar { | ||
1145 | fn test(db: &dyn crate::baz::HirDatabase) { | ||
1146 | db.metho$0 | ||
1147 | } | ||
1148 | } | ||
1149 | "#, | ||
1150 | expect![[r#""#]], | ||
1151 | ); | ||
1152 | } | ||
1130 | } | 1153 | } |