Skip to content

add documentation to the span_lint_hir functions#12445

Merged
bors merged 3 commits into
rust-lang:masterfrom
y21:document-diagnostic-utils
Mar 10, 2024
Merged

add documentation to the span_lint_hir functions#12445
bors merged 3 commits into
rust-lang:masterfrom
y21:document-diagnostic-utils

Conversation

@y21

@y21 y21 commented Mar 9, 2024

Copy link
Copy Markdown
Member

As far as I could tell, these weren't documented anywhere, and since this is sometimes needed over span_lint for #[allow] attrs to work, I thought I would add a little bit of documentation.
When I started with clippy development, I also had no idea what these functions were for.

changelog: none

@rustbot

rustbot commented Mar 9, 2024

Copy link
Copy Markdown
Collaborator

r? @Manishearth

rustbot has assigned @Manishearth.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 9, 2024

@xFrednet xFrednet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's good to see these functions getting some love!

I have a few suggestions, but either way, this is a really awesome change!

r? @xFrednet

Comment thread clippy.toml Outdated
Comment thread clippy_utils/src/diagnostics.rs Outdated
Comment thread clippy_utils/src/diagnostics.rs Outdated
Comment thread clippy_utils/src/diagnostics.rs Outdated
@rustbot rustbot assigned xFrednet and unassigned Manishearth Mar 9, 2024

@xFrednet xFrednet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I hope my comments are not too nit-picky :D

Comment thread clippy_utils/src/diagnostics.rs Outdated
Comment thread clippy_utils/src/diagnostics.rs Outdated
@y21

y21 commented Mar 9, 2024

Copy link
Copy Markdown
Member Author

Changed the documentation a bit with (a lot of) inspiration taken from the suggestions

I hope my comments are not too nit-picky :D

It's fine, especially for a PR like this. These functions are used everywhere, so imo having good documentation here is important. So feel free to point out things that you would phrase differently, even small details.

@xFrednet

Copy link
Copy Markdown
Contributor

Perfect, I like this version! This is a really nice improvement :D

@bors r+

@bors

bors commented Mar 10, 2024

Copy link
Copy Markdown
Contributor

📌 Commit 5b1f95c has been approved by xFrednet

It is now in the queue for this repository.

@bors

bors commented Mar 10, 2024

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5b1f95c with merge 86717f2...

@bors

bors commented Mar 10, 2024

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 86717f2 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants