about summary refs log tree commit diff
path: root/tests/ui/impl-trait/method-resolution4.next.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/method-resolution4.next.stderr')
-rw-r--r--tests/ui/impl-trait/method-resolution4.next.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/method-resolution4.next.stderr b/tests/ui/impl-trait/method-resolution4.next.stderr
new file mode 100644
index 00000000000..b48de0af357
--- /dev/null
+++ b/tests/ui/impl-trait/method-resolution4.next.stderr
@@ -0,0 +1,22 @@
+error[E0282]: type annotations needed
+  --> $DIR/method-resolution4.rs:13:9
+   |
+LL |         foo(false).next().unwrap();
+   |         ^^^^^^^^^^ cannot infer type
+
+error[E0308]: mismatched types
+  --> $DIR/method-resolution4.rs:16:5
+   |
+LL | fn foo(b: bool) -> impl Iterator<Item = ()> {
+   |                    ------------------------ the expected opaque type
+...
+LL |     std::iter::empty()
+   |     ^^^^^^^^^^^^^^^^^^ types differ
+   |
+   = note: expected opaque type `impl Iterator<Item = ()>`
+                   found struct `std::iter::Empty<_>`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0282, E0308.
+For more information about an error, try `rustc --explain E0282`.