Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
issues
/
issue-24010.rs
blob: f1818533487f61c0d2cefce10cb54a41b8c200cb [
file
] [
log
] [
blame
]
// run-pass
trait
Foo
:
Fn
(
i32
)
->
i32
+
Send
{}
impl
<
T
:
?
Sized
+
Fn
(
i32
)
->
i32
+
Send
>
Foo
for
T
{}
fn
wants_foo
(
f
:
Box
<
dyn
Foo
>)
->
i32
{
f
(
42
)
}
fn
main
()
{
let
f
=
Box
::
new
(|
x
|
x
);
assert_eq
!(
wants_foo
(
f
),
42
);
}