Skip to content

Anonymous function with upvar trips assert in trans #1467

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
jruderman opened this issue Jan 8, 2012 · 0 comments
Closed

Anonymous function with upvar trips assert in trans #1467

jruderman opened this issue Jan 8, 2012 · 0 comments

Comments

@jruderman
Copy link
Contributor

fn main() {
    let x = 3;
    (fn() {
        assert x == 3;
    })();
}

Result:

rust: upcall fail 'Assertion cx.fcx.llupvars.contains_key(did.node) failed', ../src/comp/middle/trans.rs:2688
rust: domain main @0x7fe932819a00 root task failed

Expected?

error: attempted dynamic environment-capture
@marijnh marijnh closed this as completed in 9fa7491 Jan 9, 2012
bjorn3 added a commit to bjorn3/rust that referenced this issue Mar 28, 2024
Avoid ICE when global_asm const operand fails to evaluate
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants