From 7283163bb9b4314ec3c7b25fad90ae794e7b7320 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 23 May 2021 19:50:23 +0300 Subject: Minor: fix comment style See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#documentation --- crates/ide/src/inlay_hints.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index 960d169f4..8f490e922 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs @@ -225,8 +225,10 @@ fn hint_iterator( } let iter_trait = famous_defs.core_iter_Iterator()?; let iter_mod = famous_defs.core_iter()?; - // assert this struct comes from `core::iter` + + // Assert that this struct comes from `core::iter`. iter_mod.visibility_of(db, &strukt.into()).filter(|&vis| vis == hir::Visibility::Public)?; + if ty.impls_trait(db, iter_trait, &[]) { let assoc_type_item = iter_trait.items(db).into_iter().find_map(|item| match item { hir::AssocItem::TypeAlias(alias) if alias.name(db) == known::Item => Some(alias), -- cgit v1.2.3