diff options
author | Florian Diebold <[email protected]> | 2019-11-15 20:00:27 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-11-16 12:11:29 +0000 |
commit | 9c2a9a9a0635e53466749fdedcdc5a371e658cde (patch) | |
tree | 904a60eca279975874c6c890109eb3c852347da0 /crates/ra_hir/src/ty/method_resolution.rs | |
parent | e21b82e035050570a8d8e77ebe8b50f7d34ad251 (diff) |
Use Chalk's dyn/impl trait support
Diffstat (limited to 'crates/ra_hir/src/ty/method_resolution.rs')
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 9aad2d3fe..d20aeaacf 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -228,14 +228,10 @@ fn iterate_trait_method_candidates<T>( | |||
228 | 'traits: for t in traits { | 228 | 'traits: for t in traits { |
229 | let data = t.trait_data(db); | 229 | let data = t.trait_data(db); |
230 | 230 | ||
231 | // FIXME this is a bit of a hack, since Chalk should say the same thing | ||
232 | // anyway, but currently Chalk doesn't implement `dyn/impl Trait` yet | ||
233 | let inherently_implemented = ty.value.inherent_trait() == Some(t); | ||
234 | |||
235 | // we'll be lazy about checking whether the type implements the | 231 | // we'll be lazy about checking whether the type implements the |
236 | // trait, but if we find out it doesn't, we'll skip the rest of the | 232 | // trait, but if we find out it doesn't, we'll skip the rest of the |
237 | // iteration | 233 | // iteration |
238 | let mut known_implemented = inherently_implemented; | 234 | let mut known_implemented = false; |
239 | for &item in data.items() { | 235 | for &item in data.items() { |
240 | if !is_valid_candidate(db, name, mode, item) { | 236 | if !is_valid_candidate(db, name, mode, item) { |
241 | continue; | 237 | continue; |