Uh oh!
There was an error while loading. Please reload this page.
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names - #148279
Conversation
rustbot
commented
Oct 30, 2025
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
Oct 31, 2025
r? hkBst |
rustbot
commented
Oct 31, 2025
Failed to set assignee to
|
oli-obk
commented
Oct 31, 2025
oh heh @bors delegate=hkBst |
bors
commented
Oct 31, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hkBst
commented
Nov 7, 2025
Looks fine now, but please squash your commits. |
… user-defined function names
rustbot
commented
Nov 8, 2025
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
IntegralPilot
commented
Nov 8, 2025
@hkBst, just squashed the commits! Thanks again for your review & help :) |
hkBst
commented
Nov 8, 2025
bors
commented
Nov 8, 2025
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolvesrust-lang#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.
Rollup of 16 pull requests Successful merges: - #147534 (Implement SIMD funnel shifts in const-eval/Miri) - #147686 (update isolate_highest_one for NonZero<T>) - #148020 (Show backtrace on allocation failures when possible) - #148204 (Modify contributor email entries in .mailmap) - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - #148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - #148555 (Fix rust-by-example spanish translation) - #148556 (Fix suggestion for returning async closures) - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) - #148612 (Add note for identifier with attempted hygiene violation) - #148613 (Switch hexagon targets to rust-lld) - #148619 (Enable std locking functions on AIX) - #148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - #148649 (don't completely reset `HeadUsages`) - #148675 (Remove eslint-js from npm dependencies) r? `@ghost` `@rustbot` modify labels: rollup
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolvesrust-lang#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.
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolvesrust-lang#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.
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolvesrust-lang#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.
Rollup of 22 pull requests Successful merges: - #128666 (Add `overflow_checks` intrinsic) - #146305 (Add correct suggestion for multi-references for self type in method) - #147179 ([DebugInfo] Fix container types failing to find template args) - #147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - #148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - #148084 (Optimize path components iteration on platforms that don't have prefixes) - #148126 (Fix rust stdlib build failing for VxWorks) - #148204 (Modify contributor email entries in .mailmap) - #148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - #148333 (constify result unwrap unchecked) - #148539 (Add Allocator proxy impls for Box, Rc, and Arc) - #148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - #148612 (Add note for identifier with attempted hygiene violation) - #148613 (Switch hexagon targets to rust-lld) - #148619 (Enable std locking functions on AIX) - #148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - #148649 (don't completely reset `HeadUsages`) - #148673 (Remove a remnant of `dyn*` from the parser) - #148675 (Remove eslint-js from npm dependencies) - #148680 (Recover `[T: N]` as `[T; N]`) - #148688 (Remove unused argument `features` from `eval_config_entry`) - #148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #148279 - IntegralPilot:master, r=hkBst rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolves#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.
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names Resolvesrust-lang#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.
Rollup of 22 pull requests Successful merges: - rust-lang#128666 (Add `overflow_checks` intrinsic) - rust-lang#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang#148204 (Modify contributor email entries in .mailmap) - rust-lang#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang#148333 (constify result unwrap unchecked) - rust-lang#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang#148612 (Add note for identifier with attempted hygiene violation) - rust-lang#148613 (Switch hexagon targets to rust-lld) - rust-lang#148619 (Enable std locking functions on AIX) - rust-lang#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang#148649 (don't completely reset `HeadUsages`) - rust-lang#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang#148675 (Remove eslint-js from npm dependencies) - rust-lang#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang#128666 (Add `overflow_checks` intrinsic) - rust-lang#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang#148204 (Modify contributor email entries in .mailmap) - rust-lang#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang#148333 (constify result unwrap unchecked) - rust-lang#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang#148612 (Add note for identifier with attempted hygiene violation) - rust-lang#148613 (Switch hexagon targets to rust-lld) - rust-lang#148619 (Enable std locking functions on AIX) - rust-lang#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang#148649 (don't completely reset `HeadUsages`) - rust-lang#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang#148675 (Remove eslint-js from npm dependencies) - rust-lang#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 22 pull requests Successful merges: - rust-lang/rust#128666 (Add `overflow_checks` intrinsic) - rust-lang/rust#146305 (Add correct suggestion for multi-references for self type in method) - rust-lang/rust#147179 ([DebugInfo] Fix container types failing to find template args) - rust-lang/rust#147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - rust-lang/rust#148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - rust-lang/rust#148084 (Optimize path components iteration on platforms that don't have prefixes) - rust-lang/rust#148126 (Fix rust stdlib build failing for VxWorks) - rust-lang/rust#148204 (Modify contributor email entries in .mailmap) - rust-lang/rust#148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - rust-lang/rust#148333 (constify result unwrap unchecked) - rust-lang/rust#148539 (Add Allocator proxy impls for Box, Rc, and Arc) - rust-lang/rust#148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - rust-lang/rust#148612 (Add note for identifier with attempted hygiene violation) - rust-lang/rust#148613 (Switch hexagon targets to rust-lld) - rust-lang/rust#148619 (Enable std locking functions on AIX) - rust-lang/rust#148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - rust-lang/rust#148649 (don't completely reset `HeadUsages`) - rust-lang/rust#148673 (Remove a remnant of `dyn*` from the parser) - rust-lang/rust#148675 (Remove eslint-js from npm dependencies) - rust-lang/rust#148680 (Recover `[T: N]` as `[T; N]`) - rust-lang/rust#148688 (Remove unused argument `features` from `eval_config_entry`) - rust-lang/rust#148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Resolves#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 distinctfrom the user’s function.
Because the prefix is applied recursively (e.g. benchmarking
__bench_bproduces a lambda ident
__bench___bench_b), there is no possible functionname 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.