Skip to content

Commit 8eaeff9

Browse files
author
Yuki Okushi
authored
Rollup merge of #106740 - petar-dambovaliev:float-iterator-hint, r=Nilstrieb
Adding a hint on iterator type errors Issue reference rust-lang/rust#106728 - [x] add a case in the attribute - [x] add a test closes #106728
2 parents ed8b3b9 + 12c94c9 commit 8eaeff9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/iter/traits/iterator.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
5858
note = "if you want to iterate between `start` until a value `end`, use the exclusive range \
5959
syntax `start..end` or the inclusive range syntax `start..=end`"
6060
),
61+
on(
62+
_Self = "{float}",
63+
note = "if you want to iterate between `start` until a value `end`, use the exclusive range \
64+
syntax `start..end` or the inclusive range syntax `start..=end`"
65+
),
6166
label = "`{Self}` is not an iterator",
6267
message = "`{Self}` is not an iterator"
6368
)]

0 commit comments

Comments
 (0)