Allow global_asm! in statement positions (take 2)#156919
Open
daxpedda wants to merge 1 commit into
Open
Conversation
daxpedda
commented
May 25, 2026
| /// Allows any generic constants being used as pattern type range ends | ||
| (incomplete, generic_pattern_types, "1.86.0", Some(136574)), | ||
| /// Allows `global_asm!` in statement positions. | ||
| (unstable, global_asm_statement_position, "CURRENT_RUSTC_VERSION", Some(0)), |
Contributor
Author
There was a problem hiding this comment.
Add the tracking issue here when we are ready.
Contributor
|
My understanding of our processes is that this needs some sort of thumbs up from T-lang, so nominating. See #project-inline-asm > Item position global_asm for extra context. |
This comment has been minimized.
This comment has been minimized.
3ad186f to
46594bf
Compare
folkertdev
reviewed
May 25, 2026
46594bf to
074562c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #156760
Fixes #156894
This PR makes it possible to put
global_asm!in statement positions. This is particularly useful for macros, where you otherwise have to wrap them inmod foo { global_asm!(...); }.The implementation gates this behind
feature(global_asm_statement_position).Previously discussed on Zulip.
Previous history:
This has been merged in #156582 and then reverted in #156884 because it was insta-stable. In that time two bugs surfaced: #156760 and #156894. Both were fixed with #156855, which was incorporated here. Thank you @Kokoro2336 and @folkertdev.
r? @petrochenkov.