Sign in
rust
/
rust-lang
/
rust
/
refs/heads/auto
/
.
/
tests
/
ui
/
lifetimes
/
lifetime-errors
/
ex3-both-anon-regions-one-is-struct-5.rs
blob: 16039f177b4deb28abfa417c33540d211762fc6b [
file
] [
log
] [
blame
] [
edit
]
// Regression test for #91831
struct
Foo
<
'a>(&'
a i32
);
impl
<
'a> Foo<'
a
>
{
fn
modify
(&
'
a
mut
self
)
{}
}
fn
bar
(
foo
:
&
mut
Foo
)
{
foo
.
modify
();
//~ ERROR lifetime may not live long enough
}
fn
main
()
{}