Skip to content

jsondoclint: simplify code using idiomatic Rust - #155169

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
AmmaarBakshi:jsondoclint-cleanup
May 12, 2026
Merged

jsondoclint: simplify code using idiomatic Rust#155169
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
AmmaarBakshi:jsondoclint-cleanup

Conversation

@AmmaarBakshi

Copy link
Copy Markdown
Contributor

Simplify jsondoclint with small idiomatic Rust cleanups. No behavior changes.

  • Use matches!() macro instead of match in item_kind.rs
  • Remove unnecessary derefs and simplify Option mapping in validator.rs
  • Replace clone() on Copy type with *id
  • Fix doc comment indentation
  • Remove redundant tuple parens in tests.rs
  • Remove needless borrow and closure in main.rs

Verified:

  • cargo clippy -p jsondoclint --tests --quiet → no warnings
  • cargo test -p jsondoclint --quiet → all 5 tests pass

- Use matches!() macro instead of match in item_kind.rs
- Remove unnecessary derefs and simplify Option mapping in validator.rs
- Replace clone() on Copy type with *id
- Fix doc comment indentation
- Remove redundant tuple parens in tests.rs
- Remove needless borrow and closure in main.rs
@rustbotrustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 11, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu

@jieyouxu

Copy link
Copy Markdown
Member

r? rustdoc

@AmmaarBakshi

Copy link
Copy Markdown
ContributorAuthor

r? rustdoc

what?

@AmmaarBakshi

Copy link
Copy Markdown
ContributorAuthor

what are you all up to?
i am waiting
no comments ? no explicit change?

@camelidcamelid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, so sorry for the delay reviewing! I didn't see it in my notifications. This looks great, thanks for the contribution!

View changes since this review

@camelid

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-borsBot commented May 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 31bd2c9 has been approved by camelid

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 11, 2026
…r=camelid
jsondoclint: simplify code using idiomatic Rust
Simplify `jsondoclint` with small idiomatic Rust cleanups. No behavior changes.
- Use `matches!()` macro instead of `match` in `item_kind.rs`
- Remove unnecessary derefs and simplify Option mapping in `validator.rs`
- Replace `clone()` on Copy type with `*id`
- Fix doc comment indentation
- Remove redundant tuple parens in `tests.rs`
- Remove needless borrow and closure in `main.rs`
Verified:
- `cargo clippy -p jsondoclint --tests --quiet` → no warnings
- `cargo test -p jsondoclint --quiet` → all 5 tests pass
This was referenced May 11, 2026
rust-borsBot pushed a commit that referenced this pull request May 11, 2026
…uwer
Rollup of 11 pull requests
Successful merges:
- #156448 (miri subtree update)
- #155023 (Introduce move expressions (`move($expr)`) )
- #156429 (Simplify `intrinsic::raw_eq` in MIR when possible)
- #147672 (LLBC-linker: Do not strip debug symbols for the nvptx target anymore)
- #155169 (jsondoclint: simplify code using idiomatic Rust)
- #155184 ( Have arrays' `drop_glue` just unsize and call the slice version)
- #156022 (rustdoc: Fix cosmetic issues when reporting unresolved paths in `broken_intra_doc_links`)
- #156442 (Show intrinsics::gpu in docs)
- #156461 (LLVM 23: Specify `returnaddress` intrinsic return type)
- #156462 (LLVM 23: Accept float (instead of hex) literals in codegen tests)
- #156466 (Refactor `CheckAttrVisitor` so rustfmt can format it.)
@rust-bors
rust-borsBot merged commit 24306e3 into rust-lang:mainMay 12, 2026
11 checks passed
@rustbotrustbot added this to the 1.97.0 milestone May 12, 2026
rust-timer added a commit that referenced this pull request May 12, 2026
Rollup merge of #155169 - AmmaarBakshi:jsondoclint-cleanup, r=camelid
jsondoclint: simplify code using idiomatic Rust
Simplify `jsondoclint` with small idiomatic Rust cleanups. No behavior changes.
- Use `matches!()` macro instead of `match` in `item_kind.rs`
- Remove unnecessary derefs and simplify Option mapping in `validator.rs`
- Replace `clone()` on Copy type with `*id`
- Fix doc comment indentation
- Remove redundant tuple parens in `tests.rs`
- Remove needless borrow and closure in `main.rs`
Verified:
- `cargo clippy -p jsondoclint --tests --quiet` → no warnings
- `cargo test -p jsondoclint --quiet` → all 5 tests pass
WhySoBad pushed a commit to WhySoBad/miri that referenced this pull request May 13, 2026
…uwer
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#156448 (miri subtree update)
- rust-lang/rust#155023 (Introduce move expressions (`move($expr)`) )
- rust-lang/rust#156429 (Simplify `intrinsic::raw_eq` in MIR when possible)
- rust-lang/rust#147672 (LLBC-linker: Do not strip debug symbols for the nvptx target anymore)
- rust-lang/rust#155169 (jsondoclint: simplify code using idiomatic Rust)
- rust-lang/rust#155184 ( Have arrays' `drop_glue` just unsize and call the slice version)
- rust-lang/rust#156022 (rustdoc: Fix cosmetic issues when reporting unresolved paths in `broken_intra_doc_links`)
- rust-lang/rust#156442 (Show intrinsics::gpu in docs)
- rust-lang/rust#156461 (LLVM 23: Specify `returnaddress` intrinsic return type)
- rust-lang/rust#156462 (LLVM 23: Accept float (instead of hex) literals in codegen tests)
- rust-lang/rust#156466 (Refactor `CheckAttrVisitor` so rustfmt can format it.)
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 17, 2026
…uwer
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#156448 (miri subtree update)
- rust-lang/rust#155023 (Introduce move expressions (`move($expr)`) )
- rust-lang/rust#156429 (Simplify `intrinsic::raw_eq` in MIR when possible)
- rust-lang/rust#147672 (LLBC-linker: Do not strip debug symbols for the nvptx target anymore)
- rust-lang/rust#155169 (jsondoclint: simplify code using idiomatic Rust)
- rust-lang/rust#155184 ( Have arrays' `drop_glue` just unsize and call the slice version)
- rust-lang/rust#156022 (rustdoc: Fix cosmetic issues when reporting unresolved paths in `broken_intra_doc_links`)
- rust-lang/rust#156442 (Show intrinsics::gpu in docs)
- rust-lang/rust#156461 (LLVM 23: Specify `returnaddress` intrinsic return type)
- rust-lang/rust#156462 (LLVM 23: Accept float (instead of hex) literals in codegen tests)
- rust-lang/rust#156466 (Refactor `CheckAttrVisitor` so rustfmt can format it.)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-jsonArea: Rustdoc JSON backendS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@AmmaarBakshi@rustbot@jieyouxu@camelid@Mark-Simulacrum