Skip to content

chore(lint): items no other crate can reach are no longer pub - #714

Draft
PiquelChips wants to merge 1 commit into
mainfrom
chore/unreachable-pub
Draft

PiquelChips wants to merge 1 commit into
mainfrom
chore/unreachable-pub

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

What and why

Turns on rustc's unreachable_pub: a pub item that no other crate can reach now warns, an error under -D warnings. Fixed 15 sites in auth-service, xtask, auth-sdk and sourceorigin-ui by narrowing them to pub(crate) (re-export lists in ui and auth-service follow).

Two #[expect(unreachable_pub)], both crate- or module-wide:

  • crates/common/src/tests.rs: the test enums that prove the exported vocabulary macros expand downstream are private to the test, while the macros make their methods pub.
  • crates/ui/src/lib.rs: a false positive on every #[component] (78 sites). The attribute generates a pub props struct beside each component. A component the crate re-exports is reachable, but its props struct is not, and the lint reports it on the function. Narrowing the function breaks the re-export. The exception turns the lint off for the whole of ui; the four genuine sites there (SUPPORT_ADDRESS, NavItem, NavGroup, Shell) are fixed. The alternative is 78 per-component #[expect]s.

Testing

cargo clippy -- -D warnings passes over the workspace and over each crate alone.

Note

Written by Claude Sonnet 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant