Repository navigation
Check Rust impl items and resolve workspace crates - #6
Merged
Merged
Conversation
Rust wiki checks now include pub methods and associated items on a public type, plus items written in a trait impl for that type. pub(crate), pub(super), pub(self), and pub(in ...) stay out, as do impl items on a restricted type. Workspace members, including globs, supply crate names, and crate:: stays inside the member that owns the file. Co-authored-by: Aron Amos <IronAdamant@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two limits left after the Rust map work are fixed.
Impl items
mark-greennow includes unrestrictedpubmethods and associated consts or types on a public type, and the items written in a trait impl for that type.pub(crate),pub(super),pub(self), andpub(in ...)stay out, including when they appear on a method. Items on apub(crate)type stay out, so aDropimpl for a restricted type is not required in the wiki. Items inside a function or a nested module stay out.impl_items_are_checked_and_restricted_visibility_is_notaccepts a wiki that namesdocumented,FLAG, andfmt, refuses a wiki that dropsdocumented, and refuses a wiki that still wraps removeddocumentedandfmtin backticks.Workspaces
The root
Cargo.toml[workspace] memberslist is read, including*and?globs, andexcludeis applied. Each member's package name and[lib] name(hyphens become underscores) point at that member's library.crate::stays inside the crate that owns the file: a workspace member, an integration test, orsrc/bin. An excluded package is not an importable crate name, andcrate::inside it does not jump to another member.workspace_members_resolve_across_crates_and_keep_crate_paths_localbuildscrates/alpha,crates/beta, atools/*member, and an excludedtools/skip. Cross-crateusereaches the named library.crate::incrates/beta/tests/stays in that test crate.The dogfood check on this repo's
src/api.rsstill lists the same dependents.Measured
cargo build: successcargo test --locked: 49 passed, 0 failed, 0 ignoredcargo clippy --all-targets -- -D warnings: successverify-wikis: 29 checked, 0 failed