1 error: invalid `?` in type
2 --> $DIR/issue-104582.rs:2:30
4 LL | let my_var: String(String?);
5 | ^ `?` is only allowed on expressions, not types
7 help: if you meant to express that the type might not contain a value, use the `Option` wrapper type
9 LL | let my_var: String(Option<String>);
12 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
13 --> $DIR/issue-104582.rs:2:17
15 LL | let my_var: String(String?);
16 | ^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
18 help: use angle brackets instead
20 LL | let my_var: String<String?>;
23 error: aborting due to 2 previous errors
25 For more information about this error, try `rustc --explain E0214`.