Skip to content

Remove <- and <-> forms #3466

Description

@nikomatsakis

This involves:

  • Converting a <- b to a = move b
  • Converting a <-> b to util::swap(&mut a, &mut b) or util::replace() (I suspect most uses would be better written with the latter)
  • Implementing util::swap() and util::replace() unsafely, probably by converting the arguments to unsafe pointers and then using the move_val_init intrinsic, which moves a value without dropping the previous value

Activity

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

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions