JelteF / derive_more

Some more derive(Trait) options
MIT License
1.73k stars 123 forks source link

Add #[track_caller] to Add/Mul(Assign) derives #378

Closed JelteF closed 4 months ago

JelteF commented 4 months ago

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)~