]> git.lizzy.rs Git - rust.git/commitdiff
Update error messages
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Mon, 27 Nov 2017 13:31:51 +0000 (14:31 +0100)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Mon, 27 Nov 2017 13:31:51 +0000 (14:31 +0100)
tests/compile-fail/deallocate-bad-alignment.rs
tests/compile-fail/deallocate-bad-size.rs
tests/compile-fail/invalid_bool.rs
tests/compile-fail/match_char.rs
tests/compile-fail/reallocate-bad-alignment-2.rs
tests/compile-fail/reallocate-bad-alignment.rs
tests/compile-fail/reallocate-bad-size.rs

index c1ae7477c81a8adc22ff8a02eaef41c2dd04e19c..b64740de81f4d0c79e8a13358fbf69ed15bf4cba 100644 (file)
@@ -5,7 +5,7 @@
 use alloc::heap::Heap;
 use alloc::allocator::*;
 
-// error-pattern: tried to deallocate or reallocate using incorrect alignment or size
+// error-pattern: incorrect alloc info: expected size 1 and align 2, got size 1 and align 1
 
 fn main() {
     unsafe {
index 5577f10736d2e39371df6848291140b809c57a34..f5b82f65d2af326cb88660891c960393115df031 100644 (file)
@@ -5,7 +5,7 @@
 use alloc::heap::Heap;
 use alloc::allocator::*;
 
-// error-pattern: tried to deallocate or reallocate using incorrect alignment or size
+// error-pattern: incorrect alloc info: expected size 2 and align 1, got size 1 and align 1
 
 fn main() {
     unsafe {
index c30c9b439a46b495c1b91c6ccc8043abd137fbc6..9de2630797ece3415241ad08e0226375f3fd9cc9 100644 (file)
@@ -1,4 +1,4 @@
 fn main() {
-    let b = unsafe { std::mem::transmute::<u8, bool>(2) }; //~ ERROR: invalid boolean value read
-    if b { unreachable!() } else { unreachable!() }
+    let b = unsafe { std::mem::transmute::<u8, bool>(2) };
+    if b { unreachable!() } else { unreachable!() } //~ ERROR: invalid boolean value read
 }
index 4fee6e692bada0913b093aeb2892fac4f610d8ea..a91c7fef6aa1e92b3d4709d26f1b56fb47c343af 100644 (file)
@@ -1,7 +1,7 @@
 fn main() {
     assert!(std::char::from_u32(-1_i32 as u32).is_none());
-    match unsafe { std::mem::transmute::<i32, char>(-1) } { //~ERROR tried to interpret an invalid 32-bit value as a char: 4294967295
-        'a' => {},
+    match unsafe { std::mem::transmute::<i32, char>(-1) } {
+        'a' => {}, //~ERROR tried to interpret an invalid 32-bit value as a char: 4294967295
         'b' => {},
         _ => {},
     }
index cd6214440ff262e572a6a1e6acaa25f896dca906..fae8246c5d29c2bbec346a2200e6180a20df7354 100644 (file)
@@ -5,7 +5,7 @@
 use alloc::heap::Heap;
 use alloc::allocator::*;
 
-// error-pattern: tried to deallocate or reallocate using incorrect alignment or size
+// error-pattern: incorrect alloc info: expected size 1 and align 2, got size 1 and align 1
 
 fn main() {
     unsafe {
index da5fe1d81909d4cc36b758b65aa8a6420b0af612..6a928de07eec3dfe908e7d0332d3d70780354bdb 100644 (file)
@@ -5,7 +5,7 @@
 use alloc::heap::Heap;
 use alloc::allocator::*;
 
-// error-pattern: tried to deallocate or reallocate using incorrect alignment or size
+// error-pattern: incorrect alloc info: expected size 1 and align 1, got size 1 and align 2
 
 fn main() {
     unsafe {
index 953178742c46fb03e14bca2bf74cd93ce647ce3e..d57c610d9337f806ead81c256b61334f80034d28 100644 (file)
@@ -5,7 +5,7 @@
 use alloc::heap::Heap;
 use alloc::allocator::*;
 
-// error-pattern: tried to deallocate or reallocate using incorrect alignment or size
+// error-pattern: incorrect alloc info: expected size 2 and align 1, got size 1 and align 1
 
 fn main() {
     unsafe {