Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2-phase borrow activation ice #49736

Closed
nikomatsakis opened this issue Apr 6, 2018 · 1 comment
Closed

2-phase borrow activation ice #49736

nikomatsakis opened this issue Apr 6, 2018 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ NLL-sound Working towards the "invalid code does not compile" goal

Comments

@nikomatsakis
Copy link
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

@nikomatsakis nikomatsakis added WG-compiler-nll NLL-sound Working towards the "invalid code does not compile" goal labels Apr 6, 2018
@pietroalbini pietroalbini added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 6, 2018
@Robbepop
Copy link
Contributor

Robbepop commented Apr 6, 2018

Is this similar to this ICE?
#49678

@bors bors closed this as completed in bacd120 Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ NLL-sound Working towards the "invalid code does not compile" goal
Projects
None yet
Development

No branches or pull requests

3 participants