Uh oh!
There was an error while loading. Please reload this page.
build: migrate the codebase to the 2024 Language Edition - #4191
Merged
Conversation
rami3lforce-pushed
the
build/edition-2024
branch
5 times, most recently
from
February 22, 2025 07:07
6799481 to
665f283Comparerami3l
marked this pull request as ready for review
February 22, 2025 07:19
rami3lforce-pushed
the
build/edition-2024
branch
from
February 22, 2025 07:56
665f283 to
396623fComparedjc
approved these changes
Feb 22, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
djc
commented
Feb 22, 2025
Contributor
Nice work! |
Following <https://users.rust-lang.org/t/rust-2024-compatibility-lint-and-the-if-let-temporary-scope/125969/5>, I have manually audited all `if_let_rescope` cases and found out that certain existing cases can be rewritten to make it clearer semantically. So these migrations have been made in advance so that the only cases of `if-let` remaining are false positives of this lint. The crux of determining false positives here is that, according to <rust-lang/rust#133167>, `if let Some()` and other similar cases where the `else` drop is not significant are not affected by the Edition change.
rami3lforce-pushed
the
build/edition-2024
branch
from
February 22, 2025 14:57
396623f to
ff252c5Comparerami3lforce-pushed
the
build/edition-2024
branch
from
February 22, 2025 15:01
ff252c5 to
85b90f6Comparerami3l
commented
Feb 22, 2025
| /// optional `opentelemetry` (a.k.a. `otel`) feature. | ||
| #[cfg(feature = "otel")] | ||
| fn telemetry<S>(process: &Process) -> impl Layer<S> | ||
| fn telemetry<S>(process: &Process) -> impl Layer<S> + use<S> |
MemberAuthor
There was a problem hiding this comment.
@djc So basically impl Layer<S> + use<S> means "this impl Layer<S> has nothing to do with 'process" (this function is generic over both 'process and S, so we use<S> to exclude 'process), and the same thing goes for other fixes in this commit.
rami3l
commented
Feb 23, 2025
MemberAuthor
I just did one more check and have again found no missing significant drops. I think it should be safe to merge this one now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #4190.
This is a semi-automatic migration due to the sheer amount of false positives in the
rust-2024-compatibilitylint group and theif_let_rescopelint in particular. Some steps have more details in the corresponding commit messages.You can get a clearer version of the PR diff via semanticdiff.
Concerns
if-letcorrectly migrated?if_let_rescopeauto migration #4192 to include all the suggestions made byclippywhere there are a lot of false positives.