-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Lifetime variance fixes for clippy #97289
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
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
56f96b8
to
8f8c89a
Compare
that's an embarrassing copy mistake |
/// or at least call `.expect(_)` with a more helpful message. Still, for a lot of | ||
/// quick-and-dirty code, `unwrap` is a good choice, which is why this lint is | ||
/// or at least call `.expect(_)` with _tcx more helpful message. Still, for _tcx lot of | ||
/// quick-and-dirty code, `unwrap` is _tcx good choice, which is why this lint is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this was a search and replace gone wrong?
I commented on one case but it looks like there are a few more at least where 'a' is replaced with _tcx in comments etc |
2ae5732
to
8983f54
Compare
Don't know how every @rustbot ready |
r=me modulo comment (either way) |
8983f54
to
215decd
Compare
@bors r=Mark-Simulacrum |
📌 Commit 215decd has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#97240 (Typo suggestion for a variable with a name similar to struct fields) - rust-lang#97289 (Lifetime variance fixes for clippy) - rust-lang#97290 (Turn on `fast_submodules` unconditionally) - rust-lang#97336 (typo) - rust-lang#97337 (Fix stabilization version of `Ipv6Addr::to_ipv4_mapped`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…rk-Simulacrum Lifetime variance fixes for clippy rust-lang#97287 migrates rustc to a `Ty` type that is invariant over its lifetime `'tcx`, so I need to fix a bunch of places that assume that `Ty<'a>` and `Ty<'b>` can be shortened to some common lifetime. This is doable, since everything is already `'tcx`, so all this PR does is be a bit more explicit that elided lifetimes are actually `'tcx`. Split out from rust-lang#97287 so the clippy team can review independently.
#97287 migrates rustc to a
Ty
type that is invariant over its lifetime'tcx
, so I need to fix a bunch of places that assume thatTy<'a>
andTy<'b>
can be shortened to some common lifetime.This is doable, since everything is already
'tcx
, so all this PR does is be a bit more explicit that elided lifetimes are actually'tcx
.Split out from #97287 so the clippy team can review independently.