Skip to content

Commit 6cfb444

Browse files
authored
Rollup merge of #94867 - notriddle:notriddle/i32-count-regression-test, r=Dylan-DPC
Add regression test for `<i32 as Iterator>::count` Closes #84495
2 parents f103b29 + ce6f987 commit 6cfb444

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
let x: i32 = 1;
3+
println!("{:?}", x.count()); //~ ERROR is not an iterator
4+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0599]: `i32` is not an iterator
2+
--> $DIR/issue-84495.rs:3:24
3+
|
4+
LL | println!("{:?}", x.count());
5+
| ^^^^^ `i32` is not an iterator
6+
|
7+
= note: the following trait bounds were not satisfied:
8+
`i32: Iterator`
9+
which is required by `&mut i32: Iterator`
10+
11+
error: aborting due to previous error
12+
13+
For more information about this error, try `rustc --explain E0599`.

0 commit comments

Comments
 (0)