You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub fn count_to_five() -> usize {
let xs = vec![true, false, true, false, true];
let mut i = 0;
for _x in xs {
i += 1;
}
i
}
compiles normally, but with #[mutate], fails with:
error[E0277]: `std::vec::Vec<bool>` is not an iterator
--> src/test.rs:10:1
|
164 | #[mutate]
| ^^^^^^^^^ `std::vec::Vec<bool>` is not an iterator
|
= help: the trait `std::iter::Iterator` is not implemented for `std::vec::Vec<bool>`
= note: required by `mutagen::forloop`
error: aborting due to previous error
It works only if i explicitly put xs.iter().
The text was updated successfully, but these errors were encountered:
bblum
changed the title
fails to recognize(?) iterable types in for loops
iterator mutations fail to typecheck if the loop argument is not exactly an Iterator
Apr 15, 2019
compiles normally, but with
#[mutate]
, fails with:It works only if i explicitly put
xs.iter()
.The text was updated successfully, but these errors were encountered: