Open
Description
This is a tracking issue for the RFC "The optimize attribute" (rust-lang/rfcs#2412).
Steps:
- Implement the RFC. Partially done, see Tracking issue for RFC 2412, "The optimize attribute" #54882 (comment).
- Adjust documentation (see instructions on forge)
- Stabilization PR (see instructions on forge)
Unresolved questions:
- Should we also implement
optimize(always)
?optimize(level=x)
?- Left for future discussion, but should make sure such extension is possible.
- Should there be any way to specify what global optimization for speed level is used in
conjunction with the optimization for speed option (e.g.-Copt-level=s3
could be equivalent to
-Copt-level=3
and#[optimize(size)]
on the crate item);- This may matter for users of
#[optimize(speed)]
.
- This may matter for users of
- Are the propagation and
unused_attr
approaches right? - The RFC specifies we should emit an unused_attributes warning when misapplied, but similar attributes emit an error instead. Should this emit an error too?
Metadata
Metadata
Assignees
Labels
Blocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(optimize_attribute)]`Status: The implementation is incomplete.Relevant to the language team, which will review and decide on the PR/issue.