Allow pointers in inline assembly const
expressions
#132012
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
A-rust-for-linux
Relevant for the Rust-for-Linux project
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Quoting from
tests/ui/asm/const-refs-to-static.rs
@ 31e102cI tried this code:
I expected to see this happen: it should compiles
Instead, this happened:
*const u8
is not allowed as an operand to inline assembly.This would be coming useful and brings us feature-parity with
asm(" /* assembly */ " ::"i"(ptr))
from C, whereptr
can be pointer to statics and constants.cc @Amanieu @nbdd0121
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: