Skip to content

Move-out-of-raw-pointer in vec::shift #2703

Closed
@graydon

Description

@graydon
Contributor

Comment says 'this isn't legal, per se..' which is cute but could do with a bit more explanation of why it's even working.

Activity

nikomatsakis

nikomatsakis commented on Jun 22, 2012

@nikomatsakis
Contributor

Actually I think that's legal now. I recently updated the rules to allow
moves out of unsafe pointers (it's very useful sometimes!)

We were "allowing" it before just because we weren't treating let x <- y
as a move.

ghost assigned on Jun 22, 2012
eholk

eholk commented on Jun 22, 2012

@eholk
Contributor

It's legal now, so I'll remove the comment.

added a commit that references this issue on Jun 4, 2024
81ec454
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@eholk@nikomatsakis

        Issue actions

          Move-out-of-raw-pointer in vec::shift · Issue #2703 · rust-lang/rust