]> git.lizzy.rs Git - rust.git/blob - tests/ui/variance/variance-regions-unused-indirect.stderr
Add regression test for #42114
[rust.git] / tests / ui / variance / variance-regions-unused-indirect.stderr
1 error[E0072]: recursive types `Foo` and `Bar` have infinite size
2   --> $DIR/variance-regions-unused-indirect.rs:3:1
3    |
4 LL | enum Foo<'a> {
5    | ^^^^^^^^^^^^
6 LL |
7 LL |     Foo1(Bar<'a>)
8    |          ------- recursive without indirection
9 ...
10 LL | enum Bar<'a> {
11    | ^^^^^^^^^^^^
12 LL |     Bar1(Foo<'a>)
13    |          ------- recursive without indirection
14    |
15 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
16    |
17 LL ~     Foo1(Box<Bar<'a>>)
18 LL | }
19 LL | 
20 LL | enum Bar<'a> {
21 LL ~     Bar1(Box<Foo<'a>>)
22    |
23
24 error[E0392]: parameter `'a` is never used
25   --> $DIR/variance-regions-unused-indirect.rs:3:10
26    |
27 LL | enum Foo<'a> {
28    |          ^^ unused parameter
29    |
30    = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
31
32 error[E0392]: parameter `'a` is never used
33   --> $DIR/variance-regions-unused-indirect.rs:8:10
34    |
35 LL | enum Bar<'a> {
36    |          ^^ unused parameter
37    |
38    = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
39
40 error: aborting due to 3 previous errors
41
42 Some errors have detailed explanations: E0072, E0392.
43 For more information about an error, try `rustc --explain E0072`.