about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-01-06 21:54:24 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-01-06 22:23:29 +0200
commit85a4a192c73f3b1f6c0d4c6fcb54532a8f820122 (patch)
treeae14aa2744edf8fb9ae7dd87cb520d7b5ff3f463 /src/test
parenta28701a928f8d6ab0299b10708441f7234ba7133 (diff)
downloadrust-85a4a192c73f3b1f6c0d4c6fcb54532a8f820122.tar.gz
rust-85a4a192c73f3b1f6c0d4c6fcb54532a8f820122.zip
rustc: keep track of tables everywhere as if they were per-body.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/const-eval-overflow.rs14
-rw-r--r--src/test/run-pass/issue-28189.rs15
2 files changed, 10 insertions, 19 deletions
diff --git a/src/test/compile-fail/const-eval-overflow.rs b/src/test/compile-fail/const-eval-overflow.rs
index b8f3f714a84..3c688d58fd1 100644
--- a/src/test/compile-fail/const-eval-overflow.rs
+++ b/src/test/compile-fail/const-eval-overflow.rs
@@ -15,6 +15,8 @@
 // change this warn to a deny, then the compiler will exit before
 // those errors are detected.
 
+#![warn(const_err)]
+
 use std::fmt;
 use std::{i8, i16, i32, i64, isize};
 use std::{u8, u16, u32, u64, usize};
@@ -80,7 +82,8 @@ const VALS_I64: (i64, i64, i64, i64) =
      );
 
 const VALS_U8: (u8, u8, u8, u8) =
-    (-(u8::MIN as i8) as u8,
+    ( //~ WARN constant evaluation error: attempt to subtract with overflow.
+     -(u8::MIN as i8) as u8,
      u8::MIN - 1,
      //~^ ERROR constant evaluation error
      //~| attempt to subtract with overflow
@@ -93,7 +96,8 @@ const VALS_U8: (u8, u8, u8, u8) =
      );
 
 const VALS_U16: (u16, u16, u16, u16) =
-    (-(u16::MIN as i16) as u16,
+    ( //~ WARN constant evaluation error: attempt to subtract with overflow.
+     -(u16::MIN as i16) as u16,
      u16::MIN - 1,
      //~^ ERROR constant evaluation error
      //~| attempt to subtract with overflow
@@ -106,7 +110,8 @@ const VALS_U16: (u16, u16, u16, u16) =
      );
 
 const VALS_U32: (u32, u32, u32, u32) =
-    (-(u32::MIN as i32) as u32,
+    ( //~ WARN constant evaluation error: attempt to subtract with overflow.
+     -(u32::MIN as i32) as u32,
      u32::MIN - 1,
      //~^ ERROR constant evaluation error
      //~| attempt to subtract with overflow
@@ -119,7 +124,8 @@ const VALS_U32: (u32, u32, u32, u32) =
      );
 
 const VALS_U64: (u64, u64, u64, u64) =
-    (-(u64::MIN as i64) as u64,
+    ( //~ WARN constant evaluation error: attempt to subtract with overflow.
+     -(u64::MIN as i64) as u64,
      u64::MIN - 1,
      //~^ ERROR constant evaluation error
      //~| attempt to subtract with overflow
diff --git a/src/test/run-pass/issue-28189.rs b/src/test/run-pass/issue-28189.rs
deleted file mode 100644
index 0e624a77858..00000000000
--- a/src/test/run-pass/issue-28189.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct S<T>(T) where [T; (||{}, 1).1]: Copy;
-
-fn main() {
-
-}