rust/tests/ui/impl-trait/issues/issue-86642.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
275 B
Rust
Raw Normal View History

static x: impl Fn(&str) -> Result<&str, ()> = move |source| {
2022-02-17 21:18:42 -06:00
//~^ `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() {}