Files
rust/compiler
Stuart Cook 645aa9232b Rollup merge of #148279 - IntegralPilot:master, r=hkBst
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names

Resolves rust-lang/rust#148275 by preventing name collisions in the `#[bench]` macro.

Previously, a user-defined function named "b" could not be benchmarked because
the macro-generated lambda identity collided with the same name. We now generate
the lambda ident as `__bench_<function_name>`, ensuring it is always distinct
from the user’s function.

Because the prefix is applied recursively (e.g. benchmarking `__bench_b`
produces a lambda ident `__bench___bench_b`), there is no possible function
name that can equal its corresponding lambda ident. This guarantees that
the user can safely bench a function of any valid name without risk of
identifier collision.
2025-11-09 13:22:28 +11:00
..
2025-11-06 13:20:12 +01:00
2025-10-12 08:08:30 +00:00
2025-09-26 17:53:49 +02:00
2025-11-06 13:20:12 +01:00