Skip to content

fix error with named lifetimes in #[new] return types#5998

Merged
davidhewitt merged 1 commit intoPyO3:mainfrom
Icxolu:fix-new-bound
Apr 24, 2026
Merged

fix error with named lifetimes in #[new] return types#5998
davidhewitt merged 1 commit intoPyO3:mainfrom
Icxolu:fix-new-bound

Conversation

@Icxolu
Copy link
Copy Markdown
Member

@Icxolu Icxolu commented Apr 23, 2026

While exploring I noticed that #[new] functions with named lifetimes in their output type give a compile error. This is because the type is used in our const specialization. There is no particular reason to block such types, most notable Bound is one of them, so this fixes that.

@Icxolu Icxolu added the bugfix label Apr 23, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Merging this PR will not alter performance

✅ 105 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing Icxolu:fix-new-bound (fca4b21) with main (4712a0a)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

Copy link
Copy Markdown
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidhewitt davidhewitt added this pull request to the merge queue Apr 24, 2026
Merged via the queue into PyO3:main with commit 90abfdc Apr 24, 2026
46 of 47 checks passed
@Icxolu Icxolu deleted the fix-new-bound branch April 24, 2026 13:37
davidhewitt pushed a commit to davidhewitt/pyo3 that referenced this pull request May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants