diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index b214608fbe9c9..43cdf2942d230 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 fe8a50bc618ed..493a272261776 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) } }