summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/issues/issue-70877.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/impl-trait/issues/issue-70877.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/issues/issue-70877.stderr b/src/test/ui/impl-trait/issues/issue-70877.stderr
new file mode 100644
index 000000000..8813bff3c
--- /dev/null
+++ b/src/test/ui/impl-trait/issues/issue-70877.stderr
@@ -0,0 +1,19 @@
+error: opaque type's hidden type cannot be another opaque type from the same scope
+ --> $DIR/issue-70877.rs:31:12
+ |
+LL | return func(&"oof");
+ | ^^^^^^^^^^^^ one of the two opaque types used here has to be outside its defining scope
+ |
+note: opaque type whose hidden type is being assigned
+ --> $DIR/issue-70877.rs:28:13
+ |
+LL | fn oof() -> impl std::fmt::Debug {
+ | ^^^^^^^^^^^^^^^^^^^^
+note: opaque type being used as hidden type
+ --> $DIR/issue-70877.rs:4:15
+ |
+LL | type FooRet = impl std::fmt::Debug;
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+