Sign in
fuchsia
/
third_party
/
rust
/
08351004125c4d49aa757f2c3ec2340f7469ea91
/
.
/
src
/
test
/
ui
/
impl-trait
/
type_parameters_captured.rs
blob: 6c9c9d4a42af5a2a592fe62a3691aeb4f633a996 [
file
] [
log
] [
blame
]
use
std
::
fmt
::
Debug
;
trait
Any
{}
impl
<
T
>
Any
for
T
{}
// Check that type parameters are captured and not considered 'static
fn
foo
<
T
>(
x
:
T
)
->
impl
Any
+
'
static
{
//~^ ERROR the parameter type `T` may not live long enough
x
}
fn
main
()
{}