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

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

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

Alexendoo
Copy link
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
Copy link
Collaborator

rustbot commented Sep 14, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@blyxyas
Copy link
Member

blyxyas commented Sep 14, 2023

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

@Alexendoo
Copy link
Member Author

#115689 isn't in rust-clippy yet

@djkoloski
Copy link
Contributor

+1 Fuchsia ran into this

@flip1995
Copy link
Member

@bors r+ rollup

Thanks!

@bors
Copy link
Contributor

bors commented Sep 15, 2023

📌 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
Copy link
Contributor

bors commented Sep 15, 2023

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

@bors
Copy link
Contributor

bors commented Sep 15, 2023

☀️ 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
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 15, 2023
@rust-timer
Copy link
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