Deprecate the asm! macro in favor of llvm_asm!#71007
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
I have not reviewed the stdarch submodule bump, but this otherwise looks good. I think we should hold off on landing this until we have a replacement in nightly for some time (say, 2 weeks) just to give people time to migrate without generating lots of warnings in their code.
(Have we landed llvm_asm yet? I think no, but I don't remember. If we have, my concern is moot of course.)
|
|
|
The stdarch submodule bump also includes additional ARM NEON intrinsics, which are all unstable. |
|
I think the current note is slightly better, as it directly suggests why we're doing it and gives the user a chance to try to find out why the asm! syntax will change soon. I suspect that ideally we'd include a link to some tracking issue or whatever, but that can happen separately. @Amanieu -- does the "suggestion" in the deprecation make cargo fix work? |
|
It should work with cargo fix but I haven't tried it yet. |
|
Okay, that's good enough for me (and Centril has separately indicated to me that he's okay with the existing comment), so @bors r+ |
|
📌 Commit 43ee31f has been approved by |
…acrum Deprecate the asm! macro in favor of llvm_asm! Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed. RFC: rust-lang/rfcs#2843
|
⌛ Testing commit 43ee31f with merge c9f88ad146aa20172d3a0e13098c707238fa0be5... |
|
💔 Test failed - checks-azure |
|
Seems spurious @bors retry |
|
⌛ Testing commit 43ee31f with merge 71bccf0e8e6d51e37fda2d367be79597df0413f2... |
|
💔 Test failed - checks-azure |
|
@bors r=Mark-Simulacrum |
|
📌 Commit ce83b49 has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
|
☀️ Test successful - checks-azure |
|
Is |
|
|
|
The error message when switching from even though I just got an error message telling me to use llvm_asm! instead of asm!. This is resolved with |
|
@samuela Haha, yes, could you please open an issue for that? The asm macro's syntax changed. What the error means is to use the new asm style, rather than llvm/gcc style inline asm. |
|
I opened #72825 to clarify the messages. |
Clarify errors and warnings about the transition to the new asm! Hopefully addresses the concerns from rust-lang#71007 (comment).
Since we will be changing the syntax of
asm!soon, deprecate it and encourage people to usellvm_asm!instead (which preserves the old syntax). This will avoid breakage whenasm!is changed.RFC: rust-lang/rfcs#2843