|
| 1 | +error: invalid `?` in type |
| 2 | + --> $DIR/issue-103748-ICE-wrong-braces.rs:3:36 |
| 3 | + | |
| 4 | +LL | struct Apple((Apple, Option(Banana ? Citron))); |
| 5 | + | ^ `?` is only allowed on expressions, not types |
| 6 | + | |
| 7 | +help: if you meant to express that the type might not contain a value, use the `Option` wrapper type |
| 8 | + | |
| 9 | +LL | struct Apple((Apple, Option(Option<Banana > Citron))); |
| 10 | + | +++++++ ~ |
| 11 | + |
| 12 | +error: expected one of `)` or `,`, found `Citron` |
| 13 | + --> $DIR/issue-103748-ICE-wrong-braces.rs:3:38 |
| 14 | + | |
| 15 | +LL | struct Apple((Apple, Option(Banana ? Citron))); |
| 16 | + | -^^^^^^ expected one of `)` or `,` |
| 17 | + | | |
| 18 | + | help: missing `,` |
| 19 | + |
| 20 | +error[E0412]: cannot find type `Citron` in this scope |
| 21 | + --> $DIR/issue-103748-ICE-wrong-braces.rs:3:38 |
| 22 | + | |
| 23 | +LL | struct Apple((Apple, Option(Banana ? Citron))); |
| 24 | + | ^^^^^^ not found in this scope |
| 25 | + |
| 26 | +error[E0214]: parenthesized type parameters may only be used with a `Fn` trait |
| 27 | + --> $DIR/issue-103748-ICE-wrong-braces.rs:3:22 |
| 28 | + | |
| 29 | +LL | struct Apple((Apple, Option(Banana ? Citron))); |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses |
| 31 | + | |
| 32 | +help: use angle brackets instead |
| 33 | + | |
| 34 | +LL | struct Apple((Apple, Option<Banana ? Citron>)); |
| 35 | + | ~ ~ |
| 36 | + |
| 37 | +error[E0072]: recursive type `Apple` has infinite size |
| 38 | + --> $DIR/issue-103748-ICE-wrong-braces.rs:3:1 |
| 39 | + | |
| 40 | +LL | struct Apple((Apple, Option(Banana ? Citron))); |
| 41 | + | ^^^^^^^^^^^^ ----- recursive without indirection |
| 42 | + | |
| 43 | +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle |
| 44 | + | |
| 45 | +LL | struct Apple((Box<Apple>, Option(Banana ? Citron))); |
| 46 | + | ++++ + |
| 47 | + |
| 48 | +error: aborting due to 5 previous errors |
| 49 | + |
| 50 | +Some errors have detailed explanations: E0072, E0214, E0412. |
| 51 | +For more information about an error, try `rustc --explain E0072`. |
0 commit comments