Skip to content

chore: enable unreachable_pub lint at workspace level#22153

Closed
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:enable-unreachable-pub-lint
Closed

chore: enable unreachable_pub lint at workspace level#22153
rluvaton wants to merge 1 commit into
apache:mainfrom
rluvaton:enable-unreachable-pub-lint

Conversation

@rluvaton
Copy link
Copy Markdown
Member

@rluvaton rluvaton commented May 13, 2026

Which issue does this PR close?

  • Closes #.

Rationale for this change

Why looking at the code I thought I could use InProgressSpillFile since it marked as pub, or the function create_in_progress_file that is also pub, but InProgressSpillFile mod is behind pub(crate) so to avoid confusion when reading the source code I'm enabling this lint

What changes are included in this PR?

  • Adds unreachable_pub = "deny" under [workspace.lints.rust] in the root Cargo.toml.

Are these changes tested?

CI

Are there any user-facing changes?

No.

Sets `unreachable_pub = "deny"` under `[workspace.lints.rust]` so the
compiler flags items marked `pub` whose effective visibility is narrower
than `pub` because of an enclosing `pub(crate)` or private module.

This catches cases where `pub` reads as public API but the item is
actually only reachable inside the crate, which is misleading when
auditing the public surface.
@rluvaton rluvaton closed this May 13, 2026
@rluvaton rluvaton deleted the enable-unreachable-pub-lint branch May 13, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant