lipanski / mockito

HTTP mocking for Rust!
MIT License
654 stars 57 forks source link

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

Open peddermaster2 opened 1 week ago

peddermaster2 commented 1 week 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 1 week 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 1 week ago

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

lipanski commented 1 week ago

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