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

chore: remove useless must_use attributes #5199

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

alexpyattaev
Copy link

Problem

must_use attribute does nothing in trait functions with default impl

https://doc.rust-lang.org/reference/attributes/diagnostics.html#r-attributes.diagnostics.must_use.trait-impl-function

Summary of Changes

remove attributes where appropriate

Fixes #
build using latest nightly compiler

@alexpyattaev alexpyattaev marked this pull request as ready for review March 9, 2025 07:20
@KirillLykov
Copy link

When used in trait implementation it is doing nothing, so I wonder why we have these attributes.

@alexpyattaev
Copy link
Author

When used in trait implementation it is doing nothing, so I wonder why we have these attributes.

I guess someone thought they work, compiler did not complain, so they stuck. Now years later it is finally a warning we can see => it gets removed =)

@alexpyattaev alexpyattaev merged commit 5ad415a into anza-xyz:master Mar 10, 2025
47 checks passed
@alexpyattaev alexpyattaev deleted the useless_attr branch March 10, 2025 08:26
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