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

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

Open
peddermaster2 opened this issue Sep 7, 2024 · 3 comments
Open

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

peddermaster2 opened this issue Sep 7, 2024 · 3 comments

Comments

@peddermaster2
Copy link

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
Copy link
Owner

lipanski commented Sep 7, 2024

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

@peddermaster2
Copy link
Author

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

@lipanski
Copy link
Owner

lipanski commented Sep 8, 2024

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

@peddermaster2 peddermaster2 changed the title Feature: add #[track_caller] to all asserting funcitons Feature: add #[track_caller] to all asserting functions Sep 9, 2024
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

No branches or pull requests

2 participants