Skip to content

Incorrect borrow checking #39963

Closed
Closed
@strega-nil

Description

@strega-nil

UPDATE: This now works in NLL land. We just need someone to add a test.


https://is.gd/O6RlWi

left.1.0 and left.0.0 should be separate borrows into the same structure.

Note that changing **left to *&mut**left makes it borrow check, and changing Box<Foo> to &'static mut Foo in the Foo struct also makes it borrow check. This makes me think it's something to do with the special casing of Box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-borrow-checkerArea: The borrow checkerC-bugCategory: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions