]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/inference/question-mark-type-infer.rs
1 // Test that type inference fails where there are multiple possible return types
2 // for the `?` operator.
4 fn f(x
: &i32) -> Result
<i32, ()> {
8 fn g() -> Result
<Vec
<i32>, ()> {
10 l
.iter().map(f
).collect()?
11 //~^ ERROR type annotations needed