Skip to content

Commit

Permalink
replace MIN/MAX constants with min_value/max_value functions
Browse files Browse the repository at this point in the history
MIN and MAX were breaking the build for me. min_value and max_value do not.
  • Loading branch information
matthew-piziak committed Oct 11, 2016
1 parent a802ec1 commit dba6678
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/run-fail/iter-step-overflow-debug.rs
Expand Up @@ -14,13 +14,13 @@ use std::panic;

fn main() {
let r = panic::catch_unwind(|| {
let mut it = u8::MAX..;
let mut it = u8::max_value()..;
it.next();
});
assert!(r.is_err());

let r = panic::catch_unwind(|| {
let mut it = i8::MAX..;
let mut it = i8::max_value()..;
it.next();
});
assert!(r.is_err());
Expand Down
8 changes: 4 additions & 4 deletions src/test/run-fail/iter-step-overflow-ndebug.rs
Expand Up @@ -11,9 +11,9 @@
// compile-flags: -C debug_assertions=no

fn main() {
let mut it = u8::MAX..;
assert_eq!(it.next(), u8::MIN);
let mut it = u8::max_value()..;
assert_eq!(it.next(), u8::min_value());

let mut it = i8::MAX..;
assert_eq!(it.next(), i8::MIN);
let mut it = i8::max_value()..;
assert_eq!(it.next(), i8::min_value());
}

0 comments on commit dba6678

Please sign in to comment.