summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/question-mark-type-infer.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/inference/question-mark-type-infer.stderr')
-rw-r--r--tests/ui/inference/question-mark-type-infer.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/inference/question-mark-type-infer.stderr b/tests/ui/inference/question-mark-type-infer.stderr
new file mode 100644
index 000000000..a9cb7e525
--- /dev/null
+++ b/tests/ui/inference/question-mark-type-infer.stderr
@@ -0,0 +1,14 @@
+error[E0282]: type annotations needed
+ --> $DIR/question-mark-type-infer.rs:10:21
+ |
+LL | l.iter().map(f).collect()?
+ | ^^^^^^^ 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
+
+For more information about this error, try `rustc --explain E0282`.