3 ms·
They are the same: asm! was replaced by llvm_asm! because it currently only supports llvm asm and the name might suggest otherwise [1]. A backend independant sy
by cdirkx 6y ago
They are the same: asm! was replaced by llvm_asm! because it currently only supports llvm asm and the name might suggest otherwise [1]. A backend independant syntax for asm! was recently specified [2], but that will take some time to implement.
[1] https://github.com/rust-lang/rfcs/pull/2843 https://github.com/rust-lang/rfcs/pull/2843
[2] https://github.com/rust-lang/rfcs/pull/2873 https://github.com/rust-lang/rfcs/pull/2873
- steveklabnik 6y agoThey are not the same, and the asm! version is already implemented; the RFC came with an implementation. That first PR moved the old asm to llvm_asm, and then the new asm was built after a period of time so folks could migrate their code to llvm_asm, as a temporary measure. This commit happened after that transition so this has to be from the new asm back to the transition version.
- cdirkx 6y agoOops, my bad, I was working with an outdated understanding of the situation. Thanks for correcting me.
- steveklabnik 6y agoNo problem :) It was a feature that had no changes for a long time, and now has had a bunch of improvements and is finally on a path to stable. It can be hard to keep up with things sometimes.