Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse rustdoc's doc comment handling in Clippy #115689

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

Alexendoo
Copy link
Member

Moves source_span_for_markdown_range and span_of_attrs (renamed to span_of_fragments) to rustc_resolve::rustdoc so it can be used in Clippy

Fixes rust-lang/rust-clippy#10277
Fixes rust-lang/rust-clippy#5593
Fixes rust-lang/rust-clippy#10263
Fixes rust-lang/rust-clippy#2581

@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2023

r? @notriddle

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 8, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@notriddle
Copy link
Contributor

The rustdoc changes look fine to me. The code is essentially unchanged, but moved. Most of the important new code is in clippy.

r? clippy

@rustbot rustbot assigned flip1995 and unassigned notriddle Sep 9, 2023
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

r+ from clippy too

@flip1995
Copy link
Member

LGTM too. Let's ship it then! :shipit:

@bors r=notriddle,Manishearth,flip1995

@bors
Copy link
Contributor

bors commented Sep 11, 2023

📌 Commit caaf1eb has been approved by notriddle,Manishearth,flip1995

It is now in the queue for this repository.

@bors bors 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 Sep 11, 2023
@bors
Copy link
Contributor

bors commented Sep 12, 2023

⌛ Testing commit caaf1eb with merge 36b8e4a...

@bors
Copy link
Contributor

bors commented Sep 12, 2023

☀️ Test successful - checks-actions
Approved by: notriddle,Manishearth,flip1995
Pushing 36b8e4a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 12, 2023
@bors bors merged commit 36b8e4a into rust-lang:master Sep 12, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 12, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (36b8e4a): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-4.0%, -2.4%] 2
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 631.364s -> 631.339s (-0.00%)
Artifact size: 317.87 MiB -> 317.84 MiB (-0.01%)

@Alexendoo Alexendoo deleted the clippy-doc-comments branch September 12, 2023 11:02
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 15, 2023
… r=flip1995

Ignore `#[doc(hidden)]` functions in clippy doc lints

Fixes rust-lang/rust-clippy#11501

The implementation before rust-lang#115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly

https://github.com/rust-lang/rust/blob/852bf4e51bf260550cd1a280d2146f1c0641b1e8/src/tools/clippy/clippy_lints/src/doc.rs#L526-L529

r? `@flip1995`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 25, 2023
…riddle,Manishearth,flip1995

Reuse rustdoc's doc comment handling in Clippy

Moves `source_span_for_markdown_range` and `span_of_attrs` (renamed to `span_of_fragments`) to `rustc_resolve::rustdoc` so it can be used in Clippy

Fixes rust-lang/rust-clippy#10277
Fixes rust-lang/rust-clippy#5593
Fixes rust-lang/rust-clippy#10263
Fixes rust-lang/rust-clippy#2581
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 25, 2023
… r=flip1995

Ignore `#[doc(hidden)]` functions in clippy doc lints

Fixes rust-lang/rust-clippy#11501

The implementation before rust-lang#115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly

https://github.com/rust-lang/rust/blob/852bf4e51bf260550cd1a280d2146f1c0641b1e8/src/tools/clippy/clippy_lints/src/doc.rs#L526-L529

r? `@flip1995`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
7 participants