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

Move and swap operators #410

Closed
graydon opened this issue May 26, 2011 · 6 comments
Closed

Move and swap operators #410

graydon opened this issue May 26, 2011 · 6 comments
Labels
A-frontend Area: frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@graydon
Copy link
Contributor

graydon commented May 26, 2011

Add operator <- for move semantics and operator <-> for in-place swapping. Essential components to making the unique ownership model work. Steal <- from send, turn operator send into |> and make it chain to the right.

@ghost ghost assigned msullivan May 26, 2011
@msullivan
Copy link
Contributor

<- is in, but the typestate component doesn't exist yet. Receive is now |> but doesn't chain.

@msullivan
Copy link
Contributor

Swap is implemented.

@graydon
Copy link
Contributor Author

graydon commented Jun 28, 2011

Is there much left to do here, aside from "fix bugs as they occur"?

@msullivan
Copy link
Contributor

Tim has implemented the typestate stuff.
Currently we don't properly check that the arguments to swap are lvals and that the RHS of move is a local. The former will trip an llvm assert, the latter will compile and do the wrong thing.

Otherwise I think it should be good?

@graydon
Copy link
Contributor Author

graydon commented Jun 28, 2011

Heh. Ok. Want to fix those?

@msullivan
Copy link
Contributor

The swap issue has been fixed in #590 and the move issue has been opened as #591.

I'm going to close this bug.

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add support for Haiku x86 and x86_64

* Rework of original patches from Niels Sascha Reedijk
  that include style and build fixes for libc master
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* More non-strict type handling

* Merge global constants
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this issue Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants