mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 09:27:51 +00:00
14 lines
212 B
Rust
14 lines
212 B
Rust
// 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() {}
|