`rustc_builtin_macros` cleanup, part 8 #163485
@bors try @rust-timer queue
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
<!-- rust-timer: temporary -->
:hourglass: Trying commit 7eace5560c6201cf8c59cbeeb4a799335f9f08a3 with merge 0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617…
To cancel the try build, run the command @bors try cancel.
Workflow: https://github.com/rust-lang/rust/actions/runs/36572142525
AstBang(
"Built-in" is not the defining property of these macros, we could easily have token-based built-in macros (IIRC quote! is already built-in but token based).
The defining property is that these macros are AST-based rather than token-based (just like the comments on them say).
:sunny: Try build successful (CI)
Build commit: 0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617 (0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617)
Base parent: b46c90c5619a16a0c7e4d0f4e9e1ad4db4cf106e (b46c90c5619a16a0c7e4d0f4e9e1ad4db4cf106e)
<!-- homu: {"type":"TryBuildCompleted","merge_sha":"0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617"} -->
Queued 0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617 with parent b46c90c5619a16a0c7e4d0f4e9e1ad4db4cf106e, future comparison URL.
There is currently 1 preceding artifact in the queue.
It will probably take at least ~1.3 hours until the benchmark run finishes.
<!-- rust-timer: temporary -->
Finished benchmarking commit (0bcf40dc0c6b1a2253f428ebaa94e0e54aa98617): comparison URL.
Overall result: ✅ improvements - no action needed
Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.
@rustbot label: -S-waiting-on-perf -perf-regression
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| | mean | range | count |
|:----------------------------------:|:-----:|:--------------:|:-----:|
| Regressions ❌ <br /> (primary) | - | - | 0 |
| Regressions ❌ <br /> (secondary) | - | - | 0 |
| Improvements ✅ <br /> (primary) | - | - | 0 |
| Improvements ✅ <br /> (secondary) | -0.2% | [-0.3%, -0.2%] | 7 |
| All ❌✅ (primary) | - | - | 0 |
Max RSS (memory usage)
<details>
<summary>Results (primary 0.7%, secondary 2.1%)</summary>
A less reliable metric. May be of interest, but not used to determine the overall result above.
| | mean | range | count |
|:----------------------------------:|:-----:|:--------------:|:-----:|
| Regressions ❌ <br /> (primary) | 2.2% | [2.2%, 2.2%] | 1 |
| Regressions ❌ <br /> (secondary) | 3.6% | [3.4%, 3.8%] | 3 |
| Improvements ✅ <br /> (primary) | -0.9% | [-0.9%, -0.9%] | 1 |
| Improvements ✅ <br /> (secondary) | -2.3% | [-2.3%, -2.3%] | 1 |
| All ❌✅ (primary) | 0.7% | [-0.9%, 2.2%] | 2 |
</details>
Cycles
This perf run didn't have relevant results for this metric.
Binary size
This perf run didn't have relevant results for this metric.
Bootstrap: 491.711s -> 491.207s (-0.10%)
Artifact size: 406.38 MiB -> 406.39 MiB (0.00%)
:umbrella: The latest upstream changes (presumably #163957) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.
Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs
cc @ZuseZ4
oh, it looks like rustfmt skips formatting a struct with a default field entirely
I think path_name and ty_name would be better, more consistent with other functions.
Pre-existing: expr_name would be better than expr_ident_sym.
This should be pat_name.
I think leaving path_std! and pathvec! seems fine, though perhaps the latter should be renamed path_vec!.
I don't have strong opinions about the substructure change, though the extra error messages are annoying.
@petrochenkov: do you have opinions about the first commit ("rename Legacy macro kinds to Ast")?
@petrochenkov: do you have opinions about the first commit ("renameLegacymacro kinds toAst")?
Yes :D https://github.com/rust-lang/rust/pull/163485#discussion_r4133751506
I added a commit that uses name instead of ident where appropriate and removed the two commits for the path macros and the broader use of Substructure for now.
@rustbot ready
Thanks!
@bors r+
:pushpin: Commit a85d97ff42f3048aad98208fc5cff08fd71e4237 has been approved by nnethercote
It is now in the queue for this repository.
:evergreen_tree: The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.
Reason for tree closure: spurious failures
:hourglass: Testing commit a85d97ff42f3048aad98208fc5cff08fd71e4237 with merge ae9d6d54d9a8b689a58dc467c8ba9d633bd4fa9d...
Workflow: https://github.com/rust-lang/rust/actions/runs/39634220880
@bors yield
Auto build was cancelled. Cancelled workflows:
The next pull request likely to be tested is https://github.com/rust-lang/rust/pull/164699.
[!NOTE]
This PR was benchmarked as part of triage of its containing rollup: [triage URL](/rust-lang/rust/pull/164699#issuecomment-6332214855).
Finished benchmarking commit (6351b4b7b719d6f1a1636be9e2b27a1788e4934a): comparison URL.
Overall result: ✅ improvements - no action needed
@rustbot label: -perf-regression
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| | mean | range | count |
|:----------------------------------:|:-----:|:--------------:|:-----:|
| Regressions ❌ <br /> (primary) | - | - | 0 |
| Regressions ❌ <br /> (secondary) | - | - | 0 |
| Improvements ✅ <br /> (primary) | -0.1% | [-0.1%, -0.1%] | 2 |
| Improvements ✅ <br /> (secondary) | -0.2% | [-0.3%, -0.1%] | 11 |
| All ❌✅ (primary) | -0.1% | [-0.1%, -0.1%] | 2 |
Max RSS (memory usage)
<details>
<summary>Results (secondary -2.3%)</summary>
A less reliable metric. May be of interest, but not used to determine the overall result above.
| | mean | range | count |
|:----------------------------------:|:-----:|:--------------:|:-----:|
| Regressions ❌ <br /> (primary) | - | - | 0 |
| Regressions ❌ <br /> (secondary) | - | - | 0 |
| Improvements ✅ <br /> (primary) | - | - | 0 |
| Improvements ✅ <br /> (secondary) | -2.3% | [-2.4%, -2.2%] | 2 |
| All ❌✅ (primary) | - | - | 0 |
</details>
Cycles
This perf run didn't have relevant results for this metric.
Binary size
This perf run didn't have relevant results for this metric.
Artifact size: 406.57 MiB -> 406.49 MiB (-0.02%)
petrochenkov
cyrgani
<!-- homu-ignore:start -->
View all comments
<!-- homu-ignore:end -->
This PR is roughly split into three parts:
ExtCtxtto both construct some common AST elements in an easier way. They also change someIdentarguments toSymbolto avoid the annoying call-site pattern of repeating the span (cx.some_method(span, Ident::new(name, span), ...)).Pathconstruction faster and remove thenew_pathremnant of the old local path version.Previous PR: https://github.com/rust-lang/rust/pull/163389
r? @nnethercote