Skip to content

Lint idea: warn about implicit drop #3915

@m-mueller678

Description

@m-mueller678

When writing low level code it is sometimes desirable to not have implicit drop calls.

For instance when interfacing with Lua one often has Rust function called by Lua, which in turn call Lua functions. One can execute a Lua function using lua_call. Errors in the Lua code are handled using longjmp, which can jump to a handler in the original Lua caller thus skipping the Execution of the rest of the Rust function.
In such a situation one wants to make sure no code is executed implicitly after lua_call (because it might be skipped).
Ideally this lint can be enabled both for single values that should not be dropped implicitly as well as functions in which nothing should be dropped implicitly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions