Skip to content

const fn arguments not properly checked for destructors. #47351

Closed

Description

@eddyb

These currently compile, even if they can be used from compile-time code to trigger a drop:

#![feature(const_fn)]
pub const fn drop<T>(_: T) {}
pub const fn drop2<T>(x: T) { (x, ()).1 }

cc @alexreg

Activity

  1. added
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
    on Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions