From 2bb80a4f0350045503258518d354a4e63e4c68fd Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sat, 10 Oct 2020 21:37:20 +0300 Subject: Also replace the associated types with iter --- crates/ide/src/inlay_hints.rs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index 08ef49a27..2ed84095d 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs @@ -228,17 +228,20 @@ fn hint_iterator( _ => None, })?; if let Some(ty) = ty.normalize_trait_assoc_type(db, iter_trait, &[], assoc_type_item) { - // TODO kb also check for the iterator impls for this ty - dbg!(ty.display(db).to_string()); const LABEL_START: &str = "impl Iterator>> some_iter.push(iter::repeat(2).take(2)); - let zz = some_iter.take(2); - //^^ impl Iterator>> + let iter_of_iters = some_iter.take(2); + //^^^^^^^^^^^^^ impl Iterator> } "#, ); -- cgit v1.2.3