Skip to content

Lint doc comments in cfg_select branches#155734

Open
qaijuang wants to merge 2 commits intorust-lang:mainfrom
qaijuang:cfg-select-doc-comment
Open

Lint doc comments in cfg_select branches#155734
qaijuang wants to merge 2 commits intorust-lang:mainfrom
qaijuang:cfg-select-doc-comment

Conversation

@qaijuang
Copy link
Copy Markdown
Contributor

@qaijuang qaijuang commented Apr 24, 2026

Fixes #155701.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 24, 2026
@qaijuang qaijuang force-pushed the cfg-select-doc-comment branch from fb8cf2e to 9c49112 Compare April 24, 2026 14:12
Comment thread tests/ui/lint/unused/unused-doc-comments-for-macros.rs Outdated
Co-authored-by: Copilot <copilot@github.com>
@qaijuang qaijuang marked this pull request as ready for review April 24, 2026 14:42
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 24, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 2026

r? @JonathanBrouwer

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

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 17 candidates

@qaijuang qaijuang requested a review from folkertdev April 24, 2026 16:59

let tts = p.parse_delimited_token_tree().map_err(|e| e.emit())?;
let span = underscore.span.to(p.token.span);
lint_unused_doc_comment(p, doc_comment, lint_node_id);
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer Apr 25, 2026

Choose a reason for hiding this comment

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

Why is the lint_unused_doc_comment here rather than immediately after the eat_outer_doc_comments call?

View changes since the review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 25, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cfg_select! + doc comment gives cryptic compiler error

4 participants