File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -207,22 +207,22 @@ pub(crate) fn expand_test_or_bench(
207207 } ;
208208
209209 let test_fn = if is_bench {
210- // A simple ident for a lambda, using the user's function name within it to avoid collisions.
210+ // A collision-resistant ident for a lambda, using the user's function name within it to avoid collisions.
211211 let bencher_param =
212212 Ident :: from_str_and_span ( & format ! ( "__bench_{}" , fn_. ident. name) , attr_sp) ;
213213 cx. expr_call (
214214 sp,
215215 cx. expr_path ( test_path ( "StaticBenchFn" ) ) ,
216216 thin_vec ! [
217217 // #[coverage(off)]
218- // |b | self::test::assert_test_result(
218+ // |__bench_fn_name | self::test::assert_test_result(
219219 coverage_off( cx. lambda1(
220220 sp,
221221 cx. expr_call(
222222 sp,
223223 cx. expr_path( test_path( "assert_test_result" ) ) ,
224224 thin_vec![
225- // super::$test_fn(b )
225+ // super::$test_fn(__bench_fn_name )
226226 cx. expr_call(
227227 ret_ty_sp,
228228 cx. expr_path( cx. path( sp, vec![ fn_. ident] ) ) ,
You can’t perform that action at this time.
0 commit comments