Add a regression test for #53457
This commit is contained in:
parent
7840a0b753
commit
41dd21a9bc
15
src/test/ui/impl-trait/issue-53457.rs
Normal file
15
src/test/ui/impl-trait/issue-53457.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// run-pass
|
||||
|
||||
#![feature(existential_type)]
|
||||
|
||||
existential type X: Clone;
|
||||
|
||||
fn bar<F: Fn(&i32) + Clone>(f: F) -> F {
|
||||
f
|
||||
}
|
||||
|
||||
fn foo() -> X {
|
||||
bar(|x| ())
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user