-
Notifications
You must be signed in to change notification settings - Fork 809
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
migrate to 2024 edition #4976
base: main
Are you sure you want to change the base?
migrate to 2024 edition #4976
Conversation
Thanks for working on this. Since this requires raising our MSRV significantly, this isn't something we'll be able to consider merging in the new future. It looks like overwhelmingly these changes relate to how |
CodSpeed Performance ReportMerging #4976 will not alter performanceComparing Summary
|
There are two lints which the new Rust edition mentions (see https://doc.rust-lang.org/edition-guide/rust-2024/index.html).
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#missing-unsafe-on-extern However, it would mean that we would need to apply these warnings for each crate in the workspace individually. |
Hmm, is there some way to use workspace settings to enable those warnings
universally?
…On Thu, Mar 13, 2025 at 3:21 PM Jonas Pleyer ***@***.***> wrote:
There are two lints which the new Rust edition mentions (see
https://doc.rust-lang.org/edition-guide/rust-2024/index.html).
#![warn(missing_unsafe_on_extern, unsafe_op_in_unsafe_fn)]
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#missing-unsafe-on-extern
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn
However, it would mean that we would need to apply these warnings for each
crate in the workspace individually.
—
Reply to this email directly, view it on GitHub
<#4976 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBDCPJS5CXH4FLFZCC32UHLEBAVCNFSM6AAAAABY674OVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRSGQ3DENRYHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: jonaspleyer]*jonaspleyer* left a comment (PyO3/pyo3#4976)
<#4976 (comment)>
There are two lints which the new Rust edition mentions (see
https://doc.rust-lang.org/edition-guide/rust-2024/index.html).
#![warn(missing_unsafe_on_extern, unsafe_op_in_unsafe_fn)]
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#missing-unsafe-on-extern
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn
However, it would mean that we would need to apply these warnings for each
crate in the workspace individually.
—
Reply to this email directly, view it on GitHub
<#4976 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBDCPJS5CXH4FLFZCC32UHLEBAVCNFSM6AAAAABY674OVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRSGQ3DENRYHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Since my changes have only been semantic, and not changed any functionality or versions of dependecies, this should not have introduced a regression this big. Either the test was an outlier or something else is happening when switching to the new edition and a new compiler version. |
I am not sure about this. I have opened a thread on the users.rust-lang.org forum to see if anyone has a idea on how to do this. |
We should be able to configure the lints via the |
d587fe7
to
adf3685
Compare
I have rebased the branch to only include the following commits addressing the previously mentioned comments:
|
Thanks for moving forward with this. I had a quick test and on our MSRV (1.63)
... so we may have to drop a4c52df from this PR. |
I have updated the PR and added another small commit for formatting |
This is an initial advancement to increase the edition version to 2024. In particular I have done the following non-structural changes:
unsafe
keyword to function calls of unsafe functionsextern "C"
blocks asunsafe extern "C"
For now, the error messages which are being produced are different to the previous ones. I have commented out the
test_compile_errors
test case. The remaining tests are all passing.I have not yet added an entry into the
newsfragments
folder but in the process of merging this PR, I can do this as well.Let me know what you think.