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

add descriptive error msg for __traverse__ receivers other than &self #4045

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Apr 3, 2024

This adds a descriptive error message if receivers other than &self are tried to extract from __traverse__ along with the corresponding UI tests. In particular this tests for PyRef, PyRefMut, Bound and &mut self.

Fixes #3180

Copy link

codspeed-hq bot commented Apr 4, 2024

CodSpeed Performance Report

Merging #4045 will not alter performance

Comparing Icxolu:fix-3180 (2906452) with main (a4aea23)

Summary

✅ 72 untouched benchmarks

@adamreichold adamreichold added this pull request to the merge queue Apr 4, 2024
Merged via the queue into PyO3:main with commit 7a00b4d Apr 4, 2024
43 checks passed
@Icxolu Icxolu deleted the fix-3180 branch April 4, 2024 21:32
davidhewitt pushed a commit that referenced this pull request Apr 16, 2024
…elf` (#4045)

* add descriptive error msg for `__traverse__` receivers other than `self`

* add newsfragment

* improve error message
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.

proc-macro should check that __traverse__ takes only &self
2 participants