]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast/issue-85586.rs
Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
[rust.git] / src / test / 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 }