Skip to content

2-phase borrow activation ice #49736

Closed
Closed
@nikomatsakis

Description

@nikomatsakis

This program ICEs:

#![feature(nll)]

struct Foo {
    
}

impl Foo {
    fn method(&mut self, foo: &mut Foo) {
    }
}

fn main() {
    let mut foo = Foo { };
    foo.method(&mut foo);
}

See also this conversation between @pnkfelix and I on gitter, which I believe to be relevant.

I'm refactoring some of this code, trying to explore the new NLL approach, so I will probably wind up fixing this. But obviously we should have this as a test!

cc @bobtwinkles

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️NLL-soundWorking towards the "invalid code does not compile" goal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions