Skip to content

Swap expression section in spec copies block of text from move expression #1595

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

Closed
mikesamuel opened this issue Jan 21, 2012 · 0 comments
Closed

Comments

@mikesamuel
Copy link

http://doc.rust-lang.org/doc/rust.html#swap-expressions says:

Evaluating a swap expression causes, as a side effect, the vales held in the left-hand-side and right-hand-side lvals to be exchanged indivisibly.

Evaluating a move expression does not change reference counts, nor does it cause a deep copy of any unique structure pointed to by the moved rval. Instead, the move expression represents an indivisible exchange of ownership between the right-hand-side to the left-hand-side of the expression. No allocation or destruction is entailed.

The second paragraph was copied verbatim from the previous section and should probably be updated to refer to swap expressions.

In the first paragraph "vales" should be "values".

flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 4, 2022
Closes rust-lang#1595

changelog: Add no_effect_replace lint.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 4, 2022
New lint `no_effect_replace`

Closes rust-lang#1595

Signed-off-by: Federico Guerinoni <[email protected]>

changelog: Add [`no_effect_replace`] lint.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Added packages to release for ubuntu-20.04 only.

* Reduced image size.

* Changed from matrix.

* Missing path in variable invocation.

* Copy without version dependence.

* Eliminated hard-coded values

* Removed redundant input.

* Added missing package command.

* Forgot to make owner flexible.

* Fixed docker push fail: uppercase in name.

* Missing permissions.

* Reverted unrelated testbundle Dockerfile
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
* write canonicalization chapter first half

* w

* review

* very good section

* whatever

* review

* ok
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
* write canonicalization chapter first half

* w

* review

* very good section

* whatever

* review

* ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants