Sign in
android
/
toolchain
/
rustc
/
fc8a4ff31fec5a822fe5eb0da3a6f87866072960
/
.
/
src
/
test
/
ui
/
rfc-2632-const-trait-impl
/
non-const-op-in-closure-in-const.rs
blob: defef9e04098e55b43153e1389d4a2418ddd40a7 [
file
] [
log
] [
blame
]
// check-pass
#![
feature
(
const_trait_impl
)]
trait
Convert
<
T
>
{
fn
to
(
self
)
->
T
;
}
impl
<
A
,
B
>
const
Convert
<
B
>
for
A where B
:
~
const
From
<
A
>
{
fn
to
(
self
)
->
B
{
B
::
from
(
self
)
}
}
const
FOO
:
fn
()
->
String
=
||
"foo"
.
to
();
fn
main
()
{}