]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/undocumented_unsafe_blocks.stderr
Fix ICE on `undocumented_unsafe_blocks`
[rust.git] / tests / ui / undocumented_unsafe_blocks.stderr
index 613e9ffca456559a9352d85166f44711d7c7b787..ebe589001a1fe563bf320a94cb08ac12b6978719 100644 (file)
@@ -155,5 +155,17 @@ LL ~     // Safety: ...
 LL ~     unsafe {};
    |
 
-error: aborting due to 13 previous errors
+error: unsafe block missing a safety comment
+  --> $DIR/undocumented_unsafe_blocks.rs:288:20
+   |
+LL |     println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: consider adding a safety comment
+   |
+LL ~     println!("{}", // Safety: ...
+LL ~     unsafe { String::from_utf8_unchecked(vec![]) });
+   |
+
+error: aborting due to 14 previous errors