summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs-enums/enum-rec/issue-17431-6.stderr')
-rw-r--r--tests/ui/structs-enums/enum-rec/issue-17431-6.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
new file mode 100644
index 000000000..e0a822550
--- /dev/null
+++ b/tests/ui/structs-enums/enum-rec/issue-17431-6.stderr
@@ -0,0 +1,14 @@
+error[E0072]: recursive type `Foo` has infinite size
+ --> $DIR/issue-17431-6.rs:3:1
+ |
+LL | enum Foo { X(Mutex<Option<Foo>>) }
+ | ^^^^^^^^ --- recursive without indirection
+ |
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
+ |
+LL | enum Foo { X(Mutex<Option<Box<Foo>>>) }
+ | ++++ +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.