diff --git a/tests/compile-fail/min_max.rs b/tests/compile-fail/min_max.rs index 18f415ddc..5a5fae493 100644 --- a/tests/compile-fail/min_max.rs +++ b/tests/compile-fail/min_max.rs @@ -5,6 +5,8 @@ use std::cmp::{min, max}; +const LARGE : usize = 3; + fn main() { let x; x = 2usize; @@ -15,6 +17,8 @@ fn main() { min(3, max(1, x)); // ok, could be 1, 2 or 3 depending on x + min(1, max(LARGE, x)); // no error, we don't lookup consts here + let s; s = "Hello";