Tracking Issue for used_with_arg
#93798
Labels
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The feature gate for the issue is
#![feature(used_with_arg)]
.This extends the existing
#[used]
attribute with two variants#[used(compiler)]
and#[used(linker)]
:#[used(compiler)]
attribute indicates that the symbol should be considered used at the compiler level. It should not be eliminated by the compiler even if it appears unreferenced. This attribute guarantees that the symbol will make it to the linker.#[used(linker)]
attribute indicates that the symbol should additionally be considered used at the linker level. The linker should not eliminate the symbol even if it appears unreferenced.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
#[used(linker)]
attribute #91504Unresolved Questions
#[used]
default to? It is currently specified to only guarantee#[used(compiler)]
but has historically acted like#[used(linker)]
on non-ELF platforms. Seeno_mangle
/used
static is only present in output when in reachable module #47384 for extended discussion on the topic.#[used(linker)]
currently uses SHF_RETAIN on ELF platforms, which is a relatively new flag. This means that the symbol may not actually be retained if an old linker is used.The text was updated successfully, but these errors were encountered: