Skip to content

Commit

Permalink
Update E0446 label with improved wording
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Turner committed Sep 27, 2016
1 parent 2fa91b2 commit c0f29fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc_privacy/lib.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/E0446.rs
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit c0f29fd

Please sign in to comment.