Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
Alexendoo:clippy-doc-hidden-headers
Sep 15, 2023
Merged

Ignore #[doc(hidden)] functions in clippy doc lints#115851
bors merged 1 commit into
rust-lang:masterfrom
Alexendoo:clippy-doc-hidden-headers

Conversation

@Alexendoo

Copy link
Copy Markdown
Member

Fixes rust-lang/rust-clippy#11501

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

} else if attr.has_name(sym::doc) {
// ignore mix of sugared and non-sugared doc
// don't trigger the safety or errors check
return None;

r? @flip1995

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 14, 2023
@rustbot

rustbot commented Sep 14, 2023

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@blyxyas

blyxyas commented Sep 14, 2023

Copy link
Copy Markdown
Member

Why is this filed on rust-lang/rust instead of rust-lang/rust-clippy?

@Alexendoo

Copy link
Copy Markdown
Member Author

#115689 isn't in rust-clippy yet

@djkoloski

Copy link
Copy Markdown
Contributor

+1 Fuchsia ran into this

@flip1995

Copy link
Copy Markdown
Member

@bors r+ rollup

Thanks!

@bors

bors commented Sep 15, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 88f3f23 has been approved by 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 15, 2023
@bors

bors commented Sep 15, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 88f3f23 with merge 56e1aaa...

@bors

bors commented Sep 15, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: flip1995
Pushing 56e1aaa to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 15, 2023
@bors
bors merged commit 56e1aaa into rust-lang:master Sep 15, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 15, 2023
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (56e1aaa): 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
0.4% [0.3%, 0.5%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.4%, 0.4%] 1

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)
1.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.6%, 1.6%] 1

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.608s -> 631.442s (-0.03%)
Artifact size: 318.07 MiB -> 318.11 MiB (0.01%)

@Alexendoo
Alexendoo deleted the clippy-doc-hidden-headers branch September 15, 2023 13:58
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clippy tells me to put # Error section on doc comments for #[doc(hidden)] function

7 participants