]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/transmute-from-fn-item-types-lint.rs
Imported Upstream version 1.10.0+dfsg1
[rustc.git] / src / test / compile-fail / transmute-from-fn-item-types-lint.rs
index 42c3cb7f181319b2badacdb429b49995f693ff09..08e660e878c2978ea54261cb28077ebff49454f5 100644 (file)
@@ -15,15 +15,15 @@ use std::mem;
 unsafe fn foo() -> (isize, *const (), Option<fn()>) {
     let i = mem::transmute(bar);
     //~^ ERROR is now zero-sized and has to be cast to a pointer before transmuting
-    //~^^ ERROR was previously accepted
+    //~^^ WARNING was previously accepted
 
     let p = mem::transmute(foo);
     //~^ ERROR is now zero-sized and has to be cast to a pointer before transmuting
-    //~^^ ERROR was previously accepted
+    //~^^ WARNING was previously accepted
 
     let of = mem::transmute(main);
     //~^ ERROR is now zero-sized and has to be cast to a pointer before transmuting
-    //~^^ ERROR was previously accepted
+    //~^^ WARNING was previously accepted
 
     (i, p, of)
 }
@@ -31,11 +31,11 @@ unsafe fn foo() -> (isize, *const (), Option<fn()>) {
 unsafe fn bar() {
     mem::transmute::<_, *mut ()>(foo);
     //~^ ERROR is now zero-sized and has to be cast to a pointer before transmuting
-    //~^^ ERROR was previously accepted
+    //~^^ WARNING was previously accepted
 
     mem::transmute::<_, fn()>(bar);
     //~^ ERROR is now zero-sized and has to be cast to a pointer before transmuting
-    //~^^ ERROR was previously accepted
+    //~^^ WARNING was previously accepted
 
     // No error if a coercion would otherwise occur.
     mem::transmute::<fn(), usize>(main);