Update E0446 label with improved wording

This commit is contained in:
Jonathan Turner 2016-09-26 17:05:43 -07:00
parent 2fa91b23c5
commit c0f29fdd58
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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)
}
}