Files
rust/compiler/rustc_span
bors b998449636 Auto merge of #156816 - saethlin:loop-attributes, r=JonathanBrouwer,folkertdev
Add unstable loop unrolling hint attributes



Tracking issue: https://github.com/rust-lang/rust/issues/156874

This adds as new attribute `#[unroll]`/`#[unroll(full)]`/`#[unroll(never)]`/`#[unroll(16)]` (or any u32).

`#[unroll]` is behind a new feature gate `#![feature(loop_hints)]` because I intend to add an attribute for loop vectorization as well. If a user wants to turn off loop unrolling to locally minimize code size, LLVM may vectorize the loop even though it isn't unrolled which can produce a similar code size explosion.
2026-06-16 08:40:13 +00:00
..