Sign in
chromium
/
external
/
github.com
/
rust-lang
/
rust
/
refs/heads/beta
/
.
/
tests
/
ui
/
borrowck
/
suggest-lt-on-ty-alias-w-generics.rs
blob: 13c7c3ef618290472caf9719c47e3cb019169ded [
file
] [
edit
]
//@ edition:2015..2021
type
Lazy
<
T
>
=
Box
<
dyn
Fn
()
->
T
+
'
static
>;
fn
test
(
x
:
&
i32
)
->
Lazy
<
i32
>
{
Box
::
new
(||
{
//~^ ERROR lifetime may not live long enough
//~| ERROR closure may outlive the current function
*
x
})
}
fn
main
()
{}