]> git.proxmox.com Git - rustc.git/blob - tests/ui/cast/issue-85586.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / cast / issue-85586.rs
1 // Check that errors for unresolved types in cast expressions are reported
2 // for the offending subexpression, not the whole cast expression.
3
4 #![allow(unused_variables)]
5
6 fn main() {
7 let a = [1, 2, 3].iter().sum();
8 let b = (a + 1) as usize;
9 //~^ ERROR: type annotations needed [E0282]
10 }