Skip to content

ICE: Default methods and &Self #8148

Closed
Closed
@alexcrichton

Description

@alexcrichton

The following code gives an ICE:

trait Foo {
    fn foo(&Self) {}
}
fn main() {
}

with the message:

rust: task failed at 'index out of bounds: the len is 0 but the index is 0', /Users/alex/code/rust-opt/src/librustc/middle/liveness.rs:1598

ping @msullivan

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-trait-systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions