1 error: invalid `?` in type
2 --> $DIR/trailing-question-in-type.rs:3:16
4 LL | fn foo() -> i32? {
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 | fn foo() -> Option<i32> {
12 error: invalid `?` in type
13 --> $DIR/trailing-question-in-type.rs:4:15
15 LL | let x: i32? = Some(1);
16 | ^ `?` is only allowed on expressions, not types
18 help: if you meant to express that the type might not contain a value, use the `Option` wrapper type
20 LL | let x: Option<i32> = Some(1);
23 error: aborting due to 2 previous errors