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

Macro-less variant #15

Open
matklad opened this issue Oct 9, 2021 · 2 comments
Open

Macro-less variant #15

matklad opened this issue Oct 9, 2021 · 2 comments

Comments

@matklad
Copy link
Member

matklad commented Oct 9, 2021

#[track_caller]
pub fn expect(data: [&str; 1]) -> Expect

seems like this can work?

@bjorn3
Copy link

bjorn3 commented Oct 9, 2021

That would give confusing results if the caller has #[track_caller] too.

@matklad
Copy link
Member Author

matklad commented Oct 9, 2021

Good question, macros and Location::caller indeed behave differently in this respect: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=62145393b803fce3564f805a1d3c4493

jeremyBanks added a commit to jeremyBanks/expect-test that referenced this issue Jul 5, 2022
jeremyBanks added a commit to jeremyBanks/expect-test that referenced this issue Jul 5, 2022
jeremyBanks added a commit to jeremyBanks/expect-test that referenced this issue Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants