Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip callee visits to avoid invisible-lifetime lint false-positive
As far as the higher intermediate representation is concerned, associated functions like `Ref::clone` are equivalent to the universal function call syntax expression `<Ref>::clone`, so our strategy of linting for invisible lifetimes while visiting types in the LifetimeContext visitor was resulting in us suggesting that the user call `Ref<'_>::clone` (which doesn't parse). It is not without some sentiments of inadequacy that the present author can't think of a better way to avoid this than making the visitor avoid traversing into the callee of call expressions. This should be OK because—one is pretty sure—there aren't going to be lifetimes to resolve in a callee expression. Besides linting for invisible lifetimes (introduced in this branch), the only other work taking place in the `hir::TyPath(hir::QPath::Resolved(None, ref path))` arm of the `visit_ty` method is about resolving lifetimes in existential types. This is all about issue no. 52041.
- Loading branch information