We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
IntelliJ Rust advies me that this life-time can be elided:
But if elided, there occurs syntax error (elimination is not enough)
... And if I removed ''a' by my hand, rust compiler says it can't compile the source!
Additional note: Rust-analyzer does not say about this elimination.
Here is a (maybe) correct and fully-annotated lifetime annotation:
pub fn find<'a, 'b, F, R>(&'a self, f: F) -> Option<R> where F: Fn(&'b String) -> Option<R>, 'a: 'b { for entry in &self.entries { let r = f(entry); if r.is_some() { return r; } } None }
Please clone this repository:
https://github.com/ledyba/__bug__intellij-rust_lifetime
Here is a main.rs:
https://github.com/ledyba/__bug__intellij-rust_lifetime/blob/magistra/src/main.rs
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Problem description
IntelliJ Rust advies me that this life-time can be elided:
But if elided, there occurs syntax error (elimination is not enough)
... And if I removed ''a' by my hand, rust compiler says it can't compile the source!
Additional note: Rust-analyzer does not say about this elimination.
Here is a (maybe) correct and fully-annotated lifetime annotation:
Steps to reproduce
Please clone this repository:
https://github.com/ledyba/__bug__intellij-rust_lifetime
Here is a main.rs:
https://github.com/ledyba/__bug__intellij-rust_lifetime/blob/magistra/src/main.rs
The text was updated successfully, but these errors were encountered: