diff options
Diffstat (limited to 'tests/ui/suggestions/remove-question-symbol-with-paren.rs')
-rw-r--r-- | tests/ui/suggestions/remove-question-symbol-with-paren.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/suggestions/remove-question-symbol-with-paren.rs b/tests/ui/suggestions/remove-question-symbol-with-paren.rs new file mode 100644 index 000000000..c522793db --- /dev/null +++ b/tests/ui/suggestions/remove-question-symbol-with-paren.rs @@ -0,0 +1,9 @@ +// https://github.com/rust-lang/rust/issues/114392 + +fn foo() -> Option<()> { + let x = Some(()); + (x?) + //~^ ERROR `?` operator has incompatible types +} + +fn main() {} |