Skip to content
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

fix clippy lints #1008

Merged
merged 1 commit into from
Dec 23, 2024
Merged

fix clippy lints #1008

merged 1 commit into from
Dec 23, 2024

Conversation

jswrenn
Copy link
Member

@jswrenn jswrenn commented Dec 23, 2024

No description provided.

Copy link
Member

@phimuemue phimuemue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw these lints and I approve the PR because you’re reasonable.

Still, could you share a link how these elisions work, in particular if multiple lifetimes are present?

@jswrenn jswrenn added this pull request to the merge queue Dec 23, 2024
Merged via the queue into master with commit ff0c942 Dec 23, 2024
11 of 12 checks passed
@jswrenn jswrenn deleted the fix-clippy-lints branch December 23, 2024 19:46
@@ -135,7 +135,7 @@ where
inner: Option<(I, F)>,
}
// This ensures we preserve the state of the original `FormatWith` if `Clone` panics
impl<'r, 'a, I, F> Drop for PutBackOnDrop<'r, 'a, I, F> {
impl<I, F> Drop for PutBackOnDrop<'_, '_, I, F> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are what was called way back in the day "impl header lifetime elision": rust-lang/rust#15872 (comment)

Each mention of '_ is a fresh lifetime, like in fn foo(x: &'_ T, y: &'_ T).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants