Skip to content

Commit 88f5efa

Browse files
authored
Merge pull request rust-lang#257 from demurgos/patch-1
Fix link in README.md (Rust operator precedence)
2 parents 3caed3c + b9d8326 commit 88f5efa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ features = ["c"]
6969

7070
### Porting Reminders
7171

72-
1. [Rust][4] and [C][5] have slightly different operator precedence. C evaluates comparisons (`== !=`) before bitwise operations (`& | ^`), while Rust evaluates the other way.
72+
1. [Rust][5a] and [C][5b] have slightly different operator precedence. C evaluates comparisons (`== !=`) before bitwise operations (`& | ^`), while Rust evaluates the other way.
7373
2. C assumes wrapping operations everywhere. Rust panics on overflow when in debug mode. Consider using the [Wrapping][6] type or the explicit [wrapping_*][7] functions where applicable.
7474
3. Note [C implicit casts][8], especially integer promotion. Rust is much more explicit about casting, so be sure that any cast which affects the output is ported to the Rust implementation.
7575
4. Rust has [many functions][9] for integer or floating point manipulation in the standard library. Consider using one of these functions rather than porting a new one.
7676

77-
[4]: https://doc.rust-lang.org/reference.html#operator-precedence
78-
[5]: http://en.cppreference.com/w/c/language/operator_precedence
77+
[5a]: https://doc.rust-lang.org/reference/expressions.html#expression-precedence
78+
[5b]: http://en.cppreference.com/w/c/language/operator_precedence
7979
[6]: https://doc.rust-lang.org/core/num/struct.Wrapping.html
8080
[7]: https://doc.rust-lang.org/std/primitive.i32.html#method.wrapping_add
8181
[8]: http://en.cppreference.com/w/cpp/language/implicit_conversion

0 commit comments

Comments
 (0)