diff --git a/src/test/ui/impl-trait/issue-53457.rs b/src/test/ui/impl-trait/issue-53457.rs new file mode 100644 index 0000000000000..3f6a4fb278715 --- /dev/null +++ b/src/test/ui/impl-trait/issue-53457.rs @@ -0,0 +1,15 @@ +// run-pass + +#![feature(existential_type)] + +existential type X: Clone; + +fn bar(f: F) -> F { + f +} + +fn foo() -> X { + bar(|x| ()) +} + +fn main() {}