diff options
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-86642.rs')
-rw-r--r-- | tests/ui/impl-trait/issues/issue-86642.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issues/issue-86642.rs b/tests/ui/impl-trait/issues/issue-86642.rs new file mode 100644 index 000000000..e6e957714 --- /dev/null +++ b/tests/ui/impl-trait/issues/issue-86642.rs @@ -0,0 +1,8 @@ +static x: impl Fn(&str) -> Result<&str, ()> = move |source| { + //~^ `impl Trait` only allowed in function and inherent method return types + let res = (move |source| Ok(source))(source); + let res = res.or((move |source| Ok(source))(source)); + res +}; + +fn main() {} |