Skip to content

"ref" in guarded patterns trips LLVM asserts #3256

Closed
@bblum

Description

@bblum

This crashes if you try to compile it:

fn main() {
    let x = some(unsafe::exclusive(false));
    match move x {
        some(ref z) if z.with(|b| *b) => {
            do z.with |b| { assert *b; }
        },
        _ => fail
    }
}

Related #2329, #3255

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationA-lifetimesArea: Lifetimes / regionsI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions