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