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

Add #[must_use] to WIN32_ERROR and other return types that represent error codes #2900

Closed
kennykerr opened this issue Feb 28, 2024 · 2 comments · Fixed by #2907
Closed

Add #[must_use] to WIN32_ERROR and other return types that represent error codes #2900

kennykerr opened this issue Feb 28, 2024 · 2 comments · Fixed by #2907
Labels
enhancement New feature or request

Comments

@kennykerr
Copy link
Collaborator

Is it worth marking WIN32_ERROR as #[must_use] @kennykerr? My only concern after upgrading to 0.54.0 is that it is now quite possible to forget to handle errors and no warnings are given about this (unlike previous versions which forced using Result values).

Cheers
Fotis

Originally posted by @fgimian in #2890 (comment)

@kennykerr
Copy link
Collaborator Author

Probably worth applying to WIN32_ERROR, BOOL, NTSTATUS, and RPC_STATUS.

@kennykerr kennykerr added the enhancement New feature or request label Feb 28, 2024
@kennykerr
Copy link
Collaborator Author

This is complicated by the fact that the metadata models some of these as enums and others as structs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant