diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-51632-try-desugar-incompatible-types.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.rs b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.rs new file mode 100644 index 000000000..35402dff6 --- /dev/null +++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.rs @@ -0,0 +1,12 @@ +#![allow(dead_code)] + +fn missing_discourses() -> Result<isize, ()> { + Ok(1) +} + +fn forbidden_narratives() -> Result<isize, ()> { + missing_discourses()? + //~^ ERROR: `?` operator has incompatible types +} + +fn main() {} |