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

added-must-use #449

Merged
merged 2 commits into from
Dec 18, 2023
Merged

added-must-use #449

merged 2 commits into from
Dec 18, 2023

Conversation

sanbox-irl
Copy link
Contributor

Added #[must_use] to those methods which look like (&*self ...) -> Self (basically methods which take a self by non-mutable ref or by value, and which return a Self). However, I did not add such bounds to trait impls whose trait definition already had such a must_use on it (all the core::ops and all the From impls). Along those notes, I added [#must_use] to FloatExt's trait definition.

On this (m1 mac), most of the tests except for those in "euler::quat::test_" did not work on main currently and after this, continue to not work. It appears that they work fine on the Github Actions runner, so I suspect that this PR should be fine, since this should not result in any different code generated.

I tried to check all the Tera files as appropriate, and I think I got them all, but even if I didn't, I would be comfortable with this PR merging, as it's just a continuation of efforts to match the std's new must_use style.

@bitshifter
Copy link
Owner

Hmm, it looks like the codegen lint failed. It looks like you ran the code generator, what version of rustc are you on?

@sanbox-irl
Copy link
Contributor Author

1.74.0 -- do i need to be on a specific RV?

@bitshifter
Copy link
Owner

That should be ok. Just checking, you ran cargo run -p codegen? I might need to check it out locally and try work out what's up

@sanbox-irl
Copy link
Contributor Author

ah @bitshifter going to check but my fault -- ran cargo run -p codegen and then updated the tera files (standardized the must_use vs. inline order) and forgot to return

@bitshifter bitshifter merged commit 142708e into bitshifter:main Dec 18, 2023
15 checks passed
@bitshifter
Copy link
Owner

Thanks!

@sanbox-irl sanbox-irl deleted the add-must-use branch December 18, 2023 14:43
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