fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: `?` operator has incompatible types 2 --> $DIR/remove-question-symbol-with-paren.rs:5:6 3 | 4LL | fn foo() -> Option<()> { 5 | ---------- expected `Option<()>` because of return type 6LL | let x = Some(()); 7LL | (x?) 8 | ^^ expected `Option<()>`, found `()` 9 | 10 = note: `?` operator cannot convert from `()` to `Option<()>` 11 = note: expected enum `Option<()>` 12 found unit type `()` 13help: try removing this `?` 14 | 15LL - (x?) 16LL + (x) 17 | 18help: try wrapping the expression in `Some` 19 | 20LL | (Some(x?)) 21 | +++++ + 22 23error: aborting due to previous error 24 25For more information about this error, try `rustc --explain E0308`.