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

#[must_use] on traits also affects trait objects #796

Closed
alercah opened this issue Apr 16, 2020 · 0 comments · Fixed by #1203
Closed

#[must_use] on traits also affects trait objects #796

alercah opened this issue Apr 16, 2020 · 0 comments · Fixed by #1203
Labels
A-attributes Area: Attributes Easy We believe this would not be difficult to actually fix

Comments

@alercah
Copy link
Contributor

alercah commented Apr 16, 2020

The reference says:

When used on a trait declaration, a call expression of an expression statement to a function that returns an impl trait of that trait violates the unused_must_use lint.

But it also applies to dyn Trait, not just impl Trait.

@ehuss ehuss added A-attributes Area: Attributes Easy We believe this would not be difficult to actually fix labels Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes Easy We believe this would not be difficult to actually fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants