Skip to content

use inline const expression initializing enum singletons#5772

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:inline-const-array
Feb 3, 2026
Merged

use inline const expression initializing enum singletons#5772
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:inline-const-array

Conversation

@davidhewitt
Copy link
Member

Fixes #5768

We can avoid the initial const by using an inline const expression (stable since 1.79).

Copy link
Contributor

@alex alex left a comment

Choose a reason for hiding this comment

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

neat

@davidhewitt davidhewitt added this pull request to the merge queue Feb 3, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 3, 2026
* use inline const expression initializing enum singletons

* newsfragment
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 3, 2026
@davidhewitt davidhewitt added this pull request to the merge queue Feb 3, 2026
Merged via the queue into PyO3:main with commit dfd6eaf Feb 3, 2026
44 checks passed
@davidhewitt davidhewitt deleted the inline-const-array branch February 3, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyo3 0.28: clippy errors on rustc 1.83 with pyclass

3 participants