E4138#
Range operators only support builtin integer types, they cannot be used on this type.
Erroneous example#
For example, you cannot use Float nor Double with range operators.
fn main {
for _ in 0.0..<1.0 {
()
}
}
Suggestion#
Use integer types for the range operators, and generate floats from these integers instead:
You can also use until to construct a range of numbers: