Skip to content

abi_unsupported_vector_types lint is optimization-dependent #132129

Open
@RalfJung

Description

@RalfJung

The lint guarding against #116558 is intended to eventually become a hard error to fix this ABI issue. However, right now the lint is optimization-dependent: it runs during monomorphization to be able to figure out the actual argument types that will be passed at all call sites, and reject them if they need a missing target feature. If a call gets optimized away (e.g. in dead code), the lint will not fire.

I don't know any good way to prevent this, since we need the monomorphization-time information to check whether any of the arguments is a too-large SIMD vector. So this issue mostly serves to let @rust-lang/lang know that this is a thing, and as a place to track any ideas we might have about fixing this, or concerns about making this into an optimization-dependent hard error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-discussionCategory: Discussion or questions that doesn't represent real issues.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itL-abi_unsupported_vector_typesLint: abi_unsupported_vector_typesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions