]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-104582.stderr
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / typeck / issue-104582.stderr
1 error: invalid `?` in type
2   --> $DIR/issue-104582.rs:2:30
3    |
4 LL |     let my_var: String(String?);
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 |     let my_var: String(Option<String>);
10    |                        +++++++      ~
11
12 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
13   --> $DIR/issue-104582.rs:2:17
14    |
15 LL |     let my_var: String(String?);
16    |                 ^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
17    |
18 help: use angle brackets instead
19    |
20 LL |     let my_var: String<String?>;
21    |                       ~       ~
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0214`.