Skip to content

Attribute invalid input assertions to callers #977

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

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

kornelski
Copy link
Contributor

#[track_caller] makes assert location point to the caller of the function. This helps users find which of their calls provided the invalid inputs.

@kornelski
Copy link
Contributor Author

It requires Rust 1.46

@@ -8,4 +8,4 @@ Please see [Rayon Docs] for details about using Rayon.

[Rayon Docs]: https://docs.rs/rayon/

Rayon-core currently requires `rustc 1.36.0` or greater.
Rayon-core currently requires `rustc 1.46.0` or greater.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, rayon-core is unaffected here, though it will be untested unless we add another CI job.

But I intend to bump to 2021 in about a month (#964), so I probably won't publish until then.

@cuviper
Copy link
Member

cuviper commented Sep 22, 2022

bors r+

bors bot added a commit that referenced this pull request Sep 22, 2022
977: Attribute invalid input assertions to callers r=cuviper a=kornelski

`#[track_caller]` makes assert location point to the caller of the function. This helps users find which of their calls provided the invalid inputs.

Co-authored-by: Kornel <kornel@geekhood.net>
@bors
Copy link
Contributor

bors bot commented Sep 22, 2022

Build failed:

@cuviper
Copy link
Member

cuviper commented Sep 23, 2022

bors r+

@bors bors bot merged commit 118d19b into rayon-rs:master Sep 23, 2022
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

Successfully merging this pull request may close these issues.

2 participants