Skip to content

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

Closed
@lqd

Description

@lqd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)NLL-completeWorking towards the "valid code works" goal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions