Skip to content

Commit 353cda5

Browse files
committed
Update the tutorial with the new shift behaviors.
1 parent 8678baa commit 353cda5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,11 @@ Thus, binary arithmetic is done with `*`, `/`, `%`, `+`, and `-`
461461
operator (there are no unary postfix operators in Rust) that does
462462
negation.
463463

464-
Binary shifting is done with `>>` (shift right), `>>>` (arithmetic
465-
shift right), and `<<` (shift left). Logical bitwise operators are
466-
`&`, `|`, and `^` (and, or, and exclusive or), and unary `!` for
467-
bitwise negation (or boolean negation when applied to a boolean
468-
value).
464+
Binary shifting is done with `>>` (shift right), and `<<` (shift
465+
left). Shift right is arithmetic if the value is signed and logical if
466+
the value is unsigned. Logical bitwise operators are `&`, `|`, and `^`
467+
(and, or, and exclusive or), and unary `!` for bitwise negation (or
468+
boolean negation when applied to a boolean value).
469469

470470
The comparison operators are the traditional `==`, `!=`, `<`, `>`,
471471
`<=`, and `>=`. Short-circuiting (lazy) boolean operators are written

0 commit comments

Comments
 (0)