Repository navigation
Tracking issue for release notes of #157273: Stabilize optimize attribute #163715
Copy link
Copy link
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamrelnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.relnotes-needs-reviewMarks release notes tracking issues which have not had their contents updated by a maintainer.Marks release notes tracking issues which have not had their contents updated by a maintainer.relnotes-tracking-issueMarks issues tracking what text to put in release notes.Marks issues tracking what text to put in release notes.
Milestone
Description
Activity
- addedA-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)T-langRelevant to the language teamRelevant to the language teamT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendrelnotes-tracking-issueMarks issues tracking what text to put in release notes.Marks issues tracking what text to put in release notes.relnotes-needs-reviewMarks release notes tracking issues which have not had their contents updated by a maintainer.Marks release notes tracking issues which have not had their contents updated by a maintainer.needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Oct 3, 2026 Hi! I'd like to help with this. Here's a proposed release note, based on the stabilization report:
Language
- Stabilize the
#[optimize]attribute, which lets you hint the compiler to optimize an individual function forsizeorspeed, or to apply few optimizations withnone(similar to-Copt-level=0). The attribute also applies to closures defined inside the annotated function.
No Compatibility Notes needed as far as I can tell. The blog section can stay empty.
- Stabilize the
Proposal for release blog:
# The #[optimize] attribute Rust 1.101.0 stabilizes per-function controls on optimization levels. This attribute comes in three forms: `#[optimize(size)]`, `#[optimize(speed)]` and `#[optimize(none)]`: ```rust #[optimize(size)] fn make_me_small() { // This function will be optimized to minimize code size, even if the program is optimized for speed. // Useful for rarely used functions in performance-sensitive programs. } #[optimize(speed)] fn go_fast() { // This function will be optimized to maximize speed, even if the program is optimized for size. // Useful for very frequently used functions in otherwise size-constrained situations } #[optimize(none)] fn debug_me() { // This function will not be optimized (much). // Useful to ease debugging of individual functions without slowing down the rest of the program. } ```- removedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Oct 9, 2026
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamrelnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.relnotes-needs-reviewMarks release notes tracking issues which have not had their contents updated by a maintainer.Marks release notes tracking issues which have not had their contents updated by a maintainer.relnotes-tracking-issueMarks issues tracking what text to put in release notes.Marks issues tracking what text to put in release notes.
This issue tracks the release notes text for #157273.
cc @veluca93, @tmandry -- original issue/PR authors and assignees for drafting text
See the forge.rust-lang.org chapter about release notes for an overview of how the release team makes use of these tracking issues.
Release notes text
This section should be edited to specify the correct category(s) for the change, with succinct description(s) of what changed. Some things worth considering:
Stabilized APIsandConst Stabilized APIs?Tip
Use the previous releases for inspiration on how to write the release notes text and which categories to pick.
Release blog section
If this change is notable enough for inclusion in the blog post then this section should be edited to contain a draft for the blog post. Otherwise leave it empty.
Note
If a blog post section is required the
release-blog-postlabel should be added (@rustbot label +release-blog-post) to this issue as otherwise it may be missed by the release team.