Skip to content

ICE when promoting @[] to slice #2797

Closed
@msullivan

Description

@msullivan

The following code fails with an ICE

fn foo(_x: &[int]) {}
fn main() {
    let x = @[1,2,3];
    foo(x);
}

The output:

nubs/box-borrow-ice.rs:4:8: 4:9 error: internal compiler error: aliased ptr with a non-none lp
nubs/box-borrow-ice.rs:4     foo(x);

Metadata

Metadata

Assignees

Labels

A-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