Skip to content

Mark C function return values as #[must_use] #451

@briansmith

Description

@briansmith

One approach is to use (if/when it is implemented) the proposed #[must_use] annotation on functions: rust-lang/rfcs#886.

Another approach is to change the return value to a #[repr(transparent)] wrapper that is marked #[must_use], if/when this proposal is implemented: rust-lang/rfcs#1758.

This is a good-first-bug since this is something anybody can do, once the facilities are available to actually do it, but note that it requires additional work on rustc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions