Skip to content

ICE matching borrowed strings #3574

Closed
Closed
@jesse99

Description

@jesse99

Following ICEs with rust from Sep 22, 2012:

// rustc --test match_borrowed_str.rs.rs && ./match_borrowed_str.rs
extern mod std;

fn compare(x: &str, y: &str) -> bool
{
    match x
    {
        "foo" => y == "foo",
        _ => y == "bar",
    }
}

#[test]
fn tester()
{
    assert compare("foo", "foo");
}

May be related to some of the other pattern matching bugs such as #2869.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions