From 01eb5e8ad39a57e9fc31569983c1b9d5905a7e58 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Mon, 22 Apr 2013 01:58:53 +1000 Subject: Rename Div operator trait to Quot and Modulo operator trait to Rem --- doc/rust.md | 16 ++++++++-------- doc/tutorial.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/rust.md b/doc/rust.md index e9c88fc3412..b1eb5521b39 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -1467,10 +1467,10 @@ A complete list of the built-in language items follows: : Elements can be subtracted. `mul` : Elements can be multiplied. -`div` - : Elements can be divided. -`mod` - : Elements have a modulo operation. +`quot` + : Elements have a quotient operation. +`rem` + : Elements have a remainder operation. `neg` : Elements can be negated arithmetically. `not` @@ -1856,11 +1856,11 @@ The default meaning of the operators on standard types is given here. : Multiplication. Calls the `mul` method on the `core::ops::Mul` trait. `/` - : Division. - Calls the `div` method on the `core::ops::Div` trait. + : Quotient. + Calls the `quot` method on the `core::ops::Quot` trait. `%` - : Modulo (a.k.a. "remainder"). - Calls the `modulo` method on the `core::ops::Modulo` trait. + : Remainder. + Calls the `rem` method on the `core::ops::Rem` trait. #### Bitwise operators diff --git a/doc/tutorial.md b/doc/tutorial.md index 56629b93b1a..c10bc8a294c 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -362,7 +362,7 @@ The nil type, written `()`, has a single value, also written `()`. ## Operators Rust's set of operators contains very few surprises. Arithmetic is done with -`*`, `/`, `%`, `+`, and `-` (multiply, divide, take remainder, add, and subtract). `-` is +`*`, `/`, `%`, `+`, and `-` (multiply, quotient, remainder, add, and subtract). `-` is also a unary prefix operator that negates numbers. As in C, the bitwise operators `>>`, `<<`, `&`, `|`, and `^` are also supported. -- cgit 1.4.1-3-g733a5