Skip to content

Commit 2d04871

Browse files
committed
Add a test for rust-lang#3137
1 parent 284583f commit 2d04871

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/type.rs

+8
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ macro_rules! foo {
9292

9393
type Target = ( FooAPI ) + 'static;
9494

95+
// #3137
96+
fn foo<T>(t: T)
97+
where
98+
T: ( FnOnce() -> () ) + Clone,
99+
U: ( FnOnce() -> () ) + 'static,
100+
{
101+
}
102+
95103
// #3117
96104
fn issue3117() {
97105
{

tests/target/type.rs

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ macro_rules! foo {
9191

9292
type Target = (FooAPI) + 'static;
9393

94+
// #3137
95+
fn foo<T>(t: T)
96+
where
97+
T: (FnOnce() -> ()) + Clone,
98+
U: (FnOnce() -> ()) + 'static,
99+
{
100+
}
101+
94102
// #3117
95103
fn issue3117() {
96104
{

0 commit comments

Comments
 (0)