rust/tests/ui/for/for-loop-type-error.rs

7 lines
136 B
Rust

pub fn main() {
let x = () + (); //~ ERROR cannot add `()` to `()`
// this shouldn't have a flow-on error:
for _ in x {}
}