Skip to content

Commit 067b541

Browse files
committed
---
yaml --- r: 189410 b: refs/heads/master c: d3c49d2 h: refs/heads/master v: v3
1 parent 2f8328e commit 067b541

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ee7a72c608dcae1b66d75f43378dfa1bee36f2d2
2+
refs/heads/master: d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 270a677d4d698916f5ad103f0afc3c070b8dbeb4
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/src/doc/complement-design-faq.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,10 @@ bindings.
174174
See also [a long thread][alt] on renaming `let mut` to `var`.
175175

176176
[alt]: https://mail.mozilla.org/pipermail/rust-dev/2014-January/008319.html
177+
178+
## Why no `--x` or `x++`?
179+
180+
Preincrement and postincrement, while convenient, are also fairly complex. They
181+
require knowledge of evaluation order, and often lead to subtle bugs and
182+
undefined behavior in C and C++. `x = x + 1` or `x += 1` is only slightly
183+
longer, but unambiguous.

0 commit comments

Comments
 (0)