From 79bf820170faf257e68540d43cdf40112822a87d Mon Sep 17 00:00:00 2001 From: llogiq Date: Sat, 5 Sep 2015 16:24:41 +0200 Subject: [PATCH] added test against const lookup --- tests/compile-fail/min_max.rs | 4 ++++ 1 file changed, 4 insertions(+) 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";