Skip to content
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

Merged
merged 2 commits into from
Nov 1, 2022
Merged

Set Rust edition to 2021 #9045

merged 2 commits into from
Nov 1, 2022

Conversation

mtreinish
Copy link
Member

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

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
@mtreinish mtreinish added Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository labels Oct 31, 2022
@mtreinish mtreinish requested a review from a team as a code owner October 31, 2022 20:31
@qiskit-bot
Copy link
Collaborator

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:

Copy link
Contributor

@kevinhartman kevinhartman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@coveralls
Copy link

coveralls commented Oct 31, 2022

Pull Request Test Coverage Report for Build 3369629652

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.456%

Totals Coverage Status
Change from base Build 3365518310: 0.0%
Covered Lines: 62192
Relevant Lines: 73638

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a 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!

@mtreinish
Copy link
Member Author

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.

@mergify mergify bot merged commit 3e14e6e into Qiskit:main Nov 1, 2022
@mtreinish mtreinish deleted the rust-edition-2021 branch November 1, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog Rust This PR or issue is related to Rust code in the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants