Skip to content

Commit f5087aa

Browse files
committed
doc: Remove unary move operator from language ref. Closes #2032
1 parent b181ea4 commit f5087aa

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

doc/rust.md

-19
Original file line numberDiff line numberDiff line change
@@ -1852,25 +1852,6 @@ mutate(copy v); // Pass a copy
18521852
assert v[0] == 1; // Original was not modified
18531853
~~~~
18541854

1855-
### Unary move expressions
1856-
1857-
~~~~~~~~{.ebnf .gram}
1858-
move_expr : "move" expr ;
1859-
~~~~~~~~
1860-
1861-
This is used to indicate that the referenced _lval_ must be moved out,
1862-
rather than copied, when evaluating this expression. It will only have
1863-
an effect when the expression is _stored_ somewhere or passed to a
1864-
function that takes ownership of it.
1865-
1866-
~~~~
1867-
let x = ~10;
1868-
let y = [move x];
1869-
~~~~
1870-
1871-
Any access to `x` after applying the `move` operator to it is invalid,
1872-
since it is no longer initialized at that point.
1873-
18741855
### Call expressions
18751856

18761857
~~~~~~~~ {.abnf .gram}

0 commit comments

Comments
 (0)