Skip to content

Conversation

GuillaumeGomez
Copy link
Member

r? @lqd

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 13, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2022
@lqd
Copy link
Member

lqd commented Sep 13, 2022

sweet, @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 13, 2022

📌 Commit c4559eb has been approved by lqd

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 13, 2022
@@ -233,14 +233,20 @@ impl AttrItem {

impl Attribute {
/// Returns `true` if it is a sugared doc comment (`///` or `//!` for example).
/// So `#[doc = "doc"]` will return `false`.
/// So `#[doc = "doc"]` (which is a doc comment) and `#[doc(...)]` (which is not
Copy link
Contributor

Choose a reason for hiding this comment

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

#[doc = "doc"] is not a doc comment, and not a comment at all, it's a doc attribute.
I'm not sure why this causes confusion, the function name tells exactly what it does.

Copy link
Member Author

Choose a reason for hiding this comment

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

Because /// is a doc comment and syntactic sugar over #[doc = "..."], so the confusion is still quite strong.

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 13, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101266 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final)
 - rust-lang#101737 (rustdoc: remove no-op CSS `.search-results .result-name > span`)
 - rust-lang#101752 (Improve Attribute doc methods)
 - rust-lang#101754 (Fix doc of log function)
 - rust-lang#101759 (:arrow_up: rust-analyzer)
 - rust-lang#101765 (Add documentation for TyCtxt::visibility)
 - rust-lang#101770 (Rustdoc-Json: Don't loose subitems of foreign traits.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8fa8021 into rust-lang:master Sep 13, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 13, 2022
@GuillaumeGomez GuillaumeGomez deleted the improve-attr-docs branch September 14, 2022 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants