Skip to content

argument-less const fn do not get properly executed #1081

Closed
@RalfJung

Description

@RalfJung

With rust-lang/rust#66294 landed, argument-less const fn get memoized even when run in Miri. I am pretty sure that is wrong as they can (certainly through unsafe code, once that is allowed) have arbitrary side-effects.

Cc @davidhewitt @oli-obk

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-interpreterArea: affects the core interpreterC-bugCategory: This is a bug.I-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions