WIP: Fix up some possible lifetime issues in newer editions #707
No reviewers
Labels
No labels
bug
duplicate
easy
enhancement
help wanted
invalid
question
rfc
structured-logging
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-rust-lang/log!707
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lifetime-rules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For #706
@ -20,3 +20,3 @@impl<'a> KVs<'a> for &'a [(&'a str, Value<'a>)] {impl<'a, const N: usize> KVs<'a> for &'a [(&'a str, Value<'a>); N] {#[inline]I'm fine with the change. I do wonder if this changes the binary size as now create code per
N/size, but I don't know if this will impact anything.The code block shouldn't matter right? (fine with the code change though)
You'd think not, but this is one of the edition-based lifetime changes. In the 2024 edition, this borrow is for a lifetime that doesn't outlive the block.
@ -20,3 +20,3 @@impl<'a> KVs<'a> for &'a [(&'a str, Value<'a>)] {impl<'a, const N: usize> KVs<'a> for &'a [(&'a str, Value<'a>); N] {#[inline]I couldn't actually trigger the same build failure reported in #706 yet, so this one is purely speculative right now.
The change in code size is a good point, I'll measure it and see what impact it has. I wouldn't be surprised if it made no difference, but is definitely worth checking.
☔ The latest upstream changes (possibly #727) made this pull request unmergeable. Please resolve the merge conflicts.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.