Skip to content

Commit b2829e5

Browse files
aryan-debugnyurik
authored andcommitted
Issue#112284
1 parent 62d7ed4 commit b2829e5

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
@@ -48,6 +48,7 @@ pub struct UnnamedItemIsPrivate {
4848
}
4949

5050
#[derive(Diagnostic)]
51+
#[help]
5152
#[diag(privacy_in_public_interface, code = "E0446")]
5253
pub struct InPublicInterface<'a> {
5354
#[primary_span]

0 commit comments

Comments
 (0)