]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/inference/question-mark-type-infer.stderr
Rollup merge of #106835 - compiler-errors:new-solver-gat-rebase-oops, r=lcnr
[rust.git] / tests / ui / inference / question-mark-type-infer.stderr
index 9b822714f828a71a446fb169782482e6a0deb58c..a9cb7e5257c83d1db6c8fa8df7e3a1fed7811586 100644 (file)
@@ -1,8 +1,13 @@
 error[E0282]: type annotations needed
-  --> $DIR/question-mark-type-infer.rs:10:30
+  --> $DIR/question-mark-type-infer.rs:10:21
    |
 LL |     l.iter().map(f).collect()?
-   |                              ^ cannot infer type
+   |                     ^^^^^^^ cannot infer type of the type parameter `B` declared on the associated function `collect`
+   |
+help: consider specifying the generic argument
+   |
+LL |     l.iter().map(f).collect::<Vec<_>>()?
+   |                            ++++++++++
 
 error: aborting due to previous error