Issue 3223 migrate to rust edition 2024#3275
Conversation
Update cargo dependencies Apply cargo fix --edition Change cargo.toml edition property to `2024`
Reformat via `cargo fmt`
|
I also ran tests on Linux and Windows, there don't seem to be any breaking tests due to the new changes. |
|
Amazing work, thank you a lot! For PRs that are not yet meant to be applied, we can convert them to a draft until they are ready to be applied. |
Skgland
left a comment
There was a problem hiding this comment.
The review request1 combined with the WIP title give me a bit of a mixed signal.
Usually I would expect review to happen once a PR is ready. Otherwise when requesting a review for incomplete work I would expect the request to include either a note on what is still WIP so the review can skip the incomplete part or for it to request review of a specific (ready) part.
My fault not yours, I should have noted this earlier, so just ignore this section.
In hindsight I think I would have liked a commit of the unmodified result of cargo fix --edition to see the changes that were undone
and given how this touches a lot of files I would have preferred it to be done by a regular contributor.
Does this clippy lint need addressing or can just ignore it?
Clippy isn't checked in CI so I would recommend to just ignore that in this PR.
My only complaint regarding the PR content is the size/placement of the added unsafe blocks (see inline comments).
Footnotes
@abmclin as the PR author you should have a
|
|
Hi @Skgland sorry about giving a mixed signal. I'm used to using WIP tag to also serve as an indication that a review is needed not necessarily to indicate that it is incomplete. I'm happy to convert to a draft instead. I do realize that lot of files are touched in this PR. Although you said to ignore the comment about adding a commit prior to my edits but if it would make it easier — I don't mind — adding a prior commit to show the changes applied by |
That is an odd use of WIP in my opinion. I don't think the review status should be signaled using a PR Title tag or using draft status. As I tried to convey in my earlier comment, for me a WIP tag or draft status indicates that the PR Author is not yet done making changes and as such review should usually wait as it could become outdated/obsolete by said changes (the PR is still a moving target). No need to be sorry, the mixed signalling appears to be a result of different expectation on how the WIP tag is used. Regarding WIP vs Draft status: I would expect both to be used in the same circumstances (PR author is not yet done making changes). I feel like I am rambling too much on this and going off-topic, sorry.
It's fine, the changes are basically all minor mechanical changes and it isn't a complete project refactoring.
In the meantime I have checked out the latest master commit and ran If you could fix the unsafe blocks as I pointed out in my review, after that I think this is good to go. Footnotes |
|
Yes I had to use I am now going through each of your code comment. |
|
I have made the requested changes. Let me know if I should squash the commits prior to merging. |
Skgland
left a comment
There was a problem hiding this comment.
Took me some time to review as I was busy visiting family over the easter weekend.
A few more notes.
| let n = self.cif.call::<T>(self.code_ptr, args); | ||
| Ok(Value::Number(fixnum!(Number, n, arena))) | ||
| unsafe { | ||
| let n = self.cif.call::<T>(self.code_ptr, args); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
@Skgland thanks for the additional comments. Based on your examples, I also found a few additional |
|
Thanks @Skgland I'm thinking to wait until the |


Resolves #3223
I've performed the steps outlined in https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html and committed changes before running
cargo fmtand committing again.As expected there were lot of code changes due to maintaining drop order, the changes made code clarity worse, so I reverted those changes.
There were changes made to macro rules, changing exprs to expr_2021 due to this reason https://doc.rust-lang.org/edition-guide/rust-2024/macro-fragment-specifiers.html#:~:text=To%20support%20the%20old%20behavior,existing%20macros%20does%20not%20change.
I scanned the codebase and it doesn't look like
constand_expressions are used in scryer so the macro rule change seemed unnecessary and I revertedexpr_2021back toexpr. But I'm not familiar enough with the codebase to say if it's ok to do that or not. Please chime in if it's a potential issue.Changes were made to resolve explicit borrowing in implicit borrow match patterns errors and new warnings generated about missing
unsafeblocks in unsafe functions.I ran
cargo clippyand it generated two warnings about the dead code enum which was already known, and another warning:Does this clippy lint need addressing or can just ignore it?