]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/trait-safety-fn-body.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / compile-fail / trait-safety-fn-body.rs
index 499b58f70d77ab5360a63458ba97188b875c6ff5..0df7ee8cabed21a4adb3db8a14e1d1962127f669 100644 (file)
@@ -18,7 +18,9 @@ unsafe trait UnsafeTrait : Sized {
 unsafe impl UnsafeTrait for *mut isize {
     fn foo(self) {
         // Unsafe actions are not made legal by taking place in an unsafe trait:
-        *self += 1; //~ ERROR E0133
+        *self += 1;
+        //~^ ERROR E0133
+        //~| NOTE unsafe call requires unsafe function or block
     }
 }