]> 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 b32069a334ca9911213729a9a7482953b985bcb5..ebe589001a1fe563bf320a94cb08ac12b6978719 100644 (file)
@@ -114,7 +114,7 @@ LL |             unsafe {}
    |             ^^^^^^^^^
 ...
 LL |     t!();
-   |     ----- in this macro invocation
+   |     ---- in this macro invocation
    |
    = help: consider adding a safety comment in the macro definition
    = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -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