diff options
| author | Urgau <urgau@numericable.fr> | 2024-10-31 23:03:09 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-11-04 19:09:40 +0100 |
| commit | 0bc622d251f8606ca86d4a5ccdbedd52afef247a (patch) | |
| tree | 52f9e29c69d4d614fb1ad1b4820c45365293eae3 /compiler/rustc_lint/src/lints.rs | |
| parent | db034cee00570a9b82ea8b9e9e95221dbd745698 (diff) | |
| download | rust-0bc622d251f8606ca86d4a5ccdbedd52afef247a.tar.gz rust-0bc622d251f8606ca86d4a5ccdbedd52afef247a.zip | |
Prefer `pub(super)` in `unreachable_pub` lint suggestion
Diffstat (limited to 'compiler/rustc_lint/src/lints.rs')
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 38e52570e53..352155729e5 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -254,7 +254,8 @@ impl<'a> LintDiagnostic<'a, ()> for BuiltinUngatedAsyncFnTrackCaller<'_> { #[diag(lint_builtin_unreachable_pub)] pub(crate) struct BuiltinUnreachablePub<'a> { pub what: &'a str, - #[suggestion(code = "pub(crate)")] + pub new_vis: &'a str, + #[suggestion(code = "{new_vis}")] pub suggestion: (Span, Applicability), #[help] pub help: bool, |
