Currently when we want to iterate over an Array we always have to call .iter() on that array. I suggest that there should be a trait to standardize this:
pub trait Iterable<T> {
fn iter(&self) -> Iterator<T>;
}
Now, rustc would check in for loops for instances of Iterable and automatically adding a .iter(). This would allow for code like this:
let a = ["a", "b", "c"];
for element in a {
println!("Element: {}", element);
}
The old way would obviously still work, this would only be syntactic sugar