diff options
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-74282.rs')
-rw-r--r-- | tests/ui/impl-trait/issues/issue-74282.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issues/issue-74282.rs b/tests/ui/impl-trait/issues/issue-74282.rs new file mode 100644 index 000000000..654de0cd0 --- /dev/null +++ b/tests/ui/impl-trait/issues/issue-74282.rs @@ -0,0 +1,11 @@ +#![feature(type_alias_impl_trait)] + +type Closure = impl Fn() -> u64; +struct Anonymous(Closure); + +fn main() { + let y = || -> Closure { || 3 }; + Anonymous(|| { //~ ERROR mismatched types + 3 //~^ ERROR mismatched types + }) +} |