about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-03-01 05:49:52 +0100
committerGitHub <noreply@github.com>2025-03-01 05:49:52 +0100
commit174bbfb369106d2c613a363628b7012847965607 (patch)
treea2b5f2f9800ef4c9f443133f72de07f802056754 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent51e09764411a5882cd210d2a205ec425b7194413 (diff)
parent395b0fb4d9c969b5db0ec1a6b9a0b3203cacbed6 (diff)
downloadrust-174bbfb369106d2c613a363628b7012847965607.tar.gz
rust-174bbfb369106d2c613a363628b7012847965607.zip
Rollup merge of #137686 - nbdd0121:asm_const, r=compiler-errors
Handle asm const similar to inline const

Previously, asm consts are handled similar to anon consts rather than inline consts. Anon consts are not good at dealing with lifetimes, because `type_of` has lifetimes erased already. Inline consts can deal with lifetimes because they live in an outer typeck context. And since `global_asm!` lacks an outer typeck context, we have implemented asm consts with anon consts while they're in fact more similar to inline consts.

This was changed in #137180, and this means that handling asm consts as inline consts are possible. While as `@compiler-errors` pointed out, `const` currently can't be used with any types with lifetime, this is about to change if #128464 is implemented. This PR is a preparatory PR for that feature.

As an unintentional side effect, fix #117877.

cc `@Amanieu`
r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions