summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
new file mode 100644
index 000000000..fa6ecf68d
--- /dev/null
+++ b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.stderr
@@ -0,0 +1,19 @@
+error: opaque type's hidden type cannot be another opaque type from the same scope
+ --> $DIR/nested_type_alias_impl_trait.rs:14:9
+ |
+LL | get_foo()
+ | ^^^^^^^^^ 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/nested_type_alias_impl_trait.rs:7:21
+ |
+LL | pub type Foot = impl Debug;
+ | ^^^^^^^^^^
+note: opaque type being used as hidden type
+ --> $DIR/nested_type_alias_impl_trait.rs:6:20
+ |
+LL | pub type Foo = impl Debug;
+ | ^^^^^^^^^^
+
+error: aborting due to previous error
+