auto merge of #6147 : bjz/rust/numeric-traits, r=brson

After much discussion on IRC and #4819, we have decided to revert to the old naming of the `/` operator. This does not change its behavior. In making this change, we also have had to rename some of the methods in the `Integer` trait. Here is a list of the methods that have changed:

- `Quot::quot` -> `Div::div`
- `Rem::rem` - stays the same
- `Integer::quot_rem` -> `Integer::div_rem`
- `Integer::div` -> `Integer::div_floor`
- `Integer::modulo` -> `Integer::mod_floor`
- `Integer::div_mod` -> `Integer::div_mod_floor`
This commit is contained in:
bors 2013-05-01 01:51:35 -07:00
commit f67239fac3
27 changed files with 201 additions and 237 deletions

View file

@ -1,5 +1,5 @@
enum test {
quot_zero = 1/0, //~ERROR expected constant: attempted quotient with a divisor of zero
div_zero = 1/0, //~ERROR expected constant: attempted to divide by zero
rem_zero = 1%0 //~ERROR expected constant: attempted remainder with a divisor of zero
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:attempted quotient with a divisor of zero
// error-pattern:attempted to divide by zero
fn main() {
let y = 0;
let z = 1 / y;