lipanski / mockito

HTTP mocking for Rust!
MIT License
698 stars 59 forks source link

Feature: add `#[track_caller]` to all asserting functions #203

Open peddermaster2 opened 3 months ago

peddermaster2 commented 3 months ago

Make all asserting function print the location in user code where they called the asserting mockito function.

It looks like this was already added to a few methods of Mock but not all.

lipanski commented 3 months ago

Where are you missing it? Also note that async methods can't handle #[track_caller] properly yet - see https://github.com/rust-lang/rust/issues/110011

peddermaster2 commented 3 months ago

In the assert_async. But if it is not yet working i'll have to wait :)

lipanski commented 3 months ago

Once that feature lands in stable, I'll gladly add the annotations.