Skip to content

Clarify where global_asm! may be placed#2272

Open
ehuss wants to merge 1 commit into
rust-lang:masterfrom
ehuss:global_asm-item-position
Open

Clarify where global_asm! may be placed#2272
ehuss wants to merge 1 commit into
rust-lang:masterfrom
ehuss:global_asm-item-position

Conversation

@ehuss
Copy link
Copy Markdown
Contributor

@ehuss ehuss commented May 19, 2026

The docs here were not clear about where global_asm! may be placed. It says the assembly is "emitted...outside a function", but doesn't exactly say where it is allowed.

The rules for this just changed in rust-lang/rust#156582 which added the ability to place it in statement position.

The docs here were not clear about where `global_asm!` may be placed. It
says the assembly is "emitted...outside a function", but doesn't exactly
say where it is allowed.

The rules for this just changed in
rust-lang/rust#156582 which added the ability to
place it in statement position.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants