Skip to content

Add proc_macro attribute documentation#158962

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
josetorrs:add-proc-macr-attribute-documentation
Jul 16, 2026
Merged

Add proc_macro attribute documentation#158962
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
josetorrs:add-proc-macr-attribute-documentation

Conversation

@josetorrs

@josetorrs josetorrs commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

part of #157604

r? @GuillaumeGomez

cc: @fmease

(I wasn't sure who to exactly tag. I see several PR's switch between you two)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 8, 2026
@rust-log-analyzer

This comment has been minimized.

@fmease fmease changed the title Add proc_macr attribute documentation Add proc_macro attribute documentation Jul 8, 2026
@rust-log-analyzer

This comment has been minimized.

Comment thread library/core/src/attribute_docs.rs Outdated
/// the [`TokenStream`] that replaces the invocation:
///
/// ```rust, ignore (requires depending on the proc-macro crate)
/// extern crate proc_macro;

@GuillaumeGomez GuillaumeGomez Jul 9, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/// extern crate proc_macro;
/// # extern crate proc_macro;

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added this in

@GuillaumeGomez GuillaumeGomez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apart from the small nit, looks good to me.

View changes since this review

@rustbot

rustbot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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

@josetorrs
josetorrs marked this pull request as ready for review July 9, 2026 20:56
@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 Jul 9, 2026
@josetorrs
josetorrs force-pushed the add-proc-macr-attribute-documentation branch 2 times, most recently from 3a7e475 to 1574cdf Compare July 10, 2026 08:19
@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@josetorrs
josetorrs force-pushed the add-proc-macr-attribute-documentation branch from 1574cdf to 421ffc1 Compare July 15, 2026 12:09
@rustbot

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Thanks!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 421ffc1 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jul 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159197 (Rename ModDefId to ModId and use more)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #159296 (Implement `bool::toggle`)
 - #158302 (Fix `overflowing_literals` lint with repeated negation)
 - #158484 (Add documentation for the `cold` and `track_caller` attributes)
 - #159239 (Add codegen test for remainder match)
 - #159330 (fix some edition annotations in UI tests)
 - #159331 (Fix ignore-llvm-version directive in codegen-llvm/array-equality.rs)

Failed merges:

 - #158962 (Add `proc_macro` attribute documentation)
rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159197 (Rename ModDefId to ModId and use more)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #159296 (Implement `bool::toggle`)
 - #158302 (Fix `overflowing_literals` lint with repeated negation)
 - #158484 (Add documentation for the `cold` and `track_caller` attributes)
 - #159239 (Add codegen test for remainder match)
 - #159330 (fix some edition annotations in UI tests)
 - #159331 (Fix ignore-llvm-version directive in codegen-llvm/array-equality.rs)

Failed merges:

 - #158962 (Add `proc_macro` attribute documentation)
rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159197 (Rename ModDefId to ModId and use more)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #159296 (Implement `bool::toggle`)
 - #158302 (Fix `overflowing_literals` lint with repeated negation)
 - #158484 (Add documentation for the `cold` and `track_caller` attributes)
 - #159239 (Add codegen test for remainder match)
 - #159330 (fix some edition annotations in UI tests)
 - #159331 (Fix ignore-llvm-version directive in codegen-llvm/array-equality.rs)

Failed merges:

 - #158962 (Add `proc_macro` attribute documentation)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 15, 2026
…documentation, r=GuillaumeGomez

Add `proc_macro` attribute documentation

part of rust-lang#157604

r? @GuillaumeGomez

cc: @fmease

(I wasn't sure who to exactly tag. I see several PR's switch between you two)
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 15, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 15, 2026
Co-authored-by: Guillaume Gomez <contact@guillaume-gomez.fr>
@josetorrs
josetorrs force-pushed the add-proc-macr-attribute-documentation branch from 421ffc1 to 4bf0b76 Compare July 15, 2026 19:06
@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@josetorrs

Copy link
Copy Markdown
Contributor Author

@GuillaumeGomez I ended getting another conflict but not sure how to use bors here

@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4bf0b76 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 15, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 16, 2026
@rust-bors

rust-bors Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: GuillaumeGomez
Duration: 3h 29m 53s
Pushing fcbe791 to main...

@rust-bors
rust-bors Bot merged commit fcbe791 into rust-lang:main Jul 16, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing d0babd8 (parent) -> fcbe791 (this PR)

Test differences

Show 10 test diffs

10 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard fcbe7917ba18120d9eda136f1c7c5a60c78e554e --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. i686-msvc-1: 2h -> 3h 4m (+52.9%)
  2. x86_64-gnu-llvm-22-1: 46m 10s -> 1h 5m (+42.4%)
  3. i686-gnu-1: 1h 42m -> 2h 18m (+35.8%)
  4. x86_64-msvc-2: 2h 28m -> 1h 38m (-34.2%)
  5. aarch64-apple: 3h 11m -> 2h 13m (-30.1%)
  6. dist-powerpc64le-linux-musl: 1h 16m -> 1h 38m (+29.7%)
  7. dist-powerpc64-linux-musl: 1h 13m -> 1h 34m (+28.7%)
  8. dist-powerpc64le-linux-gnu: 1h 12m -> 1h 32m (+27.4%)
  9. x86_64-gnu-nopt: 2h 29m -> 1h 51m (-25.2%)
  10. x86_64-gnu-gcc-core-tests: 6m 21s -> 7m 56s (+24.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (fcbe791): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.5%, secondary 3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.8% [2.6%, 6.6%] 4
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

Cycles

Results (secondary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 491.731s -> 489.999s (-0.35%)
Artifact size: 390.07 MiB -> 390.09 MiB (0.00%)

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. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants