Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update lifetime-elision.md (google#1795)
In the details section, it is suggested to adjust the signature of the nearest function to "lie" about the lifetimes returned to: fn nearest<'a, 'q'>(points: &'a [Point], query: &'q Point) -> Option<&'q Point> { to demonstrate the compiler checks lifetimes for validity. However, the syntax for 'q is incorrect and it should instead be fn nearest<'a, 'q>(points: &'a [Point], query: &'q Point) -> Option<&'q Point> {
- Loading branch information