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

NLL: Invalid "cannot borrow as mutable more than once" error related to array of mutable references #52111

Closed
lqd opened this issue Jul 6, 2018 · 2 comments
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal

Comments

@lqd
Copy link
Member

lqd commented Jul 6, 2018

Found while triaging the nll-1 crater run, extracted from fscm-0.1.1.

Playground

Accessing the first element in the array generates an error about the second element borrowing _ more than once at a time. Mutating the second element compiles fine though.

@lqd lqd added A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal labels Jul 6, 2018
@nikomatsakis nikomatsakis added this to the Rust 2018 Preview 2 milestone Jul 6, 2018
@matthewjasper
Copy link
Contributor

This looks like it was fixed by #51894

@lqd
Copy link
Member Author

lqd commented Jul 9, 2018

Confirmed on the latest nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal
Projects
None yet
Development

No branches or pull requests

3 participants