-
Notifications
You must be signed in to change notification settings - Fork 13.3k
'error: illegal borrow: borrowed value does not live long enough' on chained methods that return &'self pointers #5475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Since I got an error message "Illegal lifetime 'self: the trait Foo<'self> {
fn a(&self) -> &'self str;
fn b(&self) -> &'self str;
}
impl<'self> Foo<'self> for &'self str {
fn a(&self) -> &'self str {
*self
}
fn b(&self) -> &'self str {
*self
}
}
fn main () {
let c = "defg";
c.a();
c.b();
c.a().b();
} |
works on latest. seems no more issue. |
Sawyer47
added a commit
to Sawyer47/rust
that referenced
this issue
May 25, 2014
Issue rust-lang#5475 was closed some time ago, but ascii.rs still contained a FIXME for it.
bors
added a commit
that referenced
this issue
May 25, 2014
Issue #5475 was closed some time ago, but ascii.rs still contained a FIXME for it.
oli-obk
pushed a commit
to oli-obk/rust
that referenced
this issue
May 2, 2020
[fix] Minor typo in GH Actions 'clippy_dev' changelog: minor: fixes file name in Github Actions workflow `clippy_dev.yml` I was looking for something else and ended up on that typo, just thought I would fix it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: