]> git.lizzy.rs Git - rust.git/commitdiff
Restore error message
authorYuki Okushi <huyuumi.dev@gmail.com>
Tue, 15 Jan 2019 09:01:38 +0000 (18:01 +0900)
committerYuki Okushi <huyuumi.dev@gmail.com>
Tue, 15 Jan 2019 09:01:38 +0000 (18:01 +0900)
src/librustc_lint/builtin.rs

index 6cd632321cc1a89e774b65d2f32ca4dd4a8777dc..50631a74fe617796adb41ec41ce5acdcd0107345 100644 (file)
@@ -229,8 +229,9 @@ fn report_unsafe(&self, cx: &EarlyContext, span: Span, desc: &'static str) {
 impl EarlyLintPass for UnsafeCode {
     fn check_attribute(&mut self, cx: &EarlyContext, attr: &ast::Attribute) {
         if attr.check_name("allow_internal_unsafe") {
-            self.report_unsafe(cx, attr.span, "cannot use `allow_internal_unsafe` \
-                                               with `forbid(unsafe_code)`");
+            self.report_unsafe(cx, attr.span, "`allow_internal_unsafe` allows defining \
+                                               macros using unsafe without triggering \
+                                               the `unsafe_code` lint at their call site");
         }
     }