Skip to content

Commit ef33953

Browse files
bors[bot]Veykril
andauthored
Merge #6205
6205: Fix iterator hint shortening heuristic r=SomeoneToIgnore a=Veykril Turns out I made a mistake with the heuristic check which is always true, so all iterators exposed from `core` were shortened, including things like ranges. 😅 Co-authored-by: Lukas Wirth <[email protected]>
2 parents 3f96c9b + ed59512 commit ef33953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ide/src/inlay_hints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ fn hint_iterator(
220220
}
221221
let iter_trait = FamousDefs(sema, krate).core_iter_Iterator()?;
222222
let iter_mod = FamousDefs(sema, krate).core_iter()?;
223-
// assert this type comes from `core::iter`
224-
iter_mod.visibility_of(db, &iter_trait.into()).filter(|&vis| vis == hir::Visibility::Public)?;
223+
// assert this struct comes from `core::iter`
224+
iter_mod.visibility_of(db, &strukt.into()).filter(|&vis| vis == hir::Visibility::Public)?;
225225
if ty.impls_trait(db, iter_trait, &[]) {
226226
let assoc_type_item = iter_trait.items(db).into_iter().find_map(|item| match item {
227227
hir::AssocItem::TypeAlias(alias) if alias.name(db) == known::Item => Some(alias),

0 commit comments

Comments
 (0)