Skip to content

2-phase borrow activation ice #49736

Closed
Closed
@nikomatsakis

Description

@nikomatsakis
Contributor

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

Activity

added
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Apr 6, 2018
Robbepop

Robbepop commented on Apr 6, 2018

@Robbepop
Contributor

Is this similar to this ICE?
#49678

added a commit that references this issue on Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @nikomatsakis@pietroalbini@Robbepop

        Issue actions

          2-phase borrow activation ice · Issue #49736 · rust-lang/rust