Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nagisa opened this issue Dec 10, 2017 · 0 comments
Closed
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) C-bug Category: This is a bug.

Comments

@nagisa
Copy link
Member

nagisa commented Dec 10, 2017

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

@kennytm kennytm added the C-bug Category: This is a bug. label Dec 10, 2017
@nagisa nagisa closed this as completed Dec 10, 2017
@RalfJung RalfJung added the A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants