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
Got the following output when compiling:
src/lib.rs:41:32: 41:45 error: cannot infer an appropriate lifetime due to conflicting requirements src/lib.rs:41 guard.get(key).map(|v| BorrowedValue { guard: guard, value: v }) ^~~~~~~~~~~~~ src/lib.rs:40:5: 42:6 help: consider using an explicit lifetime parameter as shown: fn new(guard: RwLockReadGuard<'a, HashMap<K, V>>, key: &K) -> Option<Self> src/lib.rs:40 fn new(guard: RwLockReadGuard<'a, HashMap<K, V>>, key: &K) -> Option<Self> { src/lib.rs:41 guard.get(key).map(|v| BorrowedValue { guard: guard, value: v }) src/lib.rs:42 }
Notice the "help" suggests the function definition that is exactly the one used.
Full code to reproduce can be found here: https://github.com/seppo0010/shardhashmap-rs/blob/help-is-not-helpful/src/lib.rs#L40
The rustc version I'm using is rustc 1.4.0-nightly (7780408af 2015-09-01).
rustc 1.4.0-nightly (7780408af 2015-09-01)
The text was updated successfully, but these errors were encountered:
All such suggestions have been removed in #37057 so this is fixed.
Sorry, something went wrong.
Yeah, lifetime errors are painful, but we removed the help message (because it was super painful to see the same thing); closing as "fixed."
No branches or pull requests
Got the following output when compiling:
Notice the "help" suggests the function definition that is exactly the one used.
Full code to reproduce can be found here: https://github.com/seppo0010/shardhashmap-rs/blob/help-is-not-helpful/src/lib.rs#L40
The rustc version I'm using is
rustc 1.4.0-nightly (7780408af 2015-09-01)
.The text was updated successfully, but these errors were encountered: