diff options
Diffstat (limited to 'tests/ui/type-alias-impl-trait/implied_bounds3.rs')
-rw-r--r-- | tests/ui/type-alias-impl-trait/implied_bounds3.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/type-alias-impl-trait/implied_bounds3.rs b/tests/ui/type-alias-impl-trait/implied_bounds3.rs new file mode 100644 index 000000000..e39c61328 --- /dev/null +++ b/tests/ui/type-alias-impl-trait/implied_bounds3.rs @@ -0,0 +1,18 @@ +// check-pass + +fn foo<F>(_: F) +where + F: 'static, +{ +} + +fn from<F: Send>(f: F) -> impl Send { + f +} + +fn bar<T>() { + foo(from(|| ())) +} + +fn main() { +} |