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 #[track_caller] to Add/Mul(Assign) derives #378

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

JelteF
Copy link
Owner

@JelteF JelteF commented Jul 2, 2024

Resolves #364

Synopsis

In debug builds overflows cause panics. With our derives it's hard to spot
where these panics happen when RUST_BACKTRACE is not set.

Solution

This fixes that by marking our trait methods for Add/Mul(Assign) as `#[track_caller].

Checklist

- [ ] Documentation is updated (if required)
- [ ] Tests are added/updated (if required)

@JelteF JelteF requested a review from tyranron July 2, 2024 14:38
@JelteF JelteF self-assigned this Jul 2, 2024
@JelteF JelteF enabled auto-merge (squash) July 2, 2024 14:39
@JelteF JelteF disabled auto-merge July 2, 2024 14:39
@JelteF JelteF enabled auto-merge (squash) July 2, 2024 14:40
@tyranron tyranron added this to the 1.0.0 milestone Jul 2, 2024
@JelteF JelteF merged commit 55b9bb1 into master Jul 2, 2024
17 checks passed
@JelteF JelteF deleted the track-caller-add branch July 2, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally have trait methods use track_caller to push panic information to the caller
2 participants