Skip to content

simd-test: Handle target-specific behavior within generated code - #2261

Open
tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:test-updates
Open

tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:test-updates

Conversation

@tgross35

@tgross35 tgross35 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Looking for TARGET in proc macros is a bit of a hack: we have to parse
it ourselves and it's not set by Cargo (as I understand it, proc macro
output is supposed to be target-agnostic).

Address this by moving logic based on TARGET into cfg that gets
emitted as part of quoting. Also a bit of other cleanup.

This fixes macro_test detection for a handful of targets (e.g.
armv5te- or mipsisa64r6el- prefixes), not that those were likely to get
run anyway.

The first two commits just do small cleanup and update syn.

@tgross35
tgross35 force-pushed the test-updates branch 2 times, most recently from 7ec47d9 to 44bb8b1 Compare October 29, 2026 11:05
Looking for TARGET in proc macros is a bit of a hack: we have to parse
it ourselves and it's not set by Cargo (as I understand it, proc macro
output is supposed to be target-agnostic).

Address this by moving logic based on `TARGET` into `cfg` that gets
emitted as part of quoting. Also a bit of other cleanup.

This fixes `macro_test` detection for a handful of targets (e.g.
armv5te- or mipsisa64r6el- prefixes), not that those were likely to get
run anyway.
@tgross35 tgross35 changed the title Test updates simd-test: Handle target-specific behavior within generated code Oct 29, 2026
@tgross35
tgross35 requested a review from folkertdev October 29, 2026 12:07
@tgross35
tgross35 marked this pull request as ready for review October 29, 2026 12:07
@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

r? @adamgemmell

rustbot has assigned @adamgemmell.
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: @Amanieu, @adamgemmell, @davidtwco, @folkertdev
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev expanded to Amanieu, adamgemmell, davidtwco, folkertdev
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants