Rollup of 6 pull requests#155011
Conversation
…classes Add new Hexagon inline asm register classes: - reg_pair: GPR double registers (r1:0 through r27:26) for i64/f64 types - vreg: HVX vector registers (v0-v31) for mode-dependent vector types - vreg_pair: HVX vector pair registers (v1:0 through v31:30) for vector pairs - qreg: HVX predicate registers (q0-q3), clobber-only Key implementation details: - GPR pairs use LLVM's 'd' register naming (d0-d13) for constraints - HVX vector pairs use LLVM's 'w' register naming (w0-w15) for constraints - Register overlap tracking for GPR pair<->single and HVX pair<->single conflicts - HVX vector types are mode-dependent (64B vs 128B HVX length) Note: vreg_quad (HVX vector quads) is not supported as LLVM's Hexagon backend does not support vector quad types in inline asm constraints.
The AST pretty printer produces invalid Rust when a block expression is
the base of an index operation inside a macro expansion. This is a gap
in the existing `FixupContext` parenthesization machinery — the approach
handles statement position but not the case where a block-index is
nested inside another expression.
The following is a correct program:
```rust
macro_rules! block_arr {
() => {{ [0u8; 4] }};
}
macro_rules! as_slice {
() => {{ &block_arr!()[..] }};
}
fn main() { let _: &[u8] = as_slice!(); }
```
But `rustc -Zunpretty=expanded` produces output that is not valid Rust,
because the closing brace of `{ [0u8; 4] }` creates a statement
boundary, causing the parser to treat `[..]` as a separate expression:
```rust
fn main() { let _: &[u8] = { &{ [0u8; 4] }[..] }; }
```
```
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `[`
```
Fixed output after this change:
```rust
fn main() { let _: &[u8] = { &({ [0u8; 4] })[..] }; }
```
Since `{ ... }[...]` never parses as indexing a block regardless of
context, the fix unconditionally parenthesizes "complete" expressions
(block, match, if, loop, etc.) when they appear as the base of an index
operation.
When a macro expands to a call whose callee is a block (or other "complete" expression like `match`, `if`, `loop`), the AST pretty printer emits the callee without parentheses. In statement position the closing brace ends the expression and the argument list is parsed as a separate tuple expression, producing a parse error.
being faster to compile 😭
I'm ignoring the fact that there's a feature to change the behavior of the syntax. I just want to help prevent confusing the people reading the docs.
… have special syntax I'm ignoring the fact that there's a feature to change the behavior of the syntax. I just want to help prevent confusing the people reading the docs.
…athanBrouwer Remove `BuiltinLintDiag` Part of rust-lang#153099. We're finally getting rid of `BuiltinLintDiag`! \o/ Next step, `AttributeLint`. :3 r? @JonathanBrouwer
…ion, r=mati865 test `#[naked]` with `#[link_section = "..."]` on windows As a part of rust-lang#147811 I ran into that we actually don't match (current) LLVM output. r? @mati865
…ter-classes, r=JohnTitor Hexagon inline asm: add reg_pair, vreg, vreg_pair, and qreg register classes Add three new register classes for the Hexagon inline assembly backend: * `reg_pair`: GPR double registers (r1:0 through r27:26) * `vreg`: HVX vector registers (v0-v31) * `qreg`: HVX predicate registers (q0-q3), clobber-only for now
Parenthesize block-like expressions in index base of pretty printer The AST pretty printer produces invalid Rust when a block expression is the base of an index operation inside a macro expansion. This is a gap in the parenthesization fix from rust-lang#119105 — the `FixupContext` approach handles statement position but not the case where a block-index is nested inside another expression. The following is a correct program: ```rust macro_rules! block_arr { () => {{ [0u8; 4] }}; } macro_rules! as_slice { () => {{ &block_arr!()[..] }}; } fn main() { let _: &[u8] = as_slice!(); } ``` But `rustc -Zunpretty=expanded` produces output that is not valid Rust, because the closing brace of `{ [0u8; 4] }` creates a statement boundary, causing the parser to treat `[..]` as a separate expression: ```rust fn main() { let _: &[u8] = { &{ [0u8; 4] }[..] }; } ``` ``` error: expected one of `.`, `;`, `?`, `}`, or an operator, found `[` ``` Fixed output after this change: ```rust fn main() { let _: &[u8] = { &({ [0u8; 4] })[..] }; } ``` Since `{ ... }[...]` never parses as indexing a block regardless of context, the fix unconditionally parenthesizes "complete" expressions (block, match, if, loop, etc.) when they appear as the base of an index operation.
…tive, r=JonathanBrouwer make `expected_literal` positive r? @JonathanBrouwer
…ross35 Clarify that `core::range` ranges do not have special syntax r? @tgross35
This comment has been minimized.
This comment has been minimized.
Rollup of 6 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1
This comment has been minimized.
This comment has been minimized.
|
☀️ Test successful - CI, Post merge analysis |
|
📌 Perf builds for each rolled up PR:
previous master: 9004856428 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 9004856 (parent) -> d0442e2 (this PR) Test differencesShow 87 test diffsStage 1
Stage 2
Additionally, 78 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d0442e2800d356ae282ddcdbe0eff8798fe648b6 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (d0442e2): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.7%, secondary 2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.506s -> 489.468s (-0.01%) |
Successful merges:
BuiltinLintDiag#154912 (RemoveBuiltinLintDiag)#[naked]with#[link_section = "..."]on windows #154598 (test#[naked]with#[link_section = "..."]on windows)expected_literalpositive #154893 (makeexpected_literalpositive)core::rangeranges do not have special syntax #155002 (Clarify thatcore::rangeranges do not have special syntax)r? @ghost
Create a similar rollup