Skip to content

Commit c0f29fd

Browse files
author
Jonathan Turner
committed
Update E0446 label with improved wording
1 parent 2fa91b2 commit c0f29fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_privacy/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ impl<'a, 'tcx: 'a, 'v> Visitor<'v> for SearchInterfaceForPrivateItemsVisitor<'a,
974974
self.old_error_set.contains(&ty.id) {
975975
let mut err = struct_span_err!(self.tcx.sess, ty.span, E0446,
976976
"private type in public interface");
977-
err.span_label(ty.span, &format!("private type can't be public"));
977+
err.span_label(ty.span, &format!("can't leak private type"));
978978
err.emit();
979979
} else {
980980
self.tcx.sess.add_lint(lint::builtin::PRIVATE_IN_PUBLIC,

src/test/compile-fail/E0446.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod Foo {
1212
struct Bar(u32);
1313

1414
pub fn bar() -> Bar { //~ ERROR E0446
15-
//~| NOTE private type can't be public
15+
//~| NOTE can't leak private type
1616
Bar(0)
1717
}
1818
}

0 commit comments

Comments
 (0)