Sign in
rust
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
higher-ranked
/
subtyping-fn-ptr-coercion.rs
blob: 0cecf6808f2293f607a89d83d8b6d5a61566911a [
file
] [
log
] [
blame
]
//@ check-pass
// Check that we use subtyping when reifying a closure into a function pointer.
fn
foo
(
x
:
&
str
)
{}
fn
main
()
{
let
c
=
|
_
:
&
str
|
{};
let
x
=
c
as
fn
(&
'
static
str
);
}