about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Turner <jturner@mozilla.com>2016-09-26 17:05:43 -0700
committerJonathan Turner <jturner@mozilla.com>2016-09-26 17:05:43 -0700
commitc0f29fdd58666df69352c66ecbc3be68b500da27 (patch)
treec2e7bf8b5e973452b130101325783fe6746aa68d
parent2fa91b23c59a3e84e0f62f7517214d055924fed9 (diff)
downloadrust-c0f29fdd58666df69352c66ecbc3be68b500da27.tar.gz
rust-c0f29fdd58666df69352c66ecbc3be68b500da27.zip
Update E0446 label with improved wording
-rw-r--r--src/librustc_privacy/lib.rs2
-rw-r--r--src/test/compile-fail/E0446.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index b214608fbe9..43cdf2942d2 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -974,7 +974,7 @@ impl<'a, 'tcx: 'a, 'v> Visitor<'v> for SearchInterfaceForPrivateItemsVisitor<'a,
                                self.old_error_set.contains(&ty.id) {
                                 let mut err = struct_span_err!(self.tcx.sess, ty.span, E0446,
                                           "private type in public interface");
-                                err.span_label(ty.span, &format!("private type can't be public"));
+                                err.span_label(ty.span, &format!("can't leak private type"));
                                 err.emit();
                             } else {
                                 self.tcx.sess.add_lint(lint::builtin::PRIVATE_IN_PUBLIC,
diff --git a/src/test/compile-fail/E0446.rs b/src/test/compile-fail/E0446.rs
index fe8a50bc618..493a2722617 100644
--- a/src/test/compile-fail/E0446.rs
+++ b/src/test/compile-fail/E0446.rs
@@ -12,7 +12,7 @@ mod Foo {
     struct Bar(u32);
 
     pub fn bar() -> Bar { //~ ERROR E0446
-                          //~| NOTE private type can't be public
+                          //~| NOTE can't leak private type
         Bar(0)
     }
 }