From aa179cb0f1bfd56da67604b31ce3f72d0baff8b8 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 18 May 2013 01:47:51 +1000 Subject: rustc: relax limits on (u)int type limit lint. Fixes #6130. --- src/test/run-pass/issue-6130.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/run-pass/issue-6130.rs (limited to 'src/test') diff --git a/src/test/run-pass/issue-6130.rs b/src/test/run-pass/issue-6130.rs new file mode 100644 index 00000000000..642308c0ca1 --- /dev/null +++ b/src/test/run-pass/issue-6130.rs @@ -0,0 +1,20 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[deny(type_limits)]; + +fn main() { + let i: uint = 0; + assert!(i <= 0xFFFF_FFFF_u); + + let i: int = 0; + assert!(i >= -0x8000_0000_i); + assert!(i <= 0x7FFF_FFFF_i); +} -- cgit 1.4.1-3-g733a5