-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Set Rust edition to 2021 #9045
Set Rust edition to 2021 #9045
Conversation
Since our MSRV for the Rust code in Qiskit is 1.56.1 we can set the Rust editions [1] to Rust Edition 2021 [2]. This will enable us to leverage newer syntax features in the rust code. This commit bumps the rust edition from 2018 to 2021. [1] https://doc.rust-lang.org/edition-guide/editions/index.html [2] https://doc.rust-lang.org/edition-guide/rust-2021/index.html
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Pull Request Test Coverage Report for Build 3369629652
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised we weren't running on 2021 already, to be honest!
When we first added rust support our MSRV was informally older than 1.56 which prevented edition 2021 so we used edition 2018. But yeah we should have done this in #8196 it was really just an oversight. |
Summary
Since our MSRV for the Rust code in Qiskit is 1.56.1 we can set the Rust editions [1] to Rust Edition 2021 [2]. This will enable us to leverage newer syntax features in the rust code. This commit bumps the rust edition from 2018 to 2021.
Details and comments
[1] https://doc.rust-lang.org/edition-guide/editions/index.html
[2] https://doc.rust-lang.org/edition-guide/rust-2021/index.html