Skip to content

Commit e7e1bfe

Browse files
aryan-debugnyurik
authored andcommitted
Issue#112284
1 parent c474aa7 commit e7e1bfe

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

compiler/rustc_privacy/messages.ftl

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ privacy_from_private_dep_in_public_interface =
88
privacy_in_public_interface = {$vis_descr} {$kind} `{$descr}` in public interface
99
.label = can't leak {$vis_descr} {$kind}
1010
.visibility_label = `{$descr}` declared as {$vis_descr}
11+
.help = - Either remove the `pub` from the function
12+
- Or add `pub` to `{$descr}`
1113
1214
privacy_item_is_private = {$kind} `{$descr}` is private
1315
.label = private {$kind}

compiler/rustc_privacy/src/errors.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub struct InPublicInterfaceTraits<'a> {
6363

6464
// Duplicate of `InPublicInterfaceTraits` but with a different error code, shares the same slug.
6565
#[derive(Diagnostic)]
66+
#[help]
6667
#[diag(privacy_in_public_interface, code = "E0446")]
6768
pub struct InPublicInterface<'a> {
6869
#[primary_span]

0 commit comments

Comments
 (0)