-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Can't #[bench] a function named b #148275
Copy link
Copy link
Closed
Labels
A-hygieneArea: Macro hygieneArea: Macro hygieneA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.T-testing-devexRelevant to the testing devex team (testing DX), which will review and decide on the PR/issue.Relevant to the testing devex team (testing DX), which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-hygieneArea: Macro hygieneArea: Macro hygieneA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.T-testing-devexRelevant to the testing devex team (testing DX), which will review and decide on the PR/issue.Relevant to the testing devex team (testing DX), which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
I should be able to run this as a benchmark, but I got the following error:
It seems that the macro expansion of
#[bench]has a name collision with a variable namedb.rust/compiler/rustc_builtin_macros/src/test.rs
Lines 210 to 218 in 292be5c
Meta
Reproducible on the playground with version
1.93.0-nightly (2025-10-28 278a90913daf77077910)(click on the three dots on top left -> "test")