1 // Check that errors for unresolved types in cast expressions are reported
2 // for the offending subexpression, not the whole cast expression.
4 #![allow(unused_variables)]
7 let a = [1, 2, 3].iter().sum();
8 let b = (a + 1) as usize;
9 //~^ ERROR: type annotations needed [E0282]