Skip to content

i128 lowering implementation won't work for const fn evaluated at runtime #46622

Closed
@nagisa

Description

@nagisa

So the code like

const fn banana(a: i128, b: i128) -> i128 {
    a / b
}

pub fn peach(a: i128, b: i128) -> i128 {
    let ban : fn(i128, i128) -> i128 = banana;
    ban(a, b)
}

Will probably ICE with how #46583 is implemented on targets with i128 lowering, however it seems like something that needn’t block the stabilisation of i128 or const fn and can be thought about when both features land.

cc #24111 #35118

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