-------------------------------------------------------------------------------- Profile data file 'results/clgout-nightly-2026-08-15-many-assoc-items-Clippy-Full-Threads1' (creator: callgrind-3.25.1) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 491459492 Trigger: Program termination Profiled target: /home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver --crate-name many_assoc_items --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C metadata=c54f328fd27d59fb -C extra-filename=-9be62895a123f2dd --out-dir /tmp/.tmpNzzJ1V/target/debug/deps -L dependency=/tmp/.tmpNzzJ1V/target/debug/deps -Wclippy::all -Zthreads=1 -Adeprecated -Aunknown-lints -Zincremental-verify-ich (PID 290163, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: on -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 2,829,068,763 (100.0%) PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 103,210,870 ( 3.65%) ???:0x0000000000173dc0 [/usr/lib/libc.so.6] 49,816,137 ( 1.76%) include/jemalloc/internal/rtree.h:free 45,497,561 ( 1.61%) ???:rustc_mir_transform::simplify::simplify_cfg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,796,952 ( 1.19%) ???:rustc_borrowck::type_check::type_check [???] 30,788,456 ( 1.09%) ???:::advance_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,156,194 ( 1.07%) ???:::next_token_from_cursor [???] 29,906,075 ( 1.06%) ???:rustc_borrowck::get_flow_results [???] 29,664,301 ( 1.05%) ???:::visit_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,259,122 ( 1.03%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:free 29,238,927 ( 1.03%) ???:::do_mir_borrowck [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,696,428 ( 0.94%) ???:rustc_hir_typeck::typeck_with_inspect::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,891,488 ( 0.92%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,412,044 ( 0.90%) include/jemalloc/internal/jemalloc_internal_inlines_c.h:malloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,922,358 ( 0.88%) ???:rustc_borrowck::borrowck_check_region_constraints [???] 24,306,510 ( 0.86%) ???:::run_pass [???] 23,034,096 ( 0.81%) ???:::check_expr_call [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,997,599 ( 0.78%) ???:>::process_obligations:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,525,820 ( 0.76%) ???:::encode_def_ids [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,963,146 ( 0.74%) ???:::traits_in_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,472,941 ( 0.72%) ???:rustc_mir_transform::run_analysis_to_runtime_passes'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,081,562 ( 0.67%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,978,480 ( 0.67%) ???:rustc_mir_transform::liveness::check_liveness::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,377,835 ( 0.65%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,921,732 ( 0.63%) ???:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,872,574 ( 0.63%) include/jemalloc/internal/cache_bin.h:malloc 17,539,461 ( 0.62%) include/jemalloc/internal/cache_bin.h:free 17,192,191 ( 0.61%) ???:>::compress::<>::process_obligations::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,132,529 ( 0.61%) ???:::coerce [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,590,776 ( 0.59%) ???:::check_expr [???] 16,310,465 ( 0.58%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,150,381 ( 0.57%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,093,093 ( 0.57%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,942,888 ( 0.56%) ???:::add_implied_bounds [???] 14,755,215 ( 0.52%) ???:::process_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,998,096 ( 0.49%) ???:::intern_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,765,220 ( 0.49%) ???:rustc_borrowck::type_check::liveness::generate [???] 13,635,589 ( 0.48%) ???:::visit_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,440,812 ( 0.48%) ???:::short_write_process_buffer::<8> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,699,050 ( 0.45%) include/jemalloc/internal/sz.h:malloc 12,551,336 ( 0.44%) ???:::resolve_path [???] 12,505,299 ( 0.44%) ???:::instantiate_value_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,199,071 ( 0.43%) ???:::lower_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,054,903 ( 0.43%) ???:::encode_crate_root [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,755,801 ( 0.42%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,673,744 ( 0.41%) ???:0x00000000001747c0 [/usr/lib/libc.so.6] 11,555,918 ( 0.41%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,428,120 ( 0.40%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,240,391 ( 0.40%) ???:::typeck_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,237,154 ( 0.40%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,808,098 ( 0.38%) ???:, rustc_borrowck::handle_placeholders::SccAnnotations>>::construct [???] 10,684,805 ( 0.38%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,632,287 ( 0.38%) ???:rustc_hir_analysis::check::wfcheck::enter_wf_checking_ctxt:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,578,345 ( 0.37%) ???:::parent_hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,363,786 ( 0.37%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:calloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,329,517 ( 0.37%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,676,592 ( 0.34%) ???:rustc_ast_lowering::lower_to_hir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,309,974 ( 0.33%) ???:::smart_resolve_path_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,229,180 ( 0.33%) ???:::parse_item_kind'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,141,356 ( 0.32%) ???:rustc_mir_transform::mir_built'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,070,466 ( 0.32%) ???:> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,910,721 ( 0.31%) ???:::compute_drop_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,721,325 ( 0.31%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,584,568 ( 0.30%) ???:::from_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,497,894 ( 0.30%) ???:::solve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,457,982 ( 0.30%) ???:::resolve_ident_in_scope_set_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,439,847 ( 0.30%) ???:::find_by_ident_and_namespace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,364,632 ( 0.30%) ???:::to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,329,992 ( 0.29%) ???:::consider_probe::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,160,541 ( 0.29%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,077,276 ( 0.29%) ???:md5::compress::soft::compress [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,074,518 ( 0.29%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,070,932 ( 0.29%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,860,005 ( 0.28%) ???:::mark_live_symbols'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,805,641 ( 0.28%) ???:::make_owner_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,731,486 ( 0.27%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,612,705 ( 0.27%) ???:::hir_maybe_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,611,491 ( 0.27%) ???:::apply [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,609,634 ( 0.27%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,600,868 ( 0.27%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,585,501 ( 0.27%) include/jemalloc/internal/thread_event.h:malloc 7,531,264 ( 0.27%) ???:rustc_mir_build::builder::build_mir_inner_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,375,180 ( 0.26%) ???:::hir_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,363,226 ( 0.26%) ???:::lex_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,341,425 ( 0.26%) ???:rustc_trait_selection::traits::impossible_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,341,180 ( 0.26%) ???:::pick_all_method [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,307,010 ( 0.26%) ???:::stable_hash_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,161,400 ( 0.25%) ???:::assemble_extension_candidates_for_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,152,077 ( 0.25%) ???:::iterate_to_fixpoint [???] 6,950,783 ( 0.25%) ???:::resolve_type_vars_in_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,931,948 ( 0.25%) ???:::visit_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,891,652 ( 0.24%) ???:>::encode [???] 6,782,289 ( 0.24%) ???:::build [???] 6,658,739 ( 0.24%) ???:::hash_owner_nodes::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,647,644 ( 0.23%) ???:::hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,632,168 ( 0.23%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,562,585 ( 0.23%) ???:::check_expr_with_expectation_and_args'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,458,804 ( 0.23%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,445,659 ( 0.23%) ???:rustc_mir_transform::mir_promoted'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,394,287 ( 0.23%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,372,982 ( 0.23%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,292,944 ( 0.22%) ???:::normalize:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,228,715 ( 0.22%) include/jemalloc/internal/rtree.h:tcache_bin_flush_small 6,020,078 ( 0.21%) ???:::probe_for_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,961,641 ( 0.21%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,938,853 ( 0.21%) include/jemalloc/internal/sz.h:realloc 5,894,134 ( 0.21%) ???:::rollback_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,873,238 ( 0.21%) ???: as rustc_ast::visit::Visitor>::visit_expr'2 [???] 5,859,330 ( 0.21%) include/jemalloc/internal/sz.h:free 5,853,769 ( 0.21%) ???:, ())>>::reserve_rehash::, (), rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,707,150 ( 0.20%) ???:::hir_body_owner_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,653,396 ( 0.20%) ???:::call_once_force::<>>::initialize<>>::get_or_init<::reverse_postorder::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,605,630 ( 0.20%) ???:::hir_body_const_context [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,595,240 ( 0.20%) ???: as rustc_ast::visit::Visitor>::visit_id [???] 5,576,216 ( 0.20%) ???:::check_upper_case [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,547,741 ( 0.20%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,513,997 ( 0.19%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 5,386,847 ( 0.19%) ???:::visit_item::{closure#0}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,383,532 ( 0.19%) ???:::assemble_inherent_impl_candidates_for_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,284,519 ( 0.19%) ???:::in_external_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,283,868 ( 0.19%) ???:::adjust_ident_and_get_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,219,373 ( 0.18%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,204,269 ( 0.18%) ???:::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,153,558 ( 0.18%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,133,832 ( 0.18%) ???:>> as rustc_trait_selection::traits::query::type_op::TypeOp>::fully_perform [???] 5,095,206 ( 0.18%) ???:>::compress::<>::to_errors::{closure#2}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,050,979 ( 0.18%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/tcache.c:tcache_bin_flush_small [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 5,014,750 ( 0.18%) ???:::lower_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,003,831 ( 0.18%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,984,245 ( 0.18%) ???:>::visit_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,974,912 ( 0.18%) ???:::instantiate_identity_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,955,036 ( 0.18%) ???:::fully_perform_op::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,908,631 ( 0.17%) ???:rustc_hir_analysis::check::check::check_coroutine_obligations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,798,594 ( 0.17%) src/arena.c:malloc_default 4,757,442 ( 0.17%) ???:::as_operand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,737,789 ( 0.17%) ???:>::assumed_wf_types_and_report_errors [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,716,401 ( 0.17%) ???:::parse_item_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,714,454 ( 0.17%) ???:::trait_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,684,868 ( 0.17%) ???:::run_pass [???] 4,658,798 ( 0.16%) ???:0x0000000000173660 [/usr/lib/libc.so.6] 4,616,007 ( 0.16%) ???:::bump_minimal [???] 4,593,759 ( 0.16%) ???:rustc_mir_build::thir::cx::thir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,581,694 ( 0.16%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,566,350 ( 0.16%) ???:rustc_privacy::check_mod_privacy [???] 4,562,282 ( 0.16%) include/jemalloc/internal/thread_event.h:calloc 4,554,733 ( 0.16%) ???:::check_expr_with_expectation_and_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,554,563 ( 0.16%) ???:::resolve_ty_and_res_fully_qualified_call [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,535,745 ( 0.16%) ???:::expr_into_dest'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,506,599 ( 0.16%) ???:::parse_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,484,863 ( 0.16%) ???:::lower_expr_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,476,004 ( 0.16%) ???:>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,374,911 ( 0.15%) ???:::check_expr [???] 4,297,913 ( 0.15%) ???:::expr_into_dest [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,246,017 ( 0.15%) ???:::select [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,216,840 ( 0.15%) ???:rustc_mir_transform::impossible_clauses::has_impossible_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,214,227 ( 0.15%) ???:rustc_trait_selection::traits::outlives_bounds::implied_outlives_bounds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,179,393 ( 0.15%) ???:rustc_mir_transform::mir_promoted [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,147,483 ( 0.15%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,119,448 ( 0.15%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:realloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 4,058,307 ( 0.14%) ???:rustc_hir_analysis::check::region::region_scope_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,965,274 ( 0.14%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,955,466 ( 0.14%) ???:::register_wf_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,942,935 ( 0.14%) ???:rustc_mir_transform::pass_manager::run_passes_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,916,002 ( 0.14%) ???:>::find_cycles_from_node:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,895,710 ( 0.14%) ???:>::union [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,895,686 ( 0.14%) ???:::finish [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,865,485 ( 0.14%) ???:::get_diagnostic_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,804,735 ( 0.13%) include/jemalloc/internal/cache_bin.h:calloc 3,800,944 ( 0.13%) src/arena.c:realloc 3,797,047 ( 0.13%) ???:::parse_path_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,796,196 ( 0.13%) ???:::run_lint'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,757,356 ( 0.13%) ???:::parse_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,756,571 ( 0.13%) ???:, usize)>>::reserve_rehash::, usize, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,696,110 ( 0.13%) ???:::lower_generic_args_of_path::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,666,464 ( 0.13%) ???:>::tys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,625,915 ( 0.13%) ???:::mirror_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,616,030 ( 0.13%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,607,112 ( 0.13%) ???: as core::clone::Clone>::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,565,780 ( 0.13%) ???:>::fill_item::<::fresh_args_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,550,311 ( 0.13%) ???:rustc_hir_analysis::collect::generics_of::generics_of [???] 3,517,008 ( 0.12%) ???:core::ptr::drop_glue::> [???] 3,515,996 ( 0.12%) ???:::is_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,508,091 ( 0.12%) ???:rustc_mir_transform::mir_drops_elaborated_and_const_checked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,497,463 ( 0.12%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,468,532 ( 0.12%) ???:::as_call_operand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,452,925 ( 0.12%) ???:::typing_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,446,252 ( 0.12%) ???:::instantiate_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,441,488 ( 0.12%) ???:0x000000000000fb40 [/usr/lib/ld-linux-x86-64.so.2] 3,439,682 ( 0.12%) include/jemalloc/internal/sz.h:calloc 3,364,524 ( 0.12%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,356,304 ( 0.12%) ???:>::with_capacity_in [???] 3,356,264 ( 0.12%) ???:rustc_query_impl::execution::try_execute_query::>, false>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,348,903 ( 0.12%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,256,414 ( 0.12%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,236,456 ( 0.11%) ???:::super_body_preserves_cfg [???] 3,204,396 ( 0.11%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,197,280 ( 0.11%) ???:::take [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,186,369 ( 0.11%) ???:rustc_mir_build::check_unsafety::check_unsafety [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,164,906 ( 0.11%) ???:rustc_mir_build::thir::pattern::check_match::check_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,164,542 ( 0.11%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,162,654 ( 0.11%) ???:::par_hir_body_owners::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,156,271 ( 0.11%) ???:rustc_query_impl::execution::try_execute_query::>, false>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,146,430 ( 0.11%) ???:::fn_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,116,416 ( 0.11%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,108,001 ( 0.11%) ???:::run_pass [???] 3,107,023 ( 0.11%) ???:rustc_hir_analysis::collect::clauses_of::gather_explicit_clauses_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,088,633 ( 0.11%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,086,599 ( 0.11%) ???:::span_to_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,077,635 ( 0.11%) ???:rustc_middle::ty::codec::encode_with_shorthand::::type_shorthands> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,076,754 ( 0.11%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,064,824 ( 0.11%) ???:::hir_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,046,340 ( 0.11%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,037,568 ( 0.11%) ???:::fork [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,016,625 ( 0.11%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,002,774 ( 0.11%) ???:::check_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,986,977 ( 0.11%) ???:::mirror_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,976,695 ( 0.11%) ???:::needs_drop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,964,601 ( 0.10%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,936,766 ( 0.10%) ???: as rustc_ast::visit::Visitor>::visit_expr [???] 2,936,584 ( 0.10%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,930,405 ( 0.10%) include/jemalloc/internal/tsd_tls.h:free [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,930,404 ( 0.10%) include/jemalloc/internal/atomic.h:free 2,916,496 ( 0.10%) ???:::resolve_const_item_rhs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,896,605 ( 0.10%) ???:>::register_bound [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,876,987 ( 0.10%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,876,936 ( 0.10%) ???:rustc_ast::visit::visit_assoc_items::> [???] 2,876,832 ( 0.10%) ???:::desugaring_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,876,544 ( 0.10%) ???:::is_desugaring [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,866,755 ( 0.10%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,861,511 ( 0.10%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,826,712 ( 0.10%) ???:::call_once_force::<>>>::initialize<>>>::get_or_init<::predecessors::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,816,907 ( 0.10%) ???:rustc_hir_analysis::check::region::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,810,495 ( 0.10%) ???:::is_conditionally_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,797,024 ( 0.10%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,785,727 ( 0.10%) include/jemalloc/internal/rtree.h:realloc 2,777,263 ( 0.10%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,757,500 ( 0.10%) ???:>>::walk_ref [???] 2,756,688 ( 0.10%) ???:::parse_const_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,755,204 ( 0.10%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,719,541 ( 0.10%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,707,714 ( 0.10%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,676,799 ( 0.09%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,667,994 ( 0.09%) ???:::visit_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,661,144 ( 0.09%) include/jemalloc/internal/tsd.h:calloc 2,660,658 ( 0.09%) ???:rustc_borrowck::mir_borrowck [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,637,229 ( 0.09%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,618,166 ( 0.09%) ???:::resolve_regions_with_outlives_env [???] 2,610,803 ( 0.09%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,591,976 ( 0.09%) ???:rustc_passes::reachable::reachable_set'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,587,055 ( 0.09%) ???:::build_drop_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,578,626 ( 0.09%) ???:::trait_impl_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,577,694 ( 0.09%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,577,119 ( 0.09%) ???:::instantiate_identity_into'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,576,933 ( 0.09%) ???:::visit_terminator [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,560,541 ( 0.09%) include/jemalloc/internal/emap.h:tcache_bin_flush_small 2,547,862 ( 0.09%) site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,539,020 ( 0.09%) ???:::typeck_root_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,536,806 ( 0.09%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,507,277 ( 0.09%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,505,881 ( 0.09%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:malloc 2,472,608 ( 0.09%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,457,313 ( 0.09%) ???:rustc_mir_transform::deref_separator::deref_finder [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,447,060 ( 0.09%) ???:::parse_expr_paren_seq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,425,207 ( 0.09%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,418,583 ( 0.09%) ???:rustc_hir_analysis::check::check::check_item_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,417,353 ( 0.09%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,397,390 ( 0.08%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::first_node_in_macro:: 2,397,360 ( 0.08%) ???:::write_str [???] 2,397,360 ( 0.08%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,386,674 ( 0.08%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,354,135 ( 0.08%) ???:rustc_ty_utils::opaque_types::opaque_types_defined_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,347,422 ( 0.08%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,338,722 ( 0.08%) ???:::run_pass [???] 2,337,192 ( 0.08%) ???:>>::walk_ref [???] 2,317,448 ( 0.08%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,308,846 ( 0.08%) include/jemalloc/internal/edata.h:tcache_bin_flush_small 2,307,426 ( 0.08%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,307,382 ( 0.08%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,304,438 ( 0.08%) ???:::expect_hir_owner_nodes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,292,945 ( 0.08%) ???:rustc_ty_walk::walk_types:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,278,082 ( 0.08%) ???:::lookup_byte_offset [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,277,264 ( 0.08%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,271,872 ( 0.08%) ???:::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,265,331 ( 0.08%) ???:::lower_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,260,864 ( 0.08%) ???:rustc_hir_analysis::check::wfcheck::lint_redundant_lifetimes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,237,984 ( 0.08%) ???:::register_wf_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,237,444 ( 0.08%) ???:::run_pass [???] 2,206,240 ( 0.08%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,198,910 ( 0.08%) ???:rustc_mir_transform::mir_const_qualif [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,197,360 ( 0.08%) ???:::type_dependent_def [???] 2,194,080 ( 0.08%) ???:rustc_ty_utils::ty::param_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,187,948 ( 0.08%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,177,384 ( 0.08%) ???:::visit_body'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,117,993 ( 0.07%) ???:::has_trivial_sizedness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,087,492 ( 0.07%) ???:::lower_expr_mut::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,069,310 ( 0.07%) ???:rustc_passes::dead::live_symbols_and_ignored_derived_traits'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,057,899 ( 0.07%) ???:pthread_mutex_unlock [/usr/lib/libc.so.6] 2,057,528 ( 0.07%) ???:::normalize::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,017,576 ( 0.07%) ???:rustc_mir_transform::remove_noop_landing_pads::find_noop_landing_pads [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,008,322 ( 0.07%) ???:::bump [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,997,894 ( 0.07%) ???:::check_stability_allow_unstable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,978,074 ( 0.07%) ???:stacker::remaining_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,967,981 ( 0.07%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,950,925 ( 0.07%) ???:::check_missing_docs_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,947,813 ( 0.07%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,921,668 ( 0.07%) ???:rust_psm_stack_pointer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,920,626 ( 0.07%) ???:rustc_mir_transform::mir_for_ctfe [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,910,536 ( 0.07%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,908,524 ( 0.07%) ???:rustc_query_impl::query_impl::lookup_deprecation_entry::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,908,024 ( 0.07%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,898,050 ( 0.07%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,888,426 ( 0.07%) ???:::short_write_process_buffer::<1> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,861,632 ( 0.07%) ???:::check_for_duplicate_items_in_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,859,528 ( 0.07%) ???:::opt_associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,857,861 ( 0.07%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,857,861 ( 0.07%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,847,904 ( 0.07%) ???:::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,847,780 ( 0.07%) ???:::mirror_expr_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,838,252 ( 0.06%) ???:::hir_get_parent_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,837,976 ( 0.06%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,827,992 ( 0.06%) ???:rustc_query_impl::execution::try_execute_query::>, false> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,817,816 ( 0.06%) ???:::visit_operand [???] 1,803,004 ( 0.06%) ???:::opt_rpitit_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,798,830 ( 0.06%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,784,042 ( 0.06%) ???:pthread_mutex_trylock [/usr/lib/libc.so.6] 1,778,042 ( 0.06%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,778,042 ( 0.06%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,758,416 ( 0.06%) ???:::check_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,749,419 ( 0.06%) ???:::in_any_value_of_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,738,114 ( 0.06%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,738,010 ( 0.06%) ???:>>::walk_ref'2 [???] 1,724,472 ( 0.06%) ???:::typeck_root_def_id_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,721,703 ( 0.06%) ???:rustc_mir_transform::promoted_mir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,718,181 ( 0.06%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,718,108 ( 0.06%) ???:::is_suggestable_infer_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,717,931 ( 0.06%) ???:::is_intrinsic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,701,477 ( 0.06%) include/jemalloc/internal/thread_event.h:realloc 1,690,432 ( 0.06%) ???:0x000000000000ba80 [/usr/lib/ld-linux-x86-64.so.2] 1,682,132 ( 0.06%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,680,206 ( 0.06%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,676,444 ( 0.06%) ???:::short_write_process_buffer::<4> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,670,601 ( 0.06%) ???:>::reserve_rehash::<::intern_inner::{closure#0}::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,668,831 ( 0.06%) ???:::deeply_normalize:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,658,076 ( 0.06%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,648,692 ( 0.06%) ???:::lower_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,638,104 ( 0.06%) ???:::is_const_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,626,055 ( 0.06%) include/jemalloc/internal/arena_inlines_b.h:tcache_bin_flush_small 1,621,883 ( 0.06%) include/jemalloc/internal/tcache_inlines.h:calloc 1,619,549 ( 0.06%) ???:::check_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,608,777 ( 0.06%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item [???] 1,608,229 ( 0.06%) ???: as rustc_infer::traits::engine::TraitEngine>::register_predicate_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,598,240 ( 0.06%) ???: as rustc_hir::intravisit::Visitor>::visit_expr'2 [???] 1,598,080 ( 0.06%) ???:>::tys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,590,574 ( 0.06%) ???:rustc_lint::levels::shallow_lint_levels_on [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,581,000 ( 0.06%) include/jemalloc/internal/arena_inlines_b.h:realloc 1,573,719 ( 0.06%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,562,239 ( 0.06%) ???:rustc_query_impl::query_impl::trivial_const::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,560,472 ( 0.06%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,558,296 ( 0.06%) ???: as rustc_mir_transform::pass_manager::MirPass>::run_pass [???] 1,558,284 ( 0.06%) ???:::evaluate_obligations_error_on_ambiguity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,558,128 ( 0.06%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,543,803 ( 0.05%) ???:rustc_hir_analysis::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,538,152 ( 0.05%) ???:::as_constant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,530,964 ( 0.05%) ???:rustc_mir_transform::mir_built [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,528,708 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,522,360 ( 0.05%) ???:rustc_query_impl::query_impl::check_tail_calls::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,518,556 ( 0.05%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,509,678 ( 0.05%) ???:::check_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,499,550 ( 0.05%) ???:::lang_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,488,644 ( 0.05%) ???:::parse_constness_ [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,469,320 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,463,429 ( 0.05%) ???:rustc_query_impl::query_impl::clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,458,330 ( 0.05%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,457,540 ( 0.05%) include/jemalloc/internal/tcache_inlines.h:realloc 1,451,033 ( 0.05%) ???:::feed_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,448,468 ( 0.05%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,446,883 ( 0.05%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,438,416 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/casts/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,438,347 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,428,474 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}'2 [???] 1,422,910 ( 0.05%) ???:>::complete::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,399,146 ( 0.05%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,398,782 ( 0.05%) ???:core::ptr::drop_glue::]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,398,750 ( 0.05%) ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,397,578 ( 0.05%) ???:rustc_hir_analysis::collect::type_of::type_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,388,455 ( 0.05%) ???:::resolve_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,374,418 ( 0.05%) include/jemalloc/internal/bit_util.h:malloc_default 1,353,525 ( 0.05%) ???:rustc_privacy::effective_visibilities'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,353,409 ( 0.05%) ???:::get_lint_level_spec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,348,586 ( 0.05%) ???:rustc_hir_analysis::check::region::resolve_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,348,551 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,348,485 ( 0.05%) ???:>::seek_after [???] 1,347,712 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,338,567 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/misc.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,338,562 ( 0.05%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,338,392 ( 0.05%) ???:rustc_hir::intravisit::walk_unambig_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,334,810 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,334,135 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,318,555 ( 0.05%) ???:::slice_write_process_buffer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,311,043 ( 0.05%) ???:::par_items::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,309,324 ( 0.05%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,308,489 ( 0.05%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,302,417 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,301,440 ( 0.05%) ???:::hir_span_with_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,298,542 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs:clippy_lints::unit_types::unit_arg::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,289,548 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,280,192 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,278,457 ( 0.05%) ???:::assemble_inherent_candidates [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,264,689 ( 0.04%) ???:__rustc::__rust_alloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,258,810 ( 0.04%) ???:>::fill_item::<>::identity_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,258,752 ( 0.04%) ???:::intern_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,258,647 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,258,614 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,258,488 ( 0.04%) ???:::normalize::<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,254,997 ( 0.04%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,248,751 ( 0.04%) include/jemalloc/internal/cache_bin.h:realloc 1,247,812 ( 0.04%) include/jemalloc/internal/bitmap.h:tcache_bin_flush_small 1,238,822 ( 0.04%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,238,791 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,238,614 ( 0.04%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,231,358 ( 0.04%) ???:rustc_ty_utils::assoc::associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,228,662 ( 0.04%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,218,994 ( 0.04%) ???:::mk_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,218,536 ( 0.04%) ???:rustc_hir_analysis::hir_ty_lowering::generics::check_generic_arg_count_for_value_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,212,689 ( 0.04%) ???:rustc_hir_typeck::intrinsicck::check_transmutes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,211,357 ( 0.04%) ???:::check_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,210,763 ( 0.04%) ???:rustc_ty_utils::implied_bounds::assumed_wf_types [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,208,811 ( 0.04%) ???:rustc_middle::ty::util::needs_drop_components_with_async [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,198,740 ( 0.04%) ???:::parse_where_clause_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,188,691 ( 0.04%) ???:::add_required_obligations_for_hir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,188,687 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,188,572 ( 0.04%) ???:::visit_expr::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,183,500 ( 0.04%) include/jemalloc/internal/cache_bin.h:malloc_default 1,178,724 ( 0.04%) ???:::handle_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,148,654 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,141,434 ( 0.04%) ???:::hir_impl_item [???] 1,141,434 ( 0.04%) ???:::parent_hir_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,140,318 ( 0.04%) include/jemalloc/internal/tsd_tls.h:calloc 1,138,838 ( 0.04%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,138,115 ( 0.04%) ???:rustc_query_impl::query_impl::def_ident_span::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,123,576 ( 0.04%) ???:::check_false_global_bounds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,122,350 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,118,992 ( 0.04%) ???:::build_with_typing_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,111,467 ( 0.04%) ???:::check_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,108,742 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,088,802 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,087,447 ( 0.04%) ???:0x000000000000aec0 [/usr/lib/ld-linux-x86-64.so.2] 1,079,090 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,069,138 ( 0.04%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,059,050 ( 0.04%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,058,810 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,058,762 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,048,863 ( 0.04%) ???:::is_trivially_wf [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,845 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,777 ( 0.04%) ???:::start_new_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,740 ( 0.04%) ???:::visit_expr::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,740 ( 0.04%) ???:::resolve:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,041,545 ( 0.04%) ???:rustc_query_impl::query_impl::asyncness::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,038,820 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,030,211 ( 0.04%) ???:::perform_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,028,863 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,020,316 ( 0.04%) ???:rustc_query_impl::query_impl::param_env_normalized_for_post_analysis::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,019,322 ( 0.04%) ???: as rustc_hir::intravisit::Visitor>::visit_path [???] 1,018,981 ( 0.04%) ???:>::apply_rewrites [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,018,946 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 999,131 ( 0.04%) ???:::check_stability [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 999,125 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 999,000 ( 0.04%) ???:::parent_module_from_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 998,875 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 998,860 ( 0.04%) ???:>, >::iter_enumerated::{closure#0}>, ::run_pass::{closure#0}> as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 988,911 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 983,671 ( 0.03%) ???:::call [???] 978,824 ( 0.03%) ???:::instantiate_into'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 970,420 ( 0.03%) ???:::article_and_description [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 968,933 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 968,933 ( 0.03%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 961,632 ( 0.03%) ???:rustc_query_impl::query_impl::coroutine_kind::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 958,944 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 958,937 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 958,916 ( 0.03%) ???:>>::walk_ref [???] 948,994 ( 0.03%) ???:::run_pass [???] 939,911 ( 0.03%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/tcache.c:tcache_bin_flush_stashed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 939,332 ( 0.03%) ???:::visit_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 939,012 ( 0.03%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 937,521 ( 0.03%) ???:alloc::fmt::format::format_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 935,859 ( 0.03%) include/jemalloc/internal/div.h:tcache_bin_flush_small 928,977 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 928,972 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 928,971 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 921,676 ( 0.03%) ???:rustc_hir_typeck::used_trait_imports [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 919,195 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 919,172 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 919,076 ( 0.03%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 918,988 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 918,980 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/repeat_vec_with_capacity.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 914,896 ( 0.03%) include/jemalloc/internal/arena_inlines_b.h:calloc 911,614 ( 0.03%) ???:rustc_span::normalize_src [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 909,174 ( 0.03%) ???:rustc_type_ir::relate::structurally_relate_tys::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 909,022 ( 0.03%) ???:::as_operand'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 908,999 ( 0.03%) ???:::min [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 908,908 ( 0.03%) ???:::lower_body::<::lower_const_body::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 899,304 ( 0.03%) ???:::parse_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 899,052 ( 0.03%) ???: as core::clone::Clone>::clone::clone_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 899,010 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::in_automatically_derived 899,010 ( 0.03%) ???:::range_span [???] 899,010 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 889,688 ( 0.03%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 889,021 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 888,988 ( 0.03%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 888,981 ( 0.03%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 888,978 ( 0.03%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 883,885 ( 0.03%) include/jemalloc/internal/ph.h:pa_alloc 880,747 ( 0.03%) ???:rustc_passes::stability::check_mod_unstable_api_usage [???] 879,230 ( 0.03%) ???:rustc_resolve::rustdoc::unindent_doc_fragments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 879,164 ( 0.03%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 879,161 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 879,032 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/operators/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 878,900 ( 0.03%) ???:::contains [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 869,194 ( 0.03%) ???:::visit_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 869,159 ( 0.03%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 868,956 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 861,012 ( 0.03%) ???:rustc_interface::passes::emit_delayed_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 859,312 ( 0.03%) ???:::visit_node:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 859,214 ( 0.03%) ???:::parse_ident_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 858,968 ( 0.03%) ???:rustc_lint::types::literal::lint_literal [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 849,136 ( 0.03%) ???:::visit_basic_block_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 842,124 ( 0.03%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:malloc_default [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 839,118 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 839,096 ( 0.03%) ???:rustc_ast::visit::walk_item_inner::> [???] 839,076 ( 0.03%) ???:::hir_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 838,992 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 830,450 ( 0.03%) ???: as rustc_mir_transform::pass_manager::MirPass>::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 829,070 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 829,046 ( 0.03%) ???:::mk_type_list [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 825,898 ( 0.03%) include/jemalloc/internal/arena_inlines_b.h:malloc_default 819,426 ( 0.03%) ???:>>::walk_ref [???] 819,221 ( 0.03%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [???] 819,079 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 819,016 ( 0.03%) ???:::intrinsic:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 809,186 ( 0.03%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [???] 809,109 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_option_as_slice.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 809,106 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 799,730 ( 0.03%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 799,300 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes 799,120 ( 0.03%) ???:::flat_map_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 799,120 ( 0.03%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [???] 799,120 ( 0.03%) ???:::expr_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 793,736 ( 0.03%) include/jemalloc/internal/rtree.h:pa_alloc 792,152 ( 0.03%) ???:rustc_mir_transform::mir_keys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 789,368 ( 0.03%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 789,131 ( 0.03%) ???:::parse_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 780,487 ( 0.03%) ???:>::for_item::<>::identity_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 779,142 ( 0.03%) ???:>::union'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 779,142 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 779,142 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/ranges.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 779,115 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 779,103 ( 0.03%) ???:::is_lang_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 771,154 ( 0.03%) ???:::hir_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 765,164 ( 0.03%) ???:core::fmt::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 760,688 ( 0.03%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,734 ( 0.03%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,335 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 759,335 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post 759,279 ( 0.03%) ???:rustc_mir_transform::mir_keys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,278 ( 0.03%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,278 ( 0.03%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,163 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 759,136 ( 0.03%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,088 ( 0.03%) ???:::recover_missing_kw_before_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 749,175 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/redundant_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 749,142 ( 0.03%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 749,100 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 746,783 ( 0.03%) ???:::check_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 745,069 ( 0.03%) ???:rustc_ty_utils::assoc::associated_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 739,260 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 739,176 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 734,111 ( 0.03%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 730,704 ( 0.03%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 729,792 ( 0.03%) include/jemalloc/internal/tsd.h:realloc 729,184 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/minmax.rs:clippy_lints::minmax::min_max [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 729,168 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 729,165 ( 0.03%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 729,165 ( 0.03%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 729,165 ( 0.03%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 729,165 ( 0.03%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 729,158 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 721,084 ( 0.03%) ???:rustc_query_impl::query_impl::inferred_outlives_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 719,370 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,370 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,352 ( 0.03%) ???:>::tys::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 719,280 ( 0.03%) ???:::require_lang_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 719,208 ( 0.03%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 719,208 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,208 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/format.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,208 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/if_let_mutex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,208 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/ifs/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,184 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/formatting.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,184 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 718,294 ( 0.03%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 711,473 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 711,123 ( 0.03%) ???:rustc_query_impl::query_impl::explicit_clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 701,020 ( 0.02%) ???:rustc_query_impl::query_impl::hir_owner::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 700,597 ( 0.02%) ???:::body_codegen_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 700,580 ( 0.02%) ???:::run_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 699,510 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 699,226 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_mut_passed.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 696,649 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 689,541 ( 0.02%) ???:::find_ancestor_inside [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 689,241 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/bit_width.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 689,241 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 689,241 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 689,229 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0} [???] 689,223 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 689,218 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,414 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::check_attributes 679,405 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::filter_map::FilterMap, clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,405 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,289 ( 0.02%) ???:::unresolved_root_variables [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 679,247 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,238 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,228 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/double_parens.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 679,223 ( 0.02%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 669,296 ( 0.02%) ???:>::fill_item::<>::identity_for_item::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 667,245 ( 0.02%) ???:dladdr [/usr/lib/libc.so.6] 659,406 ( 0.02%) ???:>, &mut rustc_infer::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 659,339 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 659,307 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,274 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/bool_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,274 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,274 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,274 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_main_separator_str.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,274 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/match_result_ok.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,271 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,252 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/precedence.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 659,252 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 656,418 ( 0.02%) ???:rustc_middle::hir::map::crate_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 649,786 ( 0.02%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 649,252 ( 0.02%) ???:>::fill_item::<>::identity_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 648,075 ( 0.02%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 639,445 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:clippy_utils::msrvs::check_attrs:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 633,853 ( 0.02%) include/jemalloc/internal/tcache_inlines.h:malloc_default 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,307 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 629,244 ( 0.02%) ???:::parse_expr_assoc_with [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 623,906 ( 0.02%) include/jemalloc/internal/util.h:tcache_bin_flush_small 619,313 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 619,312 ( 0.02%) ???:rustc_hir::intravisit::walk_expr:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 619,284 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 615,531 ( 0.02%) include/jemalloc/internal/edata.h:pa_alloc 611,408 ( 0.02%) include/jemalloc/internal/ph.h:tcache_bin_flush_small 611,072 ( 0.02%) ???:rustc_query_impl::query_impl::def_span::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 609,592 ( 0.02%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 609,482 ( 0.02%) ???:::lower_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 609,368 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 605,180 ( 0.02%) src/hook.c:realloc 599,475 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,400 ( 0.02%) ???:::hir_span::until_within [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 599,382 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_ty 599,340 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,340 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,340 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,331 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/arc_with_non_send_sync.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,331 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/box_default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,331 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/from_raw_with_void_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,314 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/octal_escapes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 599,280 ( 0.02%) ???:::as_call_operand'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 598,267 ( 0.02%) include/jemalloc/internal/sz.h:pa_alloc 597,650 ( 0.02%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 596,760 ( 0.02%) ???:::clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 596,281 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 590,848 ( 0.02%) ???:rustc_mir_transform::ffi_unwind_calls::has_ffi_unwind_calls [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,352 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 589,351 ( 0.02%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,349 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 589,292 ( 0.02%) ???:::parse_expr_assoc_with'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 581,354 ( 0.02%) src/base.c:pa_alloc 581,151 ( 0.02%) ???:rustc_lint::expect::lint_expectations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 579,652 ( 0.02%) ???:rustc_trait_selection::traits::normalize_param_env_or_error [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 579,364 ( 0.02%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 579,355 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 579,346 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/non_octal_unix_permissions.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 579,304 ( 0.02%) ???:::legacy_const_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 579,304 ( 0.02%) ???:::eval_stability [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 570,929 ( 0.02%) ???:::is_impl_trait_in_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,952 ( 0.02%) ???:>::grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,419 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::<::collect_taits_declared_in_body::TaitInBodyFinder>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,419 ( 0.02%) ???:rustc_hir::intravisit::walk_expr:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,419 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,373 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::root_macro_call 569,373 ( 0.02%) ???: as core::iter::traits::collect::FromIterator>::from_iter::, ::lower_generic_params_mut::{closure#0}>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,373 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 569,373 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 569,373 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 569,357 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 567,555 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 567,545 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 567,175 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 567,106 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 561,512 ( 0.02%) ???:::get_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 560,540 ( 0.02%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 559,382 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 559,365 ( 0.02%) ???:::call_once_force::<>>::initialize<>>::get_or_init<::dominators::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 559,329 ( 0.02%) ???:::check_callee_stability [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 553,657 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 549,577 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 549,462 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 549,444 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 549,443 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 549,410 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 544,813 ( 0.02%) include/jemalloc/internal/sz.h:malloc_default 539,550 ( 0.02%) ???:::lower [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 539,406 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/await_holding_invalid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/block_scrutinee.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/blocks_in_conditions.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/entry.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_sub.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_pop_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_take.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/zero_repeat_side_effects.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,406 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 539,403 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/float_literal.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 532,298 ( 0.02%) ???:rustc_lint::levels::skippable_lints'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 530,712 ( 0.02%) ???:::is_type_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 529,417 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,415 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,415 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/default_constructed_unit_structs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,415 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/default_instead_of_iter_empty.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,415 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/from_str_radix_10.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,415 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 529,364 ( 0.02%) ???:::parse_expr_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 521,060 ( 0.02%) ???:rustc_query_impl::query_impl::hir_attr_map::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 520,772 ( 0.02%) ???:::is_constructor [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 520,148 ( 0.02%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 519,579 ( 0.02%) ???:rustc_arena::outline::<::alloc_from_iter, core::iter::adapters::chain::Chain, core::iter::adapters::copied::Copied>>>, rustc_ty_utils::assoc::associated_item_def_ids::{closure#1}>>::{closure#0}, &mut [rustc_span::def_id::DefId]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 519,545 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 519,532 ( 0.02%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 519,428 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 519,428 ( 0.02%) ???: as core::iter::traits::collect::Extend>::extend::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 512,598 ( 0.02%) ???:rustc_hir_analysis::check_unused::check_unused_traits'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 510,015 ( 0.02%) ???:::resolve_doc_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 509,439 ( 0.02%) ???: as core::iter::traits::collect::Extend>::extend::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 509,439 ( 0.02%) ???:rustc_mir_transform::run_analysis_to_runtime_passes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/async_yields_async.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/cloned_ref_to_slice_refs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_add.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_checked_ops.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_rem_euclid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/minmax.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/neg_cmp_op_on_partial_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/panicking_overflow_checks.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/rc_clone_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/reference.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/replace_box.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/to_digit_is_some.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,439 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,422 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unused_rounding.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,422 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/format_args_collector.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 509,388 ( 0.02%) ???:thin_vec::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 509,000 ( 0.02%) ???:rustc_query_impl::query_impl::associated_item::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 501,024 ( 0.02%) ???:rustc_hir_analysis::check::wfcheck::check_well_formed [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,943 ( 0.02%) ???:rustc_query_impl::query_impl::generics_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,850 ( 0.02%) ???:rustc_query_impl::query_impl::def_ident_span::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,800 ( 0.02%) ???:rustc_query_impl::query_impl::clauses_of::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,800 ( 0.02%) ???:rustc_query_impl::query_impl::explicit_clauses_of::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,650 ( 0.02%) ???:rustc_query_impl::query_impl::lookup_deprecation_entry::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,650 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 499,631 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,600 ( 0.02%) ???:::prohibit_generic_args::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,565 ( 0.02%) ???:::expr_guaranteed_to_constitute_read_for_never [???] 499,525 ( 0.02%) ???:::check_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,476 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,450 ( 0.02%) ???:rustc_query_impl::query_impl::trivial_const::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,255 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 492,933 ( 0.02%) ???:rustc_passes::check_attr::check_mod_attrs [???] 490,940 ( 0.02%) ???:::generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 489,474 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 489,461 ( 0.02%) ???:::filter_map_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 489,461 ( 0.02%) ???:rustc_mir_transform::pass_manager::run_passes_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 485,854 ( 0.02%) src/eset.c:pa_alloc 484,876 ( 0.02%) include/jemalloc/internal/atomic.h:realloc 484,580 ( 0.02%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:realloc 480,749 ( 0.02%) ???:::lower_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,952 ( 0.02%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,904 ( 0.02%) ???:rustc_query_impl::query_impl::generics_of::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,826 ( 0.02%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,808 ( 0.02%) ???:rustc_query_impl::query_impl::def_span::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,808 ( 0.02%) ???:rustc_query_impl::query_impl::inferred_outlives_of::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,760 ( 0.02%) ???:rustc_query_impl::query_impl::type_of::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,712 ( 0.02%) ???:rustc_query_impl::query_impl::param_env::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,580 ( 0.02%) ???:rustc_resolve::rustdoc::span_of_fragments [???] 479,520 ( 0.02%) ???:rustc_query_impl::query_impl::param_env_normalized_for_post_analysis::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,502 ( 0.02%) ???:rustc_hir::hir::is_range_literal [???] 479,492 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,483 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/init_numbered_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 479,478 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 479,472 ( 0.02%) ???:::node [???] 479,472 ( 0.02%) ???:::requires_monomorphization [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,472 ( 0.02%) ???:::name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,472 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_strip.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 479,469 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 469,812 ( 0.02%) ???:rustc_query_impl::query_impl::hir_owner::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,483 ( 0.02%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,483 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,483 ( 0.02%) ???:rustc_query_impl::query_impl::mir_for_ctfe::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,483 ( 0.02%) ???:rustc_query_impl::query_impl::promoted_mir::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,471 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,436 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 465,825 ( 0.02%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, false>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 459,558 ( 0.02%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 459,504 ( 0.02%) ???:rustc_query_impl::query_impl::nested_bodies_within::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 459,494 ( 0.02%) ???:rustc_query_impl::query_impl::thir_abstract_const::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 459,475 ( 0.02%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 450,030 ( 0.02%) ???:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,820 ( 0.02%) ???:rustc_query_impl::query_impl::lower_to_hir::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,775 ( 0.02%) ???:rustc_query_impl::query_impl::hir_attr_map::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,775 ( 0.02%) ???:rustc_query_impl::query_impl::shallow_lint_levels_on::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,640 ( 0.02%) ???:rustc_query_impl::query_impl::assumed_wf_types::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,548 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 449,505 ( 0.02%) ???:::normalize_and_prove_instantiated_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,505 ( 0.02%) ???:rustc_query_impl::query_impl::thir_abstract_const::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/borrow_deref_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs:clippy_lints::casts::ptr_cast_constness::check_null_ptr_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/zero_div_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,505 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,493 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,490 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/int_plus_one.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 449,460 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_function [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 440,639 ( 0.02%) ???:llvm::cl::Option::addArgument() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 440,452 ( 0.02%) ???:rustc_passes::dead::check_mod_deathness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,591 ( 0.02%) ???:rustc_hir::intravisit::walk_qpath::> [???] 439,538 ( 0.02%) ???:::body_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,538 ( 0.02%) ???:::record_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,520 ( 0.02%) ???:rustc_session::options::cgopts::soft_float [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::check_liveness::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::mir_borrowck::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::mir_built::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::mir_drops_elaborated_and_const_checked::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::nested_bodies_within::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::opaque_types_defined_by::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::region_scope_tree::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::typeck_root::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) ???:rustc_query_impl::query_impl::used_trait_imports::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,516 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 429,881 ( 0.02%) ???:core::slice::sort::stable::drift::sort::<(&rustc_span::symbol::Symbol, &rustc_span::span_encoding::Span), <[(&rustc_span::symbol::Symbol, &rustc_span::span_encoding::Span)]>::sort_by_key<&rustc_span::span_encoding::Span, ::check_crate::{closure#0}>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,527 ( 0.02%) ???:rustc_query_impl::query_impl::asyncness::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,527 ( 0.02%) ???:rustc_query_impl::query_impl::mir_promoted::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,527 ( 0.02%) ???:rustc_query_impl::query_impl::thir_body::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,513 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,484 ( 0.02%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,706 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,622 ( 0.01%) ???:>>::upcast_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,580 ( 0.01%) ???:>::from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,559 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,559 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,559 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,559 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,538 ( 0.01%) ???:rustc_query_impl::query_impl::coroutine_kind::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,538 ( 0.01%) ???:rustc_query_impl::query_impl::mir_const_qualif::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 419,538 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 419,538 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,682 ( 0.01%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 409,547 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,508 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 403,686 ( 0.01%) include/jemalloc/internal/atomic.h:tcache_bin_flush_small 402,881 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,863 ( 0.01%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,760 ( 0.01%) ???:rustc_query_impl::query_impl::check_well_formed::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,680 ( 0.01%) ???:::walk_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,650 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 399,640 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,573 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,565 ( 0.01%) ???:::invalidate_cfg_cache [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,546 ( 0.01%) ???:rustc_hir::intravisit::walk_expr:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,688 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generics [???] 389,606 ( 0.01%) ???:rustc_query_impl::query_impl::check_liveness::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,573 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_update.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 389,571 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,571 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 389,571 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 389,549 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 389,532 ( 0.01%) ???:::demand_coerce_diag [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,532 ( 0.01%) ???:rustc_hir::intravisit::walk_const_item_rhs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,532 ( 0.01%) ???:rustc_mir_dataflow::drop_flag_effects::on_all_children_bits::on_all_children_bits::<::apply_call_return_effect::{closure#0}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,532 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_lints::misc_early::literal_suffix::check 379,696 ( 0.01%) ???:>>::walk_ref [???] 379,696 ( 0.01%) ???:rustc_ast::visit::visit_generic_params::> [???] 379,654 ( 0.01%) ???:thin_vec::drop_non_singleton::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,620 ( 0.01%) ???:::normalize_to_macros_2_0 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,582 ( 0.01%) ???:rustc_query_impl::query_impl::check_coroutine_obligations::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,582 ( 0.01%) ???:rustc_query_impl::query_impl::check_match::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,582 ( 0.01%) ???:rustc_query_impl::query_impl::check_tail_calls::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,582 ( 0.01%) ???:rustc_query_impl::query_impl::check_transmutes::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,582 ( 0.01%) ???:rustc_query_impl::query_impl::has_ffi_unwind_calls::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,569 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,569 ( 0.01%) ???:rustc_hir::intravisit::walk_expr::<::collect_taits_declared_in_body::TaitInBodyFinder> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,568 ( 0.01%) ???:rustc_hir::intravisit::walk_expr:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,561 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 379,544 ( 0.01%) ???:::renumber_regions::visit_const_operand::{closure#0}>::{closure#0}> as rustc_type_ir::fold::TypeFolder>::fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,544 ( 0.01%) ???:rustc_hir::intravisit::walk_ty::<::collect_taits_declared_in_body::TaitInBodyFinder> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,544 ( 0.01%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,544 ( 0.01%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,544 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs:clippy_lints::misc_early::literal_suffix::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 376,967 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 369,630 ( 0.01%) ???:::break_and_eat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 369,581 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 369,556 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 366,578 ( 0.01%) ???:0x0000000000029600 [/usr/lib/ld-linux-x86-64.so.2] 363,453 ( 0.01%) include/jemalloc/internal/tsd_tls.h:realloc 362,911 ( 0.01%) ???:core::str::converts::from_utf8 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 362,118 ( 0.01%) ???:::opt_item_name:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 361,268 ( 0.01%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,689 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_resolve/src/rustdoc.rs:::check_attributes 359,688 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_attributes 359,685 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,633 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,604 ( 0.01%) ???:::needs_drop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,604 ( 0.01%) ???:rustc_query_impl::query_impl::check_unsafety::execute_query_non_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,604 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,601 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,601 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unicode.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,595 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 359,568 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,568 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 350,577 ( 0.01%) ???:std::exception::~exception() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,790 ( 0.01%) ???:::parse_outer_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,755 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,755 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,755 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,623 ( 0.01%) ???:rustc_const_eval::check_consts::post_drop_elaboration::checking_enabled [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,615 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,615 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,615 ( 0.01%) ???:::has_mut_interior [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,615 ( 0.01%) ???:::needs_non_const_drop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,615 ( 0.01%) ???:rustc_mir_dataflow::rustc_peek::sanity_check [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,580 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 346,283 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_stashed 344,145 ( 0.01%) include/jemalloc/internal/thread_event.h:malloc_default 343,818 ( 0.01%) ???:::fill_well_known'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,932 ( 0.01%) ???:::leak_check [???] 339,762 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,740 ( 0.01%) ???:::get_module_children::{closure#0}, core::result::Result::Ok>, core::result::Result> as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,655 ( 0.01%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,644 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,626 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,626 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 339,592 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,592 ( 0.01%) ???:::visit_ty [???] 339,592 ( 0.01%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,592 ( 0.01%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,592 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs:clippy_lints::methods::manual_c_str_literals::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 339,592 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 338,481 ( 0.01%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 330,543 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 330,172 ( 0.01%) ???:>>>>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,880 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,736 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,736 ( 0.01%) ???:::is_mutable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,637 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 329,637 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::eq_op::check_assert 329,637 ( 0.01%) ???:::policy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,629 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 329,604 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 329,604 ( 0.01%) ???:::parse_expr_prefix'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,604 ( 0.01%) ???:rustc_hir::intravisit::walk_body:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,604 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check_function [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 321,233 ( 0.01%) ???:rustc_hir_analysis::check::wfcheck::check_type_wf [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 321,041 ( 0.01%) ???:rustc_mir_transform::ffi_unwind_calls::required_panic_strategy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 320,646 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 319,780 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 319,692 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 319,648 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 319,648 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 319,642 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 319,616 ( 0.01%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 319,616 ( 0.01%) ???:>::fill_item::<>::identity_for_item::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 314,371 ( 0.01%) include/jemalloc/internal/fb.h:pa_alloc 313,357 ( 0.01%) include/jemalloc/internal/rtree.h:pa_dalloc 309,783 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,752 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:::check_generics 309,675 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 309,658 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 309,646 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 309,628 ( 0.01%) ???:::instantiate_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,628 ( 0.01%) ???:rustc_hir_analysis::check::region::resolve_local::record_rvalue_scope_if_borrow_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 304,807 ( 0.01%) ???:rustc_middle::hir::map::crate_hash'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 301,110 ( 0.01%) ???:::features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 300,022 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:malloc_default 299,893 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,775 ( 0.01%) ???:::expn_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,698 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,695 ( 0.01%) ???:>::visit_ty::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,672 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 299,670 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,670 ( 0.01%) ???:::recursion_limit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,670 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 299,670 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:clippy_lints::redundant_async_block::desugar_async_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 299,660 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 299,660 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::emit_lint_if_under_msrv 290,375 ( 0.01%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 290,052 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs:::check_expr 289,890 ( 0.01%) ???:rustc_query_impl::query_impl::shallow_lint_levels_on::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,823 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 289,805 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,739 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,681 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 286,567 ( 0.01%) src/tcache.c:malloc_default 279,832 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,813 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::new 279,780 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,750 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,748 ( 0.01%) ???:>::relate:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,748 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::visit_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 279,734 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_ty 279,692 ( 0.01%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 279,692 ( 0.01%) ???:::policy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,664 ( 0.01%) ???:::def_key:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,664 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 279,664 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 275,606 ( 0.01%) src/extent.c:pa_alloc 269,813 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,784 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,757 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,730 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,703 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr_post 269,703 ( 0.01%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,703 ( 0.01%) ???:::register_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,703 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,703 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/permissions_set_readonly_false.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,694 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/multi_assignments.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,684 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body 269,676 ( 0.01%) ???:::lower_const_item_rhs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,676 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 269,676 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 264,772 ( 0.01%) include/jemalloc/internal/edata.h:malloc_default 259,818 ( 0.01%) ???:::check_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,792 ( 0.01%) ???: as <[_]>::to_vec_in::ConvertVec>::to_vec:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,722 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,714 ( 0.01%) ???:::in_any_value_of_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,688 ( 0.01%) ???:::consume_operand [???] 259,688 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs:clippy_lints::methods::ip_constant::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 257,171 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 255,330 ( 0.01%) include/jemalloc/internal/edata.h:pa_dalloc 250,680 ( 0.01%) include/jemalloc/internal/mutex.h:malloc_default 250,263 ( 0.01%) ???:rustc_middle::ty::trait_def::trait_impls_of_provider [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 249,725 ( 0.01%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 249,700 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 242,798 ( 0.01%) ???:>::initialize::<>::get_or_init<::create_global_ctxt, rustc_interface::passes::create_and_enter_global_ctxt, rustc_driver_impl::run_compiler::{closure#0}::{closure#1}>::{closure#2}>::{closure#1}>::{closure#0}, !> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,075 ( 0.01%) ???:rustc_query_impl::query_impl::type_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,027 ( 0.01%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,868 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes 239,868 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes_post 239,832 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,820 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::trim_matches::<::is_whitespace> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,808 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,808 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes 239,808 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes_post 239,798 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,798 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,790 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 239,775 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_variant [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,744 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::unit_types::unit_arg::check 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::unit_types::unit_cmp::check 239,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:::check_expr 239,736 ( 0.01%) ???:::requires_monomorphization'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,728 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 239,728 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_expr 239,712 ( 0.01%) ???:::visit_operand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,712 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs:clippy_lints::methods::useless_nonzero_new_unchecked::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,712 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 239,137 ( 0.01%) include/jemalloc/internal/ph.h:pa_dalloc 235,622 ( 0.01%) ???:__cxa_finalize [/usr/lib/libc.so.6] 230,107 ( 0.01%) include/jemalloc/internal/ticker.h:malloc_default 229,839 ( 0.01%) ???:::ensure_source_file_source_present [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,816 ( 0.01%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,793 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 229,793 ( 0.01%) ???:::lower_attrs_with_extra [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,785 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 229,770 ( 0.01%) ???:::apply_inner::::apply_revealing_opaque<::apply::{closure#0}>::{closure#0}, ::apply::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,724 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,724 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,724 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 227,982 ( 0.01%) ???:::pad [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 220,104 ( 0.01%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,868 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,802 ( 0.01%) ???:::visit_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,782 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,780 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::WherePredicate; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???:::register_predicates::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,758 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::WherePredicate; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,741 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::is_ty_freeze [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::opt_item_name:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,736 ( 0.01%) ???:::xform_self_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,283 ( 0.01%) ???:::register_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,832 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> 209,769 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 209,769 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 209,769 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 209,769 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_expr 209,769 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr_post 209,769 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 209,748 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::is_expn_of 209,748 ( 0.01%) ???:::check_static_ptr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,748 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 209,097 ( 0.01%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, llvm::StringRef, llvm::cl::Option*, llvm::DenseMapInfo, llvm::detail::DenseMapPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseMapPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 203,322 ( 0.01%) src/thread_event.c:malloc_default 202,645 ( 0.01%) ???:rustc_query_impl::query_impl::associated_item::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,880 ( 0.01%) ???: as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,825 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes 199,780 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 199,780 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 199,772 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:::check_expr 199,760 ( 0.01%) ???:::defaultness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,760 ( 0.01%) ???:core::ptr::drop_glue::, rustc_hash::FxBuildHasher>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 191,875 ( 0.01%) ???:0x000000000000ad20 [/usr/lib/ld-linux-x86-64.so.2] 191,334 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_small 190,937 ( 0.01%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,886 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,886 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,861 ( 0.01%) ???:core::slice::sort::stable::drift::sort::::sort_by_key<&core::option::Option, , rustc_middle::ty::assoc::AssocItem> as core::iter::traits::collect::FromIterator<(core::option::Option, rustc_middle::ty::assoc::AssocItem)>>::from_iter, rustc_ty_utils::assoc::associated_items::{closure#0}>, ::new, rustc_ty_utils::assoc::associated_items::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,851 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,807 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:clippy_lints::functions::renamed_function_params::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,805 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,791 ( 0.01%) ???:::in_any_value_of_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,772 ( 0.01%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::::replace_free_regions_with_nll_infer_vars<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>::{closure#0}>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,772 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:clippy_lints::methods::swap_with_temporary::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,436 ( 0.01%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/pa.c:pa_alloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 187,859 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::implementations_of_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 180,690 ( 0.01%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 179,970 ( 0.01%) ???:LLVMRustVersionPatch [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 179,860 ( 0.01%) ???:rustc_trait_selection::traits::query::dropck_outlives::trivial_dropck_outlives [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 179,820 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty::> 179,802 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,802 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,802 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:clippy_utils::in_automatically_derived 179,802 ( 0.01%) ???:::run_pass [???] 179,802 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 179,802 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_expr 179,802 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 179,793 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 179,787 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:clippy_lints::needless_question_mark::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 179,784 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:::emit_span_lint::::{closure#0}>> 179,784 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 176,283 ( 0.01%) src/tcache.c:free_default 175,552 ( 0.01%) include/jemalloc/internal/tsd.h:malloc_default 175,060 ( 0.01%) ???:::call_once_force::<>, rustc_hash::FxBuildHasher>>>::initialize<>, rustc_hash::FxBuildHasher>>>::get_or_init<::resolutions::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,864 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 169,864 ( 0.01%) ???:>::visit_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,853 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/self_named_constructors.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 169,817 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 169,813 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_hir_id::HirId, clippy_lints::casts::needless_type_cast::BindingInfo), std::collections::hash::map::IntoIter>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 169,813 ( 0.01%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,813 ( 0.01%) ???:::check_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,796 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::emit_span_lint::::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 169,796 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,796 ( 0.01%) ???:core::ptr::drop_glue::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,796 ( 0.01%) ???:rustc_hir::intravisit::walk_qpath::>'2 [???] 169,796 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 162,280 ( 0.01%) ???:::encode_crate_root'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,149 ( 0.01%) ???:rustc_ast_lowering::index_ast [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,041 ( 0.01%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 159,927 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::trim_matches::<::is_whitespace> 159,869 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes 159,865 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes 159,860 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::filter_map::FilterMap, clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0}>>>::from_iter 159,860 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:::check_attributes 159,860 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes_post 159,860 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes_post 159,824 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 159,808 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 159,808 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_lints::needless_question_mark::check 159,447 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 155,354 ( 0.01%) src/thread_event.c:free_default 152,482 ( 0.01%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 151,684 ( 0.01%) include/jemalloc/internal/mutex.h:pa_alloc 150,035 ( 0.01%) ???:rustc_passes::dead::live_symbols_and_ignored_derived_traits [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 149,880 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,865 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,843 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,842 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys 149,842 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 149,835 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::float_cmp::check_assert 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_expr 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:::check_expr 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 149,835 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,830 ( 0.01%) ???:::check_expr_post [???] 149,820 ( 0.01%) ???:::typing_env [???] 149,820 ( 0.01%) ???:rustc_metadata::rmeta::encoder::rendered_const::classify [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,106 ( 0.01%) include/jemalloc/internal/bit_util.h:pa_alloc 145,011 ( 0.01%) src/sz.c:pa_alloc 143,820 ( 0.01%) include/jemalloc/internal/rtree.h:free_default 139,860 ( 0.00%) ???:::is_trivially_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 139,852 ( 0.00%) ???:::break_two_token_op [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 139,846 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::visit_expr'2 139,838 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 139,832 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/lint.rs:::emit_span_lint::::{closure#0}>> 139,832 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue::::{closure#0}>, rustc_middle::lint::LevelSpec>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 139,832 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::deref 139,832 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs:clippy_lints::types::linked_list::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 139,832 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 139,832 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::> 138,450 ( 0.00%) ???:::hash_one::<&std::path::PathBuf> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,418 ( 0.00%) include/jemalloc/internal/sz.h:tcache_bin_flush_small 132,963 ( 0.00%) include/jemalloc/internal/tsd_tls.h:malloc_default 132,332 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:free_default [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 130,184 ( 0.00%) ???:rustc_passes::reachable::reachable_set [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,038 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,857 ( 0.00%) ???:rustc_query_impl::query_impl::typeck_root::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,853 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body_post 129,844 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::methods::unwrap_expect_used::check_call 129,844 ( 0.00%) ???:>>::from [???] 129,844 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 126,833 ( 0.00%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,474 ( 0.00%) ???:__cxa_atexit [/usr/lib/libc.so.6] 123,490 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::hir_body_owner_kind:: 120,898 ( 0.00%) include/jemalloc/internal/atomic.h:pa_alloc 119,926 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::trim_matches::<::is_whitespace> 119,897 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_ident [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,895 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_attributes 119,895 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 119,895 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::check_attributes 119,895 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::doc::suspicious_doc_comments::check 119,895 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::check_attributes 119,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 119,892 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,889 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,889 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,874 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::meets 119,874 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::meets 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::root_macro_call 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::hir 119,868 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::macros::matching_root_macro_call 119,868 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::casts::needless_type_cast::check 119,868 ( 0.00%) ???:::policy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,868 ( 0.00%) ???:::run_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,868 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_impl_item 119,868 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs:::check_expr 119,868 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_expr 119,862 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::is_in_const_context 119,856 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 119,856 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:core::ptr::drop_glue::::{closure#0}>, rustc_middle::lint::LevelSpec>::{closure#0}> 119,856 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::new 119,856 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:rustc_hir::intravisit::walk_expr::> 113,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_impl_item 111,222 ( 0.00%) ???:>::reserve_rehash::, alloc::vec::Vec>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,956 ( 0.00%) ???:rustc_query_impl::query_impl::lower_to_hir::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,912 ( 0.00%) ???:rustc_query_impl::query_impl::assumed_wf_types::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,889 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::is_ty_freeze 109,886 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_body 109,879 ( 0.00%) ???:rustc_query_impl::query_impl::mir_promoted::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,879 ( 0.00%) ???:rustc_query_impl::query_impl::thir_body::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,874 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_ty 105,321 ( 0.00%) ???:llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag, llvm::cl::OptionHidden) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 102,062 ( 0.00%) ???:core::ptr::drop_glue::>>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,201 ( 0.00%) include/jemalloc/internal/mutex.h:tcache_bin_flush_small 99,910 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_ty 99,890 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::check_body 99,890 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_body 99,890 ( 0.00%) ???:rustc_query_impl::query_impl::promoted_mir::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,883 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::minmax::min_max 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_error_messages/src/lib.rs:clippy_lints::misc_early::literal_suffix::check 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_impl_item 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:clippy_lints::misc_early::literal_suffix::check 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 99,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty:: 99,880 ( 0.00%) ???:::body_id'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,230 ( 0.00%) ???:0x0000000000067b30 [/usr/lib/libc.so.6] 97,534 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::attrs_for_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,474 ( 0.00%) ???:0x0000000000040520 [/usr/lib/libc.so.6] 96,652 ( 0.00%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,557 ( 0.00%) include/jemalloc/internal/thread_event.h:free_default 92,450 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::diagnostic_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,276 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,084 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,798 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,796 ( 0.00%) src/emap.c:pa_alloc 90,116 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 89,946 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,924 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check 89,921 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_field_names.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,904 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::fn_def_id_with_node_args 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_body 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:::check_body 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:clippy_lints::operators::eq_op::check_assert 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr_post 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::trim_start_matches::<::is_whitespace> 89,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::in_automatically_derived 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 89,901 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,898 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,898 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_else.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 89,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 89,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 89,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::misc_early::literal_suffix::check -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/match_result_ok.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub MATCH_RESULT_OK, . style, . "usage of `ok()` in `let Some(pat)` statements is unnecessary, match on `Ok(pat)` instead" . } . . declare_lint_pass!(MatchResultOk => [MATCH_RESULT_OK]); . . impl<'tcx> LateLintPass<'tcx> for MatchResultOk { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let (let_pat, let_expr, ifwhile) = 119,868 ( 0.00%) if let Some(higher::IfLet { let_pat, let_expr, .. }) = higher::IfLet::hir(cx, expr) { 149,835 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . (let_pat, let_expr, "if") . } else if let Some(higher::WhileLet { let_pat, let_expr, .. }) = higher::WhileLet::hir(expr) { . (let_pat, let_expr, "while") . } else { . return; . }; . . if let ExprKind::MethodCall(ok_path, recv, [], ..) = let_expr.kind //check is expr.ok() has type Result.ok(, _) -- line 57 ---------------------------------------- -- line 74 ---------------------------------------- . MATCH_RESULT_OK, . expr.span.with_hi(let_expr.span.hi()), . "matching on `Some` with `ok()` is redundant", . format!("consider matching on `Ok({some_expr_string})` and removing the call to `ok` instead"), . sugg, . applicability, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs -------------------------------------------------------------------------------- Ir -- line 251 ---------------------------------------- . } . } . . fn is_empty_body(cx: &LateContext<'_>, body: BodyId) -> bool { . matches!(cx.tcx.hir_body(body).value.kind, ExprKind::Block(b, _) if b.stmts.is_empty() && b.expr.is_none()) . } . . impl<'tcx> LateLintPass<'tcx> for ExtraUnusedTypeParameters { 35 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 10 ( 0.00%) if let ItemKind::Fn { . generics, . body: body_id, . .. . } = item.kind . && !generics.params.is_empty() . && !is_empty_body(cx, body_id) . && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) . && !item.span.in_external_macro(cx.sess().source_map()) . && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, generics); . walk_item(&mut walker, item); . walker.emit_lint(); . } 40 ( 0.00%) } . 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { . // Only lint on inherent methods, not trait methods. 19,978 ( 0.00%) if let ImplItemKind::Fn(.., body_id) = item.kind 2 ( 0.00%) && !item.generics.params.is_empty() . && trait_ref_of_method(cx, item.owner_id).is_none() . && !is_empty_body(cx, body_id) . && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) . && !item.span.in_external_macro(cx.sess().source_map()) . && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, item.generics); . walk_impl_item(&mut walker, item); . walker.emit_lint(); . } 79,912 ( 0.00%) } . } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs -------------------------------------------------------------------------------- Ir -- line 153 ---------------------------------------- . where . I: Iterator>, . for<'a> F: FnMut(GenericShunt<'a, I, R>) -> U, . R: Residual, . { . // FIXME(#11084): we might be able to get rid of GenericShunt in favor of . // Iterator::scan, as performance should be comparable . 9,994 ( 0.00%) let mut residual = None; . let shunt = GenericShunt { iter, residual: &mut residual }; . let value = f(shunt); 19,988 ( 0.00%) match residual { . Some(r) => FromResidual::from_residual(r), 29,982 ( 0.00%) None => Try::from_output(value), . } . } . . impl Iterator for GenericShunt<'_, I, R> . where . I: Iterator>, . { . type Item = ::Output; . 99,940 ( 0.00%) fn next(&mut self) -> Option { . self.try_for_each(ControlFlow::Break).break_value() 89,946 ( 0.00%) } . . fn size_hint(&self) -> (usize, Option) { . if self.residual.is_some() { . (0, Some(0)) . } else { . let (_, upper) = self.iter.size_hint(); . (0, upper) . } -- line 186 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs -------------------------------------------------------------------------------- Ir -- line 80 ---------------------------------------- . Since(RustcVersion), . } . . /// All known std crates containing a stability attribute. . struct StdCrates([Option; 6]); . impl StdCrates { . fn new(tcx: TyCtxt<'_>) -> Self { . let mut res = Self([None; _]); 38 ( 0.00%) for &krate in tcx.crates(()) { . // FIXME(@Jarcho): We should have an internal lint to detect when this list is out of date. . match tcx.crate_name(krate) { 142 ( 0.00%) sym::alloc => res.0[0] = Some(krate), . sym::core => res.0[1] = Some(krate), . sym::core_arch => res.0[2] = Some(krate), . sym::proc_macro => res.0[3] = Some(krate), . sym::std => res.0[4] = Some(krate), . sym::std_detect => res.0[5] = Some(krate), . _ => {}, . } . } -- line 99 ---------------------------------------- -- line 112 ---------------------------------------- . std_crates: StdCrates, . . // The most recently called path. Used to skip checking the path after it's . // been checked when visiting the call expression. . called_path: Option, . } . . impl IncompatibleMsrv { 9 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 19 ( 0.00%) Self { 2 ( 0.00%) msrv: conf.msrv.into(), . availability_cache: FxHashMap::default(), 1 ( 0.00%) check_in_tests: conf.check_incompatible_msrv_in_tests, . std_crates: StdCrates::new(tcx), . called_path: None, . } 8 ( 0.00%) } . . /// Returns the availability of `def_id`, whether it is enabled through a feature or . /// available since a given version (the default being Rust 1.0.0). `needs_const` requires . /// the `const`-stability to be looked up instead of the stability in non-`const` contexts. . fn get_def_id_availability(&mut self, tcx: TyCtxt<'_>, def_id: DefId, needs_const: bool) -> Availability { . if let Some(availability) = self.availability_cache.get(&(def_id, needs_const)) { . return *availability; . } -- line 136 ---------------------------------------- -- line 161 ---------------------------------------- . patch: 0, . }) . }; . self.availability_cache.insert((def_id, needs_const), version); . version . } . . /// Emit lint if `def_id`, associated with `node` and `span`, is below the current MSRV. 449,490 ( 0.02%) fn emit_lint_if_under_msrv( . &mut self, . cx: &LateContext<'_>, . needs_const: bool, . def_id: DefId, . node: HirId, . span: Span, . ) { . if !self.std_crates.contains(def_id.krate) { -- line 177 ---------------------------------------- -- line 210 ---------------------------------------- . ), . |diag| { . if is_under_cfg_attribute(cx, node) { . diag.note_once("you may want to conditionally increase the MSRV considered by Clippy using the `clippy::msrv` attribute"); . } . }, . ); . } 239,728 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 169,817 ( 0.01%) match expr.kind { . ExprKind::MethodCall(_, _, _, span) => { . if let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { . self.emit_lint_if_under_msrv(cx, is_in_const_context(cx), method_did, expr.hir_id, span); . } . }, 69,916 ( 0.00%) ExprKind::Call(callee, _) if let ExprKind::Path(qpath) = callee.kind => { 19,976 ( 0.00%) self.called_path = Some(callee.hir_id); 29,964 ( 0.00%) let needs_const = is_in_const_context(cx); 1,991,656 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (9,988x) 59,928 ( 0.00%) let def_id = if let Some(def_id) = cx.qpath_res(&qpath, callee.hir_id).opt_def_id() { 779,064 ( 0.03%) => ???:::qpath_res (9,988x) . def_id . } else if needs_const && let ty::FnDef(def_id, _) = *cx.typeck_results().expr_ty(callee).kind() { . // Edge case where a function is first assigned then called. . // We previously would have warned for the non-const MSRV, when . // checking the path, but now that it's called the const MSRV . // must also be met. . def_id . } else { . return; . }; 69,916 ( 0.00%) self.emit_lint_if_under_msrv(cx, needs_const, def_id, expr.hir_id, callee.span); . }, . // Desugaring into function calls by the compiler will use `QPath::LangItem` variants. Those should . // not be linted as they will not be generated in older compilers if the function is not available, . // and the compiler is allowed to call unstable functions. 9,989 ( 0.00%) ExprKind::Path(qpath) 89,901 ( 0.00%) if let Some(path_def_id) = cx.qpath_res(&qpath, expr.hir_id).opt_def_id() 779,087 ( 0.03%) => ???:::qpath_res (9,989x) . && self.called_path != Some(expr.hir_id) => . { . self.emit_lint_if_under_msrv(cx, false, path_def_id, expr.hir_id, expr.span); . }, . _ => {}, . } 239,736 ( 0.01%) } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, hir_ty: &'tcx hir::Ty<'tcx, AmbigArg>) { 119,886 ( 0.00%) if let hir::TyKind::Path(qpath) = hir_ty.kind 159,848 ( 0.01%) && let Some(ty_def_id) = cx.qpath_res(&qpath, hir_ty.hir_id).opt_def_id() 459,563 ( 0.02%) => ???:::qpath_res (19,981x) . // `CStr` and `CString` have been moved around but have been available since Rust 1.0.0 139,846 ( 0.00%) && !matches!(cx.tcx.get_diagnostic_name(ty_def_id), Some(sym::cstr_type | sym::cstring_type)) 859,054 ( 0.03%) => ???:::get_diagnostic_name (19,978x) . { 179,802 ( 0.01%) self.emit_lint_if_under_msrv(cx, false, ty_def_id, hir_ty.hir_id, hir_ty.span); 699,230 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (19,978x) . } . } . } . . /// Heuristic checking if the node `hir_id` is under a `#[cfg()]` or `#[cfg_attr()]` . /// attribute. . fn is_under_cfg_attribute(cx: &LateContext<'_>, hir_id: HirId) -> bool { . cx.tcx -- line 272 ---------------------------------------- 29,967 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs -------------------------------------------------------------------------------- Ir -- line 128 ---------------------------------------- . | DefKind::Ctor(..) . | DefKind::AssocConst { .. } => false, . . DefKind::Fn | DefKind::AssocFn | DefKind::Closure => tcx.constness(def_id) == Constness::NotConst, . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::Binary(kind, lhs, rhs) = expr.kind . && let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind . && let ExprKind::Binary(rhs_kind, rhs_lhs, rhs_rhs) = rhs.kind . // Checking all possible scenarios using a function would be a hopeless task, as we have . // 16 possible alignments of constants/operands. For now, let's use `partition`. . && let mut exprs = [lhs_lhs, lhs_rhs, rhs_lhs, rhs_rhs] . && exprs.iter_mut().partition_in_place(|i| i.res_local_id().is_some()) == 2 . && !expr.span.in_external_macro(cx.sess().source_map()) . && ( -- line 145 ---------------------------------------- -- line 197 ---------------------------------------- . "or, for conciseness", . format!("!{local_snippet}.is_infinite()"), . Applicability::MaybeIncorrect, . ); . }, . } . }); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs -------------------------------------------------------------------------------- Ir -- line 24 ---------------------------------------- . pub(super) trait SpecFromIter { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIter for Vec . where . I: Iterator, . { 99,940 ( 0.00%) default fn from_iter(iterator: I) -> Self { 59,972 ( 0.00%) SpecFromIterNested::from_iter(iterator) 69 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested, core::slice::iter::Iter>>, clippy_lints::ptr::ptr_arg::check_fn_args::{closure#0}>, clippy_lints::ptr::ptr_arg::check_body::{closure#0}>>>::from_iter (1x) 89,946 ( 0.00%) } . } . . impl SpecFromIter> for Vec { . fn from_iter(iterator: IntoIter) -> Self { . // A common case is passing a vector into a function which immediately . // re-collects into a vector. We can short circuit this if the IntoIter . // has not been advanced at all. . // When it has been advanced We can also reuse the memory and move the data to the front. -- line 42 ---------------------------------------- 5 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/higher.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . /// entire `for` loop span . pub span: Span, . /// label . pub label: Option, . } . . impl<'tcx> ForLoop<'tcx> { . /// Parses a desugared `for` loop 179,802 ( 0.01%) pub fn hir(expr: &Expr<'tcx>) -> Option { 59,934 ( 0.00%) if let ExprKind::DropTemps(e) = expr.kind . && let ExprKind::Match(iterexpr, [arm], MatchSource::ForLoopDesugar) = e.kind . && let ExprKind::Call(_, [arg]) = iterexpr.kind . && let ExprKind::Loop(block, label, ..) = arm.body.kind . && let [stmt] = block.stmts . && let hir::StmtKind::Expr(e) = stmt.kind . && let ExprKind::Match(_, [_, some_arm], _) = e.kind . && let hir::PatKind::Struct(_, [field], _) = some_arm.pat.kind . { -- line 46 ---------------------------------------- -- line 48 ---------------------------------------- . pat: field.pat, . arg, . body: some_arm.body, . loop_id: arm.body.hir_id, . span: expr.span.ctxt().outer_expn_data().call_site, . label, . }); . } 29,967 ( 0.00%) None 179,802 ( 0.01%) } . } . . /// An `if` expression without `let` . pub struct If<'hir> { . /// `if` condition . pub cond: &'hir Expr<'hir>, . /// `if` then expression . pub then: &'hir Expr<'hir>, -- line 65 ---------------------------------------- -- line 66 ---------------------------------------- . /// `else` expression . pub r#else: Option<&'hir Expr<'hir>>, . } . . impl<'hir> If<'hir> { . #[inline] . /// Parses an `if` expression without `let` . pub const fn hir(expr: &Expr<'hir>) -> Option { 449,505 ( 0.02%) if let ExprKind::If(cond, then, r#else) = expr.kind . && !has_let_expr(cond) . { . Some(Self { cond, then, r#else }) . } else { . None . } . } . } -- line 82 ---------------------------------------- -- line 93 ---------------------------------------- . pub if_else: Option<&'hir Expr<'hir>>, . /// `if let PAT = EXPR` . /// ^^^^^^^^^^^^^^ . pub let_span: Span, . } . . impl<'hir> IfLet<'hir> { . /// Parses an `if let` expression 89,901 ( 0.00%) pub fn hir(cx: &LateContext<'_>, expr: &Expr<'hir>) -> Option { 179,802 ( 0.01%) if let ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { . pat: let_pat, . init: let_expr, . span: let_span, . .. . }), -- line 110 ---------------------------------------- -- line 130 ---------------------------------------- . return Some(Self { . let_pat, . let_expr, . if_then, . if_else, . let_span, . }); . } 89,901 ( 0.00%) None 89,901 ( 0.00%) } . } . . /// An `if let` or `match` expression. Useful for lints that trigger on one or the other. . #[derive(Debug)] . pub enum IfLetOrMatch<'hir> { . /// Any `match` expression . Match(&'hir Expr<'hir>, &'hir [Arm<'hir>], MatchSource), . /// scrutinee, pattern, then block, else block -- line 147 ---------------------------------------- -- line 211 ---------------------------------------- . pub start: Option<&'a Expr<'a>>, . /// The upper bound of the range, or `None` for ranges such as `X..`. . pub end: Option<&'a Expr<'a>>, . pub span: Span, . } . . impl<'a> Range<'a> { . /// Higher a `hir` range to something similar to `ast::ExprKind::Range`. 599,340 ( 0.02%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 119,868 ( 0.00%) let span = expr.range_span()?; 1,378,512 ( 0.05%) => ???:::range_span (59,934x) . let (ty, start, end) = match expr.kind { . ExprKind::Call(path, [arg1, arg2]) . if let ExprKind::Path(qpath) = path.kind . && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::RangeInclusiveNew) => . { . (RangeTy::OpsInclusive, Some(arg1), Some(arg2)) . }, . ExprKind::Struct(&qpath, fields, StructTailExpr::None) => match (cx.tcx.qpath_lang_item(qpath)?, fields) { -- line 228 ---------------------------------------- -- line 256 ---------------------------------------- . }, . (hir::LangItem::RangeTo, [end]) if end.ident.name == sym::end => (RangeTy::OpsTo, None, Some(end.expr)), . _ => return None, . }, . _ => return None, . }; . . Some(Range { ty, start, end, span }) 479,472 ( 0.02%) } . } . . /// A type that can appear as the type of a range expression. . /// . /// This is a component of [`Range`]. . #[derive(Debug, Copy, Clone, Eq, PartialEq)] . pub enum RangeTy { . /// [`core::ops::RangeFrom`] -- line 272 ---------------------------------------- -- line 361 ---------------------------------------- . Repeat(&'a Expr<'a>, &'a Expr<'a>), . /// `vec![a, b, c]` . Vec(&'a [Expr<'a>]), . } . . impl<'a> VecArgs<'a> { . /// Returns the arguments of the `vec!` macro if this expression was expanded . /// from `vec!`. 629,307 ( 0.02%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 209,766 ( 0.01%) if let ExprKind::Call(fun, args) = expr.kind 59,928 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 179,784 ( 0.01%) && is_expn_of(fun.span, sym::vec).is_some() 1,108,668 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of (29,964x) . && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() . && let Some(name) = cx.tcx.get_diagnostic_name(fun_def_id) . { . return match (name, args) { . (sym::vec_from_elem, [elem, size]) => { . // `vec![elem; size]` case . Some(VecArgs::Repeat(elem, size)) . }, -- line 380 ---------------------------------------- -- line 381 ---------------------------------------- . (sym::box_assume_init_into_vec_unsafe, [write_box_via_move]) . if let ExprKind::Call(_, [_box, elems]) = write_box_via_move.kind . && let ExprKind::Array(elems) = elems.kind => . { . // `vec![a, b, c]` case . Some(VecArgs::Vec(elems)) . }, . (sym::vec_new, []) => Some(VecArgs::Vec(&[])), 29,964 ( 0.00%) _ => None, . }; . } . 29,964 ( 0.00%) None 629,307 ( 0.02%) } . } . . /// A desugared `while` loop . pub struct While<'hir> { . /// `while` loop condition . pub condition: &'hir Expr<'hir>, . /// `while` loop body . pub body: &'hir Expr<'hir>, -- line 402 ---------------------------------------- -- line 448 ---------------------------------------- . /// ^^^^^^^^^^^^^^ . pub let_span: Span, . } . . impl<'hir> WhileLet<'hir> { . #[inline] . /// Parses a desugared `while let` loop . pub const fn hir(expr: &Expr<'hir>) -> Option { 179,802 ( 0.01%) if let ExprKind::Loop( . &Block { . expr: . Some(&Expr { . kind: . ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { -- line 464 ---------------------------------------- 269,694 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_slicing.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . } . . declare_lint_pass!(RedundantSlicing => [DEREF_BY_SLICING, REDUNDANT_SLICING]); . . static REDUNDANT_SLICING_LINT: (&Lint, &str) = (REDUNDANT_SLICING, "redundant slicing of the whole range"); . static DEREF_BY_SLICING_LINT: (&Lint, &str) = (DEREF_BY_SLICING, "slicing when dereferencing would work"); . . impl<'tcx> LateLintPass<'tcx> for RedundantSlicing { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . 29,967 ( 0.00%) let ctxt = expr.span.ctxt(); 59,934 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, mutability, addressee) = expr.kind . && addressee.span.ctxt() == ctxt . && let ExprKind::Index(indexed, range, _) = addressee.kind . && cx . .typeck_results() . .expr_ty_adjusted(range) . .is_lang_item(cx, LangItem::RangeFull) . { . let (expr_ty, expr_ref_count, _) = peel_and_count_ty_refs(cx.typeck_results().expr_ty(expr)); -- line 89 ---------------------------------------- -- line 159 ---------------------------------------- . format!("(&{}{}*{snip})", mutability.prefix_str(), "*".repeat(indexed_ref_count)) . } else { . format!("&{}{}*{snip}", mutability.prefix_str(), "*".repeat(indexed_ref_count)) . }; . diag.span_suggestion(expr.span, "dereference the original value instead", sugg, app); . }); . } . } 239,736 ( 0.01%) } . } 119,868 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . . pub fn expr_post(&mut self, id: hir::HirId) { . if Some(id) == self.expr_id { . self.expr_id = None; . } . } . . pub fn enter_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) { 49,945 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 1,720,791 ( 0.06%) => ???:::hir_body_owner (9,989x) 19,978 ( 0.00%) let body_owner_def_id = cx.tcx.hir_body_owner_def_id(body.id()); 1,141,430 ( 0.04%) => ???:::hir_body_owner_def_id (9,989x) . 59,934 ( 0.00%) match cx.tcx.hir_body_owner_kind(body_owner_def_id) { 634,739 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: (9,989x) . hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const { .. } => { 49,940 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 650,568 ( 0.02%) => ???:::hir_span_with_body (9,988x) . 29,963 ( 0.00%) if let Some(span) = self.const_span 39,948 ( 0.00%) && span.contains(body_span) 439,428 ( 0.02%) => ???:::contains (9,987x) . { . return; . } 19,976 ( 0.00%) self.const_span = Some(body_span); . }, . hir::BodyOwnerKind::Fn | hir::BodyOwnerKind::Closure | hir::BodyOwnerKind::GlobalAsm => (), . } . } . . pub fn body_post(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) { 29,967 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 1,720,791 ( 0.06%) => ???:::hir_body_owner (9,989x) 29,967 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 650,629 ( 0.02%) => ???:::hir_span_with_body (9,989x) . 29,966 ( 0.00%) if let Some(span) = self.const_span 39,952 ( 0.00%) && span.contains(body_span) 439,472 ( 0.02%) => ???:::contains (9,988x) . { . return; . } 1 ( 0.00%) self.const_span = None; . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::{self as hir, QPath, TyKind}; . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_span::symbol::sym; . . use super::{REDUNDANT_ALLOCATION, utils}; . 119,856 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, qpath: &QPath<'tcx>, def_id: DefId) -> bool { 9,988 ( 0.00%) let mut applicability = Applicability::MaybeIncorrect; 99,880 ( 0.00%) let outer_sym = match cx.tcx.get_diagnostic_name(def_id) { 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) 19,976 ( 0.00%) _ if Some(def_id) == cx.tcx.lang_items().owned_box() => "Box", 299,640 ( 0.01%) => ???:::lang_items (9,988x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; . . if let Some(span) = utils::match_borrows_parameter(cx, qpath) { . let generic_snippet = snippet_with_applicability(cx, span, "..", &mut applicability); . span_lint_and_then( -- line 26 ---------------------------------------- -- line 99 ---------------------------------------- . )); . diag.help(format!( . "consider using just `{outer_sym}<{generic_snippet}>` or `{inner_sym}<{generic_snippet}>`" . )); . }, . ); . } . true 79,904 ( 0.00%) } 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint, span_lint_and_then}; . use clippy_utils::macros::{find_assert_eq_args, first_node_macro_backtrace}; . use clippy_utils::{eq_expr_value, is_in_test_function, sym}; . use rustc_hir::{BinOpKind, Expr}; . use rustc_lint::LateContext; . . use super::EQ_OP; . 269,703 ( 0.01%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 29,967 ( 0.00%) if let Some(macro_call) = first_node_macro_backtrace(cx, e).find(|macro_call| { . matches!( . cx.tcx.get_diagnostic_name(macro_call.def_id), . Some(sym::assert_eq_macro | sym::assert_ne_macro | sym::debug_assert_eq_macro | sym::debug_assert_ne_macro) . ) . }) && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) . && eq_expr_value(cx, macro_call.span.ctxt(), lhs, rhs) . && macro_call.is_local() . && !is_in_test_function(cx.tcx, e.hir_id) -- line 19 ---------------------------------------- -- line 23 ---------------------------------------- . EQ_OP, . lhs.span.to(rhs.span), . format!( . "identical args used in this `{}!` macro call", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } 239,736 ( 0.01%) } . . pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { -- line 39 ---------------------------------------- 89,901 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reference.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub DEREF_ADDROF, . complexity, . "use of `*&` or `*&mut` in an expression" . } . . declare_lint_pass!(DerefAddrOf => [DEREF_ADDROF]); . . impl LateLintPass<'_> for DerefAddrOf { 179,802 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 89,901 ( 0.00%) if !e.span.from_expansion() . && let ExprKind::Unary(UnOp::Deref, deref_target) = e.kind . && !deref_target.span.from_expansion() . && let ExprKind::AddrOf(_, _, addrof_target) = deref_target.kind . // NOTE(tesuji): `*&` forces rustc to const-promote the array to `.rodata` section. . // See #12854 for details. . && !matches!(addrof_target.kind, ExprKind::Array(_)) . && deref_target.span.eq_ctxt(e.span) . && !addrof_target.span.from_expansion() -- line 51 ---------------------------------------- -- line 73 ---------------------------------------- . DEREF_ADDROF, . e.span, . "immediately dereferencing a reference", . "try", . sugg.to_string(), . applicability, . ); . } 179,802 ( 0.01%) } . } . . /// Is this a `ManuallyDrop` reached through a union, and when is `DerefMut` called on it? . enum ManuallyDropThroughUnion { . /// `ManuallyDrop` reached through a union and immediately explicitely dereferenced . Directly, . /// `ManuallyDrop` reached through a union, and dereferenced later on . Indirect, -- line 89 ---------------------------------------- 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . . declare_lint_pass!(EtaReduction => [ . REDUNDANT_CLOSURE, . REDUNDANT_CLOSURE_FOR_METHOD_CALLS, . ]); . . impl<'tcx> LateLintPass<'tcx> for EtaReduction { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 99,892 ( 0.00%) if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind { . for arg in args { . check_closure(cx, Some(receiver), arg); . } . } 29,964 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { 29,964 ( 0.00%) check_closure(cx, None, func); 179,784 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (9,988x) . for arg in args { 29,964 ( 0.00%) check_closure(cx, None, arg); 179,784 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (9,988x) . } . } . } . } . . #[expect(clippy::too_many_lines)] 159,808 ( 0.01%) fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) { 39,952 ( 0.00%) let body = if let ExprKind::Closure(c) = expr.kind . && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) . && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_)) . && !expr.span.from_expansion() . { . cx.tcx.hir_body(c.body) . } else { . return; . }; -- line 99 ---------------------------------------- -- line 289 ---------------------------------------- . app, . ); . }, . ); . } . }, . _ => (), . } 159,808 ( 0.01%) } . . fn check_inputs( . typeck: &TypeckResults<'_>, . params: &[Param<'_>], . self_arg: Option<&Expr<'_>>, . args: &[Expr<'_>], . ) -> bool { . params.len() == self_arg.map_or(0, |_| 1) + args.len() -- line 305 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/from_raw_with_void_ptr.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub FROM_RAW_WITH_VOID_PTR, . suspicious, . "creating a `Box` from a void raw pointer" . } . . declare_lint_pass!(FromRawWithVoidPtr => [FROM_RAW_WITH_VOID_PTR]); . . impl LateLintPass<'_> for FromRawWithVoidPtr { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 89,898 ( 0.00%) if let ExprKind::Call(box_from_raw, [arg]) = expr.kind 49,940 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_from_raw.kind 9,988 ( 0.00%) && seg.ident.name == sym::from_raw . && let Some(type_str) = ty.basic_res().opt_def_id().and_then(|id| def_id_matches_type(cx, id)) . && let arg_kind = cx.typeck_results().expr_ty(arg).kind() . && let ty::RawPtr(ty, _) = arg_kind . && is_c_void(cx, *ty) . { . let msg = format!("creating a `{type_str}` from a void raw pointer"); . span_lint_and_help( . cx, . FROM_RAW_WITH_VOID_PTR, . expr.span, . msg, . Some(arg.span), . "cast this to a pointer of the appropriate type", . ); . } 239,736 ( 0.01%) } . } . . /// Checks whether a `DefId` matches `Box`, `Rc`, `Arc`, or one of the `Weak` types. . /// Returns a static string slice with the name of the type, if one was found. . fn def_id_matches_type(cx: &LateContext<'_>, def_id: DefId) -> Option<&'static str> { . // Box . if Some(def_id) == cx.tcx.lang_items().owned_box() { . return Some("Box"); -- line 69 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs -------------------------------------------------------------------------------- Ir -- line 52 ---------------------------------------- . . impl ManualRetain { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualRetain { 149,835 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 59,934 ( 0.00%) if let Assign(left_expr, collect_expr, _) = &expr.kind . && let hir::ExprKind::MethodCall(seg, target_expr, [], _) = &collect_expr.kind . && seg.args.is_none() . && let Some(collect_def_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::iterator_collect_fn, collect_def_id) . { . check_into_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_to_owned(cx, left_expr, target_expr, expr.span, self.msrv); . } 179,802 ( 0.01%) } . } . . fn check_into_iter( . cx: &LateContext<'_>, . left_expr: &hir::Expr<'_>, . target_expr: &hir::Expr<'_>, . parent_expr_span: Span, . msrv: Msrv, -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/async_yields_async.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . pub ASYNC_YIELDS_ASYNC, . correctness, . "async blocks that return a type that can be awaited" . } . . declare_lint_pass!(AsyncYieldsAsync => [ASYNC_YIELDS_ASYNC]); . . impl<'tcx> LateLintPass<'tcx> for AsyncYieldsAsync { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) let ExprKind::Closure(Closure { . kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, kind)), . body: body_id, . .. . }) = expr.kind . else { . return; . }; . -- line 60 ---------------------------------------- -- line 118 ---------------------------------------- . return_expr_span, . "consider awaiting this value", . format!("{return_expr_snip}.await"), . applicability, . ); . }, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . } . impl AssertionsOnConstants { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . if let Some(macro_call) = root_macro_call_first_node(cx, e) . && let is_debug = match cx.tcx.get_diagnostic_name(macro_call.def_id) { . Some(sym::debug_assert_macro) => true, . Some(sym::assert_macro) => false, . _ => return, . } . && let Some((condition, _)) = find_assert_args(cx, e, macro_call.expn) . // Check if the whole expression can be moved into a const context. -- line 55 ---------------------------------------- -- line 76 ---------------------------------------- . ( . "this assertion is always `false`", . "replace this with `panic!()` or `unreachable!()`", . ) . }; . . span_lint_and_help(cx, ASSERTIONS_ON_CONSTANTS, macro_call.span, msg, None, help); . } 239,736 ( 0.01%) } . } . . fn as_bool_lit(e: &Expr<'_>) -> Option { . if let ExprKind::Lit(l) = e.kind . && let LitKind::Bool(b) = l.node . { . Some(b) . } else { -- line 92 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bool_comparison.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub BOOL_COMPARISON, . complexity, . "comparing a variable to a boolean, e.g., `if x == true` or `if x != true`" . } . . declare_lint_pass!(BoolComparison => [BOOL_COMPARISON]); . . impl<'tcx> LateLintPass<'tcx> for BoolComparison { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 89,901 ( 0.00%) if e.span.from_expansion() { . return; . } . . if let ExprKind::Binary(Spanned { node, .. }, left_side, right_side) = e.kind . && is_expn_of(left_side.span, sym::cfg).is_none() . && is_expn_of(right_side.span, sym::cfg).is_none() . && cx.typeck_results().expr_ty(left_side).is_bool() . && cx.typeck_results().expr_ty(right_side).is_bool() -- line 48 ---------------------------------------- -- line 94 ---------------------------------------- . Some(( . |l: Sugg<'tcx>, r: Sugg<'tcx>| l.bit_and(&(!r)), . "order comparisons between booleans can be simplified", . )), . ), . _ => (), . } . } 239,736 ( 0.01%) } . } . . fn check_comparison<'a, 'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . left_true: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, . left_false: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, . right_true: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, -- line 110 ---------------------------------------- 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . pub(super) trait SpecFromIterNested { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIterNested for Vec . where . I: Iterator, . { 489,617 ( 0.02%) default fn from_iter(mut iterator: I) -> Self { . // Unroll the first iteration, as the vector is going to be . // expanded on this iteration in every case when the iterable is not . // empty, but the loop in extend_desugared() is not going to see the . // vector being full in the few subsequent loop iterations. . // So we get better branch prediction. 30,013 ( 0.00%) let mut vector = match iterator.next() { 219,881 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next (9,994x) . None => return Vec::new(), 1 ( 0.00%) Some(element) => { . let (lower, _) = iterator.size_hint(); . let initial_capacity = . cmp::max(RawVec::::MIN_NON_ZERO_CAP, lower.saturating_add(1)); . let mut vector = Vec::with_capacity(initial_capacity); . unsafe { . // SAFETY: We requested capacity at least 1 . ptr::write(vector.as_mut_ptr(), element); . vector.set_len(1); . } 22 ( 0.00%) vector . } . }; . // must delegate to spec_extend() since extend() itself delegates . // to spec_from for empty Vecs 107 ( 0.00%) as SpecExtend>::spec_extend(&mut vector, iterator); 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) 28 ( 0.00%) vector 549,568 ( 0.02%) } . } . . impl SpecFromIterNested for Vec . where . I: TrustedLen, . { 35 ( 0.00%) fn from_iter(iterator: I) -> Self { . let mut vector = match iterator.size_hint() { . (_, Some(upper)) => Vec::with_capacity(upper), . // TrustedLen contract guarantees that `size_hint() == (_, None)` means that there . // are more than `usize::MAX` elements. . // Since the previous branch would eagerly panic if the capacity is too large . // (via `with_capacity`) we do the same here. . _ => panic!("capacity overflow"), . }; . // reuse extend specialization for TrustedLen . vector.spec_extend(iterator); 18 ( 0.00%) vector 40 ( 0.00%) } . } 42 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs -------------------------------------------------------------------------------- Ir -- line 493 ---------------------------------------- . RESULT_LARGE_ERR, . RESULT_UNIT_ERR, . TOO_MANY_ARGUMENTS, . TOO_MANY_LINES, . ]); . . impl EarlyLintPass for EarlyFunctions { . fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: visit::FnKind<'_>, _: Span, _: ast::NodeId) { 3 ( 0.00%) duplicate_underscore_argument::check(cx, fn_kind); 747 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs:clippy_lints::functions::duplicate_underscore_argument::check (1x) . } . } . . pub struct Functions { . too_many_arguments_threshold: u64, . too_many_lines_threshold: u64, . large_error_threshold: u64, . large_error_ignored: DefIdSet, -- line 509 ---------------------------------------- -- line 510 ---------------------------------------- . avoid_breaking_exported_api: bool, . /// A set of resolved `def_id` of traits that are configured to allow . /// function params renaming. . trait_ids: DefIdSet, . msrv: Msrv, . } . . impl Functions { 10 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 8 ( 0.00%) Self { 2 ( 0.00%) too_many_arguments_threshold: conf.too_many_arguments_threshold, . too_many_lines_threshold: conf.too_many_lines_threshold, 1 ( 0.00%) large_error_threshold: conf.large_error_threshold, . large_error_ignored: conf . .large_error_ignored . .iter() . .flat_map(|ignored_ty| lookup_path_str(tcx, PathNS::Type, ignored_ty)) . .collect(), 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, . trait_ids: conf . .allow_renamed_params_for . .iter() . .flat_map(|p| lookup_path_str(tcx, PathNS::Type, p)) . .collect(), 2 ( 0.00%) msrv: conf.msrv.into(), . } 9 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for Functions { 12 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: intravisit::FnKind<'tcx>, . decl: &'tcx hir::FnDecl<'_>, . body: &'tcx hir::Body<'_>, . span: Span, . def_id: LocalDefId, . ) { 1 ( 0.00%) let hir_id = cx.tcx.local_def_id_to_hir_id(def_id); 10 ( 0.00%) too_many_arguments::check_fn(cx, kind, decl, hir_id, def_id, self.too_many_arguments_threshold); 4 ( 0.00%) too_many_lines::check_fn(cx, kind, body, span, def_id, self.too_many_lines_threshold); . not_unsafe_ptr_arg_deref::check_fn(cx, kind, decl, body, def_id); 13 ( 0.00%) misnamed_getters::check_fn(cx, kind, decl, body, span); 85 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs:clippy_lints::functions::misnamed_getters::check_fn (1x) . impl_trait_in_params::check_fn(cx, &kind, body, hir_id); 13 ( 0.00%) ref_option::check_fn( 86 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn (1x) . cx, . kind, . decl, . span, . hir_id, . def_id, . body, 2 ( 0.00%) self.avoid_breaking_exported_api, . ); 7 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 15 ( 0.00%) must_use::check_item(cx, item); 639 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item (5x) 15 ( 0.00%) result::check_item( 95 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item (5x) . cx, . item, 5 ( 0.00%) self.large_error_threshold, 5 ( 0.00%) &self.large_error_ignored, 5 ( 0.00%) self.msrv, . ); . } . 99,890 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 29,967 ( 0.00%) must_use::check_impl_item(cx, item); 42,909 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item (9,989x) 29,967 ( 0.00%) result::check_impl_item( 190,086 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item (9,989x) . cx, . item, 9,989 ( 0.00%) self.large_error_threshold, 9,989 ( 0.00%) &self.large_error_ignored, 9,989 ( 0.00%) self.msrv, . ); . impl_trait_in_params::check_impl_item(cx, item); 49,945 ( 0.00%) renamed_function_params::check_impl_item(cx, item, &self.trait_ids); 269,867 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:clippy_lints::functions::renamed_function_params::check_impl_item (9,989x) 79,912 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { . too_many_arguments::check_trait_item(cx, item, self.too_many_arguments_threshold); . not_unsafe_ptr_arg_deref::check_trait_item(cx, item); . must_use::check_trait_item(cx, item); . result::check_trait_item( . cx, . item, -- line 597 ---------------------------------------- -- line 599 ---------------------------------------- . &self.large_error_ignored, . self.msrv, . ); . impl_trait_in_params::check_trait_item(cx, item, self.avoid_breaking_exported_api); . ref_option::check_trait_item(cx, item, self.avoid_breaking_exported_api); . } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 149,835 ( 0.01%) result::check_expr(cx, expr, self.large_error_threshold, &self.large_error_ignored); 509,439 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr (29,967x) . } . } 14 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs -------------------------------------------------------------------------------- Ir -- line 201 ---------------------------------------- . } . } . . pub struct LiteralDigitGrouping { . lint_fraction_readability: bool, . } . . impl EarlyLintPass for LiteralDigitGrouping { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `NumericLiteral::from_lit_kind` only accepts integer and float literals. 69,920 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 29,964 ( 0.00%) && matches!(lit.kind, token::LitKind::Integer | token::LitKind::Float) 39,952 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . self.check_lit(cx, lit, expr.span); . } 239,728 ( 0.01%) } . } . . // Length of each UUID hyphenated group in hex digits. . const UUID_GROUP_LENS: [usize; 5] = [8, 4, 4, 4, 12]; . . impl LiteralDigitGrouping { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) lint_fraction_readability: conf.unreadable_literal_lint_fractions, . } . } . . fn check_lit(&self, cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { 69,916 ( 0.00%) if let Some(src) = span.get_text(cx) 79,904 ( 0.00%) && let Ok(lit_kind) = LitKind::from_token_lit(lit) 2,146,142 ( 0.08%) => ???:::from_token_lit (9,988x) 209,748 ( 0.01%) && let Some(mut num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 1,658,008 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (9,988x) 249,700 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::deref (9,988x) . { . if !Self::check_for_mistyped_suffix(cx, span, &mut num_lit) { . return; . } . . if Self::is_literal_uuid_formatted(&num_lit) { . return; . } . 29,964 ( 0.00%) let result = (|| { . let integral_group_size = Self::get_group_size(num_lit.integer.split('_'), num_lit.radix, true)?; 29,964 ( 0.00%) if let Some(fraction) = num_lit.fraction { . let fractional_group_size = . Self::get_group_size(fraction.rsplit('_'), num_lit.radix, self.lint_fraction_readability)?; . . let consistent = Self::parts_consistent( . integral_group_size, . fractional_group_size, . num_lit.integer.len(), . fraction.len(), -- line 253 ---------------------------------------- -- line 272 ---------------------------------------- . warning_type.display(&num_lit, cx, span); . } . } . } . } . . // Returns `false` if the check fails . fn check_for_mistyped_suffix(cx: &EarlyContext<'_>, span: Span, num_lit: &mut NumericLiteral<'_>) -> bool { 9,988 ( 0.00%) if num_lit.suffix.is_some() { . return true; . } . . let (part, mistyped_suffixes, is_float) = if let Some((_, exponent)) = &mut num_lit.exponent { . (exponent, &["32", "64"][..], true) . } else if num_lit.fraction.is_some() { . return true; . } else { -- line 288 ---------------------------------------- -- line 386 ---------------------------------------- . groups: impl Iterator, . radix: Radix, . lint_unreadable: bool, . ) -> Result, WarningType> { . let mut groups = groups.map(str::len); . . let first = groups.next().expect("At least one group"); . 19,976 ( 0.00%) if (radix == Radix::Binary || radix == Radix::Octal || radix == Radix::Hexadecimal) . && let Some(second_size) = groups.next() . && (!groups.all(|i| i == second_size) || first > second_size) . { . return Err(WarningType::UnusualByteGroupings); . } . . if let Some(second) = groups.next() { . if !groups.all(|x| x == second) || first > second { . Err(WarningType::InconsistentDigitGrouping) . } else if second > 4 { . Err(WarningType::LargeDigitGroups) . } else { . Ok(Some(second)) . } 19,976 ( 0.00%) } else if first > 5 && lint_unreadable { . Err(WarningType::UnreadableLiteral) . } else { . Ok(None) . } . } . } . . pub struct DecimalLiteralRepresentation { . threshold: u64, . } . . impl EarlyLintPass for DecimalLiteralRepresentation { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // Only integer tokens can produce `LitKind::Int`. 59,932 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind . && lit.kind == token::LitKind::Integer 29,964 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { 49,940 ( 0.00%) self.check_lit(cx, lit, expr.span); . } 239,728 ( 0.01%) } . } . . impl DecimalLiteralRepresentation { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) threshold: conf.literal_representation_threshold, . } . } . fn check_lit(&self, cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { . // Lint integral literals. 69,916 ( 0.00%) if let Ok(lit_kind) = LitKind::from_token_lit(lit) 2,146,142 ( 0.08%) => ???:::from_token_lit (9,988x) 39,952 ( 0.00%) && let LitKind::Int(val, _) = lit_kind 9,988 ( 0.00%) && val >= u128::from(self.threshold) . && let Some(src) = span.get_text(cx) . && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) . && num_lit.radix == Radix::Decimal . { . let hex = format!("{val:#X}"); . let num_lit = NumericLiteral::new(&hex, num_lit.suffix, false); . let _: Result<(), ()> = Self::do_lint(num_lit.integer).map_err(|warning_type| { . warning_type.display(&num_lit, cx, span); -- line 451 ---------------------------------------- 109,868 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . tcx: TyCtxt<'tcx>, . // Cache the current value of `hir_owner_nodes` to avoid repeatedly calling the same query for . // the same owner, which will uselessly record many times the same query dependency. . current_owner_nodes: Option<&'tcx OwnerNodes<'tcx>>, . } . . impl<'tcx> ParentHirIterator<'tcx> { . fn new(tcx: TyCtxt<'tcx>, current_id: HirId) -> ParentHirIterator<'tcx> { 4 ( 0.00%) ParentHirIterator { current_id, tcx, current_owner_nodes: None } . } . } . . impl<'tcx> Iterator for ParentHirIterator<'tcx> { . type Item = HirId; . . fn next(&mut self) -> Option { . if self.current_id == CRATE_HIR_ID { -- line 46 ---------------------------------------- -- line 100 ---------------------------------------- . Some((self.current_id.owner, node)) . } . } . . impl<'tcx> TyCtxt<'tcx> { . #[inline] . pub fn local_def_id_to_hir_id(self, def_id: impl IntoQueryKey) -> HirId { . let def_id = def_id.into_query_key(); 10,006 ( 0.00%) match self.hir_owner(def_id) { . ProjectedMaybeOwner::Owner(_) => HirId::make_owner(def_id), . ProjectedMaybeOwner::NonOwner(hir_id) => hir_id, . } . } . . /// This function is used only inside eval-always query `analysis` . /// (`analysis -> run_required_analysis` -> `emit_delayed_lints`), so it is safe . /// to obtain delayed lints from non-eval-always `owner` query. -- line 116 ---------------------------------------- -- line 162 ---------------------------------------- . /// Retrieves the `hir::Node` corresponding to `id`. . pub fn hir_node(self, id: HirId) -> Node<'tcx> { . self.hir_owner_nodes(id.owner).nodes[id.local_id].node . } . . /// Retrieves the `hir::Node` corresponding to `id`. . #[inline] . pub fn hir_node_by_def_id(self, id: LocalDefId) -> Node<'tcx> { 29,970 ( 0.00%) self.hir_node(self.local_def_id_to_hir_id(id)) 519,376 ( 0.02%) => ???:::hir_node (9,988x) . } . . /// Returns `HirId` of the parent HIR node of node with this `hir_id`. . /// Returns the same `hir_id` if and only if `hir_id == CRATE_HIR_ID`. . /// . /// If calling repeatedly and iterating over parents, prefer [`TyCtxt::hir_parent_iter`]. . pub fn parent_hir_id(self, hir_id: HirId) -> HirId { . let HirId { owner, local_id } = hir_id; -- line 178 ---------------------------------------- -- line 313 ---------------------------------------- . PatKind::Wild => Some(Ident::new(kw::Underscore, param.pat.span)), . _ => None, . }) . } . . /// Returns the `BodyOwnerKind` of this `LocalDefId`. . /// . /// Panics if `LocalDefId` does not have an associated body. 69,931 ( 0.00%) pub fn hir_body_owner_kind(self, def_id: impl Into) -> BodyOwnerKind { 19,980 ( 0.00%) let def_id = def_id.into(); 119,880 ( 0.00%) match self.def_kind(def_id) { . DefKind::Const { .. } | DefKind::AssocConst { .. } => { 9,988 ( 0.00%) BodyOwnerKind::Const { inline: false } . } . DefKind::AnonConst => BodyOwnerKind::Const { . inline: self.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline, . }, . DefKind::Ctor(..) | DefKind::Fn | DefKind::AssocFn => BodyOwnerKind::Fn, . DefKind::Closure | DefKind::SyntheticCoroutineBody => BodyOwnerKind::Closure, . DefKind::Static { safety: _, mutability, nested: false } => { . BodyOwnerKind::Static(mutability) . } . DefKind::GlobalAsm => BodyOwnerKind::GlobalAsm, . dk => bug!("{:?} is not a body node: {:?}", def_id, dk), . } 59,942 ( 0.00%) } . . /// Returns the `ConstContext` of the body associated with this `LocalDefId`. . /// . /// Panics if `LocalDefId` does not have an associated body. . /// . /// This should only be used for determining the context of a body, a return . /// value of `Some` does not always suggest that the owner of the body is `const`, . /// just that it has to be checked as if it were. -- line 346 ---------------------------------------- -- line 524 ---------------------------------------- . pub fn hir_parent_id_iter(self, current_id: HirId) -> impl Iterator { . ParentHirIterator::new(self, current_id) . } . . /// Returns an iterator for the nodes in the ancestor tree of the `current_id` . /// until the crate root is reached. Prefer this over your own loop using `parent_id`. . #[inline] . pub fn hir_parent_iter(self, current_id: HirId) -> impl Iterator)> { 99,908 ( 0.00%) self.hir_parent_id_iter(current_id).map(move |id| (id, self.hir_node(id))) 1,080,156 ( 0.04%) => ???:::hir_node (19,978x) . } . . /// Returns an iterator for the nodes in the ancestor tree of the `current_id` . /// until the crate root is reached. Prefer this over your own loop using `parent_id`. . #[inline] . pub fn hir_parent_owner_iter(self, current_id: HirId) -> ParentOwnerIterator<'tcx> { . ParentOwnerIterator { current_id, tcx: self } . } -- line 540 ---------------------------------------- 59,962 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format_args.rs -------------------------------------------------------------------------------- Ir -- line 321 ---------------------------------------- . ty_msrv_map: FxHashMap, Option>, . has_derived_debug: FxHashMap, bool>, . has_pointer_format: FxHashMap, bool>, . } . . impl<'tcx> FormatArgs<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf, format_args: FormatArgsStorage) -> Self { . let ty_msrv_map = make_ty_msrv_map(tcx); 13 ( 0.00%) Self { . format_args, . msrv: conf.msrv.into(), 1 ( 0.00%) ignore_mixed: conf.allow_mixed_uninlined_format_args, . ty_msrv_map, . has_derived_debug: FxHashMap::default(), . has_pointer_format: FxHashMap::default(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FormatArgs<'tcx> { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { . if let Some(macro_call) = root_macro_call_first_node(cx, expr) . && is_format_macro(cx, macro_call.def_id) . && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) . { . let mut linter = FormatArgsExpr { . cx, . expr, . macro_call: ¯o_call, -- line 349 ---------------------------------------- -- line 357 ---------------------------------------- . . linter.check_trailing_comma(); . linter.check_templates(); . . if self.msrv.meets(cx, msrvs::FORMAT_ARGS_CAPTURE) { . linter.check_uninlined_args(); . } . } 239,736 ( 0.01%) } . } . . struct FormatArgsExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . macro_call: &'a MacroCall, . format_args: &'a rustc_ast::FormatArgs, . ignore_mixed: bool, -- line 373 ---------------------------------------- -- line 866 ---------------------------------------- . } . } . } . . fn make_ty_msrv_map(tcx: TyCtxt<'_>) -> FxHashMap, Option> { . [(sym::OsStr, Some(msrvs::OS_STR_DISPLAY)), (sym::Path, None)] . .into_iter() . .filter_map(|(name, feature)| { 6 ( 0.00%) tcx.get_diagnostic_item(name).map(|def_id| { 355,516 ( 0.01%) => ???:::get_diagnostic_item (2x) . let ty = Ty::new_adt(tcx, tcx.adt_def(def_id), List::empty()); . (ty, feature) . }) . }) . .collect() . } . . fn count_needed_derefs<'tcx, I>(mut ty: Ty<'tcx>, mut iter: I) -> (usize, Ty<'tcx>) -- line 882 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/block_scrutinee.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub BLOCK_SCRUTINEE, . suspicious, . "warns when the scrutinee is wrapped in a block in older editions" . } . . declare_lint_pass!(BlockScrutinee => [BLOCK_SCRUTINEE]); . . impl<'tcx> LateLintPass<'tcx> for BlockScrutinee { 149,835 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 89,901 ( 0.00%) if cx.tcx.sess.edition() >= Edition::Edition2024 { . return; . } . 149,835 ( 0.01%) let (scrutinee, keyword_fallback) = match expr.kind { . ExprKind::Match(scrutinee, _, _) => (scrutinee, "`match`"), . ExprKind::Let(let_expr) => (let_expr.init, "`if let` / `while let`"), . _ => return, . }; . . if scrutinee.span.from_expansion() || expr.span.from_expansion() { . return; . } -- line 48 ---------------------------------------- -- line 102 ---------------------------------------- . vec![ . (outer_span.shrink_to_lo(), format!("let res = {inner_snippet};\n{pad}")), . (scrutinee.span, "res".to_string()), . ], . Applicability::MaybeIncorrect, . ); . }); . } 149,835 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/lint.rs -------------------------------------------------------------------------------- Ir -- line 378 ---------------------------------------- . /// The innermost function for emitting lints implementing the [`trait@Diagnostic`] trait. . /// . /// If you are looking to implement a lint, look for higher level functions, . /// for example: . /// . /// - [`TyCtxt::emit_node_span_lint`] . /// - `LintContext::opt_span_lint` . #[track_caller] 12 ( 0.00%) pub fn emit_lint_base<'a, D: Diagnostic<'a, ()> + 'a>( . sess: &'a Session, . lint: &'static Lint, . level_spec: impl Into, . span: Option, . decorate: D, . ) { . // Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to . // the "real" work. -- line 394 ---------------------------------------- -- line 572 ---------------------------------------- . let citation = . format!("for more information, see {}", future_incompatible.reason.reference()); . err.note(citation); . } . . explain_lint_level_source(sess, lint, level, src, &mut err); . err.emit(); . } 79,912 ( 0.00%) emit_lint_base_impl( 2,600,115 ( 0.09%) => ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl (9,988x) . sess, . lint, . level_spec.into(), 59,934 ( 0.00%) span, . Box::new(move |dcx, level| decorate.into_diag(dcx, level)), . ); 7 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . /// the form of the code. No crates in `rustc-perf` need more than 15 bits . /// for `ctxt_or_parent_or_marker`, but larger crates might need more than 16 . /// bits. The number of bits needed for `parent` hasn't been measured, . /// because `parent` isn't currently used by default. . /// . /// In order to reliably use parented spans in incremental compilation, . /// accesses to `lo` and `hi` must introduce a dependency to the parent definition's span. . /// This is performed using the callback `SPAN_TRACK` to access the query engine. 3 ( 0.00%) #[derive(Clone, Copy, Eq, PartialEq, Hash)] . #[rustc_pass_by_value] . pub struct Span { . lo_or_index: u32, . len_with_tag_or_marker: u16, . ctxt_or_parent_or_marker: u16, . } . . // Convenience structures for all span formats. -- line 88 ---------------------------------------- -- line 109 ---------------------------------------- . #[derive(Clone, Copy)] . struct Interned { . index: u32, . } . . impl InlineCtxt { . #[inline] . fn data(self) -> SpanData { 19,985 ( 0.00%) let len = self.len as u32; . debug_assert!(len <= MAX_LEN); 19,997 ( 0.00%) SpanData { . lo: BytePos(self.lo), . hi: BytePos(self.lo.debug_strict_add(len)), . ctxt: SyntaxContext::from_u16(self.ctxt), . parent: None, . } . } . #[inline] . fn span(lo: u32, len: u16, ctxt: u16) -> Span { -- line 127 ---------------------------------------- -- line 159 ---------------------------------------- . (span.lo_or_index, span.len_with_tag_or_marker, span.ctxt_or_parent_or_marker); . InlineParent { lo, len_with_tag, parent } . } . } . . impl PartiallyInterned { . #[inline] . fn data(self) -> SpanData { 24 ( 0.00%) SpanData { . ctxt: SyntaxContext::from_u16(self.ctxt), 14 ( 0.00%) ..with_span_interner(|interner| interner.spans[self.index as usize]) . } . } . #[inline] . fn span(index: u32, ctxt: u16) -> Span { . let (lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker) = . (index, BASE_LEN_INTERNED_MARKER, ctxt); . Span { lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker } . } -- line 177 ---------------------------------------- -- line 204 ---------------------------------------- . macro_rules! match_span_kind { . ( . $span:expr, . InlineCtxt($span1:ident) => $arm1:expr, . InlineParent($span2:ident) => $arm2:expr, . PartiallyInterned($span3:ident) => $arm3:expr, . Interned($span4:ident) => $arm4:expr, . ) => { 3,296,546 ( 0.12%) if $span.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { 6,053,561 ( 0.21%) if $span.len_with_tag_or_marker & PARENT_TAG == 0 { . // Inline-context format. . let $span1 = InlineCtxt::from_span($span); . $arm1 . } else { . // Inline-parent format. . let $span2 = InlineParent::from_span($span); . $arm2 . } 239,767 ( 0.01%) } else if $span.ctxt_or_parent_or_marker != CTXT_INTERNED_MARKER { . // Partially-interned format. . let $span3 = PartiallyInterned::from_span($span); . $arm3 . } else { . // Interned format. . let $span4 = Interned::from_span($span); . $arm4 . } -- line 230 ---------------------------------------- -- line 246 ---------------------------------------- . impl Span { . #[inline] . pub fn new( . mut lo: BytePos, . mut hi: BytePos, . ctxt: SyntaxContext, . parent: Option, . ) -> Self { 9,993 ( 0.00%) if lo > hi { . std::mem::swap(&mut lo, &mut hi); . } . . // Small len and ctxt may enable one of fully inline formats (or may not). . let (len, ctxt32) = (hi.0 - lo.0, ctxt.as_u32()); 29,987 ( 0.00%) if len <= MAX_LEN && ctxt32 <= MAX_CTXT { 19,993 ( 0.00%) match parent { . None => return InlineCtxt::span(lo.0, len as u16, ctxt32 as u16), . Some(parent) => { . let parent32 = parent.local_def_index.as_u32(); . if ctxt32 == 0 && parent32 <= MAX_CTXT { . return InlineParent::span(lo.0, len as u16, parent32 as u16); . } . } . } -- line 269 ---------------------------------------- -- line 274 ---------------------------------------- . with_span_interner(|interner| interner.intern(&SpanData { lo, hi, ctxt, parent })) . }; . if ctxt32 <= MAX_CTXT { . // Interned ctxt should never be read, so it can use any value. . PartiallyInterned::span(index(SyntaxContext::from_u32(u32::MAX)), ctxt32 as u16) . } else { . Interned::span(index(ctxt)) . } 49,984 ( 0.00%) } . . #[inline] . pub fn data(self) -> SpanData { . let data = self.data_untracked(); 10,002 ( 0.00%) if let Some(parent) = data.parent { . (*SPAN_TRACK)(parent); . } . data . } . . /// Internal function to translate between an encoded span and the expanded representation. . /// This function must not be used outside the incremental engine. . #[inline] . pub fn data_untracked(self) -> SpanData { . match_span_kind! { . self, . InlineCtxt(span) => span.data(), . InlineParent(span) => span.data(), 14 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . } . } . . /// Returns `true` if this span comes from any kind of macro, desugaring or inlining. . #[inline] . pub fn from_expansion(self) -> bool { . let ctxt = match_span_kind! { -- line 309 ---------------------------------------- 2,317,590 ( 0.08%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::res::{MaybeDef as _, MaybeResPath as _}; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::symbol::sym; . . use super::RC_MUTEX; . 79,904 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 79,904 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Rc, def_id) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let Some(arg) = qpath_generic_tys(qpath).next() . && arg.basic_res().is_diag_item(cx, sym::Mutex) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, RC_MUTEX, hir_ty.span, "usage of `Rc>`", |diag| { . diag.help("consider using `Rc>` or `Arc>` instead"); . }); . return true; . } . . false 59,928 ( 0.00%) } 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_resolve/src/rustdoc.rs -------------------------------------------------------------------------------- Ir -- line 199 ---------------------------------------- . . pub fn attrs_to_doc_fragments<'a, A: AttributeExt + Clone + 'a>( . attrs: impl Iterator)>, . doc_only: bool, . ) -> (Vec, ThinVec) { . let (min_size, max_size) = attrs.size_hint(); . let size_hint = max_size.unwrap_or(min_size); . let mut doc_fragments = Vec::with_capacity(size_hint); 79,932 ( 0.00%) let mut other_attrs = ThinVec::::with_capacity(if doc_only { 0 } else { size_hint }); . for (attr, item_id) in attrs { . if let Some((doc_str, fragment_kind)) = attr.doc_str_and_fragment_kind() { . let doc = beautify_doc_string(doc_str, fragment_kind.comment_kind()); . let attr_span = attr.span(); . let (span, from_expansion) = match fragment_kind { . DocFragmentKind::Sugared(_) => (attr_span, attr_span.from_expansion()), . DocFragmentKind::Raw(value_span) => { . (value_span.with_ctxt(attr_span.ctxt()), value_span.from_expansion()) -- line 215 ---------------------------------------- -- line 221 ---------------------------------------- . } else if !doc_only { . other_attrs.push(attr.clone()); . } . } . . doc_fragments.shrink_to_fit(); . other_attrs.shrink_to_fit(); . 39,965 ( 0.00%) unindent_doc_fragments(&mut doc_fragments); 879,230 ( 0.03%) => ???:rustc_resolve::rustdoc::unindent_doc_fragments (39,965x) . 239,790 ( 0.01%) (doc_fragments, other_attrs) . } . . /// Return the doc-comments on this item, grouped by the module they came from. . /// The module can be different if this is a re-export with added documentation. . /// . /// The last newline is not trimmed so the produced strings are reusable between . /// early and late doc link resolution regardless of their position. . pub fn prepare_to_doc_link_resolution( -- line 239 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs -------------------------------------------------------------------------------- Ir -- line 53 ---------------------------------------- . pub ZOMBIE_PROCESSES, . suspicious, . "not waiting on a spawned child process" . } . . declare_lint_pass!(ZombieProcesses => [ZOMBIE_PROCESSES]); . . impl<'tcx> LateLintPass<'tcx> for ZombieProcesses { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 119,868 ( 0.00%) if let ExprKind::Call(..) | ExprKind::MethodCall(..) = expr.kind 19,976 ( 0.00%) && let child_ty = cx.typeck_results().expr_ty(expr) 399,520 ( 0.01%) => ???:::expr_ty (9,988x) 19,976 ( 0.00%) && child_ty.is_diag_item(cx, sym::Child) . { . match cx.tcx.parent_hir_node(expr.hir_id) { . Node::LetStmt(local) . if let PatKind::Binding(_, local_id, ..) = local.pat.kind . && let Some(enclosing_block) = get_enclosing_block(cx, expr.hir_id) => . { . let mut vis = WaitFinder { . cx, -- line 72 ---------------------------------------- -- line 110 ---------------------------------------- . .. . }) => { . // Immediately dropped. E.g. `std::process::Command::new("echo").spawn().unwrap();` . check(cx, expr, Cause::NeverWait, true); . }, . _ => {}, . } . } 239,736 ( 0.01%) } . } . . struct MaybeWait(Span); . . /// A visitor responsible for finding a `wait()` call on a local variable. . /// . /// Note that this visitor does NOT explicitly look for `wait()` calls directly, but rather does the . /// inverse -- checking if all uses of the local are either: -- line 126 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs -------------------------------------------------------------------------------- Ir -- line 136 ---------------------------------------- . . impl Lifetimes { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Lifetimes { 45 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 11 ( 0.00%) if let ItemKind::Fn { . ref sig, . generics, . body: id, . .. 10 ( 0.00%) } = item.kind . { . check_fn_inner(cx, sig, Some(id), None, generics, item.span, true, self.msrv, || { . is_from_proc_macro(cx, item) . }); . } else if let ItemKind::Impl(impl_) = &item.kind 4 ( 0.00%) && !item.span.from_expansion() 4 ( 0.00%) && !is_from_proc_macro(cx, item) . { . report_extra_impl_lifetimes(cx, impl_); . } 40 ( 0.00%) } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly_trait_ref: &'tcx PolyTraitRef<'tcx>) { . if !poly_trait_ref.span.from_expansion() { . report_extra_trait_object_lifetimes(cx, poly_trait_ref.bound_generic_params, &poly_trait_ref.trait_ref); . } . } . 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 39,959 ( 0.00%) if let ImplItemKind::Fn(ref sig, id) = item.kind { 3 ( 0.00%) let report_extra_lifetimes = trait_ref_of_method(cx, item.owner_id).is_none(); 189 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1x) 1 ( 0.00%) check_fn_inner( . cx, . sig, . Some(id), . None, 2 ( 0.00%) item.generics, 1 ( 0.00%) item.span, . report_extra_lifetimes, 1 ( 0.00%) self.msrv, . || is_from_proc_macro(cx, item), . ); . } 79,912 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { . if let TraitItemKind::Fn(ref sig, ref body) = item.kind { . let (body, trait_sig) = match *body { . TraitFn::Required(sig) => (None, Some(sig)), . TraitFn::Provided(id) => (Some(id), None), . }; . check_fn_inner( -- line 192 ---------------------------------------- -- line 211 ---------------------------------------- . body: Option, . trait_sig: Option<&[Option]>, . generics: &'tcx Generics<'_>, . span: Span, . report_extra_lifetimes: bool, . msrv: Msrv, . is_from_proc_macro: impl FnOnce() -> bool, . ) { 10 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) || has_where_lifetimes(cx, generics) { 21 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::has_where_lifetimes (1x) . return; . } . 2 ( 0.00%) let types = generics . .params . .iter() . .filter(|param| matches!(param.kind, GenericParamKind::Type { .. })); . . for typ in types { . if !typ.span.eq_ctxt(span) { . return; . } -- line 231 ---------------------------------------- -- line 261 ---------------------------------------- . } . } . } . } . } . } . } . 13 ( 0.00%) let elidable = could_use_elision(cx, sig.decl, body, trait_sig, generics.params, msrv); 650 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::could_use_elision (1x) . let has_elidable_lts = elidable . .as_ref() . .is_some_and(|(_, usages)| !usages.iter().any(|usage| !usage.ident.span.eq_ctxt(span))); . . // Only check is_from_proc_macro if we're about to emit a lint (it's an expensive check) 4 ( 0.00%) if (has_elidable_lts || report_extra_lifetimes) && is_from_proc_macro() { . return; . } . 1 ( 0.00%) if let Some((elidable_lts, usages)) = elidable . && has_elidable_lts . { . // async functions have usages whose spans point at the lifetime declaration which messes up . // suggestions . let include_suggestions = !sig.header.is_async(); . report_elidable_lifetimes(cx, generics, &elidable_lts, &usages, include_suggestions); . } . 1 ( 0.00%) if report_extra_lifetimes { 5 ( 0.00%) self::report_extra_lifetimes(cx, sig.decl, generics); 279 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_extra_lifetimes (1x) . } . } . 15 ( 0.00%) fn could_use_elision<'tcx>( . cx: &LateContext<'tcx>, . func: &'tcx FnDecl<'_>, . body: Option, . trait_sig: Option<&[Option]>, . named_generics: &'tcx [GenericParam<'_>], . msrv: Msrv, . ) -> Option<(Vec, Vec)> { . // There are two scenarios where elision works: -- line 301 ---------------------------------------- -- line 307 ---------------------------------------- . // check named LTs . let allowed_lts = allowed_lts_from(named_generics); . . // these will collect all the lifetimes for references in arg/return types . let mut input_visitor = RefVisitor::new(cx); . let mut output_visitor = RefVisitor::new(cx); . . // extract lifetimes in input argument types 1 ( 0.00%) for arg in func.inputs { . input_visitor.visit_ty_unambig(arg); . } . // extract lifetimes in output type 3 ( 0.00%) if let Return(ty) = func.output { . output_visitor.visit_ty_unambig(ty); . } . for lt in named_generics { . input_visitor.visit_generic_param(lt); . } . 4 ( 0.00%) if input_visitor.abort() || output_visitor.abort() { . return None; . } . 4 ( 0.00%) let input_lts = input_visitor.lts; 5 ( 0.00%) let output_lts = output_visitor.lts; . 6 ( 0.00%) if let Some(&[trait_sig]) = trait_sig . && non_elidable_self_type(cx, func, trait_sig, msrv) . { . return None; . } . 2 ( 0.00%) if let Some(body_id) = body { 6 ( 0.00%) let body = cx.tcx.hir_body(body_id); 52 ( 0.00%) => ???:::hir_body (1x) . 2 ( 0.00%) let first_ident = body.params.first().and_then(|param| param.pat.simple_ident()); 6 ( 0.00%) if non_elidable_self_type(cx, func, first_ident, msrv) { 14 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type (1x) . return None; . } . . let mut checker = BodyLifetimeChecker::new(cx); 3 ( 0.00%) if checker.visit_expr(body.value).is_break() { . return None; . } . } . . // check for lifetimes from higher scopes . for lt in input_lts.iter().chain(output_lts.iter()) { . if let Some(id) = named_lifetime(lt) . && !allowed_lts.contains(&id) . { . return None; . } . } . . // check for higher-ranked trait bounds 2 ( 0.00%) if !input_visitor.nested_elision_site_lts.is_empty() || !output_visitor.nested_elision_site_lts.is_empty() { . let allowed_lts: FxHashSet<_> = allowed_lts.iter().map(|id| cx.tcx.item_name(id.to_def_id())).collect(); . for lt in input_visitor.nested_elision_site_lts { . if allowed_lts.contains(<.ident.name) { . return None; . } . } . for lt in output_visitor.nested_elision_site_lts { . if allowed_lts.contains(<.ident.name) { -- line 371 ---------------------------------------- -- line 386 ---------------------------------------- . { . Some(def_id) . } else { . None . } . }) . .collect::>(); . 1 ( 0.00%) if elidable_lts.is_empty() { 1 ( 0.00%) return None; . } . . let usages = itertools::chain(input_lts, output_lts).collect(); . . Some((elidable_lts, usages)) 14 ( 0.00%) } . . fn allowed_lts_from(named_generics: &[GenericParam<'_>]) -> FxIndexSet { . named_generics . .iter() . .filter_map(|par| { . if let GenericParamKind::Lifetime { .. } = par.kind { . Some(par.def_id) . } else { . None . } . }) . .collect() . } . . // elision doesn't work for explicit self types before Rust 1.81, see rust-lang/rust#69064 4 ( 0.00%) fn non_elidable_self_type<'tcx>(cx: &LateContext<'tcx>, func: &FnDecl<'tcx>, ident: Option, msrv: Msrv) -> bool { 2 ( 0.00%) if let Some(ident) = ident 1 ( 0.00%) && ident.name == kw::SelfLower . && !func.implicit_self().has_implicit_self() . && let Some(self_ty) = func.inputs.first() . && !msrv.meets(cx, msrvs::EXPLICIT_SELF_TYPE_ELISION) . { . let mut visitor = RefVisitor::new(cx); . visitor.visit_ty_unambig(self_ty); . . !visitor.all_lts().is_empty() . } else { . false . } 5 ( 0.00%) } . . /// Number of times each named lifetime occurs in the given slice. Returns a vector to preserve . /// relative order. . #[must_use] . fn named_lifetime_occurrences(lts: &[Lifetime]) -> Vec<(LocalDefId, usize)> { . let mut occurrences = Vec::new(); . for lt in lts { . if let Some(curr_def_id) = named_lifetime(lt) { -- line 439 ---------------------------------------- -- line 461 ---------------------------------------- . cx: &'a LateContext<'tcx>, . lts: Vec, . nested_elision_site_lts: Vec, . unelided_trait_object_lifetime: bool, . } . . impl<'a, 'tcx> RefVisitor<'a, 'tcx> { . fn new(cx: &'a LateContext<'tcx>) -> Self { 17 ( 0.00%) Self { . cx, . lts: Vec::new(), . nested_elision_site_lts: Vec::new(), . unelided_trait_object_lifetime: false, . } . } . . fn all_lts(&self) -> Vec { -- line 477 ---------------------------------------- -- line 503 ---------------------------------------- . let mut sub_visitor = RefVisitor::new(self.cx); . sub_visitor.visit_trait_ref(trait_ref); . self.nested_elision_site_lts.append(&mut sub_visitor.all_lts()); . } else { . walk_poly_trait_ref(self, poly_tref); . } . } . 16 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx Ty<'_, AmbigArg>) { 10 ( 0.00%) match ty.kind { . TyKind::FnPtr(&FnPtrTy { decl, .. }) => { . let mut sub_visitor = RefVisitor::new(self.cx); . sub_visitor.visit_fn_decl(decl); . self.nested_elision_site_lts.append(&mut sub_visitor.all_lts()); . }, . TyKind::TraitObject(bounds, lt) => { . if !lt.is_elided() { . self.unelided_trait_object_lifetime = true; . } . for bound in bounds { . self.visit_poly_trait_ref(bound); . } . }, 18 ( 0.00%) _ => walk_ty(self, ty), 88 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (2x) . } . } . } . . /// Are any lifetimes mentioned in the `where` clause? If so, we don't try to . /// reason about elision. 8 ( 0.00%) fn has_where_lifetimes<'tcx>(cx: &LateContext<'tcx>, generics: &'tcx Generics<'_>) -> bool { . for predicate in generics.predicates { . match *predicate.kind { . WherePredicateKind::RegionPredicate(..) => return true, . WherePredicateKind::BoundPredicate(ref pred) => { . // a predicate like F: Trait or F: for<'a> Trait<'a> . let mut visitor = RefVisitor::new(cx); . // walk the type F, it may not contain LT refs . walk_unambig_ty(&mut visitor, pred.bounded_ty); -- line 541 ---------------------------------------- -- line 555 ---------------------------------------- . { . return true; . } . } . }, . } . } . false 8 ( 0.00%) } . . #[expect(clippy::struct_excessive_bools)] . struct Usage { . lifetime: Lifetime, . in_where_predicate: bool, . in_bounded_ty: bool, . in_generics_arg: bool, . lifetime_elision_impossible: bool, -- line 571 ---------------------------------------- -- line 591 ---------------------------------------- . .filter_map(|par| match par.kind { . GenericParamKind::Lifetime { . kind: LifetimeParamKind::Explicit, . } => Some((par.def_id, Vec::new())), . _ => None, . }) . .collect(); . 12 ( 0.00%) Self { . cx, . map, . where_predicate_depth: 0, . bounded_ty_depth: 0, . generic_args_depth: 0, . lifetime_elision_impossible: false, . phantom: std::marker::PhantomData, . } -- line 607 ---------------------------------------- -- line 667 ---------------------------------------- . . fn visit_generic_args(&mut self, generic_args: &'tcx GenericArgs<'tcx>) -> Self::Result { . self.generic_args_depth += 1; . walk_generic_args(self, generic_args); . self.generic_args_depth -= 1; . } . . fn visit_fn_decl(&mut self, fd: &'tcx FnDecl<'tcx>) -> Self::Result { 1 ( 0.00%) self.lifetime_elision_impossible = !is_candidate_for_elision(fd); . walk_fn_decl(self, fd); 1 ( 0.00%) self.lifetime_elision_impossible = false; . } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 19,978 ( 0.00%) self.cx.tcx . } . } . . /// Check if `fd` supports function elision with an anonymous (or elided) lifetime, . /// and has a lifetime somewhere in its output type. . fn is_candidate_for_elision(fd: &FnDecl<'_>) -> bool { . struct V; . -- line 689 ---------------------------------------- -- line 690 ---------------------------------------- . impl Visitor<'_> for V { . type Result = ControlFlow; . . fn visit_lifetime(&mut self, lifetime: &Lifetime) -> Self::Result { . ControlFlow::Break(lifetime.is_elided() || lifetime.is_anonymous()) . } . } . 5 ( 0.00%) if fd.lifetime_elision_allowed() . && let Return(ret_ty) = fd.output . && walk_unambig_ty(&mut V, ret_ty).is_break() . { . // The first encountered input lifetime will either be one on `self`, or will be the only lifetime. . fd.inputs . .iter() . .find_map(|ty| walk_unambig_ty(&mut V, ty).break_value()) . .unwrap() -- line 706 ---------------------------------------- -- line 732 ---------------------------------------- . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the type", . ); . } . } . } . 10 ( 0.00%) fn report_extra_lifetimes<'tcx>(cx: &LateContext<'tcx>, func: &'tcx FnDecl<'_>, generics: &'tcx Generics<'_>) { 2 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, generics.params); . 3 ( 0.00%) walk_generics(&mut checker, generics); 24 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_generics::> (1x) . walk_fn_decl(&mut checker, func); . 4 ( 0.00%) for (def_id, usages) in checker.map { . if usages . .iter() . .all(|usage| usage.in_where_predicate && !usage.in_bounded_ty && !usage.in_generics_arg) . { . span_lint( . cx, . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the function definition", . ); . } . } 8 ( 0.00%) } . . fn report_extra_impl_lifetimes<'tcx>(cx: &LateContext<'tcx>, impl_: &'tcx Impl<'_>) { 6 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, impl_.generics.params); . 8 ( 0.00%) walk_generics(&mut checker, impl_.generics); 48 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_generics::> (2x) 6 ( 0.00%) if let Some(of_trait) = impl_.of_trait { . walk_trait_ref(&mut checker, &of_trait.trait_ref); . } 2 ( 0.00%) walk_unambig_ty(&mut checker, impl_.self_ty); 9,991 ( 0.00%) for &item in impl_.items { . walk_impl_item_ref(&mut checker, item); . } . . for (&def_id, usages) in &checker.map { . if usages . .iter() . .all(|usage| usage.in_where_predicate && !usage.in_bounded_ty && !usage.in_generics_arg) . { -- line 777 ---------------------------------------- -- line 790 ---------------------------------------- . // An `impl` lifetime is elidable if it satisfies the following conditions: . // - It is used exactly once. . // - That single use is not in a `WherePredicate`. . fn report_elidable_impl_lifetimes<'tcx>( . cx: &LateContext<'tcx>, . impl_: &'tcx Impl<'_>, . map: &FxIndexMap>, . ) { 10 ( 0.00%) let (elidable_lts, usages): (Vec<_>, Vec<_>) = map . .iter() . .filter_map(|(def_id, usages)| { . if let [ . Usage { . lifetime, . in_where_predicate: false, . lifetime_elision_impossible: false, . .. -- line 806 ---------------------------------------- -- line 807 ---------------------------------------- . }, . ] = usages.as_slice() . { . Some((def_id, lifetime)) . } else { . None . } . }) 4 ( 0.00%) .unzip(); 70 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:>, clippy_lints::lifetimes::report_elidable_impl_lifetimes::{closure#0}> as core::iter::traits::iterator::Iterator>::unzip::<&rustc_span::def_id::LocalDefId, &rustc_hir::hir::Lifetime, alloc::vec::Vec, alloc::vec::Vec> (2x) . 2 ( 0.00%) if elidable_lts.is_empty() { . return; . } . . report_elidable_lifetimes(cx, impl_.generics, &elidable_lts, &usages, true); . } . . #[derive(Copy, Clone)] . enum ElidableUsage { -- line 825 ---------------------------------------- -- line 971 ---------------------------------------- . } . . struct BodyLifetimeChecker<'tcx> { . tcx: TyCtxt<'tcx>, . } . . impl<'tcx> BodyLifetimeChecker<'tcx> { . fn new(cx: &LateContext<'tcx>) -> Self { 1 ( 0.00%) Self { tcx: cx.tcx } . } . } . . impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker<'tcx> { . type Result = ControlFlow<()>; . type NestedFilter = middle_nested_filter::OnlyBodies; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { -- line 987 ---------------------------------------- 29 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs -------------------------------------------------------------------------------- Ir -- line 150 ---------------------------------------- . expr = recv; . depth += 1; . } . (expr, depth) . } . . #[expect(clippy::too_many_lines)] . impl<'tcx> LateLintPass<'tcx> for UselessConversion { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 59,934 ( 0.00%) if e.span.from_expansion() { . if e.span.desugaring_kind().is_none() { . self.expn_depth += 1; . } . return; . } . . if Some(&e.hir_id) == self.try_desugar_arm.last() { . return; . } . 209,769 ( 0.01%) match e.kind { . ExprKind::Match(_, arms, MatchSource::TryDesugar(_)) => { . let (ExprKind::Ret(Some(e)) | ExprKind::Break(_, Some(e))) = arms[0].body.kind else { . return; . }; . if let ExprKind::Call(_, [arg, ..]) = e.kind { . self.try_desugar_arm.push(arg.hir_id); . } . }, -- line 178 ---------------------------------------- -- line 408 ---------------------------------------- . e.span, . format!("useless conversion to the same type: `{b}`"), . None, . "consider removing `.try_into()`", . ); . } . }, . 29,964 ( 0.00%) ExprKind::Call(path, [arg]) => { 29,964 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind 59,928 ( 0.00%) && !is_ty_alias(qpath) 299,640 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias (9,988x) 49,940 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 59,928 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(def_id) 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . { . let a = cx.typeck_results().expr_ty(e); . let b = cx.typeck_results().expr_ty(arg); . if name == sym::try_from_fn . && a.is_diag_item(cx, sym::Result) . && let ty::Adt(_, args) = a.kind() . && let Some(a_type) = args.types().next() . && same_type_modulo_regions(a_type, b) -- line 428 ---------------------------------------- -- line 450 ---------------------------------------- . app, . ); . } . } . }, . . _ => {}, . } 239,736 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . if Some(&e.hir_id) == self.try_desugar_arm.last() { . self.try_desugar_arm.pop(); . } 59,934 ( 0.00%) if e.span.from_expansion() && e.span.desugaring_kind().is_none() { . self.expn_depth -= 1; . } . } . } . . fn has_eligible_receiver(cx: &LateContext<'_>, recv: &Expr<'_>, expr: &Expr<'_>) -> bool { . if cx.ty_based_def(expr).opt_parent(cx).is_impl(cx) { . matches!( -- line 472 ---------------------------------------- 19,976 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/mod.rs -------------------------------------------------------------------------------- Ir -- line 1033 ---------------------------------------- . modulo_arithmetic_allow_comparison_to_zero: bool, . msrv: Msrv, . } . . impl Operators { . pub fn new(conf: &'static Conf) -> Self { . Self { . arithmetic_context: numeric_arithmetic::Context::default(), 2 ( 0.00%) verbose_bit_mask_threshold: conf.verbose_bit_mask_threshold, 1 ( 0.00%) modulo_arithmetic_allow_comparison_to_zero: conf.allow_comparison_to_zero, . msrv: conf.msrv.into(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Operators { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 89,901 ( 0.00%) eq_op::check_assert(cx, e); 2,846,865 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert (29,967x) 89,901 ( 0.00%) float_cmp::check_assert(cx, e); 1,827,987 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert (29,967x) 149,835 ( 0.01%) match e.kind { . ExprKind::Binary(op, lhs, rhs) => { . if !e.span.from_expansion() { . absurd_extreme_comparisons::check(cx, e, op.node, lhs, rhs); . if !(macro_with_not_op(lhs) || macro_with_not_op(rhs)) { . eq_op::check(cx, e, op.node, lhs, rhs); . op_ref::check(cx, e, op.node, lhs, rhs); . } . erasing_op::check(cx, e, op.node, lhs, rhs); -- line 1060 ---------------------------------------- -- line 1105 ---------------------------------------- . { . #[expect(clippy::collapsible_match)] . if op == UnOp::Neg { . self.arithmetic_context.check_negate(cx, e, arg); . } . }, . _ => (), . } 239,736 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'_>, e: &Expr<'_>) { . self.arithmetic_context.expr_post(e.hir_id); . } . . fn check_body(&mut self, cx: &LateContext<'tcx>, b: &Body<'_>) { . self.arithmetic_context.enter_body(cx, b); . } -- line 1121 ---------------------------------------- 9,990 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs -------------------------------------------------------------------------------- Ir -- line 20 ---------------------------------------- . #[derive(Clone)] . pub struct Filter { . // Used for `SplitWhitespace` and `SplitAsciiWhitespace` `as_str` methods . pub(crate) iter: I, . predicate: P, . } . impl Filter { . pub(in crate::iter) const fn new(iter: I, predicate: P) -> Filter { 159,837 ( 0.01%) Filter { iter, predicate } . } . } . . impl Filter . where . I: Iterator, . P: FnMut(&I::Item) -> bool, . { -- line 36 ---------------------------------------- -- line 78 ---------------------------------------- . ) -> impl FnMut(Acc, T) -> Acc { . move |acc, item| if predicate(&item) { fold(acc, item) } else { acc } . } . . fn filter_try_fold<'a, T, Acc, R: Try>( . predicate: &'a mut impl FnMut(&T) -> bool, . mut fold: impl FnMut(Acc, T) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { 29,970 ( 0.00%) move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Filter . where . P: FnMut(&I::Item) -> bool, . { . type Item = I::Item; . . #[inline] 8 ( 0.00%) fn next(&mut self) -> Option { . self.iter.find(&mut self.predicate) 8 ( 0.00%) } . . #[inline] . fn next_chunk( . &mut self, . ) -> Result<[Self::Item; N], array::IntoIter> { . // avoid codegen for the dead branch . let fun = const { . if crate::mem::needs_drop::() { -- line 107 ---------------------------------------- -- line 157 ---------------------------------------- . self.iter.try_fold(init, filter_try_fold(&mut self.predicate, fold)) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 9,998 ( 0.00%) self.iter.fold(init, filter_fold(self.predicate, fold)) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl DoubleEndedIterator for Filter . where . P: FnMut(&I::Item) -> bool, . { -- line 173 ---------------------------------------- 69,926 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . . impl StrlenOnCStrings { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for StrlenOnCStrings { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if !expr.span.from_expansion() 29,964 ( 0.00%) && let ExprKind::Call(func, [recv]) = expr.kind 29,964 ( 0.00%) && let ExprKind::Path(path) = &func.kind 49,940 ( 0.00%) && let Some(did) = cx.qpath_res(path, func.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 49,940 ( 0.00%) && match_libc_symbol(cx, did, sym::strlen) 429,484 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol (9,988x) . && let ExprKind::MethodCall(path, self_arg, [], _) = recv.kind . && !recv.span.from_expansion() . && path.ident.name == sym::as_ptr . && let typeck = cx.typeck_results() . && typeck . .expr_ty_adjusted(self_arg) . .peel_refs() . .is_lang_item(cx, LangItem::CStr) -- line 66 ---------------------------------------- -- line 100 ---------------------------------------- . } else { . format!("{val_name}.to_bytes().len()") . }; . . diag.span_suggestion(span, "use", suggestion, app); . }, . ); . } 239,736 ( 0.01%) } . } 89,898 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_strip.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . . #[derive(Clone, Copy, Debug, Eq, PartialEq)] . enum StripKind { . Prefix, . Suffix, . } . . impl<'tcx> LateLintPass<'tcx> for ManualStrip { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let Some(higher::If { cond, then, .. }) = higher::If::hir(expr) . && let ExprKind::MethodCall(_, target_arg, [pattern], _) = cond.kind . && let ExprKind::Path(target_path) = &target_arg.kind . && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(cond.hir_id) . { . let strip_kind = match cx.tcx.get_diagnostic_name(method_def_id) { . Some(sym::str_starts_with) => StripKind::Prefix, . Some(sym::str_ends_with) => StripKind::Suffix, -- line 79 ---------------------------------------- -- line 144 ---------------------------------------- . ) . .collect(), . app, . ); . }, . ); . } . } 239,736 ( 0.01%) } . } . . // Returns `Some(arg)` if `expr` matches `arg.len()` and `None` otherwise. . fn len_arg<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::MethodCall(_, arg, [], _) = expr.kind . && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::str_len, method_def_id) . { -- line 160 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs -------------------------------------------------------------------------------- Ir -- line 754 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const fn load(&self, order: Ordering) -> bool { . // SAFETY: any data races are prevented by atomic intrinsics and the raw . // pointer passed in is valid because we got it from a reference. 69,929 ( 0.00%) unsafe { atomic_load(self.v.get().cast::(), order) != 0 } . } . . /// Stores a value into the bool. . /// . /// `store` takes an [`Ordering`] argument which describes the memory ordering . /// of this operation. Possible values are [`SeqCst`], [`Release`] and [`Relaxed`]. . /// . /// # Panics -- line 770 ---------------------------------------- -- line 3986 ---------------------------------------- . . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_load(dst: *const T, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_load`. . unsafe { . match order { 59,943 ( 0.00%) Relaxed => intrinsics::atomic_load::(dst), 90,097 ( 0.00%) Acquire => intrinsics::atomic_load::(dst), . SeqCst => intrinsics::atomic_load::(dst), . Release => panic!("there is no such thing as a release load"), . AcqRel => panic!("there is no such thing as an acquire-release load"), . } . } . } . . #[inline] -- line 4003 ---------------------------------------- -- line 4005 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_swap(dst: *mut T, val: T, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_swap`. . unsafe { . match order { . Relaxed => intrinsics::atomic_xchg::(dst, val), . Acquire => intrinsics::atomic_xchg::(dst, val), 2 ( 0.00%) Release => intrinsics::atomic_xchg::(dst, val), . AcqRel => intrinsics::atomic_xchg::(dst, val), . SeqCst => intrinsics::atomic_xchg::(dst, val), . } . } . } . . /// Returns the previous value (like __sync_fetch_and_add). . #[inline] . #[cfg(target_has_atomic)] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_add(dst: *mut T, val: U, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_add`. . unsafe { . match order { 20 ( 0.00%) Relaxed => intrinsics::atomic_xadd::(dst, val), . Acquire => intrinsics::atomic_xadd::(dst, val), . Release => intrinsics::atomic_xadd::(dst, val), . AcqRel => intrinsics::atomic_xadd::(dst, val), . SeqCst => intrinsics::atomic_xadd::(dst, val), . } . } . } . -- line 4037 ---------------------------------------- -- line 4041 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_sub(dst: *mut T, val: U, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_sub`. . unsafe { . match order { . Relaxed => intrinsics::atomic_xsub::(dst, val), . Acquire => intrinsics::atomic_xsub::(dst, val), 20,014 ( 0.00%) Release => intrinsics::atomic_xsub::(dst, val), . AcqRel => intrinsics::atomic_xsub::(dst, val), . SeqCst => intrinsics::atomic_xsub::(dst, val), . } . } . } . . /// Publicly exposed for stdarch; nobody else should use this. . #[inline] -- line 4057 ---------------------------------------- -- line 4075 ---------------------------------------- . } . (Relaxed, Acquire) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Relaxed, SeqCst) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, Relaxed) => { 3 ( 0.00%) intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, Acquire) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, SeqCst) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Release, Relaxed) => { -- line 4091 ---------------------------------------- 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs -------------------------------------------------------------------------------- Ir -- line 1490 ---------------------------------------- . matches!(n.args, AttrArgs::Empty) . } . _ => false, . } . } . . #[inline] . fn symbol_path(&self) -> Option> { 11 ( 0.00%) match &self { . Attribute::Unparsed(n) => Some(n.path.segments.iter().copied().collect()), . _ => None, . } . } . . fn path_span(&self) -> Option { . match &self { . Attribute::Unparsed(attr) => Some(attr.path.span), -- line 1506 ---------------------------------------- -- line 1517 ---------------------------------------- . } . . fn is_automatically_derived_attr(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::AutomaticallyDerived)) . } . . #[inline] . fn doc_str_and_fragment_kind(&self) -> Option<(Symbol, DocFragmentKind)> { 2 ( 0.00%) match &self { . Attribute::Parsed(AttributeKind::DocComment { kind, comment, .. }) => { . Some((*comment, *kind)) . } . _ => None, . } . } . . fn doc_resolution_scope(&self) -> Option { -- line 1533 ---------------------------------------- -- line 1547 ---------------------------------------- . AttributeKind::ProcMacro . | AttributeKind::ProcMacroAttribute . | AttributeKind::ProcMacroDerive { .. } . ) . ) . } . . fn is_doc_hidden(&self) -> bool { 2 ( 0.00%) matches!(self, Attribute::Parsed(AttributeKind::Doc(d)) if d.hidden.is_some()) . } . . fn is_doc_keyword_or_attribute(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::Doc(d)) if d.attribute.is_some() || d.keyword.is_some()) . } . . fn is_rustc_doc_primitive(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::RustcDocPrimitive(..))) -- line 1563 ---------------------------------------- -- line 2302 ---------------------------------------- . #[derive(Debug, Clone, Copy, StableHash)] . pub struct Body<'hir> { . pub params: &'hir [Param<'hir>], . pub value: &'hir Expr<'hir>, . } . . impl<'hir> Body<'hir> { . pub fn id(&self) -> BodyId { 79,921 ( 0.00%) BodyId { hir_id: self.value.hir_id } . } . } . . /// The type of source expression that caused this coroutine to be created. . #[derive(Clone, PartialEq, Eq, Debug, Copy, Hash, StableHash, Encodable, Decodable)] . pub enum CoroutineKind { . /// A coroutine that comes from a desugaring. . Desugared(CoroutineDesugaring, CoroutineSource), -- line 2318 ---------------------------------------- -- line 2719 ---------------------------------------- . . /// If `Self.kind` is `ExprKind::DropTemps(expr)`, drill down until we get a non-`DropTemps` . /// `Expr`. This is used in suggestions to ignore this `ExprKind` as it is semantically . /// silent, only signaling the ownership system. By doing this, suggestions that check the . /// `ExprKind` of any given `Expr` for presentation don't have to care about `DropTemps` . /// beyond remembering to call this function before doing analysis on it. . pub fn peel_drop_temps(&self) -> &Self { . let mut expr = self; 9 ( 0.00%) while let ExprKind::DropTemps(inner) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_blocks(&self) -> &Self { . let mut expr = self; 319,677 ( 0.01%) while let ExprKind::Block(Block { expr: Some(inner), .. }, _) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_borrows(&self) -> &Self { . let mut expr = self; 89,901 ( 0.00%) while let ExprKind::AddrOf(.., inner) = &expr.kind { . expr = inner; . } . expr . } . . pub fn can_have_side_effects(&self) -> bool { . match self.peel_drop_temps().kind { . ExprKind::Path(_) | ExprKind::Lit(_) | ExprKind::OffsetOf(..) | ExprKind::Use(..) => { -- line 2751 ---------------------------------------- -- line 3402 ---------------------------------------- . trait_item_def_id: Result, . }, . } . . impl<'hir> ImplItem<'hir> { . #[inline] . pub fn hir_id(&self) -> HirId { . // Items are always HIR owners. 29,974 ( 0.00%) HirId::make_owner(self.owner_id.def_id) . } . . pub fn impl_item_id(&self) -> ImplItemId { . ImplItemId { owner_id: self.owner_id } . } . . pub fn vis_span(&self) -> Option { . match self.impl_kind { -- line 3418 ---------------------------------------- -- line 3559 ---------------------------------------- . . impl<'hir> Ty<'hir> { . /// Converts a `Ty` in an unambiguous position to one in an ambiguous position. This is . /// fallible as the [`TyKind::Infer`] variant is not present in ambiguous positions. . /// . /// Functions accepting ambiguous types will not handle the [`TyKind::Infer`] variant, if . /// infer types are relevant to you then care should be taken to handle them separately. . pub fn try_as_ambig_ty(&self) -> Option<&Ty<'hir, AmbigArg>> { 99,915 ( 0.00%) if let TyKind::Infer(()) = self.kind { . return None; . } . . // SAFETY: `Ty` is `repr(C)` and `TyKind` is marked `repr(u8)` so that the layout is . // the same across different ZST type arguments. We also asserted that the `self` is . // not a `TyKind::Infer` so there is no risk of transmuting a `()` to `AmbigArg`. . let ptr = self as *const Ty<'hir> as *const Ty<'hir, AmbigArg>; . Some(unsafe { &*ptr }) -- line 3575 ---------------------------------------- -- line 4215 ---------------------------------------- . . /// Do the function arguments end with a C-style variadic argument? . pub fn c_variadic(self) -> bool { . self.flags & Self::C_VARIADIC_FLAG != 0 . } . . /// Is lifetime elision allowed? . pub fn lifetime_elision_allowed(self) -> bool { 2 ( 0.00%) self.flags & Self::LIFETIME_ELISION_ALLOWED_FLAG != 0 . } . . /// Get the splatted argument index, if any. . pub fn splatted(self) -> Option { . if self.splatted == Self::NO_SPLATTED_ARG_INDEX { None } else { Some(self.splatted) } . } . } . -- line 4231 ---------------------------------------- -- line 4266 ---------------------------------------- . self.fn_decl_kind.implicit_self() . } . . pub fn c_variadic(&self) -> bool { . self.fn_decl_kind.c_variadic() . } . . pub fn lifetime_elision_allowed(&self) -> bool { 1 ( 0.00%) self.fn_decl_kind.lifetime_elision_allowed() . } . . pub fn splatted(&self) -> Option { . self.fn_decl_kind.splatted() . } . . pub fn dummy(span: Span) -> Self { . Self { -- line 4282 ---------------------------------------- -- line 4301 ---------------------------------------- . /// Represents when a function does not have a self argument or . /// when a function has a `self: X` argument. . None, . } . . impl ImplicitSelfKind { . /// Does this represent an implicit self? . pub fn has_implicit_self(&self) -> bool { 4 ( 0.00%) !matches!(*self, ImplicitSelfKind::None) . } . } . . #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, StableHash)] . pub enum IsAsync { . Async(Span), . NotAsync, . } . . impl IsAsync { . pub fn is_async(self) -> bool { 2 ( 0.00%) matches!(self, IsAsync::Async(_)) . } . } . . #[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, StableHash)] . #[derive(Default)] . pub enum Defaultness { . Default { . has_value: bool, -- line 4329 ---------------------------------------- -- line 4359 ---------------------------------------- . DefaultReturn(Span), . /// Everything else. . Return(&'hir Ty<'hir>), . } . . impl<'hir> FnRetTy<'hir> { . #[inline] . pub fn span(&self) -> Span { 8 ( 0.00%) match *self { . Self::DefaultReturn(span) => span, 3 ( 0.00%) Self::Return(ref ty) => ty.span, . } . } . . pub fn is_suggestable_infer_ty(&self) -> Option<&'hir Ty<'hir>> { . if let Self::Return(ty) = self . && ty.is_suggestable_infer_ty() . { . return Some(*ty); -- line 4377 ---------------------------------------- -- line 4523 ---------------------------------------- . /// . /// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`. . Unit(#[stable_hash(ignore)] HirId, LocalDefId), . } . . impl<'hir> VariantData<'hir> { . /// Return the fields of this variant. . pub fn fields(&self) -> &'hir [FieldDef<'hir>] { 2 ( 0.00%) match *self { . VariantData::Struct { fields, .. } | VariantData::Tuple(fields, ..) => fields, . _ => &[], . } . } . . pub fn ctor(&self) -> Option<(CtorKind, HirId, LocalDefId)> { . match *self { . VariantData::Tuple(_, hir_id, def_id) => Some((CtorKind::Fn, hir_id, def_id)), -- line 4539 ---------------------------------------- -- line 4594 ---------------------------------------- . /// either an `EiiImpls` or `EiiExternTarget` attribute . pub eii: bool, . } . . impl<'hir> Item<'hir> { . #[inline] . pub fn hir_id(&self) -> HirId { . // Items are always HIR owners. 31 ( 0.00%) HirId::make_owner(self.owner_id.def_id) . } . . #[inline] . pub fn item_id(&self) -> ItemId { . ItemId { owner_id: self.owner_id } . } . . /// Check if this is an [`ItemKind::Enum`], [`ItemKind::Struct`] or -- line 4610 ---------------------------------------- -- line 4789 ---------------------------------------- . pub safety: HeaderSafety, . pub constness: Constness, . pub asyncness: IsAsync, . pub abi: ExternAbi, . } . . impl FnHeader { . pub fn is_async(&self) -> bool { 1 ( 0.00%) matches!(self.asyncness, IsAsync::Async(_)) . } . . pub fn is_unsafe(&self) -> bool { . self.safety().is_unsafe() . } . . pub fn is_safe(&self) -> bool { . self.safety().is_safe() . } . . pub fn safety(&self) -> Safety { 5 ( 0.00%) match self.safety { . HeaderSafety::SafeTargetFeatures => Safety::Unsafe, . HeaderSafety::Normal(safety) => safety, . } . } . } . . #[derive(Debug, Clone, Copy, StableHash)] . pub enum ItemKind<'hir> { -- line 4817 ---------------------------------------- -- line 4905 ---------------------------------------- . // We do not put a `Span` in `Defaultness` because it breaks foreign crate metadata . // decoding as `Span`s cannot be decoded when a `Session` is not available. . pub defaultness_span: Option, . pub trait_ref: TraitRef<'hir>, . } . . impl ItemKind<'_> { . pub fn ident(&self) -> Option { 5 ( 0.00%) match *self { . ItemKind::ExternCrate(_, ident) . | ItemKind::Use(_, UseKind::Single(ident)) . | ItemKind::Static(_, ident, ..) . | ItemKind::Const(ident, ..) . | ItemKind::Fn { ident, .. } . | ItemKind::Macro(ident, ..) . | ItemKind::Mod(ident, ..) . | ItemKind::TyAlias(ident, ..) -- line 4921 ---------------------------------------- -- line 4925 ---------------------------------------- . | ItemKind::Trait { ident, .. } . | ItemKind::TraitAlias(_, ident, ..) => Some(ident), . . ItemKind::Use(_, UseKind::Glob | UseKind::ListStem) . | ItemKind::ForeignMod { .. } . | ItemKind::GlobalAsm { .. } . | ItemKind::Impl(_) => None, . } 1 ( 0.00%) } . . pub fn generics(&self) -> Option<&Generics<'_>> { . Some(match self { . ItemKind::Fn { generics, .. } . | ItemKind::TyAlias(_, generics, _) . | ItemKind::Const(_, generics, _, _) . | ItemKind::Enum(_, generics, _) . | ItemKind::Struct(_, generics, _) -- line 4941 ---------------------------------------- 139,878 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_rem_euclid.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl ManualRemEuclid { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualRemEuclid { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // (x % c + c) % c 59,934 ( 0.00%) if let ExprKind::Binary(rem_op, rem_lhs, rem_rhs) = expr.kind . && rem_op.node == BinOpKind::Rem . && let ExprKind::Binary(add_op, add_lhs, add_rhs) = rem_lhs.kind . && add_op.node == BinOpKind::Add . && let ctxt = expr.span.ctxt() . && rem_lhs.span.ctxt() == ctxt . && rem_rhs.span.ctxt() == ctxt . && add_lhs.span.ctxt() == ctxt . && add_rhs.span.ctxt() == ctxt -- line 61 ---------------------------------------- -- line 93 ---------------------------------------- . MANUAL_REM_EUCLID, . expr.span, . "manual `rem_euclid` implementation", . "consider using", . format!("{rem_of}.rem_euclid({const1})"), . app, . ); . } 239,736 ( 0.01%) } . } . . // Checks if either the left or right expressions can be an unsigned int constant and returns that . // constant along with the other expression unchanged if so . fn check_for_either_unsigned_int_constant<'a>( . cx: &'a LateContext<'_>, . ctxt: SyntaxContext, . left: &'a Expr<'_>, -- line 109 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs -------------------------------------------------------------------------------- Ir -- line 108 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . ControlFlow::Continue(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 89,901 ( 0.00%) match self { . ControlFlow::Continue(c) => ControlFlow::Continue(c), . ControlFlow::Break(b) => ControlFlow::Break(ControlFlow::Break(b)), . } . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] -- line 124 ---------------------------------------- -- line 188 ---------------------------------------- . #[inline] . #[stable(feature = "control_flow_enum", since = "1.83.0")] . #[rustc_const_unstable(feature = "const_control_flow", issue = "148739")] . pub const fn break_value(self) -> Option . where . Self: [const] Destruct, . { . match self { 9,994 ( 0.00%) ControlFlow::Continue(..) => None, . ControlFlow::Break(x) => Some(x), . } . } . . /// Converts the `ControlFlow` into a `Result` which is `Ok` if the . /// `ControlFlow` was `Break` and `Err` if otherwise. . /// . /// # Examples -- line 204 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'tcx>, . body: &'tcx Body<'tcx>, . span: Span, . _def_id: LocalDefId, . ) { 3 ( 0.00%) if let FnRetTy::Return(hir_ty) = decl.output . && is_unit_ty(hir_ty) . && !hir_ty.span.from_expansion() . && get_def(span) == get_def(hir_ty.span) . { . // The explicit `-> ()` in the closure signature might be necessary for multiple reasons: . // - Implicit types in closure signatures are forbidden when `for<...>` is present . // - If the closure body ends with a function call, and that function's return type is generic, the . // `-> ()` could be required for it to be inferred -- line 62 ---------------------------------------- -- line 75 ---------------------------------------- . && let Some(expr) = block.expr . && is_never_expr(cx, expr).is_some() . { . return; . } . . lint_unneeded_unit_return(cx, hir_ty.span, span); . } 1 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 149,835 ( 0.01%) if let ExprKind::Ret(Some(expr)) | ExprKind::Break(_, Some(expr)) = expr.kind . && is_unit_expr(expr) . && !expr.span.from_expansion() . { . span_lint_and_sugg( . cx, . UNUSED_UNIT, . expr.span, . "unneeded `()`", . "remove the `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 29,967 ( 0.00%) } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { . if let [segment] = &poly.trait_ref.path.segments . && matches!(segment.ident.name, sym::Fn | sym::FnMut | sym::FnOnce) . && let Some(args) = segment.args . && args.parenthesized == GenericArgsParentheses::ParenSugar . && let [constraint] = &args.constraints . && constraint.ident.name == sym::Output -- line 108 ---------------------------------------- -- line 115 ---------------------------------------- . lint_unneeded_unit_return(cx, hir_ty.span, poly.span); . } . } . } . . impl EarlyLintPass for UnusedUnit { . /// Check for unit expressions in blocks. This is left in the early pass because some macros . /// expand its inputs as-is, making it invisible to the late pass. See #4076. 4 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . if let Some(stmt) = block.stmts.last() 2 ( 0.00%) && let StmtKind::Expr(expr) = &stmt.kind 3 ( 0.00%) && let rustc_ast::ExprKind::Tup(inner) = &expr.kind . && inner.is_empty() . && let ctxt = block.span.ctxt() . && stmt.span.ctxt() == ctxt . && expr.span.ctxt() == ctxt . && expr.attrs.is_empty() . { . let sp = expr.span; . span_lint_and_sugg( -- line 134 ---------------------------------------- -- line 136 ---------------------------------------- . UNUSED_UNIT, . sp, . "unneeded unit expression", . "remove the final `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 5 ( 0.00%) } . } . . fn is_unit_ty(ty: &Ty<'_>) -> bool { 2 ( 0.00%) matches!(ty.kind, TyKind::Tup([])) . } . . // get the def site . #[must_use] . fn get_def(span: Span) -> Option { . if span.from_expansion() { . Some(span.ctxt().outer_expn_data().def_site) . } else { -- line 156 ---------------------------------------- 16 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs -------------------------------------------------------------------------------- Ir -- line 61 ---------------------------------------- . . pub struct DisallowedTypes { . def_ids: DefIdMap<(&'static str, &'static DisallowedPath)>, . prim_tys: FxHashMap, . } . . impl DisallowedTypes { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 8 ( 0.00%) let (def_ids, prim_tys) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map:: (1x) . tcx, . &conf.disallowed_types, . PathNS::Type, . def_kind_predicate, . "type", . true, . ); 8 ( 0.00%) Self { def_ids, prim_tys } . } . 99,905 ( 0.00%) fn check_res_emit(&self, cx: &LateContext<'_>, res: &Res, span: Span) { 99,901 ( 0.00%) let (path, disallowed_path) = match res { . Res::Def(_, did) if let Some(&x) = self.def_ids.get(did) => x, . Res::PrimTy(prim) if let Some(&x) = self.prim_tys.get(prim) => x, . _ => return, . }; . span_lint_and_then( . cx, . DISALLOWED_TYPES, . span, . format!("use of a disallowed type `{path}`"), . disallowed_path.diag_amendment(span), . ); 119,886 ( 0.00%) } . } . . pub fn def_kind_predicate(def_kind: DefKind) -> bool { . matches!( . def_kind, . DefKind::Struct . | DefKind::Union . | DefKind::Enum -- line 101 ---------------------------------------- -- line 103 ---------------------------------------- . | DefKind::TyAlias . | DefKind::ForeignTy . | DefKind::AssocTy . ) . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedTypes { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 12 ( 0.00%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind . && let Some(res) = path.res.type_ns . { . self.check_res_emit(cx, &res, item.span); . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx, AmbigArg>) { 59,943 ( 0.00%) if let TyKind::Path(path) = &ty.kind { 219,791 ( 0.01%) self.check_res_emit(cx, &cx.qpath_res(path, ty.hir_id), ty.span); 459,563 ( 0.02%) => ???:::qpath_res (19,981x) 359,652 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (19,981x) . } . } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { . self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span); . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default_instead_of_iter_empty.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub DEFAULT_INSTEAD_OF_ITER_EMPTY, . style, . "check `std::iter::Empty::default()` and replace with `std::iter::empty()`" . } . . declare_lint_pass!(DefaultIterEmpty => [DEFAULT_INSTEAD_OF_ITER_EMPTY]); . . impl<'tcx> LateLintPass<'tcx> for DefaultIterEmpty { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 79,910 ( 0.00%) if let ExprKind::Call(iter_expr, []) = &expr.kind . && let ExprKind::Path(QPath::TypeRelative(ty, _)) = &iter_expr.kind . && let TyKind::Path(ty_path) = &ty.kind . && let QPath::Resolved(None, path) = ty_path . && let def::Res::Def(_, def_id) = &path.res . && cx.tcx.is_diagnostic_item(sym::IterEmpty, *def_id) . && let ctxt = expr.span.ctxt() . && ty.span.ctxt() == ctxt . { -- line 44 ---------------------------------------- -- line 51 ---------------------------------------- . DEFAULT_INSTEAD_OF_ITER_EMPTY, . expr.span, . format!("`{path}()` is the more idiomatic way"), . "try", . sugg, . applicability, . ); . } 239,736 ( 0.01%) } . } . . fn make_sugg( . cx: &LateContext<'_>, . ty_path: &QPath<'_>, . ctxt: SyntaxContext, . applicability: &mut Applicability, . path: &str, -- line 67 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs -------------------------------------------------------------------------------- Ir -- line 151 ---------------------------------------- . } . . // Tiny Vecs are dumb. Skip to: . // - 8 if the element size is 1, because any heap allocator is likely . // to round up a request of less than 8 bytes to at least 8 bytes. . // - 4 if elements are moderate-sized (<= 1 KiB). . // - 1 otherwise, to avoid wasting too much space for very short Vecs. . const fn min_non_zero_cap(size: usize) -> usize { 105 ( 0.00%) if size == 1 { . 8 . } else if size <= 1024 { . 4 . } else { . 1 . } . } . -- line 167 ---------------------------------------- -- line 178 ---------------------------------------- . _marker: PhantomData, . } . } . . /// A specialized version of `self.reserve(len, 1)` which requires the . /// caller to ensure `len == self.capacity()`. . #[cfg(not(no_global_oom_handling))] . #[inline(never)] 16 ( 0.00%) pub(crate) fn grow_one(&mut self) { . // SAFETY: All calls on self.inner pass T::LAYOUT as the elem_layout . unsafe { self.inner.grow_one(T::LAYOUT) } 16 ( 0.00%) } . } . . impl RawVec { . #[cfg(not(no_global_oom_handling))] . pub(crate) const MIN_NON_ZERO_CAP: usize = min_non_zero_cap(size_of::()); . . /// Like `new`, but parameterized over the choice of allocator for . /// the returned `RawVec`. -- line 197 ---------------------------------------- -- line 417 ---------------------------------------- . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe impl<#[may_dangle] T, A: [const] Allocator + [const] Destruct> Drop for RawVec { . /// Frees the memory owned by the `RawVec` *without* trying to drop its contents. . fn drop(&mut self) { . // SAFETY: We are in a Drop impl, self.inner will not be used again. 190,224 ( 0.01%) unsafe { self.inner.deallocate(T::LAYOUT) } . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . #[rustfmt::skip] // FIXME(fee1-dead): temporary measure before rustfmt is bumped . const impl RawVecInner { . #[cfg(not(no_global_oom_handling))] . #[inline] -- line 433 ---------------------------------------- -- line 453 ---------------------------------------- . // We avoid `unwrap_or_else` here because it bloats the amount of . // LLVM IR generated. . let layout = match layout_array(capacity, elem_layout) { . Ok(layout) => layout, . Err(_) => return Err(CapacityOverflow.into()), . }; . . // Don't allocate here because `Drop` will not deallocate when `capacity` is 0. 40,148 ( 0.00%) if layout.size() == 0 { . return Ok(Self::new_in(alloc, elem_layout.alignment())); . } . . let result = match init { . AllocInit::Uninitialized => alloc.allocate(layout), . #[cfg(not(no_global_oom_handling))] . AllocInit::Zeroed => alloc.allocate_zeroed(layout), . }; 20,369 ( 0.00%) let ptr = match result { . Ok(ptr) => ptr, . Err(_) => return Err(AllocError { layout, non_exhaustive: () }.into()), . }; . . // Allocators currently return a `NonNull<[u8]>` whose length . // matches the size requested. If that ever changes, the capacity . // here should change to `ptr.len() / size_of::()`. . Ok(Self { -- line 478 ---------------------------------------- -- line 485 ---------------------------------------- . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . #[cfg(not(no_global_oom_handling))] . #[inline] . unsafe fn grow_one(&mut self, elem_layout: Layout) { . // SAFETY: Precondition passed to caller 4 ( 0.00%) if let Err(err) = unsafe { self.grow_amortized(self.cap.as_inner(), 1, elem_layout) } { . handle_error(err); . } . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment -- line 501 ---------------------------------------- -- line 504 ---------------------------------------- . &mut self, . len: usize, . additional: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { . // This is ensured by the calling contexts. . debug_assert!(additional > 0); . 30 ( 0.00%) if elem_layout.size() == 0 { . // Since we return a capacity of `usize::MAX` when `elem_size` is . // 0, getting to here necessarily means the `RawVec` is overfull. . return Err(CapacityOverflow.into()); . } . . // Nothing we can really do about these checks, sadly. . let required_cap = len.checked_add(additional).ok_or(CapacityOverflow)?; . . // This guarantees exponential growth. The doubling cannot overflow . // because `cap <= isize::MAX` and the type of `cap` is `usize`. 36 ( 0.00%) let cap = cmp::max(self.cap.as_inner() * 2, required_cap); . let cap = cmp::max(min_non_zero_cap(elem_layout.size()), cap); . . // SAFETY: . // - cap >= len + additional . // - other preconditions passed to caller 73 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 79 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::finish_grow (1x) . . // SAFETY: `finish_grow` would have failed if `cap > isize::MAX` . unsafe { self.set_ptr_and_cap(ptr, cap) }; . Ok(()) . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . /// - `cap` must be greater than the current capacity . // not marked inline(never) since we want optimizers to be able to observe the specifics of this . // function, see tests/codegen-llvm/vec-reserve-extend.rs. . #[cold] 196 ( 0.00%) unsafe fn finish_grow( . &self, . cap: usize, . elem_layout: Layout, . ) -> Result, TryReserveError> { . let new_layout = layout_array(cap, elem_layout)?; . . let memory = if let Some((ptr, old_layout)) = unsafe { self.current_memory(elem_layout) } { . // FIXME(const-hack): switch to `debug_assert_eq` -- line 552 ---------------------------------------- -- line 556 ---------------------------------------- . hint::assert_unchecked(old_layout.align() == new_layout.align()); . self.alloc.grow(ptr, old_layout, new_layout) . } . } else { . self.alloc.allocate(new_layout) . }; . . memory.map_err(const |_| AllocError { layout: new_layout, non_exhaustive: () }.into()) 148 ( 0.00%) } . } . . impl RawVecInner { . #[inline] . const fn new_in(alloc: A, align: Alignment) -> Self { . let ptr = Unique::from_non_null(NonNull::without_provenance(align.as_nonzero_usize())); . // `cap: 0` means "unallocated". zero-sized types are ignored. . Self { ptr, cap: ZERO_CAP, alloc } -- line 572 ---------------------------------------- -- line 603 ---------------------------------------- . . #[inline] . const fn ptr(&self) -> *mut T { . self.non_null::().as_ptr() . } . . #[inline] . const fn non_null(&self) -> NonNull { 141,665 ( 0.01%) self.ptr.cast().as_non_null_ptr() . } . . #[inline] . const fn capacity(&self, elem_size: usize) -> usize { 76 ( 0.00%) if elem_size == 0 { usize::MAX } else { self.cap.as_inner() } . } . . #[inline] . const fn allocator(&self) -> &A { . &self.alloc . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . #[inline] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe fn current_memory(&self, elem_layout: Layout) -> Option<(NonNull, Layout)> { 200,236 ( 0.01%) if elem_layout.size() == 0 || self.cap.as_inner() == 0 { . None . } else { . // We could use Layout::array here which ensures the absence of isize and usize overflows . // and could hypothetically handle differences between stride and size, but this memory . // has already been allocated so we know it can't overflow and currently Rust does not . // support such types. So we can do better by skipping some checks and avoid an unwrap. . unsafe { . let alloc_size = elem_layout.size().unchecked_mul(self.cap.as_inner()); -- line 639 ---------------------------------------- -- line 650 ---------------------------------------- . #[cfg(not(no_global_oom_handling))] . #[inline] . unsafe fn reserve(&mut self, len: usize, additional: usize, elem_layout: Layout) { . // Callers expect this function to be very cheap when there is already sufficient capacity. . // Therefore, we move all the resizing and error-handling logic from grow_amortized and . // handle_reserve behind a call, while making sure that this function is likely to be . // inlined as just a comparison and a call if the comparison fails. . #[cold] 63 ( 0.00%) unsafe fn do_reserve_and_handle( . slf: &mut RawVecInner, . len: usize, . additional: usize, . elem_layout: Layout, . ) { . // SAFETY: Precondition passed to caller . if let Err(err) = unsafe { slf.grow_amortized(len, additional, elem_layout) } { . handle_error(err); . } 64 ( 0.00%) } . 50 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . unsafe { 79 ( 0.00%) do_reserve_and_handle(self, len, additional, elem_layout); 139 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:>::reserve::do_reserve_and_handle:: (1x) . } . } . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment -- line 680 ---------------------------------------- -- line 756 ---------------------------------------- . cap: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { . unsafe { self.shrink(cap, elem_layout) } . } . . #[inline] . const fn needs_to_grow(&self, len: usize, additional: usize, elem_layout: Layout) -> bool { 590 ( 0.00%) additional > self.capacity(elem_layout.size()).wrapping_sub(len) . } . . #[inline] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe fn set_ptr_and_cap(&mut self, ptr: NonNull<[u8]>, cap: usize) { . // Allocators currently return a `NonNull<[u8]>` whose length matches . // the size requested. If that ever changes, the capacity here should . // change to `ptr.len() / size_of::()`. 22 ( 0.00%) self.ptr = Unique::from(ptr.cast()); 20 ( 0.00%) self.cap = unsafe { Cap::new_unchecked(cap) }; . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . /// - The sum of `len` and `additional` must be greater than the current capacity . unsafe fn grow_exact( -- line 782 ---------------------------------------- -- line 789 ---------------------------------------- . // Since we return a capacity of `usize::MAX` when the type size is . // 0, getting to here necessarily means the `RawVec` is overfull. . return Err(CapacityOverflow.into()); . } . . let cap = len.checked_add(additional).ok_or(CapacityOverflow)?; . . // SAFETY: preconditions passed to caller 34 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 492 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::finish_grow (2x) . . // SAFETY: `finish_grow` would have failed if `cap > isize::MAX` . unsafe { self.set_ptr_and_cap(ptr, cap) }; . Ok(()) . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to -- line 805 ---------------------------------------- -- line 824 ---------------------------------------- . /// # Safety . /// `cap <= self.capacity()` . unsafe fn shrink_unchecked( . &mut self, . cap: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { . // SAFETY: Precondition passed to caller 1 ( 0.00%) let Some((ptr, layout)) = (unsafe { self.current_memory(elem_layout) }) else { . return Ok(()); . }; . . // If shrinking to 0, deallocate the buffer. We don't reach this point . // for the T::IS_ZST case since current_memory() will have returned . // None. 2 ( 0.00%) if cap == 0 { . unsafe { self.alloc.deallocate(ptr, layout) }; . self.ptr = . unsafe { Unique::new_unchecked(ptr::without_provenance_mut(elem_layout.align())) }; . self.cap = ZERO_CAP; . } else { . let ptr = unsafe { . // Layout cannot overflow here because it would have . // overflowed earlier when capacity was larger. -- line 847 ---------------------------------------- 600,441 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 . } . . /// Returns the first index matching the byte `x` in `text`. . #[inline] . #[must_use] . pub const fn memchr(x: u8, text: &[u8]) -> Option { . // Fast path for small slices. 20,104 ( 0.00%) if text.len() < 2 * USIZE_BYTES { . return memchr_naive(x, text); . } . 82 ( 0.00%) memchr_aligned(x, text) 106 ( 0.00%) => ???:core::slice::memchr::memchr_aligned (1x) . } . . #[inline] . const fn memchr_naive(x: u8, text: &[u8]) -> Option { . let mut i = 0; . . // FIXME(const-hack): Replace with `text.iter().pos(|c| *c == x)`. 100,702 ( 0.00%) while i < text.len() { 80,664 ( 0.00%) if text[i] == x { . return Some(i); . } . 40,326 ( 0.00%) i += 1; . } . . None . } . . #[rustc_allow_const_fn_unstable(const_eval_select)] // fallback impl has same behavior . const fn memchr_aligned(x: u8, text: &[u8]) -> Option { . // The runtime version behaves the same as the compiletime version, it's -- line 52 ---------------------------------------- 50,132 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . /// be moved. . possible_borrowers: Vec<(LocalDefId, PossibleBorrowerMap<'tcx, 'tcx>)>, . . // `IntoIterator` for arrays requires Rust 1.53. . msrv: Msrv, . } . impl NeedlessBorrowsForGenericArgs<'_> { . pub fn new(conf: &'static Conf) -> Self { 4 ( 0.00%) Self { . possible_borrowers: Vec::new(), . msrv: conf.msrv.into(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessBorrowsForGenericArgs<'tcx> { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if matches!(expr.kind, ExprKind::AddrOf(..)) . && !expr.span.from_expansion() . && let use_site = get_expr_use_site(cx.tcx, cx.typeck_results(), SyntaxContext::root(), expr) . && use_site.same_ctxt . && !use_site.is_ty_unified . && let use_node = use_site.use_node(cx) . && let Some(DefinedTy::Mir { def_site_def_id: _, ty }) = use_node.defined_ty(cx) . && let ty::Param(param_ty) = *ty.skip_binder().kind() . && let Some((hir_id, fn_id, i)) = match use_node { -- line 92 ---------------------------------------- -- line 128 ---------------------------------------- . |diag| { . let mut app = Applicability::MachineApplicable; . let snip_span = peel_n_hir_expr_refs(expr, count).0.span; . let snip = snippet_with_context(cx, snip_span, expr.span.ctxt(), "..", &mut app).0; . diag.span_suggestion(expr.span, "change this to", snip.into_owned(), app); . }, . ); . } 239,736 ( 0.01%) } . 69,923 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'_>) { . if self . .possible_borrowers . .last() . .is_some_and(|&(local_def_id, _)| local_def_id == cx.tcx.hir_body_owner_def_id(body.id())) . { . self.possible_borrowers.pop(); . } 79,912 ( 0.00%) } . } . . fn path_has_args(p: &QPath<'_>) -> bool { . match *p { . QPath::Resolved(_, Path { segments: [.., s], .. }) | QPath::TypeRelative(_, s) => s.args.is_some(), . QPath::Resolved(..) => false, . } . } -- line 154 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_option_as_slice.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . . impl ManualOptionAsSlice { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualOptionAsSlice { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 149,835 ( 0.01%) let span = expr.span; . if span.from_expansion() { . return; . } 209,769 ( 0.01%) match expr.kind { . ExprKind::Match(scrutinee, [arm1, arm2], _) . if is_none_pattern(cx, arm2.pat) && check_arms(cx, arm2, arm1) . || is_none_pattern(cx, arm1.pat) && check_arms(cx, arm1, arm2) => . { . check_as_ref(cx, scrutinee, span, self.msrv); . }, . ExprKind::If(cond, then, Some(other)) => { . if let ExprKind::Let(let_expr) = cond.kind -- line 69 ---------------------------------------- -- line 92 ---------------------------------------- . }, . sym::map_or_else if returns_empty_slice(cx, or_else) && is_slice_from_ref(cx, map) => { . check_as_ref(cx, callee, span, self.msrv); . }, . _ => {}, . }, . _ => {}, . } 239,736 ( 0.01%) } . } . . fn check_map(cx: &LateContext<'_>, map: &Expr<'_>, span: Span, msrv: Msrv) { . if let ExprKind::MethodCall(seg, callee, [mapping], _) = map.kind . && seg.ident.name == sym::map . && is_slice_from_ref(cx, mapping) . { . check_as_ref(cx, callee, span, msrv); -- line 108 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; . use rustc_span::sym; . . use super::SWAP_WITH_TEMPORARY; . . const MSG_TEMPORARY: &str = "this expression returns a temporary value"; . const MSG_TEMPORARY_REFMUT: &str = "this is a mutable reference to a temporary value"; . 69,916 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'_>, args: &'tcx [Expr<'_>]) { 39,952 ( 0.00%) if let ExprKind::Path(QPath::Resolved(_, func_path)) = func.kind . && let Some(func_def_id) = func_path.res.opt_def_id() . && cx.tcx.is_diagnostic_item(sym::mem_swap, func_def_id) . { . match (ArgKind::new(cx, &args[0]), ArgKind::new(cx, &args[1])) { . (ArgKind::RefMutToTemp(left_temp), ArgKind::RefMutToTemp(right_temp)) => { . emit_lint_useless(cx, expr, &args[0], &args[1], left_temp, right_temp); . }, . (ArgKind::RefMutToTemp(left_temp), right) => emit_lint_assign(cx, expr, &right, &args[0], left_temp), . (left, ArgKind::RefMutToTemp(right_temp)) => emit_lint_assign(cx, expr, &left, &args[1], right_temp), . _ => {}, . } . } 79,904 ( 0.00%) } . . enum ArgKind<'tcx> { . // Mutable reference to a place, coming from a macro, and number of dereferences to use . RefMutToPlaceAsMacro(&'tcx Expr<'tcx>, usize), . // Place behind a mutable reference, and number of dereferences to use . RefMutToPlace(&'tcx Expr<'tcx>, usize), . // Temporary value behind a mutable reference . RefMutToTemp(&'tcx Expr<'tcx>), -- line 37 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs -------------------------------------------------------------------------------- Ir -- line 506 ---------------------------------------- . . impl Attributes { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Attributes { 45 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 25 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 220 ( 0.00%) => ???:::hir_attrs (5x) 10 ( 0.00%) if let ItemKind::Fn { ident, body, .. } = item.kind { . inline_always::check(cx, item.span, ident.name, attrs, Some(body)); . } 5 ( 0.00%) repr_attributes::check(cx, item.span, attrs, self.msrv); 35 ( 0.00%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 19,981 ( 0.00%) if let ImplItemKind::Fn(_, body) = item.kind { 7 ( 0.00%) inline_always::check( 23 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (1x) . cx, 1 ( 0.00%) item.span, 1 ( 0.00%) item.ident.name, 4 ( 0.00%) cx.tcx.hir_attrs(item.hir_id()), 42 ( 0.00%) => ???:::hir_attrs (1x) . Some(body), . ); . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { . if let TraitItemKind::Fn(_, kind) = item.kind { . let body = match kind { -- line 536 ---------------------------------------- -- line 543 ---------------------------------------- . } . . pub struct EarlyAttributes { . msrv: MsrvStack, . } . . impl EarlyAttributes { . pub fn new(conf: &'static Conf) -> Self { 1 ( 0.00%) Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for EarlyAttributes { . fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { . deprecated_cfg_attr::check(cx, attr, &self.msrv); . deprecated_cfg_attr::check_clippy(cx, attr); . non_minimal_cfg::check(cx, attr); -- line 559 ---------------------------------------- -- line 563 ---------------------------------------- . } . . pub struct PostExpansionEarlyAttributes { . msrv: MsrvStack, . } . . impl PostExpansionEarlyAttributes { . pub fn new(conf: &'static Conf) -> Self { 1 ( 0.00%) Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for PostExpansionEarlyAttributes { . fn check_crate(&mut self, cx: &EarlyContext<'_>, _krate: &ast::Crate) { . blanket_clippy_restriction_lints::check_command_line(cx); . } . 10 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 3 ( 0.00%) check_clippy_attr(cx.sess(), attr); 89 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::check_clippy_attr:: (1x) 5 ( 0.00%) if let Some(items) = &attr.meta_item_list() 7 ( 0.00%) => ???:::meta_item_list (1x) . && let Some(name) = attr.name() . { . if matches!(name, sym::allow) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { . allow_attributes::check(cx, attr); . } . if matches!(name, sym::allow | sym::expect) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { . allow_attributes_without_reason::check(cx, name, items, attr); . } -- line 590 ---------------------------------------- -- line 603 ---------------------------------------- . } . } . } . . if attr.has_name(sym::should_panic) { . should_panic_without_expect::check(cx, attr); . } . 1 ( 0.00%) if attr.has_name(sym::ignore) . && let AttrKind::Normal(normal_attr) = &attr.kind . && !matches!(normal_attr.item.args, AttrArgs::Eq { .. }) . { . span_lint_and_help( . cx, . IGNORE_WITHOUT_REASON, . attr.span, . "`#[ignore]` without reason", . None, . "add a reason with `= \"..\"`", . ); . } 8 ( 0.00%) } . . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &'_ ast::Item) { 15 ( 0.00%) match item.kind { 6 ( 0.00%) ast::ItemKind::ExternCrate(..) | ast::ItemKind::Use(..) => useless_attribute::check(cx, item, &item.attrs), 103 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs:clippy_lints::attrs::useless_attribute::check (2x) . _ => {}, . } . 25 ( 0.00%) mixed_attributes_style::check(cx, item.span, &item.attrs); 875 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:clippy_lints::attrs::mixed_attributes_style::check (5x) . } . 399,650 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[Attribute]) { 119,895 ( 0.00%) self.msrv.check_attributes(attrs); 119,930 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes (39,965x) . duplicated_attributes::check(cx, attrs); 79,930 ( 0.00%) msrvs::check_attrs(cx.sess(), attrs); 719,398 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:clippy_utils::msrvs::check_attrs:: (39,965x) 319,720 ( 0.01%) } . . fn check_attributes_post(&mut self, _cx: &EarlyContext<'_>, attrs: &[Attribute]) { 159,860 ( 0.01%) self.msrv.check_attributes_post(attrs); 119,930 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post (39,965x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs -------------------------------------------------------------------------------- Ir -- line 88 ---------------------------------------- . &'tcx hir::Expr<'tcx>, . &'tcx hir::FnDecl<'tcx>, . ty::Asyncness, . &'tcx [Param<'tcx>], . CaptureBy, . )> { . let mut data = None; . 19,976 ( 0.00%) while let ExprKind::Closure(closure) = expr.kind . && let body = cx.tcx.hir_body(closure.body) . && !contains_early_return(body.value) . && steps > 0 . { . let mut unwrapped_body_value = body.value; . let mut asyncness = ty::Asyncness::No; . let mut capture_clause = closure.capture_clause; . -- line 104 ---------------------------------------- -- line 147 ---------------------------------------- . /// ^^ this is the call expression we were given . /// ^^ this is what we want to return (and the depth is 3) . /// ``` . fn get_parent_call_exprs<'tcx>( . cx: &LateContext<'tcx>, . mut expr: &'tcx hir::Expr<'tcx>, . ) -> (&'tcx hir::Expr<'tcx>, usize) { . let mut depth = 1; 49,940 ( 0.00%) while let Some(parent) = get_parent_expr(cx, expr) 1,071,412 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (9,988x) . && let ExprKind::Call(recv, _) = parent.kind . && expr.span == recv.span . { . expr = parent; . depth += 1; . } . (expr, depth) . } . . impl<'tcx> LateLintPass<'tcx> for RedundantClosureCall { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 179,802 ( 0.01%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 9,988 ( 0.00%) if let ExprKind::Call(recv, _) = expr.kind . // don't lint if the receiver is a call, too. . // we do this in order to prevent linting multiple times; consider: . // `(|| || 1)()()` . // ^^ we only want to lint for this call (but we walk up the calls to consider both calls). . // without this check, we'd end up linting twice. 19,976 ( 0.00%) && !matches!(recv.kind, ExprKind::Call(..)) . // Check if `recv` comes from a macro expansion. If it does, make sure that it's an expansion that is . // the same as the one the call is in. . // For instance, let's assume `x!()` returns a closure: . // B ---v . // x!()() . // ^- A . // The call happens in the expansion `A`, while the closure originates from the expansion `B`. . // We don't want to suggest replacing `x!()()` with `x!()`. 19,976 ( 0.00%) && recv.span.ctxt().outer_expn() == expr.span.ctxt().outer_expn() . && let (full_expr, call_depth) = get_parent_call_exprs(cx, expr) . && let Some((mut body, fn_decl, coroutine_kind, params, capture_clause)) = . find_innermost_closure(cx, recv, call_depth) . // outside macros we lint properly. Inside macros, we lint only ||() style closures. . && (!matches!(expr.span.ctxt().outer_expn_data().kind, ExpnKind::Macro(_, _)) || params.is_empty()) . { . span_lint_and_then( . cx, -- line 194 ---------------------------------------- -- line 229 ---------------------------------------- . .maybe_paren(); . } . . diag.span_suggestion(full_expr.span, "try doing something like", hint, applicability); . } . }, . ); . } 239,736 ( 0.01%) } . 7 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx hir::Block<'_>) { . fn count_closure_usage<'tcx>( . cx: &LateContext<'tcx>, . block: &'tcx hir::Block<'_>, . path: &'tcx hir::Path<'tcx>, . ) -> usize { . struct ClosureUsageCount<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . path: &'tcx hir::Path<'tcx>, -- line 247 ---------------------------------------- -- line 265 ---------------------------------------- . self.cx.tcx . } . } . let mut closure_usage_count = ClosureUsageCount { cx, path, count: 0 }; . closure_usage_count.visit_block(block); . closure_usage_count.count . } . 1 ( 0.00%) for w in block.stmts.windows(2) { . if let hir::StmtKind::Let(local) = w[0].kind . && let Some(t) = local.init . && let ExprKind::Closure { .. } = t.kind . && let hir::PatKind::Binding(_, _, ident, _) = local.pat.kind . && let hir::StmtKind::Semi(second) = w[1].kind . && let ExprKind::Assign(_, call, _) = second.kind . && let ExprKind::Call(closure, _) = call.kind . && let ExprKind::Path(hir::QPath::Resolved(_, path)) = closure.kind -- line 281 ---------------------------------------- -- line 286 ---------------------------------------- . cx, . REDUNDANT_CLOSURE_CALL, . second.hir_id, . second.span, . "closure called just once immediately after it was declared", . ); . } . } 8 ( 0.00%) } . } 49,940 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/source.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . #[inline] . fn source_map(self) -> &'sm SourceMap { . ::rustc_lint::LintContext::sess(self).source_map() . } . } . impl<'sm> HasSourceMap<'sm> for &LateContext<'sm> { . #[inline] . fn source_map(self) -> &'sm SourceMap { 1 ( 0.00%) self.tcx.sess.source_map() . } . } . . /// Conversion of a value into the range portion of a `Span`. . pub trait SpanRange: Sized { . fn into_range(self) -> Range; . } . impl SpanRange for Span { 49,945 ( 0.00%) fn into_range(self) -> Range { . let data = self.data(); 19,978 ( 0.00%) data.lo..data.hi 19,978 ( 0.00%) } . } . impl SpanRange for SpanData { . fn into_range(self) -> Range { . self.lo..self.hi . } . } . impl SpanRange for Range { . fn into_range(self) -> Range { -- line 74 ---------------------------------------- -- line 105 ---------------------------------------- . Span::new(self.start, self.end, ctxt, None) . } . } . . pub trait SpanExt: SpanRange { . /// Attempts to get a handle to the source text. Returns `None` if either the span is malformed, . /// or the source text is not accessible. . fn get_text<'sm>(self, sm: impl HasSourceMap<'sm>) -> Option { 59,928 ( 0.00%) get_source_range(sm.source_map(), self.into_range()).and_then(SourceText::new) 3,026,364 ( 0.11%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range (9,988x) 169,796 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (9,988x) . } . . /// Gets the source file, and range in the file, of the given span. Returns `None` if the span . /// extends through multiple files, or is malformed. . fn get_source_range<'sm>(self, sm: impl HasSourceMap<'sm>) -> Option { . get_source_range(sm.source_map(), self.into_range()) . } . . /// Calls the given function with the source text referenced and returns the value. Returns . /// `None` if the source text cannot be retrieved. . fn with_source_text<'sm, T>(self, sm: impl HasSourceMap<'sm>, f: impl for<'a> FnOnce(&'a str) -> T) -> Option { 2 ( 0.00%) with_source_text(sm.source_map(), self.into_range(), f) 17 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (1x) . } . . /// Checks if the referenced source text satisfies the given predicate. Returns `false` if the . /// source text cannot be retrieved. . fn check_text<'sm>(self, sm: impl HasSourceMap<'sm>, pred: impl for<'a> FnOnce(&'a str) -> bool) -> bool { . self.with_source_text(sm, pred).unwrap_or(false) . } . -- line 133 ---------------------------------------- -- line 177 ---------------------------------------- . } . } . impl SpanExt for T {} . . /// Handle to a range of text in a source file. . pub struct SourceText(SourceFileRange); . impl SourceText { . /// Takes ownership of the source file handle if the source text is accessible. 9,988 ( 0.00%) pub fn new(text: SourceFileRange) -> Option { . if text.as_str().is_some() { 39,952 ( 0.00%) Some(Self(text)) . } else { . None . } 9,988 ( 0.00%) } . . /// Gets the source text. . pub fn as_str(&self) -> &str { . self.0.as_str().unwrap() . } . . /// Converts this into an owned string. . pub fn to_owned(&self) -> String { . self.as_str().to_owned() . } . } . impl Deref for SourceText { . type Target = str; . fn deref(&self) -> &Self::Target { . self.as_str() 9,988 ( 0.00%) } . } . impl AsRef for SourceText { . fn as_ref(&self) -> &str { . self.as_str() . } . } . impl Index for SourceText . where -- line 215 ---------------------------------------- -- line 226 ---------------------------------------- . } . } . impl fmt::Debug for SourceText { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . self.as_str().fmt(f) . } . } . 99,890 ( 0.00%) fn get_source_range(sm: &SourceMap, sp: Range) -> Option { 79,912 ( 0.00%) let start = sm.lookup_byte_offset(sp.start); 1,138,756 ( 0.04%) => ???:::lookup_byte_offset (9,989x) 49,945 ( 0.00%) let end = sm.lookup_byte_offset(sp.end); 1,138,756 ( 0.04%) => ???:::lookup_byte_offset (9,989x) 29,967 ( 0.00%) if !Arc::ptr_eq(&start.sf, &end.sf) || start.pos > end.pos { . return None; . } 29,967 ( 0.00%) sm.ensure_source_file_source_present(&start.sf); 229,747 ( 0.01%) => ???:::ensure_source_file_source_present (9,989x) . let range = start.pos.to_usize()..end.pos.to_usize(); 39,956 ( 0.00%) Some(SourceFileRange { sf: start.sf, range }) 89,901 ( 0.00%) } . . fn with_source_text(sm: &SourceMap, sp: Range, f: impl for<'a> FnOnce(&'a str) -> T) -> Option { 10 ( 0.00%) if let Some(src) = get_source_range(sm, sp) 323 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range (1x) 4 ( 0.00%) && let Some(src) = src.as_str() 28 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::as_str (1x) . { . Some(f(src)) . } else { . None . } . } . . fn with_source_text_and_range( -- line 255 ---------------------------------------- -- line 355 ---------------------------------------- . } . impl SourceFileRange { . /// Attempts to get the text from the source file. This can fail if the source text isn't . /// loaded. . pub fn as_str(&self) -> Option<&str> { . (self.sf.src.as_ref().map(|src| src.as_str())) . .or_else(|| self.sf.external_src.get()?.get_source()) . .and_then(|x| x.get(self.range.clone())) 1 ( 0.00%) } . } . . /// Like [`snippet_block`], but add braces if the expr is not an `ExprKind::Block` with no label. . pub fn expr_block<'sm>( . sm: impl HasSourceMap<'sm>, . expr: &Expr<'_>, . outer: SyntaxContext, . default: &str, -- line 371 ---------------------------------------- -- line 583 ---------------------------------------- . *applicability = Applicability::HasPlaceholders; . } . Cow::Borrowed(default) . } . } . . /// Converts a span to a code snippet. Returns `None` if not available. . pub fn snippet_opt<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> Option { 19,976 ( 0.00%) sm.source_map().span_to_snippet(span).ok() 3,493,652 ( 0.12%) => ???:::span_to_snippet (9,988x) . } . . /// Converts a span (from a block) to a code snippet if available, otherwise use default. . /// . /// This trims the code of indentation, except for the first line. Use it for blocks or block-like . /// things which need to be printed as such. . /// . /// The `indent_relative_to` arg can be used, to provide a span, where the indentation of the -- line 599 ---------------------------------------- 39,957 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs -------------------------------------------------------------------------------- Ir -- line 64 ---------------------------------------- . _ => return None, . }; . return Some((dir, l, r)); . } . None . } . . impl LateLintPass<'_> for ManualRotate { 209,769 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind . && let BinOpKind::Add | BinOpKind::BitOr = op.node . && let Some((l_shift_dir, l_expr, l_amount)) = parse_shift(l) . && let Some((r_shift_dir, r_expr, r_amount)) = parse_shift(r) . && l_shift_dir != r_shift_dir . && let ctxt = expr.span.ctxt() . && clippy_utils::eq_expr_value(cx, ctxt, l_expr, r_expr) . && let Some(bit_width) = match cx.typeck_results().expr_ty(expr).kind() { . ty::Int(itype) => itype.bit_width(), -- line 81 ---------------------------------------- -- line 130 ---------------------------------------- . expr.span, . "this expression can be rewritten as", . format!("{expr_sugg}.{shift_function}({amount})"), . applicability, . ); . }, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_field_names.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . impl RedundantFieldNames { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for RedundantFieldNames { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Struct(ref se) = expr.kind 4 ( 0.00%) && self.msrv.meets(msrvs::FIELD_INIT_SHORTHAND) 8 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1x) . { 1 ( 0.00%) for field in &se.fields { 2 ( 0.00%) if !field.is_shorthand . && let ExprKind::Path(None, path) = &field.expr.kind . && let [segment] = path.segments.as_slice() . && segment.args.is_none() . && segment.ident == field.ident . && field.span.eq_ctxt(field.ident.span) . && !field.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( -- line 64 ---------------------------------------- -- line 68 ---------------------------------------- . "redundant field names in struct initialization", . "replace it with", . field.ident.to_string(), . Applicability::MachineApplicable, . ); . } . } . } 29,966 ( 0.00%) } . . extract_msrv_attr!(); . } 16 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/format_args_collector.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . pub struct FormatArgsCollector { . format_args: FxHashMap, . parent_spans: Vec, . storage: FormatArgsStorage, . } . . impl FormatArgsCollector { . pub fn new(storage: FormatArgsStorage) -> Self { 8 ( 0.00%) Self { . format_args: FxHashMap::default(), . parent_spans: Vec::new(), . storage, . } . } . } . . impl_lint_pass!(FormatArgsCollector => []); . . impl EarlyLintPass for FormatArgsCollector { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::FormatArgs(args) = &expr.kind { . if self.has_span_from_external_macro(cx.sess().source_map(), expr.span, args) { . return; . } . . self.format_args.insert(expr.span.with_parent(None), (**args).clone()); . } 239,728 ( 0.01%) } . . fn check_crate_post(&mut self, _: &EarlyContext<'_>, _: &Crate) { 2 ( 0.00%) self.storage.set(mem::take(&mut self.format_args)); 110 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::set (1x) . } . } . . impl FormatArgsCollector { . /// Detects if the format string or an argument has its span set by a proc macro to something . /// inside a macro callsite, e.g. . /// . /// ```ignore -- line 51 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{self as hir, AmbigArg, GenericParamKind, TyKind}; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::TYPE_COMPLEXITY; . . pub(super) fn check(cx: &LateContext<'_>, ty: &hir::Ty<'_>, type_complexity_threshold: u64) -> bool { . let score = { 19,982 ( 0.00%) let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 }; . visitor.visit_ty_unambig(ty); 9,991 ( 0.00%) visitor.score . }; . 19,982 ( 0.00%) if score > type_complexity_threshold { . span_lint( . cx, . TYPE_COMPLEXITY, . ty.span, . "very complex type used. Consider factoring parts into `type` definitions", . ); . true . } else { -- line 25 ---------------------------------------- -- line 36 ---------------------------------------- . } . . impl<'tcx> Visitor<'tcx> for TypeComplexityVisitor { . fn visit_infer(&mut self, inf_id: hir::HirId, _inf_span: Span, _kind: InferKind<'tcx>) -> Self::Result { . self.score += 1; . self.visit_id(inf_id); . } . 39,964 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx hir::Ty<'_, AmbigArg>) { 89,919 ( 0.00%) let (add_score, sub_nest) = match ty.kind { . // &x and *x have only small overhead; don't mess with nesting level . TyKind::Ptr(..) | TyKind::Ref(..) => (1, 0), . . // the "normal" components of a type: named types, arrays/tuples 29,973 ( 0.00%) TyKind::Path(..) | TyKind::Slice(..) | TyKind::Tup(..) | TyKind::Array(..) => (10 * self.nest, 1), . . // function types bring a lot of overhead . TyKind::FnPtr(fn_ptr) if fn_ptr.abi == ExternAbi::Rust => (50 * self.nest, 1), . . TyKind::TraitObject(param_bounds, _) => { . let has_lifetime_parameters = param_bounds.iter().any(|bound| { . bound . .bound_generic_params -- line 58 ---------------------------------------- -- line 65 ---------------------------------------- . } else { . // simple trait bounds like A + B . (20 * self.nest, 0) . } . }, . . _ => (0, 0), . }; 9,991 ( 0.00%) self.score += add_score; 9,991 ( 0.00%) self.nest += sub_nest; 19,982 ( 0.00%) walk_ty(self, ty); 639,424 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (9,991x) 9,991 ( 0.00%) self.nest -= sub_nest; 39,964 ( 0.00%) } . } 29,973 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::def_id::DefId; . use rustc_hir::{BinOpKind, Expr, ExprKind, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::SyntaxContext; . . use super::{FLOAT_CMP, FLOAT_CMP_CONST}; . 269,703 ( 0.01%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . if let Some(macro_call) = . first_node_macro_backtrace(cx, e).find(|macro_call| is_assert_eq_diag(cx, macro_call.def_id)) . && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) . && is_float(cx, lhs) . { . let ecx = ConstEvalCtxt::new(cx); . let ctxt = macro_call.span.ctxt(); . -- line 23 ---------------------------------------- -- line 30 ---------------------------------------- . let msg = if is_comparing_arrays { . "strict comparison of `f32` or `f64` constant arrays" . } else { . "strict comparison of `f32` or `f64` constant" . }; . . clippy_utils::diagnostics::span_lint(cx, FLOAT_CMP_CONST, macro_call.span, msg); . } 239,736 ( 0.01%) } . . fn is_float_const(ecx: &ConstEvalCtxt<'_>, expr: &Expr<'_>, ctxt: SyntaxContext) -> bool { . match ecx.eval_with_source(expr, ctxt) { . Some((c, s)) if !is_allowed(&c) => !s.is_local(), . _ => false, . } . } . -- line 46 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use rustc_errors::Applicability; . use rustc_lint::EarlyContext; . use rustc_span::Span; . . use super::{SEPARATED_LITERAL_SUFFIX, UNSEPARATED_LITERAL_SUFFIX}; . 119,856 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, lit_span: Span, lit_snip: &str, suffix: &str, sugg_type: &str) { 19,976 ( 0.00%) let Some(maybe_last_sep_idx) = lit_snip.len().checked_sub(suffix.len() + 1) else { . return; // It's useless so shouldn't lint. . }; . // Do not lint when literal is unsuffixed. 19,976 ( 0.00%) if !suffix.is_empty() { 39,952 ( 0.00%) if lit_snip.as_bytes()[maybe_last_sep_idx] == b'_' { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . SEPARATED_LITERAL_SUFFIX, . lit_span, . format!("{sugg_type} type suffix should not be separated by an underscore"), . |diag| { . diag.span_suggestion( -- line 22 ---------------------------------------- -- line 24 ---------------------------------------- . "remove the underscore", . format!("{}{suffix}", &lit_snip[..maybe_last_sep_idx]), . Applicability::MachineApplicable, . ); . }, . ); . } else { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 19,976 ( 0.00%) span_lint_and_then( . cx, . UNSEPARATED_LITERAL_SUFFIX, . lit_span, 29,964 ( 0.00%) format!("{sugg_type} type suffix should be separated by an underscore"), . |diag| { . diag.span_suggestion( . lit_span, . "add an underscore", . format!("{}_{suffix}", &lit_snip[..=maybe_last_sep_idx]), . Applicability::MachineApplicable, . ); . }, . ); . } . } 79,904 ( 0.00%) } 49,940 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/author.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . } else { . println!(" && {}", format_args!($($t)*)); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Author { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 10 ( 0.00%) check_item(cx, item.hir_id()); 575 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (5x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 19,978 ( 0.00%) check_item(cx, item.hir_id()); 2,272,874 ( 0.08%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (9,989x) . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { . check_item(cx, item.hir_id()); . } . . fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) { . check_node(cx, arm.hir_id, |v| { . v.arm(&v.bind("arm", arm)); . }); . } . 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 59,934 ( 0.00%) check_node(cx, expr.hir_id, |v| { . v.expr(&v.bind("expr", expr)); . }); 239,736 ( 0.01%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { . match stmt.kind { . StmtKind::Expr(e) | StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } . check_node(cx, stmt.hir_id, |v| { . v.stmt(&v.bind("stmt", stmt)); . }); . } . } . 89,946 ( 0.00%) fn check_item(cx: &LateContext<'_>, hir_id: HirId) { 49,970 ( 0.00%) if let Some(body) = cx.tcx.hir_maybe_body_owned_by(hir_id.expect_owner().def_id) { 1,522,820 ( 0.05%) => ???:::hir_maybe_body_owned_by (9,994x) . check_node_with_body( . cx, . hir_id, 9,989 ( 0.00%) |v| { . v.expr(&v.bind("expr", body.value)); . }, . Some(body), . ); . } 79,952 ( 0.00%) } . . fn check_node(cx: &LateContext<'_>, hir_id: HirId, f: impl Fn(&PrintVisitor<'_, '_>)) { . check_node_with_body(cx, hir_id, f, None); . } . . /// Check the node at `hir_id`, in the context of `body` or the default from `cx` if none is given. . fn check_node_with_body( . cx: &LateContext<'_>, . hir_id: HirId, . f: impl Fn(&PrintVisitor<'_, '_>), . body: Option<&Body<'_>>, . ) { 29,967 ( 0.00%) if has_attr(cx, hir_id) { . let typeck_results = body.map_or_else(|| cx.typeck_results(), |body| cx.tcx.typeck_body(body.id())); . f(&PrintVisitor::new(cx, typeck_results)); . println!("{{"); . println!(" // report your lint here"); . println!("}}"); . } . } . -- line 170 ---------------------------------------- -- line 875 ---------------------------------------- . kind!("Semi({e})"); . self.expr(e); . }, . } . } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: HirId) -> bool { 69,923 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 1,382,514 ( 0.05%) => ???:::hir_attrs (29,967x) . get_builtin_attr(attrs, sym::author).count() > 0 . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use rustc_errors::Applicability; . use rustc_hir::{Block, BlockCheckMode, Expr, ExprKind, Node, QPath, UnsafeSource}; . use rustc_lint::LateContext; . use rustc_span::sym; . . use super::USELESS_NONZERO_NEW_UNCHECKED; . 69,916 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'tcx>, args: &[Expr<'_>], msrv: Msrv) { 39,952 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, segment)) = func.kind 29,964 ( 0.00%) && segment.ident.name == sym::new_unchecked . && let [init_arg] = args . && is_inside_always_const_context(cx.tcx, expr.hir_id) . && cx.typeck_results().node_type(ty.hir_id).is_diag_item(cx, sym::NonZero) . && msrv.meets(cx, msrvs::CONST_UNWRAP) . { . let mut app = Applicability::MachineApplicable; . let ty_str = snippet_with_applicability(cx, ty.span, "_", &mut app); . let msg = format!("`{ty_str}::new()` and `Option::unwrap()` can be safely used in a `const` context"); -- line 23 ---------------------------------------- -- line 51 ---------------------------------------- . // this may no longer be needed for the fixed expression. . span_lint_and_then(cx, USELESS_NONZERO_NEW_UNCHECKED, expr.span, msg, |diagnostic| { . diagnostic . .span_suggestion(expr.span, "use instead", sugg, app) . .note("the fixed expression does not require an `unsafe` context"); . }); . } . } 79,904 ( 0.00%) } 19,976 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs -------------------------------------------------------------------------------- Ir -- line 1081 ---------------------------------------- . Some(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::AsyncGen, _)) . ) . } . . pub fn features(self) -> &'tcx rustc_feature::Features { . self.features_query(()) . } . 59,946 ( 0.00%) pub fn def_key(self, id: impl IntoQueryKey) -> rustc_hir::definitions::DefKey { . let id = id.into_query_key(); . // Accessing the DefKey is ok, since it is part of DefPathHash. . if let Some(id) = id.as_local() { . self.definitions_untracked().def_key(id) . } else { . self.cstore_untracked().def_key(id) . } 69,937 ( 0.00%) } . . /// Converts a `DefId` into its fully expanded `DefPath` (every . /// `DefId` is really just an interned `DefPath`). . /// . /// Note that if `id` is not local to this crate, the result will . /// be a non-local `DefPath`. . pub fn def_path(self, id: DefId) -> rustc_hir::definitions::DefPath { . // Accessing the DefPath is ok, since it is part of DefPathHash. -- line 1105 ---------------------------------------- -- line 2224 ---------------------------------------- . pub fn mk_ct_from_kind(self, kind: ty::ConstKind<'tcx>) -> Const<'tcx> { . self.interners.intern_const(kind) . } . . // Avoid this in favour of more specific `Ty::new_*` methods, where possible. . #[allow(rustc::usage_of_ty_tykind)] . #[inline] . pub fn mk_ty_from_kind(self, st: TyKind<'tcx>) -> Ty<'tcx> { 6 ( 0.00%) self.interners.intern_ty(st) 322 ( 0.00%) => ???:::intern_ty (2x) . } . . pub fn mk_param_from_def(self, param: &ty::GenericParamDef) -> GenericArg<'tcx> { . match param.kind { . GenericParamDefKind::Lifetime => { . ty::Region::new_early_param(self, param.to_early_bound_region_data()).into() . } . GenericParamDefKind::Type { .. } => Ty::new_param(self, param.index, param.name).into(), -- line 2240 ---------------------------------------- -- line 2436 ---------------------------------------- . T::collect_and_apply(iter, |xs| self.mk_type_list(xs)) . } . . pub fn mk_args_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, ty::GenericArgsRef<'tcx>>, . { 3 ( 0.00%) T::collect_and_apply(iter, |xs| self.mk_args(xs)) 123 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/interner.rs:>>::collect_and_apply::, alloc::vec::into_iter::IntoIter>, >::into>, ::mk_args_from_iter, alloc::vec::into_iter::IntoIter>, >::into>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}> (1x) . } . . pub fn mk_canonical_var_infos_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, &'tcx List>>, . { . T::collect_and_apply(iter, |xs| self.mk_canonical_var_kinds(xs)) -- line 2452 ---------------------------------------- -- line 2500 ---------------------------------------- . #[track_caller] . pub fn emit_node_span_lint( . self, . lint: &'static Lint, . hir_id: HirId, . span: impl Into, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { 3 ( 0.00%) let level_spec = self.lint_level_spec_at_node(lint, hir_id); 393 ( 0.00%) => ???:::lint_level_spec_at_node (1x) 5 ( 0.00%) emit_lint_base(self.sess, lint, level_spec, Some(span.into()), decorator) . } . . /// Find the appropriate span where `use` and outer attributes can be inserted at. . pub fn crate_level_attribute_injection_span(self) -> Span { . let node = self.hir_node(hir::CRATE_HIR_ID); . let hir::Node::Crate(m) = node else { bug!() }; . m.spans.inject_use_span.shrink_to_lo() . } -- line 2517 ---------------------------------------- -- line 2680 ---------------------------------------- . let def_id = def_id.into_query_key(); . match self.def_kind(def_id) { . DefKind::Fn | DefKind::AssocFn => self.intrinsic_raw(def_id), . _ => None, . } . } . . pub fn next_trait_solver_globally(self) -> bool { 2 ( 0.00%) self.sess.opts.unstable_opts.next_solver.globally . } . . pub fn next_trait_solver_in_coherence(self) -> bool { . self.sess.opts.unstable_opts.next_solver.coherence . } . . pub fn disable_trait_solver_fast_paths(self) -> bool { . self.sess.opts.unstable_opts.disable_fast_paths -- line 2696 ---------------------------------------- 19,986 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bit_width.rs -------------------------------------------------------------------------------- Ir -- line 93 ---------------------------------------- . . impl ManualBitWidth { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualBitWidth { 299,670 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 89,901 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 59,934 ( 0.00%) match expr.kind { . // `T::BITS - n.leading_zeros()` . ExprKind::Binary(op, left, right) . if op.node == BinOpKind::Sub . && let ExprKind::MethodCall(leading_zeros, recv, [], _) = right.kind . && leading_zeros.ident.name == sym::leading_zeros . && let ExprKind::Path(QPath::TypeRelative(hir_ty, segment)) = left.kind . && segment.ident.name == sym::BITS . && let right_ty = cx.typeck_results().expr_ty(recv) -- line 114 ---------------------------------------- -- line 124 ---------------------------------------- . emit_manual_bit_width(cx, recv, expr, right_int_kind); . } else { . // mismatched calling types . emit_type_mismatch(cx, recv, expr, right_int_kind); . } . }, . _ => {}, . } 239,736 ( 0.01%) } . } . . fn get_int_kind<'a>(cx: &LateContext<'a>, ty: Ty<'a>) -> Option> { . match ty.kind() { . // int::BITS or uint::BITS . ty::Int(int_ty) => Some(IntKind::Int(*int_ty)), . ty::Uint(uint_ty) => Some(IntKind::Uint(*uint_ty)), . // NonZero::::BITS -- line 140 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::sym; . use rustc_data_structures::smallvec::SmallVec; . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind, QPath, TyKind}; . use rustc_lint::LateContext; . . use super::IP_CONSTANT; . 69,916 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>]) { 49,940 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, p)) = func.kind 39,952 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, func_path)) = ty.kind 9,988 ( 0.00%) && p.ident.name == sym::new . && let Some(func_def_id) = func_path.res.opt_def_id() . && matches!( . cx.tcx.get_diagnostic_name(func_def_id), . Some(sym::Ipv4Addr | sym::Ipv6Addr) . ) . && let ecx = ConstEvalCtxt::new(cx) . && let ctxt = expr.span.ctxt() . && let Some(args) = args -- line 22 ---------------------------------------- -- line 43 ---------------------------------------- . // Remove everything before the type name . sugg.push((before_span, String::new())); . } . . span_lint_and_then(cx, IP_CONSTANT, expr.span, "hand-coded well-known IP address", |diag| { . diag.multipart_suggestion("use", sugg, Applicability::MachineApplicable); . }); . } 79,904 ( 0.00%) } 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/int_plus_one.rs -------------------------------------------------------------------------------- Ir -- line 151 ---------------------------------------- . let rec = sugg::make_binop(new_binop, &new_lhs, &new_rhs); . diag.span_suggestion(expr.span, "change it to", rec, app); . }, . ); . } . } . . impl EarlyLintPass for IntPlusOne { 179,796 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Binary(binop, lhs, rhs) = &expr.kind . && let Ok(le_or_ge) = LeOrGe::try_from(binop.node) . && let Some((new_lhs, new_rhs)) = Self::check_binop(le_or_ge, lhs, rhs) . { . Self::emit_warning(cx, expr, new_lhs, le_or_ge, new_rhs); . } 209,762 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs -------------------------------------------------------------------------------- Ir -- line 147 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for VecInitThenPush { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 1 ( 0.00%) self.searcher = None; . } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { . if let Some(init_expr) = local.init . && let PatKind::Binding(BindingMode::MUT, id, name, None) = local.pat.kind . && !local.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, init_expr) . && !matches!(init, VecInitKind::WithExprCapacity(_)) -- line 163 ---------------------------------------- -- line 171 ---------------------------------------- . err_span: local.span, . found: 0, . last_push_expr: init_expr.hir_id, . }); . } . } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if self.searcher.is_none() . && let ExprKind::Assign(left, right, _) = expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind . && let [name] = &path.segments . && let Res::Local(id) = path.res . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, right) . && !matches!(init, VecInitKind::WithExprCapacity(_)) . { -- line 187 ---------------------------------------- -- line 191 ---------------------------------------- . lhs_is_let: false, . let_ty_span: None, . name: name.ident.name, . err_span: expr.span, . found: 0, . last_push_expr: expr.hir_id, . }); . } 29,967 ( 0.00%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . if let Some(searcher) = self.searcher.take() { . if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind . && !stmt.span.from_expansion() . && let ExprKind::MethodCall(name, self_arg, [_], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::push -- line 207 ---------------------------------------- -- line 214 ---------------------------------------- . }); . } else { . searcher.display_err(cx); . } . } . } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 2 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/float_literal.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . pub fn new(conf: &'static Conf) -> Self { . Self { . const_literal_digits_threshold: conf.const_literal_digits_threshold, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FloatLiteral { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 59,934 ( 0.00%) if let hir::ExprKind::Lit(lit) = expr.kind 19,976 ( 0.00%) && let LitKind::Float(sym, lit_float_ty) = lit.node . && let ty::Float(fty) = *cx.typeck_results().expr_ty(expr).kind() . { . let sym_str = sym.as_str(); . let formatter = FloatFormat::new(sym_str); . // Try to bail out if the float is for sure fine. . // If its within the 2 decimal digits of being out of precision we . // check if the parsed representation is the same as the string . // since we'll need the truncated string anyway. -- line 89 ---------------------------------------- -- line 168 ---------------------------------------- . "consider changing the type or truncating it to", . numeric_literal::format(&float_str, type_suffix, true), . Applicability::MachineApplicable, . ); . }, . ); . } . } 239,736 ( 0.01%) } . } . . #[must_use] . fn max_digits(fty: FloatTy) -> u32 { . match fty { . FloatTy::F16 => f16::DIGITS, . FloatTy::F32 => f32::DIGITS, . FloatTy::F64 => f64::DIGITS, -- line 184 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . impl EarlyLintPass for UnnestedOrPatterns { . fn check_arm(&mut self, cx: &EarlyContext<'_>, a: &ast::Arm) { . if self.msrv.meets(msrvs::OR_PATTERNS) { . lint_unnested_or_patterns(cx, &a.pat); . } . } . . fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { 149,830 ( 0.01%) if self.msrv.meets(msrvs::OR_PATTERNS) 239,728 ( 0.01%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (29,966x) . && let ast::ExprKind::Let(pat, _, _, _) = &e.kind . { . lint_unnested_or_patterns(cx, pat); . } . } . . fn check_param(&mut self, cx: &EarlyContext<'_>, p: &ast::Param) { 4 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 8 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1x) 3 ( 0.00%) lint_unnested_or_patterns(cx, &p.pat); 25 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (1x) . } . } . . fn check_local(&mut self, cx: &EarlyContext<'_>, l: &ast::Local) { . if self.msrv.meets(msrvs::OR_PATTERNS) { . lint_unnested_or_patterns(cx, &l.pat); . } . } . . extract_msrv_attr!(); . } . 5 ( 0.00%) fn lint_unnested_or_patterns(cx: &EarlyContext<'_>, pat: &Pat) { 9 ( 0.00%) if let Ident(.., None) | Expr(_) | Wild | Path(..) | Range(..) | Rest | MacCall(_) = pat.kind { . // This is a leaf pattern, so cloning is unprofitable. . return; . } . . let mut pat = pat.clone(); . . // Nix all the paren patterns everywhere so that they aren't in our way. . remove_all_parens(&mut pat); -- line 102 ---------------------------------------- -- line 110 ---------------------------------------- . insert_necessary_parens(&mut pat); . db.span_suggestion_verbose( . pat.span, . "nest the patterns", . pprust::pat_to_string(&pat), . Applicability::MachineApplicable, . ); . }); 6 ( 0.00%) } . . /// Remove all `(p)` patterns in `pat`. . fn remove_all_parens(pat: &mut Pat) { . #[derive(Default)] . struct Visitor { . /// If is not in the outer most pattern. This is needed to avoid removing the outermost . /// parens because top-level or-patterns are not allowed in let statements. . is_inner: bool, -- line 126 ---------------------------------------- 89,903 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . . #[derive(Default)] . pub struct Default { . // Spans linted by `field_reassign_with_default`. . reassigned_linted: FxHashSet, . } . . impl<'tcx> LateLintPass<'tcx> for Default { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if !expr.span.from_expansion() . // Avoid cases already linted by `field_reassign_with_default` 49,943 ( 0.00%) && !self.reassigned_linted.contains(&expr.span) . && let ExprKind::Call(path, []) = expr.kind . && !in_automatically_derived(cx.tcx, expr.hir_id) . && let ExprKind::Path(ref qpath) = path.kind . && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() . && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) . && !is_update_syntax_base(cx, expr) . // Detect and ignore ::default() because these calls do explicitly name the type. . && let QPath::Resolved(None, _path) = qpath -- line 92 ---------------------------------------- -- line 100 ---------------------------------------- . DEFAULT_TRAIT_ACCESS, . expr.span, . format!("calling `{replacement}` is more clear than this expression"), . "try", . replacement, . Applicability::Unspecified, // First resolve the TODO above . ); . } 239,736 ( 0.01%) } . . #[expect(clippy::too_many_lines)] 9 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &Block<'tcx>) { . // start from the `let mut _ = _::default();` and look at all the following . // statements, see if they re-assign the fields of the binding . let stmts_head = match block.stmts { 4 ( 0.00%) [] | [_] => return, . // Skip the last statement since there cannot possibly be any following statements that re-assign fields. . [head @ .., _] => head, . }; . for (stmt_idx, stmt) in stmts_head.iter().enumerate() { . // find all binding statements like `let mut _ = T::default()` where `T::default()` is the . // `default` method of the `Default` trait, and store statement index in current block being . // checked and the name of the bound variable . let (local, variant, binding_name, binding_type, span) = if let StmtKind::Let(local) = stmt.kind -- line 123 ---------------------------------------- -- line 242 ---------------------------------------- . first_assign.unwrap().span, . "field assignment outside of initializer for an instance created with Default::default()", . Some(local.span), . format!("consider initializing the variable with `{sugg}` and removing relevant reassignments"), . ); . self.reassigned_linted.insert(span); . } . } 8 ( 0.00%) } . } . . /// Returns the reassigned field and the assigning expression (right-hand side of assign). . fn field_reassigned_by_stmt<'tcx>(this: &Stmt<'tcx>, binding_name: Symbol) -> Option<(Ident, &'tcx Expr<'tcx>)> { . if let StmtKind::Semi(later_expr) = this.kind . // only take assignments . && let ExprKind::Assign(assign_lhs, assign_rhs, _) = later_expr.kind . // only take assignments to fields where the left-hand side field is a field of -- line 258 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs -------------------------------------------------------------------------------- Ir -- line 565 ---------------------------------------- . ub_checks::maybe_is_aligned_and_not_null(src, align, zero_size) . && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size) . && ub_checks::maybe_is_nonoverlapping(src, dst, size, count) . } . ); . . // SAFETY: the safety contract for `copy_nonoverlapping` must be . // upheld by the caller. 52,066 ( 0.00%) unsafe { crate::intrinsics::copy_nonoverlapping(src, dst, count) } 12 ( 0.00%) => ???:0x0000000000173dc0 (1x) . } . . /// Copies `count * size_of::()` bytes from `src` to `dst`. The source . /// and destination may overlap. . /// . /// If the source and destination will *never* overlap, . /// [`copy_nonoverlapping`] can be used instead. . /// -- line 581 ---------------------------------------- -- line 727 ---------------------------------------- . check_language_ub, . "ptr::write_bytes requires that the destination pointer is aligned and non-null", . ( . addr: *const () = dst as *const (), . align: usize = align_of::(), . zero_size: bool = T::IS_ZST || count == 0, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, zero_size) . ); 64 ( 0.00%) crate::intrinsics::write_bytes(dst, val, count) 12 ( 0.00%) => ???:0x00000000001747c0 (1x) . } . } . . /// Executes the destructor (if any) of the pointed-to value. . /// . /// This is almost the same as calling [`ptr::read`] and discarding . /// the result, but has the following advantages: . // FIXME: say something more useful than "almost the same"? -- line 743 ---------------------------------------- -- line 834 ---------------------------------------- . // Due to historic reasons, `drop_in_place` takes a pointer rather than a reference, . // which results in worse codegen since we don't apply noalias/dereferenceable llvm . // attributes to pointer arguments. To workaround this without breaking public . // interface, `drop_in_place` calls the lang item, rather than being one directly. . . // SAFETY: . // - compiler glue has the same safety requirements as this function . // - the pointer must be valid as per the safety requirement of this function 7 ( 0.00%) unsafe { drop_glue(&mut *to_drop) } . } . . /// Helper function for `drop_in_place`. The compiler replaces this by the actual drop glue. . #[lang = "drop_glue"] 180,816 ( 0.01%) pub(crate) const unsafe fn drop_glue(_: &mut T) 284 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (2x) . where . T: [const] Destruct, . { . // Code here does not matter - this is replaced by the . // real drop glue by the compiler. . } . . /// Creates a null raw pointer. -- line 855 ---------------------------------------- -- line 1464 ---------------------------------------- . i += 1; . } . } . . // Don't let MIR inline this, because we really want it to keep its noalias metadata . #[rustc_no_mir_inline] . #[inline] . fn swap_chunk(x: &mut MaybeUninit<[u8; N]>, y: &mut MaybeUninit<[u8; N]>) { 21 ( 0.00%) let a = *x; . let b = *y; 65 ( 0.00%) *x = b; . *y = a; . } . . #[inline] . unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, bytes: NonZero) { . // Same as `swap_nonoverlapping::<[u8; N]>`. . unsafe fn swap_nonoverlapping_chunks( . x: *mut MaybeUninit<[u8; N]>, -- line 1482 ---------------------------------------- -- line 1747 ---------------------------------------- . check_language_ub, . "ptr::read requires that the pointer argument is aligned and non-null", . ( . addr: *const () = src as *const (), . align: usize = align_of::(), . is_zst: bool = T::IS_ZST, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, is_zst) . ); 126 ( 0.00%) crate::intrinsics::read_via_copy(src) . } . } . . /// Reads the value from `src` without moving it. This leaves the . /// memory in `src` unchanged. . /// . /// Unlike [`read`], `read_unaligned` works with unaligned pointers. . /// -- line 1763 ---------------------------------------- -- line 1955 ---------------------------------------- . check_language_ub, . "ptr::write requires that the pointer argument is aligned and non-null", . ( . addr: *mut () = dst as *mut (), . align: usize = align_of::(), . is_zst: bool = T::IS_ZST, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, is_zst) . ); 73,779 ( 0.00%) intrinsics::write_via_move(dst, src) 150 ( 0.00%) => ???:0x0000000000173dc0 (5x) . } . } . . /// Overwrites a memory location with the given value without reading or . /// dropping the old value. . /// . /// Unlike [`write()`], the pointer may be unaligned. . /// -- line 1971 ---------------------------------------- -- line 2500 ---------------------------------------- . /// assert!(!std::ptr::eq(&a[0..2], &a[1..3])); . /// ``` . #[stable(feature = "ptr_eq", since = "1.17.0")] . #[inline(always)] . #[must_use = "pointer comparison produces a value"] . #[rustc_diagnostic_item = "ptr_eq"] . #[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here . pub fn eq(a: *const T, b: *const T) -> bool { 9,988 ( 0.00%) a == b . } . . /// Compares the *addresses* of the two pointers for equality, . /// ignoring any metadata in fat pointers. . /// . /// If the arguments are thin pointers of the same type, . /// then this is the same as [`eq`]. . /// -- line 2516 ---------------------------------------- -- line 2524 ---------------------------------------- . /// . /// assert!(ptr::addr_eq(whole, first)); . /// assert!(!ptr::eq::(whole, first)); . /// ``` . #[stable(feature = "ptr_addr_eq", since = "1.76.0")] . #[inline(always)] . #[must_use = "pointer comparison produces a value"] . pub fn addr_eq(p: *const T, q: *const U) -> bool { 39,956 ( 0.00%) (p as *const ()) == (q as *const ()) . } . . /// Compares the *addresses* of the two function pointers for equality. . /// . /// This is the same as `f == g`, but using this function makes clear that the potentially . /// surprising semantics of function pointer comparison are involved. . /// . /// There are **very few guarantees** about how functions are compiled and they have no intrinsic -- line 2540 ---------------------------------------- 10,405 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/msrvs.rs -------------------------------------------------------------------------------- Ir -- line 111 ---------------------------------------- . } . . impl Msrv { . /// Returns the MSRV at the current node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations . pub fn current(self, cx: &LateContext<'_>) -> Option { 59,937 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(cx.tcx, cx.last_node_with_lint_attrs) . } else { . self.0 . } . } . . /// Returns the MSRV at the specified node . /// -- line 127 ---------------------------------------- -- line 141 ---------------------------------------- . .find_map(|id| parse_attrs(tcx.hir_attrs(id))) . .or(self.0) . } . . /// Checks if a required version from [this module](self) is met at the current node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations 299,685 ( 0.01%) pub fn meets(self, cx: &LateContext<'_>, required: RustcVersion) -> bool { . self.current(cx).is_none_or(|msrv| msrv >= required) 239,748 ( 0.01%) } . /// Checks if a required version from [this module](self) is met at the specified node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations . pub fn meets_at(self, tcx: TyCtxt<'_>, node: HirId, required: RustcVersion) -> bool { . self.at(tcx, node).is_none_or(|msrv| msrv >= required) . } . -- line 159 ---------------------------------------- -- line 233 ---------------------------------------- . . impl MsrvStack { . pub fn current(&self) -> Option { . self.stack.last().copied() . } . . pub fn meets(&self, required: RustcVersion) -> bool { . self.current().is_none_or(|msrv| msrv >= required) 29,973 ( 0.00%) } . . pub fn check_attributes(&mut self, attrs: &[Attribute]) { . if let Some(version) = parse_attrs(attrs) { . SEEN_MSRV_ATTR.store(true, Ordering::Relaxed); . self.stack.push(version); . } 239,788 ( 0.01%) } . . pub fn check_attributes_post(&mut self, attrs: &[Attribute]) { . if parse_attrs(attrs).is_some() { . self.stack.pop(); . } 239,788 ( 0.01%) } . } . . fn parse_attrs(attrs: &[impl AttributeExt]) -> Option { 40 ( 0.00%) let msrv_attr = attrs.iter().find(|attr| attr.path_matches(&[sym::clippy, sym::msrv]))?; 40 ( 0.00%) => ???:::path_matches (5x) . . let msrv = msrv_attr.value_str()?; . . parse_version(msrv) . } . 319,720 ( 0.01%) pub fn check_attrs(sess: &Session, attrs: &[impl AttributeExt]) { 4 ( 0.00%) let mut msrv_attrs = attrs.iter().filter(|attr| attr.path_matches(&[sym::clippy, sym::msrv])); 8 ( 0.00%) => ???:::path_matches (1x) . . let Some(msrv_attr) = msrv_attrs.next() else { . return; . }; . . if let Some(duplicate) = msrv_attrs.next_back() { . sess.dcx() . .struct_span_err(duplicate.span(), "`clippy::msrv` is defined multiple times") -- line 274 ---------------------------------------- -- line 280 ---------------------------------------- . sess.dcx().span_err(msrv_attr.span(), "bad clippy attribute"); . return; . }; . . if parse_version(msrv).is_none() { . sess.dcx() . .span_err(msrv_attr.span(), format!("`{msrv}` is not a valid Rust version")); . } 319,720 ( 0.01%) } 89,911 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/mod.rs -------------------------------------------------------------------------------- Ir -- line 883 ---------------------------------------- . . impl Casts { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Casts { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Cast(cast_from_expr, cast_to_hir) = expr.kind { . if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . if is_hir_ty_cfg_dependant(cx, cast_to_hir) { . return; . } . let (cast_from, cast_to) = ( . cx.typeck_results().expr_ty(cast_from_expr), -- line 900 ---------------------------------------- -- line 938 ---------------------------------------- . . let was_borrow_as_ptr_emitted = self.msrv.meets(cx, msrvs::BORROW_AS_PTR) . && borrow_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); . if !was_borrow_as_ptr_emitted && self.msrv.meets(cx, msrvs::PTR_FROM_REF) { . ref_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . } . 209,769 ( 0.01%) if self.msrv.meets(cx, msrvs::RAW_REF_OP) { 449,505 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (29,967x) 89,901 ( 0.00%) borrow_as_ptr::check_implicit_cast(cx, expr); 569,373 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast (29,967x) . } 179,802 ( 0.01%) if self.msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) { 449,505 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (29,967x) 89,901 ( 0.00%) cast_slice_from_raw_parts::check_implicit_cast(cx, expr); 679,257 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast (29,967x) . } 89,901 ( 0.00%) cast_ptr_alignment::check_cast_method(cx, expr); 389,571 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method (29,967x) 119,868 ( 0.00%) cast_slice_different_sizes::check(cx, expr, self.msrv); 4,792,798 ( 0.17%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::check (29,967x) 89,901 ( 0.00%) ptr_cast_constness::check_null_ptr_cast_method(cx, expr); 449,505 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs:clippy_lints::casts::ptr_cast_constness::check_null_ptr_cast_method (29,967x) 239,736 ( 0.01%) } . . fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 29,967 ( 0.00%) needless_type_cast::check(cx, body); 2,097,714 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check (9,989x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/double_parens.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub DOUBLE_PARENS, . complexity, . "Warn on unnecessary double parentheses" . } . . declare_lint_pass!(DoubleParens => [DOUBLE_PARENS]); . . impl EarlyLintPass for DoubleParens { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 169,810 ( 0.01%) match &expr.kind { . // ((..)) . // ^^^^^^ expr . // ^^^^ inner . ExprKind::Paren(inner) . if matches!(inner.kind, ExprKind::Paren(_) | ExprKind::Tup(_)) . && expr.span.eq_ctxt(inner.span) . && !expr.span.in_external_macro(cx.sess().source_map()) . && check_source(cx, inner) => -- line 53 ---------------------------------------- -- line 70 ---------------------------------------- . ); . }, . . // func((n)) . // ^^^^^^^^^ expr . // ^^^ arg . // ^ inner . ExprKind::Call(_, args) | ExprKind::MethodCall(MethodCall { args, .. }) 19,976 ( 0.00%) if let [arg] = &**args 29,964 ( 0.00%) && let ExprKind::Paren(inner) = &arg.kind . && expr.span.eq_ctxt(arg.span) . && !arg.span.in_external_macro(cx.sess().source_map()) . && check_source(cx, arg) => . { . // suggest removing the inner parens . . let mut applicability = Applicability::MachineApplicable; . let sugg = snippet_with_context(cx.sess(), inner.span, arg.span.ctxt(), "_", &mut applicability).0; -- line 87 ---------------------------------------- -- line 92 ---------------------------------------- . "unnecessary parentheses", . "remove them", . sugg.to_string(), . applicability, . ); . }, . _ => {}, . } 239,728 ( 0.01%) } . } . . /// Check that the span does indeed look like `( (..) )` . fn check_source(cx: &EarlyContext<'_>, inner: &Expr) -> bool { . if let Some(sfr) = inner.span.get_source_range(cx) . // this is the same as `SourceFileRange::as_str`, but doesn't apply the range right away, because . // we're interested in the source code outside it . && let Some(src) = sfr.sf.src.as_ref().map(|src| src.as_str()) -- line 108 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/cloned_ref_to_slice_refs.rs -------------------------------------------------------------------------------- Ir -- line 58 ---------------------------------------- . } . impl ClonedRefToSliceRefs { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ClonedRefToSliceRefs { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . // `&[foo.clone()]` expressions 59,934 ( 0.00%) if let ExprKind::AddrOf(_, mutability, arr) = &expr.kind . // mutable references would have a different meaning . && mutability.is_not() . . // check for single item arrays . && let ExprKind::Array([item]) = &arr.kind . . // check for clones . && let ExprKind::MethodCall(path, recv, _, _) = item.kind -- line 76 ---------------------------------------- -- line 101 ---------------------------------------- . "unnecessary use of `{}` to create a slice from a reference", . path.ident.name . ), . "try", . format!("{builtin_crate}::slice::from_ref({adjustment}{sugg})"), . applicability, . ); . } 239,736 ( 0.01%) } . } . . /// Checks if a method call is a needless clone or equivalent. If so, returns the necessary . /// adjustments to use the method receiver directly without cloning. . /// For example, in the code below: . /// ```rust,no_run . /// use std::path::PathBuf; . /// -- line 117 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . "using `map`/`map_err` on `Option` or `Result` constructors" . } . . declare_lint_pass!(UnnecessaryMapOnConstructor => [ . UNNECESSARY_MAP_ON_CONSTRUCTOR, . ]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryMapOnConstructor { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { 89,901 ( 0.00%) if !expr.span.from_expansion() . && let hir::ExprKind::MethodCall(path, recv, [map_arg], ..) = expr.kind . && !map_arg.span.from_expansion() . && let hir::ExprKind::Path(fun) = map_arg.kind . && let Some(sym::Option | sym::Result) = cx.typeck_results().expr_ty(recv).opt_diag_name(cx) . { . let (constructor_path, constructor_item) = if let hir::ExprKind::Call(constructor, [arg, ..]) = recv.kind . && let hir::ExprKind::Path(constructor_path) = constructor.kind . && !constructor.span.from_expansion() -- line 49 ---------------------------------------- -- line 81 ---------------------------------------- . "unnecessary `{}` on constructor `{constructor_snippet}(_)`", . path.ident.name . ), . "try", . format!("{constructor_snippet}({fun_snippet}({constructor_arg_snippet}))"), . app, . ); . } 239,736 ( 0.01%) } . } 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); . } . 69,916 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>) { 29,964 ( 0.00%) let ExprKind::Call(func, args) = expr.kind else { return }; . 59,928 ( 0.00%) if let ExprKind::Path(qpath) = func.kind 59,928 ( 0.00%) && let Some(def_id) = cx.typeck_results().qpath_res(&qpath, func.hir_id).opt_def_id() 669,196 ( 0.02%) => ???:::qpath_res (9,988x) 109,868 ( 0.00%) && cx.tcx.trait_of_assoc(def_id) == cx.tcx.lang_items().clone_trait() 1,178,584 ( 0.04%) => ???:::trait_of_assoc (9,988x) 299,640 ( 0.01%) => ???:::lang_items (9,988x) . && let [arg] = args . && let ty = cx.typeck_results().expr_ty(expr) . { . if !is_copy(cx, ty) { . return; . } . . let check_res = check_parent_is_suffix_expr(cx, expr); -- line 131 ---------------------------------------- -- line 166 ---------------------------------------- . with_forced_trimmed_paths!(format!( . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); . } 79,904 ( 0.00%) } 39,952 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs -------------------------------------------------------------------------------- Ir -- line 18 ---------------------------------------- . /// fn foo(input: u32) -> u64 { . /// input as u64 . /// } . /// ``` . DumpHir => [] . ); . . impl<'tcx> LateLintPass<'tcx> for DumpHir { 40 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 6 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 40 ( 0.00%) } . 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 89,901 ( 0.00%) if has_attr(cx, expr.hir_id) { . println!("{expr:#?}"); . } 239,736 ( 0.01%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { . match stmt.kind { . hir::StmtKind::Expr(e) | hir::StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } . if has_attr(cx, stmt.hir_id) { . println!("{stmt:#?}"); -- line 44 ---------------------------------------- -- line 46 ---------------------------------------- . } . . fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { . if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } . } . 79,912 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) { 9,989 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 79,912 ( 0.00%) } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool { 89,916 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 220 ( 0.00%) => ???:::hir_attrs (5x) 1 ( 0.00%) get_builtin_attr(attrs, sym::dump).count() > 0 . } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_take.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . . impl ManualTake { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualTake { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::If(cond, then, Some(otherwise)) = expr.kind . && let ExprKind::Path(_) = cond.kind . && let ExprKind::Block( . Block { . stmts: [stmt], . expr: Some(then_expr), . .. . }, . .., -- line 65 ---------------------------------------- -- line 98 ---------------------------------------- . expr.span, . "use", . format!("{negate}{std_or_core}::mem::take(&mut {taken})"), . app, . ); . }, . ); . } 239,736 ( 0.01%) } . } . . fn as_const_bool(e: &Expr<'_>) -> Option { . if let ExprKind::Lit(lit) = e.kind . && let LitKind::Bool(b) = lit.node . { . Some(b) . } else { -- line 114 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs -------------------------------------------------------------------------------- Ir -- line 70 ---------------------------------------- . . // SAFETY: Buckets must be managed solely by functions here (i.e., get/put on SlotIndex) and . // `self` comes from SlotIndex::from_index . #[inline] . unsafe fn get(&self, buckets: &[AtomicPtr>; 21]) -> Option<(V, u32)> { . let bucket = &buckets[self.bucket_idx]; . let ptr = bucket.load(Ordering::Acquire); . // Bucket is not yet initialized: then we obviously won't find this entry in that bucket. 40,031 ( 0.00%) if ptr.is_null() { . return None; . } . debug_assert!(self.index_in_bucket < self.bucket_idx.capacity()); . // SAFETY: `bucket` was allocated (so <= isize in total bytes) to hold `entries`, so this . // must be inbounds. . let slot = unsafe { ptr.add(self.index_in_bucket) }; . . // SAFETY: initialized bucket has zeroed all memory within the bucket, so we are valid for . // AtomicU32 access. . let index_and_lock = unsafe { &(*slot).index_and_lock }; . let current = index_and_lock.load(Ordering::Acquire); 80,062 ( 0.00%) let index = match current { . 0 => return None, . // Treat "initializing" as actually just not initialized at all. . // The only reason this is a separate state is that `complete` calls could race and . // we can't allow that, but from load perspective there's no difference. . 1 => return None, 40,015 ( 0.00%) _ => current - 2, . }; . . // SAFETY: . // * slot is a valid pointer (buckets are always valid for the index we get). . // * value is initialized since we saw a >= 2 index above. . // * `V: Copy`, so safe to read. 50,003 ( 0.00%) let value = unsafe { (*slot).value }; . Some((value, index)) . } . . fn bucket_ptr(&self, bucket: &AtomicPtr>) -> *mut Slot { . let ptr = bucket.load(Ordering::Acquire); . if ptr.is_null() { Self::initialize_bucket(bucket, self.bucket_idx) } else { ptr } . } . -- line 111 ---------------------------------------- -- line 293 ---------------------------------------- . V: Copy, . I: Idx + Copy, . { . #[inline(always)] . pub fn lookup(&self, key: &K) -> Option<(V, I)> { . let key = u32::try_from(key.index()).unwrap(); . let slot_idx = SlotIndex::from_index(key); . match unsafe { slot_idx.get(&self.buckets) } { 17 ( 0.00%) Some((value, idx)) => Some((value, I::new(idx as usize))), . None => None, . } 1 ( 0.00%) } . . #[inline] . pub fn complete(&self, key: K, value: V, index: I) { . let key = u32::try_from(key.index()).unwrap(); . let slot_idx = SlotIndex::from_index(key); . if slot_idx.put(&self.buckets, value, index.index() as u32) { . let present_idx = self.len.fetch_add(1, Ordering::Relaxed); . let slot = SlotIndex::from_index(u32::try_from(present_idx).unwrap()); -- line 312 ---------------------------------------- -- line 444 ---------------------------------------- . #[inline(always)] . const fn from_flat_index(flat: usize) -> (Self, usize) { . if flat > u32::MAX as usize { . panic!(); . } . . // If the index is in bucket 0, the conversion is trivial. . // This also avoids calling `ilog2` when `flat == 0`. 70,035 ( 0.00%) if flat < Self::BUCKET_0_CAPACITY { . return (Self::Bucket00, flat); . } . . // General-case conversion for a non-zero bucket index. . // . // | bucket | slot . // flat | ilog2 | index | offset . // ------------------------------ . // 4096 | 12 | 1 | 0 . // 4097 | 12 | 1 | 1 . // ... . // 8191 | 12 | 1 | 4095 . // 8192 | 13 | 2 | 0 . let highest_bit_pos = flat.ilog2() as usize; . let bucket_index = 23,600 ( 0.00%) BucketIndex::from_raw(highest_bit_pos - Self::NONZERO_BUCKET_SHIFT_ADJUST); . . // Clear the highest-set bit (which selects the bucket) to get the . // slot offset within this bucket. 29,500 ( 0.00%) let slot_offset = flat - (1 << highest_bit_pos); . . (bucket_index, slot_offset) . } . . #[inline(always)] . fn iter_all() -> impl ExactSizeIterator { . (0usize..BUCKETS).map(BucketIndex::from_raw) . } -- line 480 ---------------------------------------- 54,217 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/entry.rs -------------------------------------------------------------------------------- Ir -- line 58 ---------------------------------------- . perf, . "use of `contains_key` followed by `insert` on a `HashMap` or `BTreeMap`" . } . . declare_lint_pass!(HashMapPass => [MAP_ENTRY]); . . impl<'tcx> LateLintPass<'tcx> for HashMapPass { . #[expect(clippy::too_many_lines)] 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . . let Some(higher::If { . cond: cond_expr, . then: then_expr, . r#else: else_expr, . }) = higher::If::hir(expr) -- line 75 ---------------------------------------- -- line 205 ---------------------------------------- . lint_msg, . None, . format!( . "consider using the `Entry` API: https://doc.rust-lang.org/std/collections/struct.{}.html#entry-api", . map_ty.name() . ), . ); . } 239,736 ( 0.01%) } . } . . #[derive(Clone, Copy)] . enum MapType { . Hash, . BTree, . } . impl MapType { -- line 221 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . pub MAYBE_INFINITE_ITER, . pedantic, . "possible infinite iteration" . } . . declare_lint_pass!(InfiniteIter => [INFINITE_ITER, MAYBE_INFINITE_ITER]); . . impl<'tcx> LateLintPass<'tcx> for InfiniteIter { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let (lint, msg) = match complete_infinite_iter(cx, expr) { . Infinite => (INFINITE_ITER, "infinite iteration detected"), . MaybeInfinite => (MAYBE_INFINITE_ITER, "possible infinite iteration detected"), . Finite => { . return; . }, . }; . span_lint(cx, lint, expr.span, msg); 179,802 ( 0.01%) } . } . . #[derive(Copy, Clone, Debug, PartialEq, Eq)] . enum Finiteness { . Infinite, . MaybeInfinite, . Finite, . } -- line 73 ---------------------------------------- -- line 207 ---------------------------------------- . (sym::min, 0), . (sym::min_by, 1), . (sym::min_by_key, 1), . (sym::sum, 0), . (sym::product, 0), . ]; . . fn complete_infinite_iter(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness { 149,835 ( 0.01%) match expr.kind { . ExprKind::MethodCall(method, receiver, args, _) => { . let method_str = method.ident.name; . for &(name, len) in &COMPLETING_METHODS { . if method_str == name && args.len() == len { . return is_infinite(cx, receiver); . } . } . for &(name, len) in &POSSIBLY_COMPLETING_METHODS { -- line 223 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/neg_cmp_op_on_partial_ord.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub NEG_CMP_OP_ON_PARTIAL_ORD, . complexity, . "The use of negated comparison operators on partially ordered types may produce confusing code." . } . . declare_lint_pass!(NoNegCompOpForPartialOrd => [NEG_CMP_OP_ON_PARTIAL_ORD]); . . impl<'tcx> LateLintPass<'tcx> for NoNegCompOpForPartialOrd { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Unary(UnOp::Not, inner) = expr.kind . && let ExprKind::Binary(ref op, left, _) = inner.kind . && let BinOpKind::Le | BinOpKind::Ge | BinOpKind::Lt | BinOpKind::Gt = op.node . && !expr.span.in_external_macro(cx.sess().source_map()) . { . let ty = cx.typeck_results().expr_ty(left); . . let implements_ord = { . if let Some(id) = cx.tcx.get_diagnostic_item(sym::Ord) { -- line 55 ---------------------------------------- -- line 74 ---------------------------------------- . expr.span, . "the use of negated comparison operators on partially ordered \ . types produces code that is hard to read and refactor, please \ . consider using the `partial_cmp` method instead, to make it \ . clear that the two values could be incomparable", . ); . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_ast::Mutability; . use rustc_hir::{Expr, ExprKind, Node}; . use rustc_lint::LateContext; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_middle::ty::{self, Ty, TypeAndMut}; . . use super::CAST_SLICE_DIFFERENT_SIZES; . 329,637 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>, msrv: Msrv) { . // if this cast is the child of another cast expression then don't emit something for it, the full . // chain will be analyzed 109,878 ( 0.00%) if is_child_of_cast(cx, expr) { . return; . } . 29,967 ( 0.00%) if let Some(CastChainInfo { . left_cast, . start_ty, . end_ty, 149,835 ( 0.01%) }) = expr_cast_chain_tys(cx, expr) 719,215 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys (29,967x) . && let (Ok(from_layout), Ok(to_layout)) = (cx.layout_of(start_ty.ty), cx.layout_of(end_ty.ty)) . { . let from_size = from_layout.size.bytes(); . let to_size = to_layout.size.bytes(); . if from_size != to_size . && from_size != 0 . && to_size != 0 . && msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) -- line 31 ---------------------------------------- -- line 58 ---------------------------------------- . format!("replace with `ptr::slice_from_raw_parts{mutbl_fn_str}`"), . sugg, . rustc_errors::Applicability::HasPlaceholders, . ); . }, . ); . } . } 239,736 ( 0.01%) } . . fn is_child_of_cast(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 59,934 ( 0.00%) let parent = cx.tcx.parent_hir_node(expr.hir_id); 2,884,896 ( 0.10%) => ???:::parent_hir_node (29,967x) 149,833 ( 0.01%) let expr = match parent { 1 ( 0.00%) Node::Block(block) => { 3 ( 0.00%) if let Some(parent_expr) = block.expr { . parent_expr . } else { . return false; . } . }, 39,952 ( 0.00%) Node::Expr(expr) => expr, . _ => return false, . }; . 19,977 ( 0.00%) matches!(expr.kind, ExprKind::Cast(..)) . } . . /// Returns the type T of the pointed to *const [T] or *mut [T] and the mutability of the slice if . /// the type is one of those slices . fn get_raw_slice_ty_mut(ty: Ty<'_>) -> Option> { . match ty.kind() { . ty::RawPtr(slice_ty, mutbl) => match slice_ty.kind() { . ty::Slice(ty) => Some(TypeAndMut { ty: *ty, mutbl: *mutbl }), -- line 90 ---------------------------------------- -- line 102 ---------------------------------------- . start_ty: TypeAndMut<'tcx>, . /// The final type of the cast chain . end_ty: TypeAndMut<'tcx>, . } . . /// Returns a `CastChainInfo` with the left-most cast in the chain and the original ptr T and final . /// ptr U if the expression is composed of casts. . /// Returns None if the expr is not a Cast 239,736 ( 0.01%) fn expr_cast_chain_tys<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option> { 29,967 ( 0.00%) if let ExprKind::Cast(cast_expr, _cast_to_hir_ty) = expr.peel_blocks().kind { . let cast_to = cx.typeck_results().expr_ty(expr); . let to_slice_ty = get_raw_slice_ty_mut(cast_to)?; . . // If the expression that makes up the source of this cast is itself a cast, recursively . // call `expr_cast_chain_tys` and update the end type with the final target type. . // Otherwise, this cast is not immediately nested, just construct the info for this cast . if let Some(prev_info) = expr_cast_chain_tys(cx, cast_expr) { . Some(CastChainInfo { -- line 119 ---------------------------------------- -- line 125 ---------------------------------------- . let from_slice_ty = get_raw_slice_ty_mut(cast_from)?; . Some(CastChainInfo { . left_cast: cast_expr, . start_ty: from_slice_ty, . end_ty: to_slice_ty, . }) . } . } else { 29,967 ( 0.00%) None . } 239,736 ( 0.01%) } 89,901 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs -------------------------------------------------------------------------------- Ir -- line 157 ---------------------------------------- . path.ident.span, . ); . } . } . . /// Checks function call exprs: . /// - `>::try_from(0i32)` . /// - `<_ as TryInto>::try_into(0i32)` 69,916 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>, callee: &Expr<'_>) { 29,964 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind 69,916 ( 0.00%) && let Some(item_def_id) = cx.qpath_res(qpath, callee.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 49,940 ( 0.00%) && let Some(trait_def_id) = cx.tcx.trait_of_assoc(item_def_id) 1,178,584 ( 0.04%) => ???:::trait_of_assoc (9,988x) . { . let qpath_spans = match qpath { . QPath::Resolved(_, path) => { . if let [trait_seg, fn_seg] = path.segments { . Some(SpansKind::TraitFn { . trait_span: trait_seg.ident.span, . fn_span: fn_seg.ident.span, . }) -- line 176 ---------------------------------------- -- line 190 ---------------------------------------- . match cx.tcx.get_diagnostic_name(trait_def_id) { . Some(sym::TryFrom) => FunctionKind::TryFromFunction(qpath_spans), . Some(sym::TryInto) => FunctionKind::TryIntoFunction(qpath_spans), . _ => return, . }, . callee.span, . ); . } 79,904 ( 0.00%) } 29,964 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs -------------------------------------------------------------------------------- Ir -- line 82 ---------------------------------------- . #[inline(always)] . const unsafe fn get_offset_len_noubcheck( . ptr: *const [T], . offset: usize, . len: usize, . ) -> *const [T] { . let ptr = ptr as *const T; . // SAFETY: The caller already checked these preconditions 10,056 ( 0.00%) let ptr = unsafe { crate::intrinsics::offset(ptr, offset) }; . crate::intrinsics::aggregate_raw_ptr(ptr, len) . } . . #[inline(always)] . const unsafe fn get_offset_len_mut_noubcheck( . ptr: *mut [T], . offset: usize, . len: usize, -- line 98 ---------------------------------------- -- line 176 ---------------------------------------- . /// The methods `index` and `index_mut` panic if the index is out of bounds. . #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex<[T]> for usize { . type Output = T; . . #[inline] . fn get(self, slice: &[T]) -> Option<&T> { 709 ( 0.00%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. 7 ( 0.00%) unsafe { Some(slice_get_unchecked(slice, self)) } . } else { . None . } . } . . #[inline] . #[rustc_no_writable] . fn get_mut(self, slice: &mut [T]) -> Option<&mut T> { 2 ( 0.00%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. . unsafe { Some(slice_get_unchecked(slice, self)) } . } else { . None . } . } . . #[inline] -- line 203 ---------------------------------------- -- line 211 ---------------------------------------- . // SAFETY: the caller guarantees that `slice` is not dangling, so it . // cannot be longer than `isize::MAX`. They also guarantee that . // `self` is in bounds of `slice` so `self` cannot overflow an `isize`, . // so the call to `add` is safe. . unsafe { . // Use intrinsics::assume instead of hint::assert_unchecked so that we don't check the . // precondition of this function twice. . crate::intrinsics::assume(self < slice.len()); 8 ( 0.00%) slice_get_unchecked(slice, self) . } . } . . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut T { . assert_unsafe_precondition!( . check_library_ub, -- line 227 ---------------------------------------- -- line 230 ---------------------------------------- . ); . // SAFETY: see comments for `get_unchecked` above. . unsafe { slice_get_unchecked(slice, self) } . } . . #[inline] . fn index(self, slice: &[T]) -> &T { . // N.B., use intrinsic indexing 129,871 ( 0.00%) &(*slice)[self] . } . . #[inline] . #[rustc_no_writable] . fn index_mut(self, slice: &mut [T]) -> &mut T { . // N.B., use intrinsic indexing 15 ( 0.00%) &mut (*slice)[self] . } . } . . /// Because `IndexRange` guarantees `start <= end`, fewer checks are needed here . /// than there are for a general `Range` (which might be `100..3`). . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex<[T]> for ops::IndexRange { . type Output = [T]; -- line 253 ---------------------------------------- 307 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs -------------------------------------------------------------------------------- Ir -- line 51 ---------------------------------------- . pub SIZE_OF_REF, . suspicious, . "Argument to `size_of_val()` is a double-reference, which is almost certainly unintended" . } . . declare_lint_pass!(SizeOfRef => [SIZE_OF_REF]); . . impl LateLintPass<'_> for SizeOfRef { 119,868 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 89,898 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind . && path.basic_res().is_diag_item(cx, sym::mem_size_of_val) . && let arg_ty = cx.typeck_results().expr_ty(arg) . && peel_and_count_ty_refs(arg_ty).1 > 1 . { . span_lint_and_help( . cx, . SIZE_OF_REF, . expr.span, . "argument to `size_of_val()` is a reference to a reference", . None, . "dereference the argument to `size_of_val()` to get the size of the value instead of the size of the reference-type", . ); . } 149,835 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub INEFFECTIVE_OPEN_OPTIONS, . suspicious, . "usage of both `write(true)` and `append(true)` on same `OpenOptions`" . } . . declare_lint_pass!(IneffectiveOpenOptions => [INEFFECTIVE_OPEN_OPTIONS]); . . impl<'tcx> LateLintPass<'tcx> for IneffectiveOpenOptions { 119,868 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::MethodCall(name, recv, [_], _) = expr.kind . && name.ident.name == sym::open . && !expr.span.from_expansion() . && cx . .typeck_results() . .expr_ty(recv) . .peel_refs() . .is_diag_item(cx, sym::FsOpenOptions) . { -- line 55 ---------------------------------------- -- line 94 ---------------------------------------- . write_span, . "unnecessary use of `.write(true)` because there is `.append(true)`", . "remove `.write(true)`", . String::new(), . Applicability::MachineApplicable, . ); . } . } 119,868 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs -------------------------------------------------------------------------------- Ir -- line 17 ---------------------------------------- . let $len = unsafe { &mut *(&raw mut $this.end_or_len).cast::() }; . $zst_body . } else { . // SAFETY: for non-ZSTs, the type invariant ensures it cannot be null . let $end = unsafe { &mut *(&raw mut $this.end_or_len).cast::>() }; . $other_body . } . }}; 169,894 ( 0.01%) ($this:ident, $len:ident => $zst_body:expr, $end:ident => $other_body:expr,) => {{ . #![allow(unused_unsafe)] // we're sometimes used within an unsafe block . 3 ( 0.00%) if T::IS_ZST { . let $len = $this.end_or_len.addr(); . $zst_body . } else { . // SAFETY: for non-ZSTs, the type invariant ensures it cannot be null . let $end = unsafe { mem::transmute::<*const T, NonNull>($this.end_or_len) }; . $other_body . } . }}; -- line 36 ---------------------------------------- -- line 172 ---------------------------------------- . // cannot wrap. (Ideally this would be `checked_sub`, which . // does the same thing internally, but as of 2025-02 that . // doesn't optimize quite as small in MIR.) . self.end_or_len = without_provenance_mut(len.unchecked_sub(1)); . } else { . // SAFETY: by type invariant, the `end_or_len` field is always . // non-null for a non-ZST pointee. (This transmute ensures we . // get `!nonnull` metadata on the load of the field.) 1,211,969 ( 0.04%) if ptr == crate::intrinsics::transmute::<$ptr, NonNull>(end_or_len) { . return None; . } . // SAFETY: since it's not empty, per the check above, moving . // forward one keeps us inside the slice, and this is valid. 9,990 ( 0.00%) self.ptr = ptr.add(1); . } . // SAFETY: Now that we know it wasn't empty and we've moved past . // the first one (to avoid giving a duplicate `&mut` next time), . // we can give out a reference to it. . Some({ptr}.$into_ref()) . } . } . -- line 193 ---------------------------------------- -- line 266 ---------------------------------------- . return init; . } . let mut acc = init; . let mut i = 0; . let len = len!(self); . loop { . // SAFETY: the loop iterates `i in 0..len`, which always is in bounds of . // the slice allocation 972 ( 0.00%) acc = f(acc, unsafe { & $( $mut_ )? *self.ptr.add(i).as_ptr() }); . // SAFETY: `i` can't overflow since it'll only reach usize::MAX if the . // slice had that length, in which case we'll break out of the loop . // after the increment . i = unsafe { i.unchecked_add(1) }; 824 ( 0.00%) if i == len { . break; . } . } . acc . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 287 ---------------------------------------- -- line 302 ---------------------------------------- . // faster to compile. . #[inline] . fn all(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 10 ( 0.00%) if !f(x) { . return false; . } . } . true . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 318 ---------------------------------------- -- line 319 ---------------------------------------- . // faster to compile. . #[inline] . fn any(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 300,099 ( 0.01%) if f(x) { . return true; . } . } . false . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 335 ---------------------------------------- -- line 336 ---------------------------------------- . // faster to compile. . #[inline] . fn find

(&mut self, mut predicate: P) -> Option . where . Self: Sized, . P: FnMut(&Self::Item) -> bool, . { . while let Some(x) = self.next() { 42 ( 0.00%) if predicate(&x) { . return Some(x); . } . } . None . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 352 ---------------------------------------- -- line 353 ---------------------------------------- . // faster to compile. . #[inline] . fn find_map(&mut self, mut f: F) -> Option . where . Self: Sized, . F: FnMut(Self::Item) -> Option, . { . while let Some(x) = self.next() { 7 ( 0.00%) if let Some(y) = f(x) { 12 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut (1x) . return Some(y); . } . } . None 3 ( 0.00%) } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. Also, the `assume` avoids a bounds check. . #[inline] . fn position

(&mut self, mut predicate: P) -> Option where . Self: Sized, . P: FnMut(Self::Item) -> bool, . { . let n = len!(self); . let mut i = 0; . while let Some(x) = self.next() { 199 ( 0.00%) if predicate(x) { . // SAFETY: we are guaranteed to be in bounds by the loop invariant: . // when `i >= n`, `self.next()` returns `None` and the loop breaks. . unsafe { assert_unchecked(i < n) }; . return Some(i); . } 121 ( 0.00%) i += 1; . } . None . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. Also, the `assume` avoids a bounds check. . #[inline] -- line 393 ---------------------------------------- 834,044 ( 0.03%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/multi_assignments.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . expr . } . }, . _ => expr, . } . } . . impl EarlyLintPass for MultiAssignments { 89,898 ( 0.00%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Assign(target, source, _) = &expr.kind { . if let ExprKind::Assign(_target, _source, _) = &strip_paren_blocks(target).kind { . span_lint(cx, MULTI_ASSIGNMENTS, expr.span, "assignments don't nest intuitively"); . } . if let ExprKind::Assign(_target, _source, _) = &strip_paren_blocks(source).kind { . span_lint(cx, MULTI_ASSIGNMENTS, expr.span, "assignments don't nest intuitively"); . } . } 119,864 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . . #[derive(Default)] . pub struct SuspiciousOperationGroupings { . // Spans already linted. . linted_spans: FxHashSet, . } . . impl EarlyLintPass for SuspiciousOperationGroupings { 269,694 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if expr.span.from_expansion() { . return; . } . 89,898 ( 0.00%) if let Some(binops) = extract_related_binops(&expr.kind) { . check_binops(cx, &binops.iter().collect::>(), &mut self.linted_spans); . . let mut op_types = Vec::with_capacity(binops.len()); . // We could use a hashmap, etc. to avoid being O(n*m) here, but . // we want the lints to be emitted in a consistent order. Besides, . // m, (the number of distinct `BinOpKind`s in `binops`) . // will often be small, and does have an upper limit. . binops.iter().map(|b| b.op).for_each(|op| { -- line 88 ---------------------------------------- -- line 92 ---------------------------------------- . }); . . for op_type in op_types { . let ops: Vec<_> = binops.iter().filter(|b| b.op == op_type).collect(); . . check_binops(cx, &ops, &mut self.linted_spans); . } . } 239,728 ( 0.01%) } . } . . fn check_binops(cx: &EarlyContext<'_>, binops: &[&BinaryOp<'_>], linted_spans: &mut FxHashSet) { . let binop_count = binops.len(); . if binop_count < 2 { . // Single binary operation expressions would likely be false . // positives. . return; -- line 108 ---------------------------------------- -- line 356 ---------------------------------------- . _ => { . return output; . }, . }; . } . } . . fn extract_related_binops(kind: &ExprKind) -> Option>> { 89,898 ( 0.00%) append_opt_vecs(chained_binops(kind), if_statement_binops(kind)) 719,184 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops (29,966x) 659,252 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (29,966x) . } . 209,762 ( 0.01%) fn if_statement_binops(kind: &ExprKind) -> Option>> { 209,762 ( 0.01%) match kind { . ExprKind::If(condition, _, _) => chained_binops(&condition.kind), . ExprKind::Paren(e) => if_statement_binops(&e.kind), . ExprKind::Block(block, _) => { . let mut output = None; . for stmt in &block.stmts { . match &stmt.kind { . StmtKind::Expr(e) | StmtKind::Semi(e) => { . output = append_opt_vecs(output, if_statement_binops(&e.kind)); -- line 376 ---------------------------------------- -- line 377 ---------------------------------------- . }, . _ => {}, . } . } . output . }, . _ => None, . } 239,728 ( 0.01%) } . 209,762 ( 0.01%) fn append_opt_vecs(target_opt: Option>, source_opt: Option>) -> Option> { 149,830 ( 0.01%) match (target_opt, source_opt) { . (Some(mut target), Some(source)) => { . target.reserve(source.len()); . for op in source { . target.push(op); . } . Some(target) . }, . (Some(v), None) | (None, Some(v)) => Some(v), 59,932 ( 0.00%) (None, None) => None, . } 239,728 ( 0.01%) } . . fn chained_binops(kind: &ExprKind) -> Option>> { 209,762 ( 0.01%) match kind { . ExprKind::Binary(_, left_outer, right_outer) => chained_binops_helper(left_outer, right_outer), . ExprKind::Paren(e) | ExprKind::Unary(_, e) => chained_binops(&e.kind), 29,966 ( 0.00%) _ => None, . } . } . . fn chained_binops_helper<'expr>(left_outer: &'expr Expr, right_outer: &'expr Expr) -> Option>> { . match (&left_outer.kind, &right_outer.kind) { . ( . ExprKind::Paren(left_e) | ExprKind::Unary(_, left_e), . ExprKind::Paren(right_e) | ExprKind::Unary(_, right_e), -- line 413 ---------------------------------------- 179,796 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs -------------------------------------------------------------------------------- Ir -- line 54 ---------------------------------------- . "replace with", . format!("{krate}::ptr::slice_{func}({ptr}, {len})"), . applicability, . ); . } . } . . /// Checks for implicit cast from slice reference to raw slice pointer. 239,736 ( 0.01%) pub(super) fn check_implicit_cast(cx: &LateContext<'_>, expr: &Expr<'_>) { 19,976 ( 0.00%) if let ExprKind::Call(fun, [ptr_arg, len_arg]) = expr.peel_blocks().kind . && let ExprKind::Path(ref qpath) = fun.kind . && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() . && let Some(rpk) = raw_parts_kind(cx, fun_def_id) . && !matches!(get_parent_expr(cx, expr).map(|e| e.kind), Some(ExprKind::Cast(..))) . && let [deref, borrow] = cx.typeck_results().expr_adjustments(expr) . && matches!(deref.kind, Adjust::Deref(..)) . && let Adjustment { . kind: Adjust::Borrow(AutoBorrow::RawPtr(..)), -- line 71 ---------------------------------------- -- line 89 ---------------------------------------- . CAST_SLICE_FROM_RAW_PARTS, . expr.span, . format!("implicitly casting the result of `{func}` to `{target}`"), . "replace_with", . format!("{krate}::ptr::slice_{func}({ptr}, {len})"), . applicability, . ); . } 239,736 ( 0.01%) } 29,967 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . trait_bound: &'tcx PolyTraitRef<'tcx>, . . predicate_pos: usize, . bound_pos: usize, . } . . /// Finds all of the [`Bound`]s that refer to a type parameter and are not from a macro expansion . fn type_param_bounds<'tcx>(generics: &'tcx Generics<'tcx>) -> impl Iterator> { 29,976 ( 0.00%) generics . .predicates . .iter() . .enumerate() . .filter_map(|(predicate_pos, predicate)| { . let WherePredicateKind::BoundPredicate(bound_predicate) = &predicate.kind else { . return None; . }; . -- line 61 ---------------------------------------- -- line 113 ---------------------------------------- . false . } . . let mut path = vec![trait_bound.trait_ref.trait_def_id()?]; . search(cx, &mut path).then_some(path) . } . . impl LateLintPass<'_> for NeedlessMaybeSized { 89,928 ( 0.00%) fn check_generics(&mut self, cx: &LateContext<'_>, generics: &Generics<'_>) { 59,952 ( 0.00%) let Some(sized_trait) = cx.tcx.lang_items().sized_trait() else { 299,760 ( 0.01%) => ???:::lang_items (9,992x) . return; . }; . . let maybe_sized_params: DefIdMap<_> = type_param_bounds(generics) . .filter(|bound| { . bound.trait_bound.trait_ref.trait_def_id() == Some(sized_trait) . && matches!(bound.trait_bound.modifiers.polarity, BoundPolarity::Maybe(_)) . }) -- line 130 ---------------------------------------- -- line 162 ---------------------------------------- . Applicability::MaybeIncorrect, . ); . }, . ); . . return; . } . } 79,936 ( 0.00%) } . } 9,992 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . fn needs_ref_to_cmp(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { . ty.is_char() . || *ty.kind() == ty::Uint(UintTy::U8) . || ty.is_diag_item(cx, sym::Vec) . || ty.is_lang_item(cx, LangItem::String) . } . . impl LateLintPass<'_> for ManualIgnoreCaseCmp { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { . // check if expression represents a comparison of two strings . // using .to_ascii_lowercase() or .to_ascii_uppercase() methods, . // or one of the sides is a literal . // Offer to replace it with .eq_ignore_ascii_case() method 59,934 ( 0.00%) if let Binary(op, left, right) = &expr.kind . && (op.node == BinOpKind::Eq || op.node == BinOpKind::Ne) . && let Some((left_span, left_val)) = get_ascii_type(cx, left.kind) . && let Some((right_span, right_val)) = get_ascii_type(cx, right.kind) . && match (&left_val, &right_val) { . (ToAscii(l_lower, ..), ToAscii(r_lower, ..)) if l_lower == r_lower => true, . (ToAscii(..), Literal(..)) | (Literal(..), ToAscii(..)) => true, . _ => false, . } -- line 93 ---------------------------------------- -- line 117 ---------------------------------------- . expr.span, . "consider using `.eq_ignore_ascii_case()` instead", . format!("{neg}{left_snip}.eq_ignore_ascii_case({deref}{right_snip})"), . app, . ); . }, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/visitors.rs -------------------------------------------------------------------------------- Ir -- line 87 ---------------------------------------- . } . V::Result::output() . } . } . macro_rules! visitable_ref { . ($t:ident, $f:ident) => { . impl<'tcx> Visitable<'tcx> for &'tcx $t<'tcx> { . fn visit>(self, visitor: &mut V) -> V::Result { 4 ( 0.00%) visitor.$f(self) 181 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr (1x) . } . } . }; . } . visitable_ref!(Arm, visit_arm); . visitable_ref!(Block, visit_block); . visitable_ref!(Body, visit_body); . visitable_ref!(Expr, visit_expr); -- line 103 ---------------------------------------- -- line 110 ---------------------------------------- . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V { . f: F, . } . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V { . type Result = ControlFlow; . 21 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 39,956 ( 0.00%) match (self.f)(e) { 99,908 ( 0.00%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 23 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 (1x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 24 ( 0.00%) } . . // Avoid unnecessary `walk_*` calls. . fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, AmbigArg>) -> Self::Result { . ControlFlow::Continue(()) . } . fn visit_pat(&mut self, _: &'tcx Pat<'tcx>) -> Self::Result { . ControlFlow::Continue(()) . } -- line 132 ---------------------------------------- -- line 133 ---------------------------------------- . fn visit_qpath(&mut self, _: &'tcx QPath<'tcx>, _: HirId, _: Span) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid monomorphising all `visit_*` functions. . fn visit_nested_item(&mut self, _: ItemId) -> Self::Result { . ControlFlow::Continue(()) . } . } 29,973 ( 0.00%) let mut v = V { f }; . node.visit(&mut v).break_value() . } . . /// Calls the given function once for each expression contained. This will enter bodies, but not . /// nested items. . pub fn for_each_expr<'tcx, B, C: Continue>( . tcx: TyCtxt<'tcx>, . node: impl Visitable<'tcx>, -- line 149 ---------------------------------------- -- line 156 ---------------------------------------- . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V<'tcx, F> { . type NestedFilter = nested_filter::OnlyBodies; . type Result = ControlFlow; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.tcx . } . 27 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { . match (self.f)(e) { 9 ( 0.00%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 1,826 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> (1x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 24 ( 0.00%) } . . // Only walk closures . fn visit_anon_const(&mut self, _: &'tcx AnonConst) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid unnecessary `walk_*` calls. . fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, AmbigArg>) -> Self::Result { . ControlFlow::Continue(()) -- line 178 ---------------------------------------- -- line 183 ---------------------------------------- . fn visit_qpath(&mut self, _: &'tcx QPath<'tcx>, _: HirId, _: Span) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid monomorphising all `visit_*` functions. . fn visit_nested_item(&mut self, _: ItemId) -> Self::Result { . ControlFlow::Continue(()) . } . } 6 ( 0.00%) let mut v = V { tcx, f }; . node.visit(&mut v).break_value() . } . . /// returns `true` if expr contains match expr desugared from try . fn contains_try(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { . if matches!(e.kind, ExprKind::Match(_, _, hir::MatchSource::TryDesugar(_))) { . ControlFlow::Break(()) -- line 199 ---------------------------------------- 19,982 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_mut_passed.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub UNNECESSARY_MUT_PASSED, . style, . "an argument passed as a mutable reference although the callee only demands an immutable reference" . } . . declare_lint_pass!(UnnecessaryMutPassed => [UNNECESSARY_MUT_PASSED]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryMutPassed { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 59,934 ( 0.00%) if e.span.from_expansion() { . // Issue #11268 . return; . } . 129,859 ( 0.00%) match e.kind { 19,976 ( 0.00%) ExprKind::Call(fn_expr, arguments) => { 19,976 ( 0.00%) if let ExprKind::Path(ref path) = fn_expr.kind . && arguments.iter().any(is_mut_ref_arg) . { . check_arguments( . cx, . &mut arguments.iter(), . cx.typeck_results().expr_ty(fn_expr), . #[allow(trivial_casts)] . &|| { -- line 58 ---------------------------------------- -- line 76 ---------------------------------------- . &mut iter::once(receiver).chain(arguments.iter()), . method_type, . &|| path.ident.as_str().to_owned(), . "method", . ); . }, . _ => (), . } 239,736 ( 0.01%) } . } . . /// Only `&mut ...` arguments can lint, so the type and path lookups run only after one is found. . fn is_mut_ref_arg(argument: &Expr<'_>) -> bool { 19,976 ( 0.00%) matches!(argument.kind, ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _)) . } . . fn check_arguments<'tcx>( . cx: &LateContext<'tcx>, . arguments: &mut dyn Iterator>, . type_definition: Ty<'tcx>, . name: &dyn Fn() -> String, . fn_kind: &str, -- line 97 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs -------------------------------------------------------------------------------- Ir -- line 64 ---------------------------------------- . impl_lint_pass!(DisallowedMethods => [DISALLOWED_METHODS]); . . pub struct DisallowedMethods { . disallowed: DefIdMap<(&'static str, &'static DisallowedPath)>, . } . . impl DisallowedMethods { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 10 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_methods, . PathNS::Value, . |def_kind| { . matches!( . def_kind, . DefKind::Fn | DefKind::Ctor(_, CtorKind::Fn) | DefKind::AssocFn . ) . }, . "function", . false, 1 ( 0.00%) ); 4 ( 0.00%) Self { disallowed } . } . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedMethods { 149,835 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 29,967 ( 0.00%) if self.disallowed.is_empty() { . return; . } . if expr.span.desugaring_kind().is_some() { . return; . } . let (id, span) = match &expr.kind { . ExprKind::Path(path) if let Res::Def(_, id) = cx.qpath_res(path, expr.hir_id) => (id, expr.span), . ExprKind::MethodCall(name, ..) if let Some(id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) => { -- line 99 ---------------------------------------- -- line 105 ---------------------------------------- . span_lint_and_then( . cx, . DISALLOWED_METHODS, . span, . format!("use of a disallowed method `{path}`"), . disallowed_path.diag_amendment(span), . ); . } 179,802 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_pop_if.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . msrv: Msrv, . binary_heap_pop_if_feature_enabled: bool, . } . . impl ManualPopIf { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { . Self { . msrv: conf.msrv.into(), 6 ( 0.00%) binary_heap_pop_if_feature_enabled: tcx.features().enabled(sym::binary_heap_pop_if), 30 ( 0.00%) => ???:::features (1x) 4 ( 0.00%) => ???:::enabled (1x) . } . } . . fn msrv_compatible(&self, cx: &LateContext<'_>, kind: ManualPopIfKind) -> bool { . match kind { . ManualPopIfKind::Vec => self.msrv.meets(cx, msrvs::VEC_POP_IF), . ManualPopIfKind::VecDequeBack => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_BACK_IF), . ManualPopIfKind::VecDequeFront => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_FRONT_IF), -- line 79 ---------------------------------------- -- line 455 ---------------------------------------- . ControlFlow::Break((collection_expr, span, false)) . } else { . ControlFlow::Continue(()) . } . }) . } . . impl<'tcx> LateLintPass<'tcx> for ManualPopIf { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) let ExprKind::If(cond, then_block, None) = expr.kind else { . return; . }; . . let in_else_clause = is_else_clause(cx.tcx, expr); . . for kind in [ . ManualPopIfKind::Vec, . ManualPopIfKind::VecDequeBack, -- line 472 ---------------------------------------- -- line 482 ---------------------------------------- . if in_else_clause { . pattern.suggestable = false; . } . . pattern.emit_lint(cx); . return; . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs -------------------------------------------------------------------------------- Ir -- line 1048 ---------------------------------------- . msrv: conf.msrv.into(), . infallible_destructuring_match_linted: false, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Matches { . #[expect(clippy::too_many_lines)] 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let from_expansion = expr.span.from_expansion(); . 89,901 ( 0.00%) if let ExprKind::Match(ex, arms, source) = expr.kind { . if is_direct_expn_of(expr.span, sym::matches).is_some() . && let [arm, _] = arms . { . redundant_pattern_match::check_match(cx, expr, ex, arms); . redundant_pattern_match::check_matches_true(cx, expr, arm, ex); . } . if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; -- line 1067 ---------------------------------------- -- line 1141 ---------------------------------------- . if self.infallible_destructuring_match_linted { . self.infallible_destructuring_match_linted = false; . } else { . match_single_binding::check(cx, ex, arms, expr); . } . } . match_ref_pats::check(cx, ex, arms.iter().map(|el| el.pat), expr); . } 179,802 ( 0.01%) } else if let Some(if_let) = higher::IfLet::hir(cx, expr) { 149,835 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . collapsible_match::check_if_let( . cx, . if_let.let_span.ctxt(), . if_let.let_pat, . if_let.if_then, -- line 1157 ---------------------------------------- -- line 1206 ---------------------------------------- . if_let.let_pat, . if_let.let_expr, . if_let.if_else.is_some(), . if_let.let_span, . ); . needless_match::check_if_let(cx, expr, &if_let); . } . } else { 149,835 ( 0.01%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . if let Some(while_let) = higher::WhileLet::hir(expr) { . significant_drop_in_scrutinee::check_while_let(cx, expr, while_let.let_expr, while_let.if_then); . } . if !from_expansion { . redundant_pattern_match::check(cx, expr); . } . } 239,736 ( 0.01%) } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'_>) { . self.infallible_destructuring_match_linted |= . local.els.is_none() && infallible_destructuring_match::check(cx, local); . } . . fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 3 ( 0.00%) rest_pat_in_fully_bound_struct::check(cx, pat); 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/rest_pat_in_fully_bound_struct.rs:clippy_lints::matches::rest_pat_in_fully_bound_struct::check (1x) . } . } . . /// Calls the given function for each segment of the source text within the . /// match block which is not part of any arm. For the purposes of this function . /// attributes on an arm are not considered part of the arm. . /// . /// This will return whether all the relevant source text could be retrieved. If -- line 1240 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/arc_with_non_send_sync.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub ARC_WITH_NON_SEND_SYNC, . suspicious, . "using `Arc` with a type that does not implement `Send` and `Sync`" . } . . declare_lint_pass!(ArcWithNonSendSync => [ARC_WITH_NON_SEND_SYNC]); . . impl<'tcx> LateLintPass<'tcx> for ArcWithNonSendSync { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 89,898 ( 0.00%) if let ExprKind::Call(func, [arg]) = expr.kind 49,940 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(func_ty, func_name)) = func.kind 9,988 ( 0.00%) && func_name.ident.name == sym::new . && !expr.span.from_expansion() . && cx.typeck_results().node_type(func_ty.hir_id).is_diag_item(cx, sym::Arc) . && let arg_ty = cx.typeck_results().expr_ty(arg) . // make sure that the type is not and does not contain any type parameters . && arg_ty.walk().all(|arg| { . !matches!(arg.kind(), GenericArgKind::Type(ty) if matches!(ty.kind(), ty::Param(_))) . }) . && let Some(send) = cx.tcx.get_diagnostic_item(sym::Send) -- line 57 ---------------------------------------- -- line 78 ---------------------------------------- . diag.help("if the `Arc` will not be used across threads replace it with an `Rc`"); . diag.help(format!( . "otherwise make `{arg_ty}` `Send` and `Sync` or consider a wrapper type such as `Mutex`" . )); . }); . }, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/box_default.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub BOX_DEFAULT, . style, . "Using Box::new(T::default()) instead of Box::default()" . } . . declare_lint_pass!(BoxDefault => [BOX_DEFAULT]); . . impl LateLintPass<'_> for BoxDefault { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // If the expression is a call (`Box::new(...)`) 89,898 ( 0.00%) if let ExprKind::Call(box_new, [arg]) = expr.kind . // And call is of the form `::something` . // Here, it would be `::new` 49,940 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_new.kind . // And that method is `new` 9,988 ( 0.00%) && seg.ident.name == sym::new . // And the call is that of a `Box` method . && ty.basic_res().is_lang_item(cx, LangItem::OwnedBox) . // And the single argument to the call is another function call . // This is the `T::default()` (or default equivalent) of `Box::new(T::default())` . && let ExprKind::Call(arg_path, _) = arg.kind . // And we are not in a foreign crate's macro . && !expr.span.in_external_macro(cx.sess().source_map()) . // And the argument expression has the same context as the outer call expression -- line 54 ---------------------------------------- -- line 62 ---------------------------------------- . BOX_DEFAULT, . expr.span, . "`Box::new(_)` of default value", . "try", . "Box::default()".into(), . Applicability::MachineApplicable, . ); . } 239,736 ( 0.01%) } . } . . fn is_plain_default(cx: &LateContext<'_>, arg_path: &Expr<'_>) -> bool { . // we need to match the actual path so we don't match e.g. "u8::default" . if let ExprKind::Path(QPath::Resolved(None, path)) = &arg_path.kind . && let Res::Def(_, def_id) = path.res . { . // avoid generic parameters -- line 78 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for LegacyNumericConstants { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { . // Integer modules are "TBD" deprecated, and the contents are too, . // so lint on the `use` statement directly. 18 ( 0.00%) if let ItemKind::Use(path, kind @ (UseKind::Single(_) | UseKind::Glob)) = item.kind 4 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) . // use `present_items` because it could be in either type_ns or value_ns . && let Some(res) = path.res.present_items().next() . && let Some(def_id) = res.opt_def_id() . && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) . { . let module = if is_integer_module(cx, def_id) { . true . } else if is_numeric_const(cx, def_id) { -- line 63 ---------------------------------------- -- line 96 ---------------------------------------- . } else if let [.., module_name, name] = &*def_path { . diag.help( . format!("remove this import and use the associated constant `{module_name}::{name}` from the primitive type instead") . ); . } . }, . ); . } 5 ( 0.00%) } . 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { . // `std::::` check 109,881 ( 0.00%) let (sugg, msg) = if let ExprKind::Path(qpath) = &expr.kind . && let QPath::Resolved(None, path) = qpath 1 ( 0.00%) && let Some(def_id) = path.res.opt_def_id() . && is_numeric_const(cx, def_id) . && let [.., mod_name, name] = &*cx.get_def_path(def_id) . // Skip linting if this usage looks identical to the associated constant, . // since this would only require removing a `use` import (which is already linted). . && !is_numeric_const_path_canonical(path, [*mod_name, *name]) . { . (format!("{mod_name}::{name}"), "usage of a legacy numeric constant") . // `::xxx_value` check 79,908 ( 0.00%) } else if let ExprKind::Call(func, []) = &expr.kind . && let ExprKind::Path(qpath) = &func.kind . && let QPath::TypeRelative(ty, last_segment) = qpath . && let Some(def_id) = cx.qpath_res(qpath, func.hir_id).opt_def_id() . && is_integer_method(cx, def_id) . && let Some(mod_name) = ty.span.get_text(cx) . && ty.span.eq_ctxt(last_segment.ident.span) . { . let name = last_segment.ident.name.as_str()[..=2].to_ascii_uppercase(); -- line 127 ---------------------------------------- -- line 138 ---------------------------------------- . diag.span_suggestion_verbose( . expr.span, . "use the associated constant instead", . sugg, . Applicability::MaybeIncorrect, . ); . }); . } 239,736 ( 0.01%) } . } . . fn is_integer_module(cx: &LateContext<'_>, did: DefId) -> bool { . matches!( . cx.tcx.get_diagnostic_name(did), . Some( . sym::isize_legacy_mod . | sym::i128_legacy_mod -- line 154 ---------------------------------------- 29,981 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . format!("try `pointer::cast_{constness}`, a safer alternative"), . format!("{}.cast_{constness}()", sugg.maybe_paren()), . app, . ); . } . } . } . 179,802 ( 0.01%) pub(super) fn check_null_ptr_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::MethodCall(method, cast_from_expr, [], _) = expr.kind . && let ExprKind::Call(func, []) = cast_from_expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = func.kind . && let Some(defid) = path.res.opt_def_id() . && let method = match (cx.tcx.get_diagnostic_name(defid), method.ident.name) { . (Some(sym::ptr_null), sym::cast_mut) => "null_mut", . (Some(sym::ptr_null_mut), sym::cast_const) => "null", . _ => return, . } -- line 88 ---------------------------------------- -- line 97 ---------------------------------------- . PTR_CAST_CONSTNESS, . expr.span, . "changing constness of a null pointer", . format!("use `{method}()` directly instead"), . format!("{prefix}::ptr::{method}::<{after_lt}"), . app, . ); . } 209,769 ( 0.01%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/result.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_then}; . use clippy_utils::ty::{AdtVariantInfo, approx_ty_size}; . use clippy_utils::{is_no_std_crate, trait_ref_of_method}; . . use super::{RESULT_LARGE_ERR, RESULT_UNIT_ERR}; . . /// The type of the `Err`-variant in a `std::result::Result` returned by the . /// given `FnDecl` 11 ( 0.00%) fn result_err_ty<'tcx>( . cx: &LateContext<'tcx>, . decl: &hir::FnDecl<'tcx>, . id: hir::def_id::LocalDefId, . item_span: Span, . ) -> Option<(&'tcx hir::Ty<'tcx>, Ty<'tcx>)> { 4 ( 0.00%) if !item_span.in_external_macro(cx.sess().source_map()) . && let hir::FnRetTy::Return(hir_ty) = decl.output . { . let mut ty = cx . .tcx 5 ( 0.00%) .instantiate_bound_regions_with_erased(cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip().output()); 27 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (1x) . . // for async functions, peel through `impl Future` to get `T` 5 ( 0.00%) if cx.tcx.ty_is_opaque_future(ty) 18 ( 0.00%) => ???:::ty_is_opaque_future (1x) . && let Some(future_output_ty) = cx.tcx.get_impl_future_output_ty(ty) . { . ty = future_output_ty; . } . 2 ( 0.00%) if let ty::Adt(adt_def, args) = ty.kind() 6 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Result, adt_def.did()) 44 ( 0.00%) => ???:::is_diagnostic_item (1x) . { . let err_ty = args.type_at(1); . return Some((hir_ty, err_ty)); . } . } . None 9 ( 0.00%) } . 45 ( 0.00%) pub(super) fn check_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::Item<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { 10 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind . && let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) . { . if cx.effective_visibilities.is_exported(item.owner_id.def_id) { . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . check_result_unit_err(cx, err_ty, fn_header_span, msrv); . } . check_result_large_err(cx, err_ty, hir_ty.span, large_err_threshold, large_err_ignored, false); . } 40 ( 0.00%) } . 89,901 ( 0.00%) pub(super) fn check_impl_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::ImplItem<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { . // Don't lint if method is a trait's implementation, we can't do anything about those 19,978 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, _) = item.kind 12 ( 0.00%) && let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) 281 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::result_err_ty (1x) . && trait_ref_of_method(cx, item.owner_id).is_none() . { . if cx.effective_visibilities.is_exported(item.owner_id.def_id) { . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . check_result_unit_err(cx, err_ty, fn_header_span, msrv); . } . check_result_large_err(cx, err_ty, hir_ty.span, large_err_threshold, large_err_ignored, false); . } 79,912 ( 0.00%) } . . pub(super) fn check_trait_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::TraitItem<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { -- line 92 ---------------------------------------- -- line 178 ---------------------------------------- . diag.span_label(hir_ty_span, format!("the `Err`-variant is at least {ty_size} bytes")); . diag.help(format!("try reducing the size of `{err_ty}`, for example by boxing large elements or replacing it with `Box<{err_ty}>`")); . }, . ); . } . } . } . 209,769 ( 0.01%) pub(super) fn check_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx hir::Expr<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . ) { 59,934 ( 0.00%) if let hir::ExprKind::Closure(closure) = expr.kind . && let ty::Closure(_, args) = cx.typeck_results().expr_ty(expr).kind() . && let closure_sig = args.as_closure().sig() . && let Ok(err_binder) = closure_sig.output().try_map_bound(|output_ty| { . if let ty::Adt(adt, args) = output_ty.kind() . && let [_, err_arg] = args.as_slice() . && let Some(err_ty) = err_arg.as_type() . && adt.is_diag_item(cx, sym::Result) . { -- line 200 ---------------------------------------- -- line 206 ---------------------------------------- . { . let err_ty = cx.tcx.instantiate_bound_regions_with_erased(err_binder); . let hir_ty_span = match closure.fn_decl.output { . hir::FnRetTy::Return(hir_ty) => hir_ty.span, . hir::FnRetTy::DefaultReturn(_) => expr.span, . }; . check_result_large_err(cx, err_ty, hir_ty_span, large_err_threshold, large_err_ignored, true); . } 239,736 ( 0.01%) } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs -------------------------------------------------------------------------------- Ir -- line 134 ---------------------------------------- . struct InputMinMax<'tcx> { . input: &'tcx Expr<'tcx>, . min: &'tcx Expr<'tcx>, . max: &'tcx Expr<'tcx>, . is_float: bool, . } . . impl<'tcx> LateLintPass<'tcx> for ManualClamp { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { . // Cheap kind check before the costlier const context query. 29,967 ( 0.00%) if matches!( 59,934 ( 0.00%) expr.kind, . ExprKind::If(..) | ExprKind::Match(..) | ExprKind::MethodCall(..) | ExprKind::Call(..) 19,976 ( 0.00%) ) && !expr.span.from_expansion() 39,952 ( 0.00%) && !is_in_const_context(cx) 1,991,656 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (9,988x) . { . let suggestion = is_if_elseif_else_pattern(cx, expr) . .or_else(|| is_max_min_pattern(cx, expr)) . .or_else(|| is_call_max_min_pattern(cx, expr)) . .or_else(|| is_match_pattern(cx, expr)) . .or_else(|| is_if_elseif_pattern(cx, expr)); . if let Some(suggestion) = suggestion . && self.msrv.meets(cx, msrvs::CLAMP) . { . maybe_emit_suggestion(cx, &suggestion); . } . } 239,736 ( 0.01%) } . 7 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . // Cheap `if`-statement check before the costlier const context query. 1 ( 0.00%) if !block . .stmts . .iter() . .any(|stmt| matches!(stmt.kind, StmtKind::Expr(e) if matches!(e.kind, ExprKind::If(..)))) . { . return; . } . . if is_in_const_context(cx) || !self.msrv.meets(cx, msrvs::CLAMP) { . return; . } . for suggestion in is_two_if_pattern(cx, block) { . maybe_emit_suggestion(cx, &suggestion); . } 8 ( 0.00%) } . } . . fn maybe_emit_suggestion<'tcx>(cx: &LateContext<'tcx>, suggestion: &ClampSuggestion<'tcx>) { . if !suggestion.min_less_than_max(cx) { . return; . } . let ClampSuggestion { . params: InputMinMax { -- line 187 ---------------------------------------- 79,904 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . . declare_lint_pass!(SuspiciousImpl => [ . SUSPICIOUS_ARITHMETIC_IMPL, . SUSPICIOUS_OP_ASSIGN_IMPL, . ]); . . impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 119,868 ( 0.00%) match expr.kind { . hir::ExprKind::Binary(op, _, _) => { . check_expr_inner(cx, expr, op.node, op.span); . }, . hir::ExprKind::AssignOp(op, _, _) => { . check_expr_inner(cx, expr, op.node.into(), op.span); . }, . _ => {}, . } -- line 71 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs -------------------------------------------------------------------------------- Ir -- line 460 ---------------------------------------- . /// assert_eq!(13, unsafe { mem::size_of_val_raw(y) }); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . pub const unsafe fn size_of_val_raw(val: *const T) -> usize { . // SAFETY: the caller must provide a valid raw pointer 1 ( 0.00%) unsafe { intrinsics::size_of_val(val) } . } . . /// Returns the [ABI]-required minimum alignment of a type in bytes. . /// . /// Every reference to a value of the type `T` must be a multiple of this number. . /// . /// This is the alignment used for struct fields. It may be smaller than the preferred alignment. . /// -- line 476 ---------------------------------------- -- line 634 ---------------------------------------- . /// . /// [type-layout]: ../../reference/type-layout.html#r-layout.primitive . #[inline] . #[must_use] . #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . pub const unsafe fn align_of_val_raw(val: *const T) -> usize { . // SAFETY: the caller must provide a valid raw pointer 1 ( 0.00%) unsafe { intrinsics::align_of_val(val) } . } . . /// Returns `true` if dropping values of type `T` matters. . /// . /// This is purely an optimization hint, and may be implemented conservatively: . /// it may return `true` for types that don't actually need to be dropped. . /// As such always returning `true` would be a valid implementation of . /// this function. However if this function actually returns `false`, then you -- line 650 ---------------------------------------- -- line 967 ---------------------------------------- . // such that the old value is not duplicated. Nothing is dropped and . // nothing here can panic. . unsafe { . // Ideally we wouldn't use the intrinsics here, but going through the . // `ptr` methods introduces two unnecessary UbChecks, so until we can . // remove those for pointers that come from references, this uses the . // intrinsics instead so this stays very cheap in MIR (and debug). . 200,167 ( 0.01%) let result = crate::intrinsics::read_via_copy(dest); 160,382 ( 0.01%) crate::intrinsics::write_via_move(dest, src); . result . } . } . . /// Disposes of a value. . /// . /// This effectively does nothing for types which implement `Copy`, e.g. . /// integers. Such values are copied and _then_ moved into the function, so the -- line 984 ---------------------------------------- 29,970 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc.rs -------------------------------------------------------------------------------- Ir -- line 119 ---------------------------------------- . let test = if binop.node == BinOpKind::Or { !test } else { test }; . let then = Sugg::hir_with_context(cx, b, expr.span.ctxt(), "_", &mut app); . diag.span_suggestion(stmt.span, "replace it with", format!("if {test} {{ {then}; }}"), app); . }, . ); . } . } . 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) 89,901 ( 0.00%) || expr.span.desugaring_kind().is_some() 2,876,832 ( 0.10%) => ???:::desugaring_kind (29,967x) 239,736 ( 0.01%) || in_automatically_derived(cx.tcx, expr.hir_id) 13,908,720 ( 0.49%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (29,967x) . { . return; . } . . used_underscore_binding(cx, expr); . used_underscore_items(cx, expr); 239,736 ( 0.01%) } . } . . fn used_underscore_items<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 139,851 ( 0.00%) let (def_id, ident) = match expr.kind { 9,988 ( 0.00%) ExprKind::Call(func, ..) => { 39,952 ( 0.00%) if let ExprKind::Path(QPath::Resolved(.., path)) = func.kind . && let Some(last_segment) = path.segments.last() . && let Res::Def(_, def_id) = last_segment.res . { . (def_id, last_segment.ident) . } else { . return; . } . }, -- line 151 ---------------------------------------- -- line 152 ---------------------------------------- . ExprKind::MethodCall(path, ..) => { . if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { . (def_id, path.ident) . } else { . return; . } . }, . ExprKind::Struct(QPath::Resolved(_, path), ..) => { 1 ( 0.00%) if let Some(last_segment) = path.segments.last() . && let Res::Def(_, def_id) = last_segment.res . { . (def_id, last_segment.ident) . } else { . return; . } . }, . _ => return, . }; . . let name = ident.name.as_str(); . let definition_span = cx.tcx.def_span(def_id); 1 ( 0.00%) if name.starts_with('_') . && !name.starts_with("__") . && !definition_span.from_expansion() . && def_id.is_local() . && !cx.tcx.is_foreign_item(def_id) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_ITEMS, -- line 181 ---------------------------------------- -- line 184 ---------------------------------------- . |diag| { . diag.span_note(definition_span, "item is defined here".to_string()); . }, . ); . } . } . . fn used_underscore_binding<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 159,826 ( 0.01%) let (definition_hir_id, ident) = match expr.kind { . ExprKind::Path(ref qpath) => { 19,980 ( 0.00%) if let QPath::Resolved(None, path) = qpath 6 ( 0.00%) && let Res::Local(id) = path.res . && is_used(cx, expr) . { 5 ( 0.00%) (id, last_path_segment(qpath).ident) 12 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (1x) . } else { . return; . } 1 ( 0.00%) }, . ExprKind::Field(recv, ident) => { . if let Some(adt_def) = cx.typeck_results().expr_ty_adjusted(recv).ty_adt_def() . && let Some(field) = adt_def.all_fields().find(|field| field.name == ident.name) . && let Some(local_did) = field.did.as_local() . && !cx.tcx.type_of(field.did).skip_binder().is_phantom_data() . { . (cx.tcx.local_def_id_to_hir_id(local_did), ident) . } else { . return; . } . }, . _ => return, . }; . . let name = ident.name.as_str(); 1 ( 0.00%) if name.starts_with('_') . && !name.starts_with("__") . && let definition_span = cx.tcx.hir_span(definition_hir_id) . && !definition_span.from_expansion() . && !fulfill_or_allowed(cx, USED_UNDERSCORE_BINDING, [expr.hir_id, definition_hir_id]) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_BINDING, -- line 226 ---------------------------------------- -- line 232 ---------------------------------------- . ); . } . } . . /// Heuristic to see if an expression is used. Should be compatible with . /// `unused_variables`'s idea . /// of what it means for an expression to be "used". . fn is_used(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 3 ( 0.00%) get_parent_expr(cx, expr).is_none_or(|parent| match parent.kind { 99 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (1x) . ExprKind::Assign(_, rhs, _) | ExprKind::AssignOp(_, _, rhs) => { . SpanlessEq::new(cx).eq_expr(parent.span.ctxt(), rhs, expr) . }, . _ => is_used(cx, parent), . }) . } 39,975 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_update.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . pub NEEDLESS_UPDATE, . complexity, . "using `Foo { ..base }` when there are no missing fields" . } . . declare_lint_pass!(NeedlessUpdate => [NEEDLESS_UPDATE]); . . impl<'tcx> LateLintPass<'tcx> for NeedlessUpdate { 149,835 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,936 ( 0.00%) if let ExprKind::Struct(_, fields, StructTailExpr::Base(base)) = expr.kind { . let ty = cx.typeck_results().expr_ty(expr); . if let ty::Adt(def, _) = ty.kind() . && fields.len() == def.non_enum_variant().fields.len() . && !def.variant(0_usize.into()).is_field_list_non_exhaustive() . { . span_lint( . cx, . NEEDLESS_UPDATE, . base.span, . "struct update has no effect, all the fields in the struct have already been specified", . ); . } . } 179,802 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . }, . ); . } . } . . /// Checks if the callee is a "relevant" `CStr` function considered by this lint. . /// Returns the function name. . fn is_c_str_function(cx: &LateContext<'_>, func: &Expr<'_>) -> Option { 39,952 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(cstr, fn_name)) = &func.kind 49,940 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, ty_path)) = &cstr.kind 19,976 ( 0.00%) && cx.tcx.lang_items().c_str() == ty_path.res.opt_def_id() 299,640 ( 0.01%) => ???:::lang_items (9,988x) . { . Some(fn_name.ident.name) . } else { . None . } . } . . /// Checks calls to the `CStr` constructor functions: . /// - `CStr::from_bytes_with_nul(..)` . /// - `CStr::from_bytes_with_nul_unchecked(..)` . /// - `CStr::from_ptr(..)` 69,916 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>], msrv: Msrv) { . if let Some(fn_name) = is_c_str_function(cx, func) . && let [arg] = args . && cx.tcx.sess.edition() >= Edition2021 . && msrv.meets(cx, msrvs::C_STR_LITERALS) . { . match fn_name { . sym::from_bytes_with_nul | sym::from_bytes_with_nul_unchecked . if !arg.span.from_expansion() -- line 85 ---------------------------------------- -- line 87 ---------------------------------------- . && let LitKind::ByteStr(_, StrStyle::Cooked) | LitKind::Str(_, StrStyle::Cooked) = lit.node => . { . check_from_bytes(cx, expr, arg, lit.node, fn_name); . }, . sym::from_ptr => check_from_ptr(cx, expr, arg), . _ => {}, . } . } 79,904 ( 0.00%) } . . /// Checks `CStr::from_ptr(b"foo\0".as_ptr().cast())` . fn check_from_ptr(cx: &LateContext<'_>, expr: &Expr<'_>, arg: &Expr<'_>) { . if let ExprKind::MethodCall(method, lit, [], _) = peel_ptr_cast(arg).kind . && method.ident.name == sym::as_ptr . && !lit.span.from_expansion() . && let ExprKind::Lit(lit) = lit.kind . && let LitKind::ByteStr(_, StrStyle::Cooked) = lit.node -- line 103 ---------------------------------------- 79,904 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_add.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub IMPLICIT_SATURATING_ADD, . style, . "Perform saturating addition instead of implicitly checking max bound of data type" . } . . declare_lint_pass!(ImplicitSaturatingAdd => [IMPLICIT_SATURATING_ADD]); . . impl<'tcx> LateLintPass<'tcx> for ImplicitSaturatingAdd { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::If(cond, then, None) = expr.kind . && let Some((c, op_node, l)) = get_const(cx, cond) . && let BinOpKind::Ne | BinOpKind::Lt = op_node . && let ExprKind::Block(block, None) = then.kind . && let Block { . stmts: . [ . Stmt { . kind: StmtKind::Expr(ex) | StmtKind::Semi(ex), -- line 52 ---------------------------------------- -- line 88 ---------------------------------------- . IMPLICIT_SATURATING_ADD, . expr.span, . "manual saturating add detected", . "use instead", . sugg, . app, . ); . } 239,736 ( 0.01%) } . } . . fn get_int_max(ty: Ty<'_>) -> Option { . use rustc_middle::ty::{Int, Uint}; . match ty.peel_refs().kind() { . Int(IntTy::I8) => i8::MAX.try_into().ok(), . Int(IntTy::I16) => i16::MAX.try_into().ok(), . Int(IntTy::I32) => i32::MAX.try_into().ok(), -- line 104 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs -------------------------------------------------------------------------------- Ir -- line 106 ---------------------------------------- . /// } . /// } . /// ``` . metavar_expns: BTreeMap, . } . . impl ExprMetavarsInUnsafe { . pub fn new(conf: &'static Conf) -> Self { 3 ( 0.00%) Self { . warn_unsafe_macro_metavars_in_private_macros: conf.warn_unsafe_macro_metavars_in_private_macros, . metavar_expns: BTreeMap::new(), . } . } . } . . struct BodyVisitor<'a, 'tcx> { . /// Stack of unsafe blocks -- the top item always represents the last seen unsafe block from -- line 122 ---------------------------------------- -- line 157 ---------------------------------------- . self.expn_depth += 1; . } . walk_stmt(self, s); . if from_expn { . self.expn_depth -= 1; . } . } . 239,736 ( 0.01%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) { 29,967 ( 0.00%) let ctxt = e.span.ctxt(); . 59,934 ( 0.00%) if let ExprKind::Block(block, _) = e.kind 1 ( 0.00%) && let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules . && !ctxt.is_root() . && let Some(macro_def_id) = ctxt.outer_expn_data().macro_def_id . && let Some(macro_def_id) = macro_def_id.as_local() . && (self.lint.warn_unsafe_macro_metavars_in_private_macros || is_public_macro(self.cx, macro_def_id)) . { . self.macro_unsafe_blocks.push(block.hir_id); . self.expn_depth += 1; . walk_block(self, block); . self.expn_depth -= 1; . self.macro_unsafe_blocks.pop(); 119,868 ( 0.00%) } else if ctxt.is_root() && self.expn_depth > 0 { . let unsafe_block = self.macro_unsafe_blocks.last().copied(); . . match (self.lint.metavar_expns.entry(e.span), unsafe_block) { . (Entry::Vacant(e), None) => { . e.insert(MetavarState::ReferencedInSafe); . }, . (Entry::Vacant(e), Some(unsafe_block)) => { . e.insert(MetavarState::ReferencedInUnsafe { -- line 188 ---------------------------------------- -- line 201 ---------------------------------------- . unsafe_blocks.push(unsafe_block); . } . }, . } . . // NB: No need to visit descendant nodes. They're guaranteed to represent the same . // metavariable . } else { 89,901 ( 0.00%) walk_expr(self, e); 2,337,455 ( 0.08%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: (9,989x) . } 239,736 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe { 89,901 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 79,912 ( 0.00%) if is_lint_allowed(cx, MACRO_METAVARS_IN_UNSAFE, body.value.hir_id) { 8,264,935 ( 0.29%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (9,989x) . return; . } . . // This BodyVisitor is separate and not part of the lint pass because there is no . // `check_stmt_post` on `(Late)LintPass`, which we'd need to detect when we're leaving a macro span . 59,934 ( 0.00%) let mut vis = BodyVisitor { . macro_unsafe_blocks: Vec::new(), . #[expect(clippy::bool_to_int_with_if)] // obfuscates the meaning 19,978 ( 0.00%) expn_depth: if body.value.span.from_expansion() { 1 } else { 0 }, . cx, . lint: self . }; . vis.visit_body(body); 69,923 ( 0.00%) } . . fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { . // Aggregate all unsafe blocks from all spans: . // ``` . // macro_rules! x { . // ($w:expr, $x:expr, $y:expr) => { $w; unsafe { $w; $x; }; unsafe { $x; $y; }; } . // } . // $w: [] (unsafe#0 is never added because it was referenced in a safe context) -- line 239 ---------------------------------------- -- line 266 ---------------------------------------- . // The invocation doesn't matter. Also we want to dedupe by the unsafe block and not by anything . // related to the callsite. . let span = cx.tcx.hir_span(id); . . (id, Span::new(span.lo(), span.hi(), SyntaxContext::root(), None)) . }) . .dedup_by(|&(_, a), &(_, b)| a == b); . 20 ( 0.00%) for (id, span) in bad_unsafe_blocks { 49 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/adaptors/coalesce.rs:, ::check_crate_post::{closure#0}>>>, ::check_crate_post::{closure#1}>, ::check_crate_post::{closure#2}>, itertools::adaptors::coalesce::DedupPred2CoalescePred<::check_crate_post::{closure#3}>, itertools::adaptors::coalesce::NoCount> as core::iter::traits::iterator::Iterator>::next (1x) . span_lint_hir_and_then( . cx, . MACRO_METAVARS_IN_UNSAFE, . id, . span, . "this macro expands metavariables in an unsafe block", . |diag| { . diag.note("this allows the user of the macro to write unsafe code outside of an unsafe block"); -- line 282 ---------------------------------------- -- line 284 ---------------------------------------- . "consider expanding any metavariables outside of this block, e.g. by storing them in a variable", . ); . diag.help( . "... or also expand referenced metavariables in a safe context to require an unsafe block at callsite", . ); . }, . ); . } 8 ( 0.00%) } . } 119,870 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/rc_clone_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . pub RC_CLONE_IN_VEC_INIT, . suspicious, . "initializing reference-counted pointer in `vec![elem; len]`" . } . . declare_lint_pass!(RcCloneInVecInit => [RC_CLONE_IN_VEC_INIT]); . . impl LateLintPass<'_> for RcCloneInVecInit { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; . let Some(VecArgs::Repeat(elem, len)) = VecArgs::hir(cx, expr) else { . return; . }; . let Some((symbol, func_span)) = ref_init(cx, elem) else { . return; . }; . . emit_lint(cx, symbol, macro_call.span, elem, len, func_span); 239,736 ( 0.01%) } . } . . fn loop_init_suggestion(elem: &str, len: &str, indent: &str) -> String { . format!( . r"{{ . {indent} let mut v = Vec::with_capacity({len}); . {indent} (0..{len}).for_each(|_| v.push({elem})); . {indent} v -- line 72 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . derive_src: Option, . . // When a macro is disallowed in an early pass, it's stored . // and emitted during the late pass. This happens for attributes. . early_macro_cache: AttrStorage, . } . . impl DisallowedMacros { 6 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, early_macro_cache: AttrStorage) -> Self { 12 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_macros, . PathNS::Macro, . |def_kind| matches!(def_kind, DefKind::Macro(_)), . "macro", . false, . ); 6 ( 0.00%) Self { 4 ( 0.00%) disallowed, . seen: FxHashSet::default(), . derive_src: None, . early_macro_cache, . } 5 ( 0.00%) } . 719,392 ( 0.03%) fn check(&mut self, cx: &LateContext<'_>, span: Span, derive_src: Option) { 89,924 ( 0.00%) if self.disallowed.is_empty() { . return; . } . . for mac in macro_backtrace(span) { . if !self.seen.insert(mac.expn) { . return; . } . -- line 107 ---------------------------------------- -- line 119 ---------------------------------------- . msg, . add_note, . ); . } else { . span_lint_and_then(cx, DISALLOWED_MACROS, mac.span, msg, add_note); . } . } . } 719,392 ( 0.03%) } . } . . impl LateLintPass<'_> for DisallowedMacros { 6 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'_>) { . // once we check a crate in the late pass we can emit the early pass lints . if let Some(attr_spans) = self.early_macro_cache.clone().0.get() { . for span in attr_spans { 5 ( 0.00%) self.check(cx, *span, None); 18 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (1x) . } . } 7 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 149,835 ( 0.01%) self.check(cx, expr.span, None); 539,406 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (29,967x) . // `$t + $t` can have the context of $t, check also the span of the binary operator 59,934 ( 0.00%) if let ExprKind::Binary(op, ..) = expr.kind { . self.check(cx, op.span, None); . } . } . . fn check_stmt(&mut self, cx: &LateContext<'_>, stmt: &Stmt<'_>) { . self.check(cx, stmt.span, None); . } . . fn check_ty(&mut self, cx: &LateContext<'_>, ty: &Ty<'_, AmbigArg>) { 79,924 ( 0.00%) self.check(cx, ty.span, None); 359,658 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (19,981x) . } . . fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { 4 ( 0.00%) self.check(cx, pat.span, None); 18 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (1x) . } . 50 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 20 ( 0.00%) self.check(cx, item.span, self.derive_src); 90 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (5x) 25 ( 0.00%) self.check(cx, item.vis_span, None); 90 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (5x) . 15 ( 0.00%) if matches!( 5 ( 0.00%) item.kind, . ItemKind::Struct(..) | ItemKind::Enum(..) | ItemKind::Union(..) . ) && macro_backtrace(item.span).all(|m| !matches!(m.kind, MacroKind::Derive)) . { 2 ( 0.00%) self.derive_src = Some(item.owner_id); . } 40 ( 0.00%) } . . fn check_foreign_item(&mut self, cx: &LateContext<'_>, item: &ForeignItem<'_>) { . self.check(cx, item.span, None); . self.check(cx, item.vis_span, None); . } . . fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &ImplItem<'_>) { 49,945 ( 0.00%) self.check(cx, item.span, None); 179,802 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (9,989x) 29,967 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind { 39,956 ( 0.00%) self.check(cx, vis_span, None); 179,802 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (9,989x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { . self.check(cx, item.span, None); . } . . fn check_path(&mut self, cx: &LateContext<'_>, path: &Path<'_>, _: HirId) { 79,944 ( 0.00%) self.check(cx, path.span, None); 359,748 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (19,986x) . } . } 3 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/if_let_mutex.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . correctness, . "locking a `Mutex` in an `if let` block can cause deadlocks" . } . . declare_lint_pass!(IfLetMutex => [IF_LET_MUTEX]); . . impl<'tcx> LateLintPass<'tcx> for IfLetMutex { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 89,901 ( 0.00%) if cx.tcx.sess.edition() >= Edition2024 { . return; . } . 29,967 ( 0.00%) if let Some(higher::IfLet { . let_expr, . if_then, . if_else: Some(if_else), . .. 59,934 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 149,835 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . && let ctxt = expr.span.ctxt() . && let Some(op_mutex) = for_each_expr_without_closures(let_expr, |e| mutex_lock_call(cx, ctxt, e, None)) . && let Some(arm_mutex) = . for_each_expr_without_closures((if_then, if_else), |e| mutex_lock_call(cx, ctxt, e, Some(op_mutex))) . { . let diag = |diag: &mut Diag<'_, ()>| { . diag.span_label( . op_mutex.span, -- line 72 ---------------------------------------- -- line 81 ---------------------------------------- . span_lint_and_then( . cx, . IF_LET_MUTEX, . expr.span, . "calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock", . diag, . ); . } 29,967 ( 0.00%) } . } . . fn mutex_lock_call<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . op_mutex: Option<&'tcx Expr<'_>>, . ) -> ControlFlow<&'tcx Expr<'tcx>> { -- line 97 ---------------------------------------- 509,439 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unicode.rs -------------------------------------------------------------------------------- Ir -- line 74 ---------------------------------------- . . declare_lint_pass!(Unicode => [ . INVISIBLE_CHARACTERS, . NON_ASCII_LITERAL, . UNICODE_NOT_NFC, . ]); . . impl LateLintPass<'_> for Unicode { 119,868 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 29,964 ( 0.00%) && let LitKind::Str(_, _) | LitKind::Char(_) = lit.node . { . check_str(cx, lit.span, expr.hir_id); . } 149,835 ( 0.01%) } . } . . fn escape>(s: T) -> String { . let mut result = String::new(); . for c in s { . if c as u32 > 0x7F { . for d in c.escape_unicode() { . result.push(d); -- line 96 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::snippet_opt; . use clippy_utils::sym; . use rustc_errors::Applicability; . use rustc_hir as hir; . use rustc_hir::def_id::DefId; . use rustc_lint::LateContext; . use rustc_span::Span; . 89,892 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, qpath: &hir::QPath<'_>, def_id: DefId) -> bool { 79,904 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Cow, def_id) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let hir::QPath::Resolved(_, path) = qpath . && let [.., last_seg] = path.segments . && let Some(args) = last_seg.args . && let [_lt, carg] = args.args . && let hir::GenericArg::Type(cty) = carg . && let Some((span, repl)) = replacement(cx, cty.as_unambig_ty()) . { . span_lint_and_sugg( -- line 20 ---------------------------------------- -- line 24 ---------------------------------------- . "needlessly owned Cow type", . "use", . repl, . Applicability::Unspecified, . ); . return true; . } . false 79,904 ( 0.00%) } . . fn replacement(cx: &LateContext<'_>, cty: &hir::Ty<'_>) -> Option<(Span, String)> { . if cty.basic_res().is_lang_item(cx, hir::LangItem::String) { . return Some((cty.span, "str".into())); . } . if cty.basic_res().is_diag_item(cx, sym::Vec) { . return if let hir::TyKind::Path(hir::QPath::Resolved(_, path)) = cty.kind . && let [.., last_seg] = path.segments -- line 40 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . pub BYTE_CHAR_SLICES, . style, . "hard to read byte char slice" . } . . declare_lint_pass!(ByteCharSlice => [BYTE_CHAR_SLICES]); . . impl<'tcx> LateLintPass<'tcx> for ByteCharSlice { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if !expr.span.from_expansion() . && let Some((has_ref, slice)) = is_byte_char_slices(cx, expr) . { . span_lint_and_then( . cx, . BYTE_CHAR_SLICES, . expr.span, . "can be more succinctly written as a byte str", . |diag| { -- line 49 ---------------------------------------- -- line 64 ---------------------------------------- . if !has_ref && !cx.typeck_results().expr_ty_adjusted(expr).is_array_slice() { . sugg = sugg.deref(); . } . . diag.span_suggestion(expr.span, "try", sugg, app); . }, . ); . } 239,736 ( 0.01%) } . } . . /// Checks whether the slice is that of byte chars, and if so, builds a byte-string out of it . fn is_byte_char_slices<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option<(bool, Vec)> { 89,901 ( 0.00%) let (has_ref, expr) = if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = expr.kind { . (true, inner) 149,835 ( 0.01%) } else if let Some(parent) = get_parent_expr(cx, expr) // Already checked by the parent expr. 3,214,533 ( 0.11%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (29,967x) 39,952 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, _) = parent.kind . { . return None; . } else { . (false, expr) . }; . 59,934 ( 0.00%) if let ExprKind::Array(members) = expr.kind . && !members.is_empty() . && !span_contains_comment(cx, expr.span) . && !span_contains_cfg(cx, expr.span) . { . return members . .iter() . .try_fold(Vec::new(), |mut acc, member| { . if let ExprKind::Lit(lit) = member.kind -- line 95 ---------------------------------------- 119,868 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl NonnullUncheckedOnBoxPtr { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for NonnullUncheckedOnBoxPtr { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if !expr.span.from_expansion() 29,964 ( 0.00%) && let ExprKind::Call(nonnull_new_unchecked, [arg]) = expr.kind 19,976 ( 0.00%) && let ExprKind::Call(box_into_raw, [arg]) = arg.kind . && nonnull_new_unchecked . .ty_rel_def_if_named(cx, sym::new_unchecked) . .opt_parent(cx) . .opt_impl_ty(cx) . .is_diag_item(cx, sym::NonNull) . && box_into_raw . .ty_rel_def_if_named(cx, sym::into_raw) . .opt_parent(cx) -- line 62 ---------------------------------------- -- line 89 ---------------------------------------- . } else { . format!("NonNull::from(Box::leak({arg_name}))") . }; . . diag.span_suggestion(span, "try", sugg, app); . }, . ); . } 239,736 ( 0.01%) } . } 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs -------------------------------------------------------------------------------- Ir -- line 124 ---------------------------------------- . "consider using `expect{method_suffix}()` to provide a better panic message" . )); . } . }, . ); . } . . #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] 69,916 ( 0.00%) pub(super) fn check_call( . cx: &LateContext<'_>, . expr: &Expr<'_>, . func: &Expr<'_>, . args: &[Expr<'_>], . allow_unwrap_in_consts: bool, . allow_unwrap_in_tests: bool, . allow_expect_in_consts: bool, . allow_expect_in_tests: bool, . unwrap_allowed_ids: &rustc_data_structures::fx::FxHashSet, . unwrap_allowed_aliases: &[rustc_hir::def_id::DefId], . ) { . let Some(recv) = args.first() else { . return; . }; 109,868 ( 0.00%) let Some((DefKind::AssocFn, def_id)) = cx.typeck_results().type_dependent_def(func.hir_id) else { 549,340 ( 0.02%) => ???:::type_dependent_def (9,988x) . return; . }; . 9,988 ( 0.00%) match cx.tcx.item_name(def_id) { . sym::unwrap => { . check( . cx, . expr, . recv, . false, . allow_unwrap_in_consts, . allow_unwrap_in_tests, -- line 159 ---------------------------------------- -- line 198 ---------------------------------------- . allow_expect_in_tests, . unwrap_allowed_ids, . unwrap_allowed_aliases, . Variant::Expect, . ); . }, . _ => (), . } 79,904 ( 0.00%) } 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zero_div_zero.rs -------------------------------------------------------------------------------- Ir -- line 24 ---------------------------------------- . pub ZERO_DIVIDED_BY_ZERO, . complexity, . "usage of `0.0 / 0.0` to obtain NaN instead of `f32::NAN` or `f64::NAN`" . } . . declare_lint_pass!(ZeroDiv => [ZERO_DIVIDED_BY_ZERO]); . . impl<'tcx> LateLintPass<'tcx> for ZeroDiv { 179,802 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // check for instances of 0.0/0.0 59,934 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind . && op.node == BinOpKind::Div . // TODO - constant_simple does not fold many operations involving floats. . // That's probably fine for this lint - it's pretty unlikely that someone would . // do something like 0.0/(2.0 - 2.0), but it would be nice to warn on that case too. . && let ecx = ConstEvalCtxt::new(cx) . && let ctxt = expr.span.ctxt() . && let Some(lhs_value) = ecx.eval_local(left, ctxt) . && let Some(rhs_value) = ecx.eval_local(right, ctxt) -- line 42 ---------------------------------------- -- line 54 ---------------------------------------- . cx, . ZERO_DIVIDED_BY_ZERO, . expr.span, . "constant division of `0.0` with `0.0` will always result in NaN", . None, . format!("consider using `{float_type}::NAN` if you would like a constant representing NaN"), . ); . } 209,769 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/from_str_radix_10.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub FROM_STR_RADIX_10, . style, . "from_str_radix with radix 10" . } . . declare_lint_pass!(FromStrRadix10 => [FROM_STR_RADIX_10]); . . impl<'tcx> LateLintPass<'tcx> for FromStrRadix10 { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, exp: &Expr<'tcx>) { 79,910 ( 0.00%) if let ExprKind::Call(maybe_path, [src, radix]) = &exp.kind . && let ExprKind::Path(QPath::TypeRelative(ty, pathseg)) = &maybe_path.kind . . // check if the second argument is a primitive `10` . && is_integer_literal(radix, 10) . . // check if the second part of the path indeed calls the associated . // function `from_str_radix` . && pathseg.ident.name == sym::from_str_radix -- line 55 ---------------------------------------- -- line 79 ---------------------------------------- . FROM_STR_RADIX_10, . exp.span, . "this call to `from_str_radix` can be replaced with a call to `str::parse`", . "try", . format!("{sugg}.parse::<{}>()", prim_ty.name_str()), . Applicability::MaybeIncorrect, . ); . } 239,736 ( 0.01%) } . } . . /// Checks if a Ty is `String` or `&str` . fn is_ty_stringish(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { . ty.is_lang_item(cx, LangItem::String) || ty.peel_refs().is_str() . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs -------------------------------------------------------------------------------- Ir -- line 243 ---------------------------------------- . // The is a separate function to avoid doing it in every generic version, but it . // looks small to the mir inliner (particularly in panic=abort) so leave it to . // the backend to decide whether pulling it in everywhere is worth doing. . #[rustc_no_mir_inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[cfg(not(no_global_oom_handling))] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const fn box_new_uninit(layout: Layout) -> *mut u8 { 20,819 ( 0.00%) match Global.allocate(layout) { . Ok(ptr) => ptr.as_mut_ptr(), . Err(_) => handle_alloc_error(layout), . } . } . . /// Helper for `vec!`. . /// . /// This is unsafe, but has to be marked as safe or else we couldn't use it in `vec!`. -- line 259 ---------------------------------------- -- line 285 ---------------------------------------- . #[must_use] . #[rustc_diagnostic_item = "box_new"] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub fn new(x: T) -> Self { . // This is `Box::new_uninit` but inlined to avoid build time regressions. . let ptr = box_new_uninit(::LAYOUT) as *mut T; . // Nothing below can panic so we do not have to worry about deallocating `ptr`. . // SAFETY: we just allocated the box to store `x`. 159,854 ( 0.01%) unsafe { core::intrinsics::write_via_move(ptr, x) }; 89 ( 0.00%) => ???:0x0000000000173dc0 (1x) . // SAFETY: we just initialized the memory `ptr` points to. . unsafe { mem::transmute(ptr) } . } . . /// Constructs a new box with uninitialized contents. . /// . /// # Examples . /// -- line 301 ---------------------------------------- -- line 1990 ---------------------------------------- . #[inline] . fn drop(&mut self) { . // the T in the Box is dropped by the compiler before the destructor is run . . let ptr = self.0; . . unsafe { . let layout = Layout::for_value_raw(ptr.as_ptr()); 2 ( 0.00%) if layout.size() != 0 { . self.1.deallocate(From::from(ptr.cast()), layout); . } . } . } . } . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] -- line 2006 ---------------------------------------- 71 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs -------------------------------------------------------------------------------- Ir -- line 61 ---------------------------------------- . pub struct Map { . // Used for `SplitWhitespace` and `SplitAsciiWhitespace` `as_str` methods . pub(crate) iter: I, . f: F, . } . . impl Map { . pub(in crate::iter) const fn new(iter: I, f: F) -> Map { 40,003 ( 0.00%) Map { iter, f } . } . . pub(crate) fn into_inner(self) -> I { . self.iter . } . } . . #[stable(feature = "core_impl_debug", since = "1.9.0")] -- line 77 ---------------------------------------- -- line 80 ---------------------------------------- . f.debug_struct("Map").field("iter", &self.iter).finish() . } . } . . fn map_fold( . mut f: impl FnMut(T) -> B, . mut g: impl FnMut(Acc, B) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { 19 ( 0.00%) move |acc, elt| g(acc, f(elt)) . } . . fn map_try_fold<'a, T, B, Acc, R>( . f: &'a mut impl FnMut(T) -> B, . mut g: impl FnMut(Acc, B) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { . move |acc, elt| g(acc, f(elt)) . } -- line 96 ---------------------------------------- -- line 98 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Map . where . F: FnMut(I::Item) -> B, . { . type Item = B; . . #[inline] 147 ( 0.00%) fn next(&mut self) -> Option { 39,976 ( 0.00%) self.iter.next().map(&mut self.f) 64 ( 0.00%) => ???:::next (1x) 54 ( 0.00%) } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.iter.size_hint() . } . 299,670 ( 0.01%) fn try_fold(&mut self, init: Acc, g: G) -> R . where . Self: Sized, . G: FnMut(Acc, Self::Item) -> R, . R: Try, . { . self.iter.try_fold(init, map_try_fold(&mut self.f, g)) 239,736 ( 0.01%) } . 89,988 ( 0.00%) fn fold(self, init: Acc, g: G) -> Acc . where . G: FnMut(Acc, Self::Item) -> Acc, . { 2 ( 0.00%) self.iter.fold(init, map_fold(self.f, g)) 79,992 ( 0.00%) } . . #[inline] . unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> B . where . Self: TrustedRandomAccessNoCoerce, . { . // SAFETY: the caller must uphold the contract for . // `Iterator::__iterator_get_unchecked`. -- line 137 ---------------------------------------- 9,993 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs -------------------------------------------------------------------------------- Ir -- line 213 ---------------------------------------- . impl Usage { . fn new(span: Span, idx: usize) -> Self { . Self { span, idx } . } . } . . /// The parameters being checked by the lint, indexed by both the parameter's `HirId` and the . /// `DefId` of the function paired with the parameter's index. 2 ( 0.00%) #[derive(Default)] . #[expect(clippy::struct_field_names)] . struct Params { . params: Vec, . by_id: HirIdMap, . by_fn: FxHashMap<(DefId, usize), usize>, . } . impl Params { . fn insert(&mut self, param: Param, id: HirId) { -- line 229 ---------------------------------------- -- line 230 ---------------------------------------- . let idx = self.params.len(); . self.by_id.insert(id, idx); . self.by_fn.insert((param.fn_id, param.idx), idx); . self.params.push(param); . } . . fn remove_by_id(&mut self, id: HirId) { . if let Some(param) = self.get_by_id_mut(id) { 3 ( 0.00%) param.uses = Vec::new(); 4 ( 0.00%) let key = (param.fn_id, param.idx); . self.by_fn.remove(&key); . // FIXME(rust/#120456) - is `swap_remove` correct? 2 ( 0.00%) self.by_id.swap_remove(&id); 88 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (1x) . } . } . . fn get_by_id_mut(&mut self, id: HirId) -> Option<&mut Param> { 8 ( 0.00%) self.params.get_mut(*self.by_id.get(&id)?) 54 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (2x) . } . . fn get_by_fn(&self, id: DefId, idx: usize) -> Option<&Param> { . self.params.get(*self.by_fn.get(&(id, idx))?) . } . . fn clear(&mut self) { . self.params.clear(); -- line 255 ---------------------------------------- -- line 257 ---------------------------------------- . self.by_fn.clear(); . } . . /// Sets the `apply_lint` flag on each parameter. . fn flag_for_linting(&self) { . // Stores the list of parameters currently being resolved. Needed to avoid cycles. . let mut eval_stack = Vec::new(); . for param in &self.params { 3 ( 0.00%) self.try_disable_lint_for_param(param, &mut eval_stack); 7 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::try_disable_lint_for_param (1x) . } . } . . // Use by calling `flag_for_linting`. . fn try_disable_lint_for_param(&self, param: &Param, eval_stack: &mut Vec) -> bool { 2 ( 0.00%) if !param.apply_lint.get() { . true 1 ( 0.00%) } else if param.uses.is_empty() { . // Don't lint on unused parameters. . param.apply_lint.set(false); . true . } else if eval_stack.contains(¶m.idx) { . // Already on the evaluation stack. Returning false will continue to evaluate other dependencies. . false . } else { . eval_stack.push(param.idx); -- line 281 ---------------------------------------- -- line 290 ---------------------------------------- . param.apply_lint.set(false); . eval_stack.pop(); . return true; . } . } . eval_stack.pop(); . false . } 1 ( 0.00%) } . } . 11 ( 0.00%) #[derive(Default)] . pub struct OnlyUsedInRecursion { . /// Track the top-level body entered. Needed to delay reporting when entering nested bodies. . entered_body: Option, . params: Params, . } . . impl<'tcx> LateLintPass<'tcx> for OnlyUsedInRecursion { 79,912 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 29,967 ( 0.00%) if body.value.span.from_expansion() { . return; . } . // `skip_params` is either `0` or `1` to skip the `self` parameter in trait functions. . // It can't be renamed, and it can't be removed without removing it from multiple functions. 169,813 ( 0.01%) let (fn_id, fn_kind, skip_params) = match cx.tcx.parent_hir_node(body.value.hir_id) { 961,632 ( 0.03%) => ???:::parent_hir_node (9,989x) . Node::Item(i) => (i.owner_id.to_def_id(), FnKind::Fn, 0), . Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(ref sig, _), . owner_id, . .. . }) => ( . owner_id.to_def_id(), . FnKind::TraitFn, . usize::from(sig.decl.implicit_self().has_implicit_self()), . ), . Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(ref sig, _), 1 ( 0.00%) owner_id, 1 ( 0.00%) impl_kind, . .. . }) => { 4 ( 0.00%) if let ImplItemImplKind::Trait { trait_item_def_id, .. } = impl_kind . && let Ok(trait_item_id) = trait_item_def_id . { . let impl_id = cx.tcx.local_parent(owner_id.def_id); . let trait_ref = cx.tcx.impl_trait_ref(impl_id).instantiate_identity().skip_norm_wip(); . ( . trait_item_id, . FnKind::ImplTraitFn( . std::ptr::from_ref(cx.tcx.erase_and_anonymize_regions(trait_ref.args)) as usize -- line 340 ---------------------------------------- -- line 342 ---------------------------------------- . usize::from(sig.decl.implicit_self().has_implicit_self()), . ) . } else { . (owner_id.to_def_id(), FnKind::Fn, 0) . } . }, . _ => return, . }; 2 ( 0.00%) body.params . .iter() . .enumerate() . .skip(skip_params) 4 ( 0.00%) .filter_map(|(idx, p)| match p.pat.kind { 10 ( 0.00%) PatKind::Binding(_, id, ident, None) if !ident.as_str().starts_with('_') => { 32 ( 0.00%) => ???:::as_str (1x) . Some((id, Param::new(fn_id, fn_kind, idx, ident))) . }, . _ => None, . }) . .for_each(|(id, param)| self.params.insert(param, id)); 1 ( 0.00%) if self.entered_body.is_none() { 2 ( 0.00%) self.entered_body = Some(body.value.hir_id); . } 79,912 ( 0.00%) } . 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) { . if let Some(id) = e.res_local_id() . && let Some(param) = self.params.get_by_id_mut(id) . { . let typeck = cx.typeck_results(); 1 ( 0.00%) let span = e.span; . let mut e = e; . loop { 10 ( 0.00%) match get_expr_use_or_unification_node(cx.tcx, e) { 177 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (1x) . None | Some((Node::Stmt(_), _)) => return, . Some((Node::Expr(parent), child_id)) => match parent.kind { . // Recursive call. Track which index the parameter is used in. . ExprKind::Call(callee, args) . if callee.res(cx).opt_def_id().is_some_and(|id| { . id == param.fn_id && has_matching_args(param.fn_kind, typeck.node_args(callee.hir_id)) . }) => . { -- line 382 ---------------------------------------- -- line 428 ---------------------------------------- . _ => (), . }, . _ => (), . } . self.params.remove_by_id(id); . return; . } . } 239,736 ( 0.01%) } . 69,923 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 1 ( 0.00%) if self.entered_body == Some(body.value.hir_id) { 1 ( 0.00%) self.entered_body = None; . self.params.flag_for_linting(); . for param in &self.params.params { 2 ( 0.00%) if param.apply_lint.get() { . if param.ident.name == kw::SelfLower { . span_lint_and_then( . cx, . SELF_ONLY_USED_IN_RECURSION, . param.ident.span, . "`self` is only used in recursion", . |diag| { . diag.span_note( -- line 451 ---------------------------------------- -- line 473 ---------------------------------------- . ); . }, . ); . } . } . } . self.params.clear(); . } 79,912 ( 0.00%) } . } . . fn has_matching_args(kind: FnKind, args: GenericArgsRef<'_>) -> bool { . match kind { . FnKind::Fn => true, . FnKind::TraitFn => args.iter().enumerate().all(|(idx, subst)| match subst.kind() { . GenericArgKind::Lifetime(_) => true, . GenericArgKind::Type(ty) => matches!(*ty.kind(), ty::Param(ty) if ty.index as usize == idx), -- line 489 ---------------------------------------- 20 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint; . use clippy_utils::macros::{find_assert_eq_args, root_macro_call_first_node}; . use clippy_utils::{is_unit_expr, sym}; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . . use super::UNIT_CMP; . 269,703 ( 0.01%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . if let Some(macro_call) = root_macro_call_first_node(cx, expr) . && let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) . { . let result = match diag_name { . sym::assert_eq_macro | sym::debug_assert_eq_macro => "succeed", . sym::assert_ne_macro | sym::debug_assert_ne_macro => "fail", . _ => return, . }; -- line 18 ---------------------------------------- -- line 33 ---------------------------------------- . "`{}` of unit values detected. This will always {result}", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } . return; . } . 59,934 ( 0.00%) if let ExprKind::Binary(ref cmp, left, _) = expr.kind { . let op = cmp.node; . if op.is_comparison() && cx.typeck_results().expr_ty(left).is_unit() { . let result = match op { . BinOpKind::Eq | BinOpKind::Le | BinOpKind::Ge => "true", . _ => "false", . }; . span_lint( . cx, -- line 49 ---------------------------------------- -- line 51 ---------------------------------------- . expr.span, . format!( . "{}-comparison of unit values detected. This will always be {result}", . op.as_str() . ), . ); . } . } 239,736 ( 0.01%) } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs -------------------------------------------------------------------------------- Ir -- line 81 ---------------------------------------- . Method(Ident, &'a FnSig<'a>), . . /// `|x, y| {}` . Closure, . } . . impl<'a> FnKind<'a> { . pub fn header(&self) -> Option<&FnHeader> { 10 ( 0.00%) match *self { . FnKind::ItemFn(_, _, ref header) => Some(header), 4 ( 0.00%) FnKind::Method(_, ref sig) => Some(&sig.header), . FnKind::Closure => None, . } . } . . pub fn constness(self) -> Constness { . self.header().map_or(Constness::NotConst, |header| header.constness) . } . -- line 99 ---------------------------------------- -- line 252 ---------------------------------------- . Self::Result::output() . } . . /// Like `visit_nested_item()`, but for impl items. See . /// `visit_nested_item()` for advice on when to override this . /// method. . fn visit_nested_impl_item(&mut self, id: ImplItemId) -> Self::Result { . if Self::NestedFilter::INTER { 39,956 ( 0.00%) let item = self.maybe_tcx().hir_impl_item(id); 570,717 ( 0.02%) => ???:::hir_impl_item (9,989x) . try_visit!(self.visit_impl_item(item)); . } . Self::Result::output() . } . . /// Like `visit_nested_item()`, but for foreign items. See . /// `visit_nested_item()` for advice on when to override this . /// method. -- line 268 ---------------------------------------- -- line 274 ---------------------------------------- . Self::Result::output() . } . . /// Invoked to visit the body of a function, method or closure. Like . /// `visit_nested_item`, does nothing by default unless you override . /// `Self::NestedFilter`. . fn visit_nested_body(&mut self, id: BodyId) -> Self::Result { . if Self::NestedFilter::INTRA { 69,930 ( 0.00%) let body = self.maybe_tcx().hir_body(id); 52 ( 0.00%) => ???:::hir_body (1x) . try_visit!(self.visit_body(body)); . } . Self::Result::output() . } . . fn visit_param(&mut self, param: &'v Param<'v>) -> Self::Result { . walk_param(self, param) . } -- line 290 ---------------------------------------- -- line 314 ---------------------------------------- . walk_mod(self, m) . } . fn visit_foreign_item(&mut self, i: &'v ForeignItem<'v>) -> Self::Result { . walk_foreign_item(self, i) . } . fn visit_local(&mut self, l: &'v LetStmt<'v>) -> Self::Result { . walk_local(self, l) . } 9 ( 0.00%) fn visit_block(&mut self, b: &'v Block<'v>) -> Self::Result { 39 ( 0.00%) walk_block(self, b) 114 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>> (1x) . } . fn visit_stmt(&mut self, s: &'v Stmt<'v>) -> Self::Result { . walk_stmt(self, s) . } . fn visit_arm(&mut self, a: &'v Arm<'v>) -> Self::Result { . walk_arm(self, a) . } . fn visit_pat(&mut self, p: &'v Pat<'v>) -> Self::Result { 6 ( 0.00%) walk_pat(self, p) 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat:: (1x) . } . fn visit_pat_field(&mut self, f: &'v PatField<'v>) -> Self::Result { . walk_pat_field(self, f) . } . fn visit_pat_expr(&mut self, expr: &'v PatExpr<'v>) -> Self::Result { . walk_pat_expr(self, expr) . } . fn visit_lit(&mut self, _hir_id: HirId, _lit: Lit, _is_negated_pat: bool) -> Self::Result { -- line 340 ---------------------------------------- -- line 351 ---------------------------------------- . walk_generic_arg(self, generic_arg) . } . . /// All types are treated as ambiguous types for the purposes of hir visiting in . /// order to ensure that visitors can handle infer vars without it being too error-prone. . /// . /// The [`Visitor::visit_infer`] method should be overridden in order to handle infer vars. . fn visit_ty(&mut self, t: &'v Ty<'v, AmbigArg>) -> Self::Result { 59,947 ( 0.00%) walk_ty(self, t) 449,460 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (9,988x) . } . . fn visit_const_item_rhs(&mut self, c: ConstItemRhs<'v>) -> Self::Result { . walk_const_item_rhs(self, c) . } . . /// All consts are treated as ambiguous consts for the purposes of hir visiting in . /// order to ensure that visitors can handle infer vars without it being too error-prone. -- line 367 ---------------------------------------- -- line 376 ---------------------------------------- . self.visit_id(inf_id) . } . . fn visit_lifetime(&mut self, lifetime: &'v Lifetime) -> Self::Result { . walk_lifetime(self, lifetime) . } . . fn visit_expr(&mut self, ex: &'v Expr<'v>) -> Self::Result { 59,944 ( 0.00%) walk_expr(self, ex) 144 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 (1x) . } . fn visit_expr_field(&mut self, field: &'v ExprField<'v>) -> Self::Result { . walk_expr_field(self, field) . } . fn visit_const_arg_expr_field(&mut self, field: &'v ConstArgExprField<'v>) -> Self::Result { . walk_const_arg_expr_field(self, field) . } . fn visit_pattern_type_pattern(&mut self, p: &'v TyPat<'v>) -> Self::Result { -- line 392 ---------------------------------------- -- line 413 ---------------------------------------- . fn visit_fn( . &mut self, . fk: FnKind<'v>, . fd: &'v FnDecl<'v>, . b: BodyId, . _: Span, . id: LocalDefId, . ) -> Self::Result { 2 ( 0.00%) walk_fn(self, fk, fd, b, id) 454 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_fn::> (1x) . } . fn visit_use(&mut self, path: &'v UsePath<'v>, hir_id: HirId) -> Self::Result { . walk_use(self, path, hir_id) . } . fn visit_trait_item(&mut self, ti: &'v TraitItem<'v>) -> Self::Result { . walk_trait_item(self, ti) . } . fn visit_trait_item_ref(&mut self, ii: &'v TraitItemId) -> Self::Result { . walk_trait_item_ref(self, *ii) . } . fn visit_impl_item(&mut self, ii: &'v ImplItem<'v>) -> Self::Result { 29,967 ( 0.00%) walk_impl_item(self, ii) 3,058,179 ( 0.11%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item::> (9,989x) . } . fn visit_foreign_item_ref(&mut self, ii: &'v ForeignItemId) -> Self::Result { . walk_foreign_item_ref(self, *ii) . } . fn visit_impl_item_ref(&mut self, ii: &'v ImplItemId) -> Self::Result { . walk_impl_item_ref(self, *ii) . } . fn visit_trait_ref(&mut self, t: &'v TraitRef<'v>) -> Self::Result { -- line 441 ---------------------------------------- -- line 464 ---------------------------------------- . } . fn visit_variant(&mut self, v: &'v Variant<'v>) -> Self::Result { . walk_variant(self, v) . } . fn visit_label(&mut self, label: &'v Label) -> Self::Result { . walk_label(self, label) . } . // The span is that of the surrounding type/pattern/expr/whatever. 69,930 ( 0.00%) fn visit_qpath(&mut self, qpath: &'v QPath<'v>, id: HirId, _span: Span) -> Self::Result { 89,960 ( 0.00%) walk_qpath(self, qpath, id) 40 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: (1x) 59,940 ( 0.00%) } . fn visit_path(&mut self, path: &Path<'v>, _id: HirId) -> Self::Result { 11 ( 0.00%) walk_path(self, path) 64 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_path::> (2x) . } . fn visit_path_segment(&mut self, path_segment: &'v PathSegment<'v>) -> Self::Result { 4 ( 0.00%) walk_path_segment(self, path_segment) 8 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_path_segment:: (2x) . } . fn visit_generic_args(&mut self, generic_args: &'v GenericArgs<'v>) -> Self::Result { . walk_generic_args(self, generic_args) . } . fn visit_assoc_item_constraint( . &mut self, . constraint: &'v AssocItemConstraint<'v>, . ) -> Self::Result { -- line 487 ---------------------------------------- -- line 516 ---------------------------------------- . walk_unambig_const_arg(self, c) . } . } . impl<'v, V: Visitor<'v>> VisitorExt<'v> for V {} . . pub fn walk_param<'v, V: Visitor<'v>>(visitor: &mut V, param: &'v Param<'v>) -> V::Result { . let Param { hir_id, pat, ty_span: _, span: _ } = param; . try_visit!(visitor.visit_id(*hir_id)); 3 ( 0.00%) visitor.visit_pat(pat) . } . . pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) -> V::Result { . let Item { owner_id: _, kind, span: _, vis_span: _, eii: _ } = item; . try_visit!(visitor.visit_id(item.hir_id())); . match *kind { . ItemKind::ExternCrate(orig_name, ident) => { . visit_opt!(visitor, visit_name, orig_name); -- line 532 ---------------------------------------- -- line 632 ---------------------------------------- . walk_list!(visitor, visit_param_bound, bounds); . } . } . V::Result::output() . } . . pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &Body<'v>) -> V::Result { . let Body { params, value } = body; 19,979 ( 0.00%) walk_list!(visitor, visit_param, *params); 29,973 ( 0.00%) visitor.visit_expr(*value) 268 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_expr (1x) . } . . pub fn walk_ident<'v, V: Visitor<'v>>(visitor: &mut V, ident: Ident) -> V::Result { . visitor.visit_name(ident.name) . } . . pub fn walk_mod<'v, V: Visitor<'v>>(visitor: &mut V, module: &'v Mod<'v>) -> V::Result { . let Mod { spans: _, item_ids } = module; -- line 649 ---------------------------------------- -- line 682 ---------------------------------------- . visit_opt!(visitor, visit_expr, *init); . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_pat(*pat)); . visit_opt!(visitor, visit_block, *els); . visit_opt!(visitor, visit_ty_unambig, *ty); . V::Result::output() . } . 34 ( 0.00%) pub fn walk_block<'v, V: Visitor<'v>>(visitor: &mut V, block: &'v Block<'v>) -> V::Result { . let Block { stmts, expr, hir_id, rules: _, span: _, targeted_by_break: _ } = block; . try_visit!(visitor.visit_id(*hir_id)); 8 ( 0.00%) walk_list!(visitor, visit_stmt, *stmts); 38 ( 0.00%) visit_opt!(visitor, visit_expr, *expr); 108 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (1x) . V::Result::output() . } . . pub fn walk_stmt<'v, V: Visitor<'v>>(visitor: &mut V, statement: &'v Stmt<'v>) -> V::Result { . let Stmt { kind, hir_id, span: _ } = statement; . try_visit!(visitor.visit_id(*hir_id)); . match *kind { . StmtKind::Let(ref local) => visitor.visit_local(local), -- line 702 ---------------------------------------- -- line 724 ---------------------------------------- . try_visit!(visitor.visit_const_arg_unambig(upper_bound)); . } . TyPatKind::Or(patterns) => walk_list!(visitor, visit_pattern_type_pattern, patterns), . TyPatKind::NotNull | TyPatKind::Err(_) => (), . } . V::Result::output() . } . 33 ( 0.00%) pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat<'v>) -> V::Result { . let Pat { hir_id, kind, span, default_binding_modes: _ } = pattern; . try_visit!(visitor.visit_id(*hir_id)); 29 ( 0.00%) match *kind { . PatKind::TupleStruct(ref qpath, children, _) => { . try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); . walk_list!(visitor, visit_pat, children); . } . PatKind::Struct(ref qpath, fields, _) => { . try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); . walk_list!(visitor, visit_pat_field, fields); . } -- line 743 ---------------------------------------- -- line 747 ---------------------------------------- . } . PatKind::Box(ref subpattern) . | PatKind::Deref(ref subpattern) . | PatKind::Ref(ref subpattern, _, _) => { . try_visit!(visitor.visit_pat(subpattern)); . } . PatKind::Binding(_, _hir_id, ident, ref optional_subpattern) => { . try_visit!(visitor.visit_ident(ident)); 12 ( 0.00%) visit_opt!(visitor, visit_pat, optional_subpattern); . } . PatKind::Expr(ref expression) => try_visit!(visitor.visit_pat_expr(expression)), . PatKind::Range(ref lower_bound, ref upper_bound, _) => { . visit_opt!(visitor, visit_pat_expr, lower_bound); . visit_opt!(visitor, visit_pat_expr, upper_bound); . } . PatKind::Missing | PatKind::Never | PatKind::Wild | PatKind::Err(_) => (), . PatKind::Slice(prepatterns, ref slice_pattern, postpatterns) => { -- line 763 ---------------------------------------- -- line 766 ---------------------------------------- . walk_list!(visitor, visit_pat, postpatterns); . } . PatKind::Guard(subpat, condition) => { . try_visit!(visitor.visit_pat(subpat)); . try_visit!(visitor.visit_expr(condition)); . } . } . V::Result::output() 24 ( 0.00%) } . . pub fn walk_pat_field<'v, V: Visitor<'v>>(visitor: &mut V, field: &'v PatField<'v>) -> V::Result { . let PatField { hir_id, ident, pat, is_shorthand: _, span: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); . visitor.visit_pat(*pat) . } . -- line 782 ---------------------------------------- -- line 799 ---------------------------------------- . visitor: &mut V, . constant: &'v ConstBlock, . ) -> V::Result { . let ConstBlock { hir_id, def_id: _, body } = constant; . try_visit!(visitor.visit_id(*hir_id)); . visitor.visit_nested_body(*body) . } . 899,132 ( 0.03%) pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>) -> V::Result { . let Expr { hir_id, kind, span } = expression; 59,940 ( 0.00%) try_visit!(visitor.visit_id(*hir_id)); 419,616 ( 0.01%) match *kind { . ExprKind::Array(subexpressions) => { . walk_list!(visitor, visit_expr, subexpressions); . } . ExprKind::ConstBlock(ref const_block) => { . try_visit!(visitor.visit_inline_const(const_block)) . } . ExprKind::Repeat(ref element, ref count) => { . try_visit!(visitor.visit_expr(element)); . try_visit!(visitor.visit_const_arg_unambig(count)); . } 12 ( 0.00%) ExprKind::Struct(ref qpath, fields, ref optional_base) => { 14 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 42 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath (1x) 7 ( 0.00%) walk_list!(visitor, visit_expr_field, fields); 20 ( 0.00%) match optional_base { . StructTailExpr::Base(base) => try_visit!(visitor.visit_expr(base)), . StructTailExpr::None . | StructTailExpr::NoneWithError(_) . | StructTailExpr::DefaultFields(_) => {} . } . } . ExprKind::Tup(subexpressions) => { . walk_list!(visitor, visit_expr, subexpressions); . } 59,928 ( 0.00%) ExprKind::Call(ref callee_expression, arguments) => { 79,904 ( 0.00%) try_visit!(visitor.visit_expr(callee_expression)); 1,318,416 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (9,988x) 79,904 ( 0.00%) walk_list!(visitor, visit_expr, arguments); 599,280 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (9,988x) . } . ExprKind::MethodCall(ref segment, receiver, arguments, _) => { . try_visit!(visitor.visit_path_segment(segment)); . try_visit!(visitor.visit_expr(receiver)); . walk_list!(visitor, visit_expr, arguments); . } . ExprKind::Use(expr, _) => { . try_visit!(visitor.visit_expr(expr)); -- line 844 ---------------------------------------- -- line 889 ---------------------------------------- . constness: _, . explicit_captures: _, . }) => { . walk_list!(visitor, visit_generic_param, bound_generic_params); . try_visit!(visitor.visit_fn(FnKind::Closure, fn_decl, body, *span, def_id)); . } . ExprKind::Block(ref block, ref opt_label) => { . visit_opt!(visitor, visit_label, opt_label); 9 ( 0.00%) try_visit!(visitor.visit_block(block)); . } . ExprKind::Assign(ref lhs, ref rhs, _) => { . try_visit!(visitor.visit_expr(rhs)); . try_visit!(visitor.visit_expr(lhs)); . } . ExprKind::AssignOp(_, ref left_expression, ref right_expression) => { . try_visit!(visitor.visit_expr(right_expression)); . try_visit!(visitor.visit_expr(left_expression)); -- line 905 ---------------------------------------- -- line 907 ---------------------------------------- . ExprKind::Field(ref subexpression, ident) => { . try_visit!(visitor.visit_expr(subexpression)); . try_visit!(visitor.visit_ident(ident)); . } . ExprKind::Index(ref main_expression, ref index_expression, _) => { . try_visit!(visitor.visit_expr(main_expression)); . try_visit!(visitor.visit_expr(index_expression)); . } 9,991 ( 0.00%) ExprKind::Path(ref qpath) => { 99,900 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 42 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath (1x) . } . ExprKind::Break(ref destination, ref opt_expr) => { . visit_opt!(visitor, visit_label, &destination.label); . visit_opt!(visitor, visit_expr, opt_expr); . } . ExprKind::Continue(ref destination) => { . visit_opt!(visitor, visit_label, &destination.label); . } -- line 924 ---------------------------------------- -- line 939 ---------------------------------------- . ExprKind::UnsafeBinderCast(_kind, expr, ty) => { . try_visit!(visitor.visit_expr(expr)); . visit_opt!(visitor, visit_ty_unambig, ty); . } . ExprKind::Lit(lit) => try_visit!(visitor.visit_lit(*hir_id, lit, false)), . ExprKind::Err(_) => {} . } . V::Result::output() 639,329 ( 0.02%) } . . pub fn walk_expr_field<'v, V: Visitor<'v>>(visitor: &mut V, field: &'v ExprField<'v>) -> V::Result { . let ExprField { hir_id, ident, expr, span: _, is_shorthand: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); 16 ( 0.00%) visitor.visit_expr(*expr) 956 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (1x) . } . . pub fn walk_const_arg_expr_field<'v, V: Visitor<'v>>( . visitor: &mut V, . field: &'v ConstArgExprField<'v>, . ) -> V::Result { . let ConstArgExprField { hir_id, field, expr, span: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); -- line 961 ---------------------------------------- -- line 983 ---------------------------------------- . let InferArg { hir_id, span } = inf; . visitor.visit_infer(*hir_id, *span, InferKind::Ambig(inf)) . } . } . } . . pub fn walk_unambig_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) -> V::Result { . match typ.try_as_ambig_ty() { 19,987 ( 0.00%) Some(ambig_ty) => visitor.visit_ty(ambig_ty), 132 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty (2x) . None => { . let Ty { hir_id, span, kind: _ } = typ; . visitor.visit_infer(*hir_id, *span, InferKind::Ty(typ)) . } . } . } . 429,628 ( 0.02%) pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v, AmbigArg>) -> V::Result { . let Ty { hir_id, span: _, kind } = typ; . try_visit!(visitor.visit_id(*hir_id)); . 189,839 ( 0.01%) match *kind { . TyKind::Slice(ref ty) => try_visit!(visitor.visit_ty_unambig(ty)), . TyKind::Ptr(ref mutable_type) => try_visit!(visitor.visit_ty_unambig(mutable_type.ty)), . TyKind::Ref(ref lifetime, ref mutable_type) => { . try_visit!(visitor.visit_lifetime(lifetime)); . try_visit!(visitor.visit_ty_unambig(mutable_type.ty)); . } . TyKind::Never => {} . TyKind::Tup(tuple_element_types) => { -- line 1011 ---------------------------------------- -- line 1014 ---------------------------------------- . TyKind::FnPtr(ref function_declaration) => { . walk_list!(visitor, visit_generic_param, function_declaration.generic_params); . try_visit!(visitor.visit_fn_decl(function_declaration.decl)); . } . TyKind::UnsafeBinder(ref unsafe_binder) => { . walk_list!(visitor, visit_generic_param, unsafe_binder.generic_params); . try_visit!(visitor.visit_ty_unambig(unsafe_binder.inner_ty)); . } 9,994 ( 0.00%) TyKind::Path(ref qpath) => { . try_visit!(visitor.visit_qpath(qpath, typ.hir_id, typ.span)); . } . TyKind::OpaqueDef(opaque) => { . try_visit!(visitor.visit_opaque_ty(opaque)); . } . TyKind::TraitAscription(bounds) => { . walk_list!(visitor, visit_param_bound, bounds); . } -- line 1030 ---------------------------------------- -- line 1051 ---------------------------------------- . TyKind::View(ty, fields) => { . try_visit!(visitor.visit_ty_unambig(ty)); . for field in fields { . try_visit!(visitor.visit_ident(*field)); . } . } . } . V::Result::output() 239,776 ( 0.01%) } . . pub fn walk_const_item_rhs<'v, V: Visitor<'v>>( . visitor: &mut V, . ct_rhs: ConstItemRhs<'v>, . ) -> V::Result { 19,976 ( 0.00%) match ct_rhs { . ConstItemRhs::Body(body_id) => visitor.visit_nested_body(body_id), . ConstItemRhs::TypeConst(const_arg) => visitor.visit_const_arg_unambig(const_arg), . } . } . . pub fn walk_unambig_const_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . const_arg: &'v ConstArg<'v>, -- line 1073 ---------------------------------------- -- line 1157 ---------------------------------------- . . pub fn walk_const_param_default<'v, V: Visitor<'v>>( . visitor: &mut V, . ct: &'v ConstArg<'v>, . ) -> V::Result { . visitor.visit_const_arg_unambig(ct) . } . 27 ( 0.00%) pub fn walk_generics<'v, V: Visitor<'v>>(visitor: &mut V, generics: &'v Generics<'v>) -> V::Result { . let &Generics { 9,992 ( 0.00%) params, 19,984 ( 0.00%) predicates, . has_where_clause_predicates: _, . where_clause_span: _, . span: _, . } = generics; . walk_list!(visitor, visit_generic_param, params); . walk_list!(visitor, visit_where_predicate, predicates); . V::Result::output() 24 ( 0.00%) } . . pub fn walk_where_predicate<'v, V: Visitor<'v>>( . visitor: &mut V, . predicate: &'v WherePredicate<'v>, . ) -> V::Result { . let &WherePredicate { hir_id, kind, span: _ } = predicate; . try_visit!(visitor.visit_id(hir_id)); . match *kind { -- line 1184 ---------------------------------------- -- line 1204 ---------------------------------------- . V::Result::output() . } . . pub fn walk_fn_decl<'v, V: Visitor<'v>>( . visitor: &mut V, . function_declaration: &'v FnDecl<'v>, . ) -> V::Result { . let FnDecl { inputs, output, fn_decl_kind: _ } = function_declaration; 3 ( 0.00%) walk_list!(visitor, visit_ty_unambig, *inputs); . visitor.visit_fn_ret_ty(output) . } . . pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FnRetTy<'v>) -> V::Result { 9 ( 0.00%) if let FnRetTy::Return(output_ty) = *ret_ty { . try_visit!(visitor.visit_ty_unambig(output_ty)); . } . V::Result::output() . } . 24 ( 0.00%) pub fn walk_fn<'v, V: Visitor<'v>>( . visitor: &mut V, . function_kind: FnKind<'v>, . function_declaration: &'v FnDecl<'v>, . body_id: BodyId, . _: LocalDefId, . ) -> V::Result { . try_visit!(visitor.visit_fn_decl(function_declaration)); . try_visit!(walk_fn_kind(visitor, function_kind)); . visitor.visit_nested_body(body_id) 16 ( 0.00%) } . . pub fn walk_fn_kind<'v, V: Visitor<'v>>(visitor: &mut V, function_kind: FnKind<'v>) -> V::Result { 4 ( 0.00%) match function_kind { . FnKind::ItemFn(_, generics, ..) => { . try_visit!(visitor.visit_generics(generics)); . } . FnKind::Closure | FnKind::Method(..) => {} . } . V::Result::output() . } . -- line 1244 ---------------------------------------- -- line 1291 ---------------------------------------- . } . V::Result::output() . } . . pub fn walk_trait_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: TraitItemId) -> V::Result { . visitor.visit_nested_trait_item(id) . } . 89,901 ( 0.00%) pub fn walk_impl_item<'v, V: Visitor<'v>>( . visitor: &mut V, . impl_item: &'v ImplItem<'v>, . ) -> V::Result { . let ImplItem { owner_id: _, ident, ref generics, ref impl_kind, ref kind, span: _ } = . *impl_item; . . try_visit!(visitor.visit_ident(ident)); 9,989 ( 0.00%) try_visit!(visitor.visit_generics(generics)); . try_visit!(visitor.visit_id(impl_item.hir_id())); . match impl_kind { . ImplItemImplKind::Inherent { vis_span: _ } => {} . ImplItemImplKind::Trait { defaultness, trait_item_def_id: _ } => { . try_visit!(visitor.visit_defaultness(defaultness)); . } . } 59,936 ( 0.00%) match *kind { 29,964 ( 0.00%) ImplItemKind::Const(ref ty, rhs) => { 9,988 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); . visitor.visit_const_item_rhs(rhs) . } 2 ( 0.00%) ImplItemKind::Fn(ref sig, body_id) => visitor.visit_fn( 6 ( 0.00%) FnKind::Method(impl_item.ident, sig), 1 ( 0.00%) sig.decl, . body_id, . impl_item.span, . impl_item.owner_id.def_id, 1 ( 0.00%) ), . ImplItemKind::Type(ref ty) => visitor.visit_ty_unambig(ty), . } 79,912 ( 0.00%) } . . pub fn walk_foreign_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: ForeignItemId) -> V::Result { . visitor.visit_nested_foreign_item(id) . } . . pub fn walk_impl_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: ImplItemId) -> V::Result { . visitor.visit_nested_impl_item(id) . } -- line 1337 ---------------------------------------- -- line 1450 ---------------------------------------- . } . . pub fn walk_lifetime<'v, V: Visitor<'v>>(visitor: &mut V, lifetime: &'v Lifetime) -> V::Result { . let Lifetime { hir_id, ident, kind: _, source: _, syntax: _ } = lifetime; . try_visit!(visitor.visit_id(*hir_id)); . visitor.visit_ident(*ident) . } . 89,982 ( 0.00%) pub fn walk_qpath<'v, V: Visitor<'v>>( . visitor: &mut V, . qpath: &'v QPath<'v>, . id: HirId, . ) -> V::Result { 119,901 ( 0.00%) match *qpath { . QPath::Resolved(ref maybe_qself, ref path) => { 79,948 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, maybe_qself); 39,974 ( 0.00%) visitor.visit_path(path, id) . } . QPath::TypeRelative(ref qself, ref segment) => { . try_visit!(visitor.visit_ty_unambig(qself)); 19,976 ( 0.00%) visitor.visit_path_segment(segment) . } . } 79,984 ( 0.00%) } . . pub fn walk_path<'v, V: Visitor<'v>>(visitor: &mut V, path: &Path<'v>) -> V::Result { . let Path { segments, span: _, res: _ } = path; 39,974 ( 0.00%) walk_list!(visitor, visit_path_segment, *segments); . V::Result::output() 2 ( 0.00%) } . . pub fn walk_path_segment<'v, V: Visitor<'v>>( . visitor: &mut V, . segment: &'v PathSegment<'v>, . ) -> V::Result { . let PathSegment { ident, hir_id, res: _, args, infer_args: _, delegation_child_segment: _ } = . segment; . try_visit!(visitor.visit_ident(*ident)); . try_visit!(visitor.visit_id(*hir_id)); 179,850 ( 0.01%) visit_opt!(visitor, visit_generic_args, *args); . V::Result::output() 2 ( 0.00%) } . . pub fn walk_generic_args<'v, V: Visitor<'v>>( . visitor: &mut V, . generic_args: &'v GenericArgs<'v>, . ) -> V::Result { . let GenericArgs { args, constraints, parenthesized: _, span_ext: _ } = generic_args; . walk_list!(visitor, visit_generic_arg, *args); . walk_list!(visitor, visit_assoc_item_constraint, *constraints); -- line 1499 ---------------------------------------- 169,876 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs -------------------------------------------------------------------------------- Ir -- line 153 ---------------------------------------- . Some((fn_decl_span, None)) . } . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for UnitReturnExpectingOrd { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::MethodCall(_, receiver, args, _) = expr.kind . && args.iter().any(|arg| { . matches!( . arg.peel_blocks().peel_borrows().peel_drop_temps().kind, . ExprKind::Path(_) | ExprKind::Closure(_) . ) . }) . && let Some(fn_mut_trait) = cx.tcx.lang_items().fn_mut_trait() . { -- line 170 ---------------------------------------- -- line 190 ---------------------------------------- . if let Some(last_semi) = last_semi { . diag.span_help(last_semi, "probably caused by this trailing semicolon"); . } . }, . ); . } . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs -------------------------------------------------------------------------------- Ir -- line 469 ---------------------------------------- . pub before_feature_tys: Ty<'tcx>, . /// Tuple containing the types of closure captures after the feature `capture_disjoint_fields` . pub after_feature_tys: Ty<'tcx>, . } . . impl TyCtxt<'_> { . #[inline] . pub fn opt_parent(self, id: DefId) -> Option { 24 ( 0.00%) self.def_key(id).parent.map(|index| DefId { index, ..id }) 90 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: (3x) . } . . #[inline] . #[track_caller] . pub fn parent(self, id: DefId) -> DefId { . match self.opt_parent(id) { . Some(id) => id, . // not `unwrap_or_else` to avoid breaking caller tracking -- line 485 ---------------------------------------- -- line 536 ---------------------------------------- . self.def_id_partial_cmp(descendant.into(), ancestor.into()), . Some(Ordering::Less | Ordering::Equal) . ) . } . } . . impl Visibility { . pub fn is_public(self) -> bool { 1 ( 0.00%) matches!(self, Visibility::Public) . } . . pub fn map_id(self, f: impl FnOnce(Id) -> OutId) -> Visibility { . match self { . Visibility::Public => Visibility::Public, . Visibility::Restricted(id) => Visibility::Restricted(f(id)), . } . } -- line 552 ---------------------------------------- -- line 644 ---------------------------------------- . #[rustc_diagnostic_item = "Ty"] . #[rustc_pass_by_value] . pub struct Ty<'tcx>(Interned<'tcx, WithCachedTypeInfo>>); . . impl<'tcx> rustc_type_ir::inherent::IntoKind for Ty<'tcx> { . type Kind = TyKind<'tcx>; . . fn kind(self) -> TyKind<'tcx> { 4 ( 0.00%) *self.kind() . } . } . . impl<'tcx> rustc_type_ir::Flags for Ty<'tcx> { . fn flags(&self) -> TypeFlags { 19,977 ( 0.00%) self.0.flags . } . . fn outer_exclusive_binder(&self) -> DebruijnIndex { . self.0.outer_exclusive_binder . } . } . . /// The crate outlives map is computed during typeck and contains the -- line 666 ---------------------------------------- -- line 1222 ---------------------------------------- . #[type_foldable(identity)] . #[type_visitable(ignore)] . typing_mode: TypingModeEqWrapper<'tcx>, . pub param_env: ParamEnv<'tcx>, . } . . impl<'tcx> TypingEnv<'tcx> { . pub fn new(param_env: ParamEnv<'tcx>, typing_mode: TypingMode<'tcx>) -> Self { 4 ( 0.00%) Self { typing_mode: TypingModeEqWrapper(typing_mode), param_env } . } . . pub fn typing_mode(&self) -> TypingMode<'tcx> { . self.typing_mode.0 . } . . /// Create a typing environment with no where-clauses in scope . /// where all opaque types and default associated items are revealed. -- line 1238 ---------------------------------------- -- line 1245 ---------------------------------------- . Self::new(ParamEnv::empty(), TypingMode::Codegen) . } . . /// Create a typing environment for use during analysis outside of a body. . /// . /// Using a typing environment inside of bodies is not supported as the body . /// may define opaque types. In this case the used functions have to be . /// converted to use proper canonical inputs instead. 7 ( 0.00%) pub fn non_body_analysis( . tcx: TyCtxt<'tcx>, . def_id: impl IntoQueryKey, . ) -> TypingEnv<'tcx> { . let def_id = def_id.into_query_key(); . Self::new(tcx.param_env(def_id), TypingMode::non_body_analysis()) 7 ( 0.00%) } . . /// Ideally we just use `TypingMode::PostTypeckUntilBorrowck`. . /// But that's not compatible with the old solver yet. . /// . /// FIXME: this should not be needed in the long term. . pub fn post_typeck_until_borrowck_for_mir_build( . tcx: TyCtxt<'tcx>, . def_id: LocalDefId, -- line 1267 ---------------------------------------- -- line 1790 ---------------------------------------- . pack: min_pack, . flags, . field_shuffle_seed, . scalable: elt, . } . } . . /// Look up the name of a definition across crates. This does not look at HIR. 69,916 ( 0.00%) pub fn opt_item_name(self, def_id: impl IntoQueryKey) -> Option { . let def_id = def_id.into_query_key(); . if let Some(cnum) = def_id.as_crate_root() { . Some(self.crate_name(cnum)) . } else { 29,964 ( 0.00%) let def_key = self.def_key(def_id); 299,640 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: (9,988x) 59,928 ( 0.00%) match def_key.disambiguated_data.data { . // The name of a constructor is that of its parent. . rustc_hir::definitions::DefPathData::Ctor => self . .opt_item_name(DefId { krate: def_id.krate, index: def_key.parent.unwrap() }), . _ => def_key.get_opt_name(), . } . } 59,928 ( 0.00%) } . . /// Look up the name of a definition across crates. This does not look at HIR. . /// . /// This method will ICE if the corresponding item does not have a name. In these cases, use . /// [`opt_item_name`] instead. . /// . /// [`opt_item_name`]: Self::opt_item_name . pub fn item_name(self, id: impl IntoQueryKey) -> Symbol { . let id = id.into_query_key(); 39,952 ( 0.00%) self.opt_item_name(id).unwrap_or_else(|| { 579,304 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::opt_item_name:: (9,988x) . bug!("item_name: no name for {:?}", self.def_path(id)); . }) . } . . /// Look up the name and span of a definition. . /// . /// See [`item_name`][Self::item_name] for more information. . pub fn opt_item_ident(self, def_id: impl IntoQueryKey) -> Option { -- line 1829 ---------------------------------------- -- line 1987 ---------------------------------------- . /// Gets all attributes with the given name. . #[deprecated = "Though there are valid usecases for this method, especially when your attribute is not a parsed attribute, usually you want to call rustc_hir::find_attr! instead."] . pub fn get_attrs( . self, . did: impl Into, . attr: Symbol, . ) -> impl Iterator { . #[expect(deprecated)] 2 ( 0.00%) self.get_all_attrs(did).iter().filter(move |a: &&hir::Attribute| a.has_name(attr)) 90 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::get_all_attrs:: (1x) . } . . /// Gets all attributes. . /// . /// To see if an item has a specific attribute, you should use . /// [`rustc_hir::find_attr!`] so you can use matching. . #[deprecated = "Though there are valid usecases for this method, especially when your attribute is not a parsed attribute, usually you want to call rustc_hir::find_attr! instead."] 9 ( 0.00%) pub fn get_all_attrs(self, did: impl Into) -> &'tcx [hir::Attribute] { . let did: DefId = did.into(); . if let Some(did) = did.as_local() { 3 ( 0.00%) self.hir_attrs(self.local_def_id_to_hir_id(did)) 42 ( 0.00%) => ???:::hir_attrs (1x) . } else { . self.attrs_for_def(did) . } 8 ( 0.00%) } . . pub fn get_attrs_by_path( . self, . did: DefId, . attr: &[Symbol], . ) -> impl Iterator { . let filter_fn = move |a: &&hir::Attribute| a.path_matches(attr); . if let Some(did) = did.as_local() { -- line 2018 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs -------------------------------------------------------------------------------- Ir -- line 82 ---------------------------------------- . declare_lint_pass!(EvalOrderDependence => [ . DIVERGING_SUB_EXPRESSION, . MIXED_READ_WRITE_IN_EXPRESSION, . ]); . . impl<'tcx> LateLintPass<'tcx> for EvalOrderDependence { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Find a write to a local variable. 119,868 ( 0.00%) let var = if let ExprKind::Assign(lhs, ..) | ExprKind::AssignOp(_, lhs, _) = expr.kind . && let Some(var) = lhs.res_local_id() . && expr.span.desugaring_kind().is_none() . { . var . } else { . return; . }; . let mut visitor = ReadVisitor { . cx, . var, . write_expr: expr, . last_expr: expr, . }; . check_for_unsequenced_reads(&mut visitor); 29,967 ( 0.00%) } . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . match stmt.kind { . StmtKind::Let(local) => { . if let LetStmt { init: Some(e), .. } = local { . DivergenceVisitor { cx }.visit_expr(e); . } . }, . StmtKind::Expr(e) | StmtKind::Semi(e) => DivergenceVisitor { cx }.maybe_walk_expr(e), -- line 113 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/minmax.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub MIN_MAX, . correctness, . "`min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant" . } . . declare_lint_pass!(MinMaxPass => [MIN_MAX]); . . impl<'tcx> LateLintPass<'tcx> for MinMaxPass { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if let Some((outer_max, outer_c, oe)) = min_max(cx, expr) 1,977,687 ( 0.07%) => site/frontend/rust-clippy/clippy_lints/src/minmax.rs:clippy_lints::minmax::min_max (29,967x) . && let Some((inner_max, inner_c, ie)) = min_max(cx, oe) . && outer_max != inner_max . && let Some(ord) = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(ie), &outer_c, &inner_c) . && matches!( . (outer_max, ord), . (MinMax::Max, Equal | Greater) | (MinMax::Min, Equal | Less) . ) . { . span_lint( . cx, . MIN_MAX, . expr.span, . "this `min`/`max` combination leads to constant result", . ); . } 179,802 ( 0.01%) } . } . . #[derive(PartialEq, Eq, Debug, Clone, Copy)] . enum MinMax { . Min, . Max, . } . 209,769 ( 0.01%) fn min_max<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option<(MinMax, Constant, &'a Expr<'a>)> { 129,859 ( 0.00%) match expr.kind { 9,988 ( 0.00%) ExprKind::Call(path, args) => { 29,964 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind { . cx.typeck_results() 39,952 ( 0.00%) .qpath_res(qpath, path.hir_id) 669,196 ( 0.02%) => ???:::qpath_res (9,988x) . .opt_def_id() 59,928 ( 0.00%) .and_then(|def_id| match cx.tcx.get_diagnostic_name(def_id) { 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . Some(sym::cmp_min) => fetch_const(cx, expr.span.ctxt(), None, args, MinMax::Min), . Some(sym::cmp_max) => fetch_const(cx, expr.span.ctxt(), None, args, MinMax::Max), . _ => None, . }) . } else { . None . } . }, -- line 80 ---------------------------------------- -- line 89 ---------------------------------------- . { . fetch_const(cx, expr.span.ctxt(), Some(receiver), args, m) . } else { . None . } . }, . _ => None, . } 239,736 ( 0.01%) } . . fn fetch_const<'a>( . cx: &LateContext<'_>, . ctxt: SyntaxContext, . receiver: Option<&'a Expr<'a>>, . args: &'a [Expr<'a>], . m: MinMax, . ) -> Option<(MinMax, Constant, &'a Expr<'a>)> { -- line 105 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/blocks_in_conditions.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . "useless or complex blocks that can be eliminated in conditions" . } . . declare_lint_pass!(BlocksInConditions => [BLOCKS_IN_CONDITIONS]); . . const BRACED_EXPR_MESSAGE: &str = "omit braces around single expression condition"; . . impl<'tcx> LateLintPass<'tcx> for BlocksInConditions { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . . let Some((cond, keyword, desc)) = higher::If::hir(expr) . .map(|hif| (hif.cond, "if", "an `if` condition")) . .or(if let ExprKind::Match(match_ex, _, MatchSource::Normal) = expr.kind { . Some((match_ex, "match", "a `match` scrutinee")) . } else { -- line 64 ---------------------------------------- -- line 129 ---------------------------------------- . "let res = {}; {keyword} res", . snippet_block_with_applicability(cx, block.span, "..", Some(expr.span), &mut applicability), . ), . applicability, . ); . } . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl UselessFormat { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for UselessFormat { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Loosened from `root_macro_call_first_node` so the lint also fires when `format!` is . // the tail of a block emitted by another macro. The `!= macro_call.expn` check filters . // HIR nodes inside `format!`'s own expansion (its outer block's tail, its nested . // `format_args!`), which would otherwise also pass `first_node_in_macro` and cause the . // lint to fire multiple times per call. 149,835 ( 0.01%) if let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::format_macro) 2,007,789 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (29,967x) . && first_node_in_macro(cx, expr).is_some_and(|p_expn| p_expn != macro_call.expn) . && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) . { . let mut applicability = Applicability::MachineApplicable; . let call_site = macro_call.span; . . match (format_args.arguments.all_args(), &format_args.template[..]) { . ([], []) => span_useless_format_empty(cx, call_site, "String::new()".to_owned(), applicability), -- line 69 ---------------------------------------- -- line 101 ---------------------------------------- . format!("{}.to_string()", sugg.maybe_paren()) . }; . span_useless_format(cx, call_site, sugg, applicability); . } . }, . _ => {}, . } . } 239,736 ( 0.01%) } . } . . fn span_useless_format_empty(cx: &LateContext<'_>, span: Span, sugg: String, applicability: Applicability) { . span_lint_and_sugg( . cx, . USELESS_FORMAT, . span, . "useless use of `format!`", -- line 117 ---------------------------------------- 29,967 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub LEN_WITHOUT_IS_EMPTY, . style, . "traits or impls with a public `len` method but no corresponding `is_empty` method" . } . . declare_lint_pass!(LenWithoutIsEmpty => [LEN_WITHOUT_IS_EMPTY]); . . impl<'tcx> LateLintPass<'tcx> for LenWithoutIsEmpty { 35 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 10 ( 0.00%) if let ItemKind::Trait { . ident, . items: trait_items, . .. . } = item.kind . && !item.span.from_expansion() . { . check_trait_items(cx, item, ident, trait_items); . } 40 ( 0.00%) } . 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 9,989 ( 0.00%) if item.ident.name == sym::len . && let ImplItemKind::Fn(sig, _) = &item.kind . && sig.decl.implicit_self().has_implicit_self() . && sig.decl.inputs.len() == 1 . && cx.effective_visibilities.is_exported(item.owner_id.def_id) . && matches!(sig.decl.output, FnRetTy::Return(_)) . && let Some(imp) = get_parent_as_impl(cx.tcx, item.hir_id()) . && imp.of_trait.is_none() . && let TyKind::Path(ty_path) = &imp.self_ty.kind -- line 68 ---------------------------------------- -- line 95 ---------------------------------------- . output, . ty_id, . name, . kind, . item.hir_id(), . ty_hir_id, . ); . } 79,912 ( 0.00%) } . } . . fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, ident: Ident, trait_items: &[TraitItemId]) { . fn is_named_self(cx: &LateContext<'_>, item: TraitItemId, name: Symbol) -> bool { . cx.tcx.item_name(item.owner_id) == name . && matches!( . cx.tcx.fn_arg_idents(item.owner_id), . [Some(Ident { -- line 111 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs -------------------------------------------------------------------------------- Ir -- line 146 ---------------------------------------- . /// ``` . #[doc = concat!("[`ilog2`]: ", stringify!($SelfT), "::ilog2")] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn leading_zeros(self) -> u32 { 6 ( 0.00%) return intrinsics::ctlz(self as $ActualT); . } . . /// Returns the number of trailing zeros in the binary representation . /// of `self`. . /// . /// # Examples . /// . /// ``` -- line 162 ---------------------------------------- -- line 170 ---------------------------------------- . #[doc = concat!("assert_eq!(max.trailing_zeros(), 0);")] . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn trailing_zeros(self) -> u32 { 4 ( 0.00%) return intrinsics::cttz(self); . } . . /// Returns the number of leading ones in the binary representation of `self`. . /// . /// # Examples . /// . /// ``` . #[doc = concat!("let n = !(", stringify!($SelfT), "::MAX >> 2);")] -- line 186 ---------------------------------------- -- line 890 ---------------------------------------- . pub const fn checked_add(self, rhs: Self) -> Option { . // This used to use `overflowing_add`, but that means it ends up being . // a `wrapping_add`, losing some optimization opportunities. Notably, . // phrasing it this way helps `.checked_add(1)` optimize to a check . // against `MAX` and a `add nuw`. . // Per , . // LLVM is happy to re-form the intrinsic later if useful. . 103 ( 0.00%) if intrinsics::unlikely(intrinsics::add_with_overflow(self, rhs).1) { . None . } else { . // SAFETY: Just checked it doesn't overflow . Some(unsafe { intrinsics::unchecked_add(self, rhs) }) . } . } . . /// Strict integer addition. Computes `self + rhs`, panicking -- line 906 ---------------------------------------- -- line 965 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_add(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 253 ( 0.00%) intrinsics::unchecked_add(self, rhs) . } . } . . /// Checked addition with a signed integer. Computes `self + rhs`, . /// returning `None` if overflow occurred. . /// . /// # Examples . /// -- line 981 ---------------------------------------- -- line 1044 ---------------------------------------- . without modifying the original"] . #[inline] . pub const fn checked_sub(self, rhs: Self) -> Option { . // Per PR#103299, there's no advantage to the `overflowing` intrinsic . // for *unsigned* subtraction and we just emit the manual check anyway. . // Thus, rather than using `overflowing_sub` that produces a wrapping . // subtraction, check it ourself so we can use an unchecked one. . 29,966 ( 0.00%) if self < rhs { . None . } else { . // SAFETY: just checked this can't overflow 20,103 ( 0.00%) Some(unsafe { intrinsics::unchecked_sub(self, rhs) }) . } . } . . /// Strict integer subtraction. Computes `self - rhs`, panicking if . /// overflow occurred. . /// . /// # Panics . /// -- line 1064 ---------------------------------------- -- line 1353 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_mul(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 10,052 ( 0.00%) intrinsics::unchecked_mul(self, rhs) . } . } . . /// Checked integer division. Computes `self / rhs`, returning `None` . /// if `rhs == 0`. . /// . /// # Examples . /// -- line 1369 ---------------------------------------- -- line 2448 ---------------------------------------- . #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add(127), ", stringify!($SelfT), "::MAX);")] . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[rustc_const_stable(feature = "const_saturating_int_methods", since = "1.47.0")] . #[inline(always)] . pub const fn saturating_add(self, rhs: Self) -> Self { 5 ( 0.00%) intrinsics::saturating_add(self, rhs) . } . . /// Saturating addition with a signed integer. Computes `self + rhs`, . /// saturating at the numeric bounds instead of overflowing. . /// . /// # Examples . /// . /// ``` -- line 2464 ---------------------------------------- -- line 2604 ---------------------------------------- . #[doc = concat!("assert_eq!(200", stringify!($SelfT), ".wrapping_add(", stringify!($SelfT), "::MAX), 199);")] . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_wrapping_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn wrapping_add(self, rhs: Self) -> Self { 20,729 ( 0.00%) intrinsics::wrapping_add(self, rhs) . } . . /// Wrapping (modular) addition with a signed integer. Computes . /// `self + rhs`, wrapping around at the boundary of the type. . /// . /// # Examples . /// . /// ``` -- line 2620 ---------------------------------------- -- line 2641 ---------------------------------------- . #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_sub(", stringify!($SelfT), "::MAX), 101);")] . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_wrapping_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn wrapping_sub(self, rhs: Self) -> Self { 354 ( 0.00%) intrinsics::wrapping_sub(self, rhs) . } . . /// Wrapping (modular) subtraction with a signed integer. Computes . /// `self - rhs`, wrapping around at the boundary of the type. . /// . /// # Examples . /// . /// ``` -- line 2657 ---------------------------------------- -- line 2680 ---------------------------------------- . /// assert_eq!(25u8.wrapping_mul(12), 44); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_wrapping_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn wrapping_mul(self, rhs: Self) -> Self { 20,749 ( 0.00%) intrinsics::wrapping_mul(self, rhs) . } . . /// Wrapping (modular) division. Computes `self / rhs`. . /// . /// Wrapped division on unsigned types is just normal division. There's . /// no way wrapping could ever happen. This function exists so that all . /// operations are accounted for in the wrapping operations. . /// -- line 2696 ---------------------------------------- -- line 3164 ---------------------------------------- . /// assert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true)); . /// ``` . #[stable(feature = "wrapping", since = "1.7.0")] . #[rustc_const_stable(feature = "const_wrapping_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { 60,195 ( 0.00%) let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); . (a as Self, b) . } . . /// Calculates the "full multiplication" `self * rhs + carry` . /// without the possibility to overflow. . /// . /// This returns the low-order (wrapping) bits and the high-order (overflow) bits . /// of the result as two separate values, in that order. -- line 3180 ---------------------------------------- -- line 3860 ---------------------------------------- . // . // This method cannot overflow, as in the `next_power_of_two` . // overflow cases it instead ends up returning the maximum value . // of the type, and can return 0 for 0. . #[inline] . const fn one_less_than_next_power_of_two(self) -> Self { . if self <= 1 { return 0; } . 6 ( 0.00%) let p = self - 1; . // SAFETY: Because `p > 0`, it cannot consist entirely of leading zeros. . // That means the shift is always in-bounds, and some processors . // (such as intel pre-haswell) have more efficient ctlz . // intrinsics when the argument is non-zero. 3 ( 0.00%) let z = unsafe { intrinsics::ctlz_nonzero(p) }; 6 ( 0.00%) <$SelfT>::MAX >> z . } . . /// Returns the smallest power of two greater than or equal to `self`. . /// . /// When return value overflows (i.e., `self > (1 << (N-1))` for type . /// `uN`), it panics in debug mode and the return value is wrapped to 0 in . /// release mode (the only situation in which this method can return 0). . /// -- line 3882 ---------------------------------------- -- line 4010 ---------------------------------------- . without modifying the original"] . #[allow(unnecessary_transmutes)] . // SAFETY: const sound because integers are plain old datatypes so we can always . // transmute them to arrays of bytes . #[inline] . pub const fn to_ne_bytes(self) -> [u8; size_of::()] { . // SAFETY: integers are plain old datatypes so we can always transmute them to . // arrays of bytes 32 ( 0.00%) unsafe { mem::transmute(self) } . } . . /// Creates a native endian integer value from its representation . /// as a byte array in big endian. . /// . #[doc = $from_xe_bytes_doc] . /// . /// # Examples -- line 4026 ---------------------------------------- 40,220 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/write/mod.rs -------------------------------------------------------------------------------- Ir -- line 251 ---------------------------------------- . format_args: FormatArgsStorage, . // The outermost `impl Debug` we're currently in. While we're in one, `USE_DEBUG` is deactivated . outermost_debug_impl: Option, . allow_print_in_tests: bool, . } . . impl Write { . pub fn new(conf: &'static Conf, format_args: FormatArgsStorage) -> Self { 3 ( 0.00%) Self { . format_args, . outermost_debug_impl: None, . allow_print_in_tests: conf.allow_print_in_tests, . } . } . . fn in_debug_impl(&self) -> bool { . self.outermost_debug_impl.is_some() . } . } . . impl<'tcx> LateLintPass<'tcx> for Write { . fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { . // Only check for `impl Debug`s if we're not already in one 10 ( 0.00%) if self.outermost_debug_impl.is_none() && is_debug_impl(cx, item) { . self.outermost_debug_impl = Some(item.owner_id); . } . } . . fn check_item_post(&mut self, _cx: &LateContext<'_>, item: &Item<'_>) { . // Only clear `self.outermost_debug_impl` if we're escaping the _outermost_ debug impl . if self.outermost_debug_impl == Some(item.owner_id) { . self.outermost_debug_impl = None; . } . } . 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; . let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) else { . return; . }; . let Some(name) = diag_name.as_str().strip_suffix("_macro") else { . return; -- line 294 ---------------------------------------- -- line 332 ---------------------------------------- . } . . literal::check(cx, format_args, name); . . if !self.in_debug_impl() { . use_debug::check(cx, format_args); . } . } 239,736 ( 0.01%) } . } . . fn is_debug_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 30 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. . }) = &item.kind . && let Some(trait_id) = of_trait.trait_ref.trait_def_id() . { . cx.tcx.is_diagnostic_item(sym::Debug, trait_id) . } else { . false -- line 352 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . . /// This field is used for assigning DepNodeIndices when running in . /// non-incremental mode. Even in non-incremental mode we make sure that . /// each task has a `DepNodeIndex` that uniquely identifies it. This unique . /// ID is used for self-profiling. . virtual_dep_node_index: Arc, . } . 80,030 ( 0.00%) rustc_index::newtype_index! { . pub struct DepNodeIndex {} . } . . // We store a large collection of these in `prev_index_to_index` during . // non-full incremental builds, and want to ensure that the element size . // doesn't inadvertently increase. . rustc_data_structures::static_assert_size!(Option, 4); . -- line 76 ---------------------------------------- -- line 500 ---------------------------------------- . hashing_timer.finish_with_query_invocation_id(dep_node_index.into()); . dep_node_index . } . } . . impl DepGraph { . #[inline] . pub fn read_index(&self, dep_node_index: DepNodeIndex) { 120,088 ( 0.00%) if let Some(ref data) = self.data { . read_deps(|task_deps| { . let mut task_deps = match task_deps { . TaskDepsRef::Allow(deps) => deps.lock(), . TaskDepsRef::EvalAlways => { . // We don't need to record dependencies of eval_always . // queries. They are re-evaluated unconditionally anyway. . return; . } -- line 516 ---------------------------------------- 49,948 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs -------------------------------------------------------------------------------- Ir -- line 310 ---------------------------------------- . SEPARATED_LITERAL_SUFFIX, . UNNEEDED_FIELD_PATTERN, . UNNEEDED_WILDCARD_PATTERN, . UNSEPARATED_LITERAL_SUFFIX, . ZERO_PREFIXED_LITERAL, . ]); . . impl EarlyLintPass for MiscEarlyLints { 69,944 ( 0.00%) fn check_generics(&mut self, cx: &EarlyContext<'_>, generics: &Generics) { . for param in &generics.params { . builtin_type_shadow::check(cx, param); . } 79,936 ( 0.00%) } . 9 ( 0.00%) fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &Pat) { 3 ( 0.00%) unneeded_field_pattern::check(cx, pat); 18 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_field_pattern.rs:clippy_lints::misc_early::unneeded_field_pattern::check (1x) 3 ( 0.00%) redundant_pattern::check(cx, pat); 22 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_pattern.rs:clippy_lints::misc_early::redundant_pattern::check (1x) 3 ( 0.00%) redundant_at_rest_pattern::check(cx, pat); 3 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs:clippy_lints::misc_early::redundant_at_rest_pattern::check (1x) . unneeded_wildcard_pattern::check(cx, pat); 8 ( 0.00%) } . 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `check_lit` only lints integer literals and suffixed float literals. 79,908 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 9,988 ( 0.00%) && match lit.kind { . token::LitKind::Integer => true, . token::LitKind::Float => lit.suffix.is_some(), . _ => false, . } 29,964 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . MiscEarlyLints::check_lit(cx, lit, expr.span); . } 239,728 ( 0.01%) } . } . . impl MiscEarlyLints { . fn check_lit(cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { . // We test if first character in snippet is a number, because the snippet could be an expansion . // from a built-in macro like `line!()` or a proc-macro like `#[wasm_bindgen]`. . // Note that this check also covers special case that `line!()` is eagerly expanded by compiler. . // See for a regression. . // FIXME: Find a better way to detect those cases. 19,976 ( 0.00%) let lit_snip = match snippet_opt(cx, span) { 9,988 ( 0.00%) Some(snip) if snip.starts_with(|c: char| c.is_ascii_digit()) => snip, . _ => return, . }; . 9,988 ( 0.00%) let lit_kind = LitKind::from_token_lit(lit); 2,146,142 ( 0.08%) => ???:::from_token_lit (9,988x) 59,928 ( 0.00%) if let Ok(LitKind::Int(value, lit_int_type)) = lit_kind { 39,952 ( 0.00%) let suffix = match lit_int_type { . LitIntType::Signed(ty) => ty.name_str(), . LitIntType::Unsigned(ty) => ty.name_str(), . LitIntType::Unsuffixed => "", . }; 99,880 ( 0.00%) literal_suffix::check(cx, span, &lit_snip, suffix, "integer"); 10,749,813 ( 0.38%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs:clippy_lints::misc_early::literal_suffix::check (9,988x) 9,988 ( 0.00%) if lit_snip.starts_with("0x") { . mixed_case_hex_literals::check(cx, span, suffix, &lit_snip); 49,940 ( 0.00%) } else if lit_snip.starts_with("0b") || lit_snip.starts_with("0o") { . // nothing to do 9,988 ( 0.00%) } else if value != 0 && lit_snip.starts_with('0') { . zero_prefixed_literal::check(cx, span, &lit_snip); . } . } else if let Ok(LitKind::Float(_, LitFloatType::Suffixed(float_ty))) = lit_kind { . let suffix = float_ty.name_str(); . literal_suffix::check(cx, span, &lit_snip, suffix, "float"); . } . } . } -- line 378 ---------------------------------------- 179,784 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/init_numbered_fields.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . pub INIT_NUMBERED_FIELDS, . style, . "numbered fields in tuple struct initializer" . } . . declare_lint_pass!(NumberedFields => [INIT_NUMBERED_FIELDS]); . . impl<'tcx> LateLintPass<'tcx> for NumberedFields { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 59,941 ( 0.00%) if let ExprKind::Struct(path, fields @ [field, ..], StructTailExpr::None) = e.kind . // If the first character of any field is a digit it has to be a tuple. 2 ( 0.00%) && field.ident.as_str().as_bytes().first().is_some_and(u8::is_ascii_digit) 32 ( 0.00%) => ???:::as_str (1x) . // Type aliases can't be used as functions. . && !matches!( . cx.qpath_res(path, e.hir_id), . Res::Def(DefKind::TyAlias | DefKind::AssocTy, _) . ) . // This is the only syntax macros can use that works for all struct types. . && !e.span.from_expansion() . && let mut has_side_effects = false -- line 56 ---------------------------------------- -- line 89 ---------------------------------------- . .intersperse(Cow::Borrowed(", ")) . .collect::() . ), . app, . ); . }, . ); . } 209,769 ( 0.01%) } . } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 128 ---------------------------------------- . /// Methods on `Vec` that also exists on slices. . pub const VEC_METHODS_SHADOWING_SLICE_METHODS: [Symbol; 3] = [sym::as_ptr, sym::is_empty, sym::len]; . . #[macro_export] . macro_rules! extract_msrv_attr { . () => { . fn check_attributes(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 919,189 ( 0.03%) self.msrv.check_attributes(attrs); 119,889 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes (39,963x) . } . . fn check_attributes_post(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 879,224 ( 0.03%) self.msrv.check_attributes_post(attrs); 119,889 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post (39,963x) . } . }; . } . . /// If the given expression is a local binding, find the initializer expression. . /// If that initializer expression is another local binding, find its initializer again. . /// . /// This process repeats as long as possible (but usually no more than once). Initializer -- line 149 ---------------------------------------- -- line 160 ---------------------------------------- . /// . /// // or... . /// let abc = 1; . /// let def = abc + 2; . /// // ^^^^^^^ output . /// dbg!(def); . /// // ^^^ input . /// ``` 15 ( 0.00%) pub fn expr_or_init<'a, 'b, 'tcx: 'b>(cx: &LateContext<'tcx>, mut expr: &'a Expr<'b>) -> &'a Expr<'b> { . while let Some(init) = expr . .res_local_id() . .and_then(|id| find_binding_init(cx, id)) . .filter(|init| cx.typeck_results().expr_adjustments(init).is_empty()) . { . expr = init; . } . expr 9 ( 0.00%) } . . /// Finds the initializer expression for a local binding. Returns `None` if the binding is mutable. . /// . /// By only considering immutable bindings, we guarantee that the returned expression represents the . /// value of the binding wherever it is referenced. . /// . /// Example: For `let x = 1`, if the `HirId` of `x` is provided, the `Expr` `1` is returned. . /// Note: If you have an expression that references a binding `x`, use `path_to_local` to get the -- line 185 ---------------------------------------- -- line 216 ---------------------------------------- . /// `tcx.hir_is_inside_const_context(_)`. . /// . /// Do not call this unless the `LateContext` has an enclosing body. For release build this case . /// will safely return `false`, but debug builds will ICE. Note that `check_expr`, `check_block`, . /// `check_pat` and a few other entry points will always have an enclosing body. Some entry points . /// like `check_path` or `check_ty` may or may not have one. . pub fn is_in_const_context(cx: &LateContext<'_>) -> bool { . debug_assert!(cx.enclosing_body.is_some(), "`LateContext` has no enclosing body"); 39,954 ( 0.00%) cx.enclosing_body.is_some_and(|id| { 19,977 ( 0.00%) cx.tcx 99,885 ( 0.00%) .hir_body_const_context(cx.tcx.hir_body_owner_def_id(id)) 2,282,758 ( 0.08%) => ???:::hir_body_owner_def_id (19,977x) 1,401,190 ( 0.05%) => ???:::hir_body_const_context (19,977x) . .is_some() . }) 19,977 ( 0.00%) } . . /// Returns `true` if the given `HirId` is inside an always constant context. . /// . /// This context includes: . /// * const/static items . /// * const blocks (or inline consts) . /// * associated constants 6 ( 0.00%) pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { . use rustc_hir::ConstContext::{Const, ConstFn, Static}; 24 ( 0.00%) let Some(ctx) = tcx.hir_body_const_context(tcx.hir_enclosing_body_owner(hir_id)) else { 774 ( 0.00%) => ???:::hir_enclosing_body_owner (3x) 522 ( 0.00%) => ???:::hir_body_const_context (3x) . return false; . }; . match ctx { . ConstFn => false, . Static(_) . | Const { . allow_const_fn_promotion: _, . } => true, . } 6 ( 0.00%) } . . /// Checks if `{ctor_call_id}(...)` is `{enum_item}::{variant_name}(...)`. . pub fn is_enum_variant_ctor( . cx: &LateContext<'_>, . enum_item: Symbol, . variant_name: Symbol, . ctor_call_id: DefId, . ) -> bool { -- line 257 ---------------------------------------- -- line 380 ---------------------------------------- . peel_blocks(arm.body).kind, . ExprKind::Path(qpath) . if cx.qpath_res(&qpath, arm.body.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone) . ) . } . . /// Checks if the given `QPath` belongs to a type alias. . pub fn is_ty_alias(qpath: &QPath<'_>) -> bool { 39,952 ( 0.00%) match *qpath { 129,844 ( 0.00%) QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), 89,892 ( 0.00%) QPath::TypeRelative(ty, _) if let TyKind::Path(qpath) = ty.kind => is_ty_alias(&qpath), 159,808 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias'2 (9,988x) . QPath::TypeRelative(..) => false, . } 19,976 ( 0.00%) } . . /// Checks if the `def_id` belongs to a function that is part of a trait impl. . pub fn is_def_id_trait_method(cx: &LateContext<'_>, def_id: LocalDefId) -> bool { . if let Node::Item(item) = cx.tcx.parent_hir_node(cx.tcx.local_def_id_to_hir_id(def_id)) . && let ItemKind::Impl(imp) = item.kind . { . imp.of_trait.is_some() . } else { . false . } . } . . pub fn last_path_segment<'tcx>(path: &QPath<'tcx>) -> &'tcx PathSegment<'tcx> { 2 ( 0.00%) match *path { 2 ( 0.00%) QPath::Resolved(_, path) => path.segments.last().expect("A path must have at least one segment"), . QPath::TypeRelative(_, seg) => seg, . } 1 ( 0.00%) } . . pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator> { . last_path_segment(qpath) . .args . .map_or(&[][..], |a| a.args) . .iter() . .filter_map(|a| match a { . GenericArg::Type(ty) => Some(ty.as_unambig_ty()), -- line 419 ---------------------------------------- -- line 448 ---------------------------------------- . /// impl std::ops::Add for Point { . /// type Output = Self; . /// . /// fn add(self, other: Self) -> Self { . /// Point(0, 0) . /// } . /// } . /// ``` 24 ( 0.00%) pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, owner: OwnerId) -> Option<&'tcx TraitRef<'tcx>> { 21 ( 0.00%) if let Node::Item(item) = cx.tcx.hir_node(cx.tcx.hir_owner_parent(owner)) 156 ( 0.00%) => ???:::hir_node (3x) 6 ( 0.00%) && let ItemKind::Impl(impl_) = &item.kind 3 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { . return Some(&of_trait.trait_ref); . } . None 24 ( 0.00%) } . . /// This method will return tuple of projection stack and root of the expression, . /// used in `can_mut_borrow_both`. . /// . /// For example, if `e` represents the `v[0].a.b[x]` . /// this method will return a tuple, composed of a `Vec` . /// containing the `Expr`s for `v[0], v[0].a, v[0].a.b, v[0].a.b[x]` . /// and an `Expr` for root of them, `v` -- line 472 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . /// Matches an `Expr` against a chain of methods, and return the matched `Expr`s. . /// . /// For example, if `expr` represents the `.baz()` in `foo.bar().baz()`, . /// `method_chain_args(expr, &[sym::bar, sym::baz])` will return a `Vec` . /// containing the `Expr`s for . /// `.bar()` and `.baz()` 42 ( 0.00%) pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[Symbol]) -> Option, &'a [Expr<'a>])>> { . let mut current = expr; . let mut matched = Vec::with_capacity(methods.len()); . for method_name in methods.iter().rev() { . // method chains are stored last -> first 12 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, _) = current.kind { . if path.ident.name == *method_name { . if receiver.span.from_expansion() || args.iter().any(|e| e.span.from_expansion()) { . return None; . } . matched.push((receiver, args)); // build up `matched` backwards . current = receiver; // go to parent expression . } else { . return None; -- line 1051 ---------------------------------------- -- line 1052 ---------------------------------------- . } . } else { . return None; . } . } . // Reverse `matched` so that it is in the same order as `methods`. . matched.reverse(); . Some(matched) 54 ( 0.00%) } . . /// Returns `true` if the provided `def_id` is an entrypoint to a program. 9 ( 0.00%) pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool { 1 ( 0.00%) cx.tcx . .entry_fn(()) . .is_some_and(|(entry_fn_def_id, _)| def_id == entry_fn_def_id) 8 ( 0.00%) } . . /// Returns `true` if the expression is in the program's `#[panic_handler]`. . pub fn is_in_panic_handler(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . let parent = cx.tcx.hir_get_parent_item(e.hir_id); . Some(parent.to_def_id()) == cx.tcx.lang_items().panic_impl() . } . . /// Gets the name of the item the expression is in, if available. -- line 1075 ---------------------------------------- -- line 1118 ---------------------------------------- . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Gets the parent expression, if any –- this is useful to constrain a lint. 39,956 ( 0.00%) pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 79,912 ( 0.00%) get_parent_expr_for_hir(cx, e.hir_id) 79,912 ( 0.00%) } . . /// This retrieves the parent for the given `HirId` if it's an expression. This is useful for . /// constraint lints . pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 159,824 ( 0.01%) match cx.tcx.parent_hir_node(hir_id) { 3,846,528 ( 0.14%) => ???:::parent_hir_node (39,956x) . Node::Expr(parent) => Some(parent), . _ => None, . } . } . . /// Gets the enclosing block, if any. . pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> { . let enclosing_node = cx -- line 1141 ---------------------------------------- -- line 1388 ---------------------------------------- . pub fn is_adjusted(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . cx.typeck_results().adjustments().get(e.hir_id).is_some() . } . . /// Returns the pre-expansion span if this comes from an expansion of the . /// macro `name`. . /// See also [`is_direct_expn_of`]. . #[must_use] 509,388 ( 0.02%) pub fn is_expn_of(mut span: Span, name: Symbol) -> Option { . loop { . if span.from_expansion() { . let data = span.ctxt().outer_expn_data(); . let new_span = data.call_site; . . if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { . return Some(new_span); . } . . span = new_span; . } else { 59,928 ( 0.00%) return None; . } . } 269,676 ( 0.01%) } . . /// Returns the pre-expansion span if the span directly comes from an expansion . /// of the macro `name`. . /// The difference with [`is_expn_of`] is that in . /// ```no_run . /// # macro_rules! foo { ($name:tt!$args:tt) => { $name!$args } } . /// # macro_rules! bar { ($e:expr) => { $e } } . /// foo!(bar!(42)); -- line 1421 ---------------------------------------- -- line 1434 ---------------------------------------- . return Some(new_span); . } . } . . None . } . . /// Convenience function to get the return type of a function. 21 ( 0.00%) pub fn return_ty<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId) -> Ty<'tcx> { 3 ( 0.00%) let ret_ty = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip().output(); 12 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ret_ty) 81 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (3x) 21 ( 0.00%) } . . /// Convenience function to get the nth argument type of a function. . pub fn nth_arg<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId, nth: usize) -> Ty<'tcx> { . let arg = cx . .tcx . .fn_sig(fn_def_id) . .instantiate_identity() . .skip_norm_wip() -- line 1453 ---------------------------------------- -- line 1545 ---------------------------------------- . && let Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } = path.res . { . return true; . } . false . } . . pub fn iter_input_pats<'tcx>(decl: &FnDecl<'_>, body: &'tcx Body<'_>) -> impl Iterator> { 6 ( 0.00%) (0..decl.inputs.len()).map(move |i| &body.params[i]) . } . . /// Checks if a given expression is a match expression expanded from the `?` . /// operator or the `try` macro. . pub fn is_try<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . fn is_ok(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { . if let PatKind::TupleStruct(ref path, pat, ddpos) = arm.pat.kind . && ddpos.as_opt_usize().is_none() -- line 1561 ---------------------------------------- -- line 1628 ---------------------------------------- . . /// Returns `true` if the lint is allowed in the current context. This is useful for . /// skipping long running code when it's unnecessary . /// . /// This function should check the lint level for the same node, that the lint will . /// be emitted at. If the information is buffered to be emitted at a later point, please . /// make sure to use `span_lint_hir` functions to emit the lint. This ensures that . /// expectations at the checked nodes will be fulfilled. 39,976 ( 0.00%) pub fn is_lint_allowed(cx: &LateContext<'_>, lint: &'static Lint, id: HirId) -> bool { 19,988 ( 0.00%) cx.tcx.lint_level_spec_at_node(lint, id).is_allow() 8,155,721 ( 0.29%) => ???:::lint_level_spec_at_node (9,994x) 19,988 ( 0.00%) } . . pub fn strip_pat_refs<'hir>(mut pat: &'hir Pat<'hir>) -> &'hir Pat<'hir> { . while let PatKind::Ref(subpat, _, _) = pat.kind { . pat = subpat; . } . pat . } . -- line 1646 ---------------------------------------- -- line 1688 ---------------------------------------- . enclosing_node = tcx.hir_get_parent_item(enclosing_node).into(); . } . . false . } . . /// Checks if the given HIR node is inside an `impl` block with the `automatically_derived` . /// attribute. 209,769 ( 0.01%) pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_owner_iter(id) 209,769 ( 0.01%) .filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_)))) 59,934 ( 0.00%) .any(|(id, _)| find_attr!(tcx, id.def_id, AutomaticallyDerived)) 2,157,624 ( 0.08%) => ???:>::get_attrs (29,967x) 209,769 ( 0.01%) } . . /// Checks if the given `DefId` matches the `libc` item. 99,880 ( 0.00%) pub fn match_libc_symbol(cx: &LateContext<'_>, did: DefId, name: Symbol) -> bool { . // libc is meant to be used as a flat list of names, but they're all actually defined in different . // modules based on the target platform. Ignore everything but crate name and the item name. 29,964 ( 0.00%) cx.tcx.crate_name(did.krate) == sym::libc && cx.tcx.def_path_str(did).ends_with(name.as_str()) 79,904 ( 0.00%) } . . /// Returns the list of condition expressions and the list of blocks in a . /// sequence of `if/else`. . /// E.g., this returns `([a, b], [c, d, e])` for the expression . /// `if a { c } else if b { d } else { e }`. . pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>, Vec<&'tcx Block<'tcx>>) { . let mut conds = Vec::new(); . let mut blocks: Vec<&Block<'_>> = Vec::new(); -- line 1715 ---------------------------------------- -- line 1986 ---------------------------------------- . match expr.kind { . ExprKind::Closure(&Closure { body, .. }) => is_body_identity_function(cx, cx.tcx.hir_body(body)), . _ => expr.basic_res().is_diag_item(cx, sym::convert_identity), . } . } . . /// Gets the node where an expression is either used, or it's type is unified with another branch. . /// Returns both the node and the `HirId` of the closest child node. 8 ( 0.00%) pub fn get_expr_use_or_unification_node<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<(Node<'tcx>, HirId)> { 9 ( 0.00%) for (node, child_id) in hir_parent_with_src_iter(tcx, expr.hir_id) { 6 ( 0.00%) match node { . Node::Block(_) => {}, . Node::Arm(arm) if arm.body.hir_id == child_id => {}, . Node::Expr(expr) => match expr.kind { . ExprKind::Block(..) | ExprKind::DropTemps(_) => {}, . ExprKind::Match(_, [arm], _) if arm.hir_id == child_id => {}, . ExprKind::If(_, then_expr, None) if then_expr.hir_id == child_id => return None, . _ => return Some((Node::Expr(expr), child_id)), . }, 2 ( 0.00%) node => return Some((node, child_id)), . } . } . None 8 ( 0.00%) } . . /// Checks if the result of an expression is used, or it's type is unified with another branch. . pub fn is_expr_used_or_unified(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { . !matches!( . get_expr_use_or_unification_node(tcx, expr), . None | Some(( . Node::Stmt(Stmt { . kind: StmtKind::Expr(_) -- line 2017 ---------------------------------------- -- line 2052 ---------------------------------------- . None . } else if is_no_std_crate(cx) { . Some("core") . } else { . Some("std") . } . } . 1 ( 0.00%) pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool { 2 ( 0.00%) find_attr!(cx.tcx, crate, NoStd) 35 ( 0.00%) => ???:::hir_krate_attrs (1x) 3 ( 0.00%) } . . pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool { . find_attr!(cx.tcx, crate, NoCore) . } . . /// Check if parent of a hir node is a trait implementation block. . /// For example, `f` in . /// ```no_run . /// # struct S; . /// # trait Trait { fn f(); } . /// impl Trait for S { . /// fn f() {} . /// } . /// ``` 6 ( 0.00%) pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool { 10 ( 0.00%) if let Node::Item(item) = cx.tcx.parent_hir_node(hir_id) { 292 ( 0.00%) => ???:::parent_hir_node (2x) 8 ( 0.00%) matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) . } else { . false . } 4 ( 0.00%) } . . /// Check if it's even possible to satisfy the `where` clause for the item. . /// . /// `trivial_bounds` feature allows functions with unsatisfiable bounds, for example: . /// . /// ```ignore . /// fn foo() where i32: Iterator { . /// for _ in 2i32 {} -- line 2091 ---------------------------------------- -- line 2098 ---------------------------------------- . .clauses_of(did) . .clauses . .iter() . .filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None }); . traits::impossible_clauses(cx.tcx, traits::elaborate(cx.tcx, clauses).collect::>()) . } . . /// Returns the `DefId` of the callee if the given expression is a function or method call. 119,868 ( 0.00%) pub fn fn_def_id(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 29,967 ( 0.00%) fn_def_id_with_node_args(cx, expr).map(|(did, _)| did) 1,807,906 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (29,967x) 59,934 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call, . /// as well as its node args. 209,776 ( 0.01%) pub fn fn_def_id_with_node_args<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'_>, . ) -> Option<(DefId, GenericArgsRef<'tcx>)> { . let typeck = cx.typeck_results(); 159,828 ( 0.01%) match &expr.kind { . ExprKind::MethodCall(..) => Some(( . typeck.type_dependent_def_id(expr.hir_id)?, . typeck.node_args(expr.hir_id), 9,988 ( 0.00%) )), . ExprKind::Call( . Expr { 9,988 ( 0.00%) kind: ExprKind::Path(qpath), . hir_id: path_hir_id, . .. . }, . .., . ) => { . // Only return Fn-like DefIds, not the DefIds of statics/consts/etc that contain or . // deref to fn pointers, dyn Fn, impl Fn - #8850 49,940 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(..) | DefKind::AssocFn, id) = 99,880 ( 0.00%) typeck.qpath_res(qpath, *path_hir_id) 669,196 ( 0.02%) => ???:::qpath_res (9,988x) . { 59,928 ( 0.00%) Some((id, typeck.node_args(*path_hir_id))) 89,892 ( 0.00%) => ???:::node_args (9,988x) . } else { . None . } . }, . _ => None, . } 269,712 ( 0.01%) } . . /// Returns `Option` where String is a textual representation of the type encapsulated in . /// the slice iff the given expression is a slice of primitives. . /// . /// (As defined in the `is_recursively_primitive_type` function.) Returns `None` otherwise. . pub fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { . let expr_type = cx.typeck_results().expr_ty_adjusted(expr); . let expr_kind = expr_type.kind(); -- line 2150 ---------------------------------------- -- line 2267 ---------------------------------------- . count = count.wrapping_add(1); . curr_expr = local_expr; . } . (curr_expr, count) . } . . /// Peels off all references on the expression. Returns the underlying expression and the number of . /// references removed. 59,934 ( 0.00%) pub fn peel_hir_expr_refs<'a>(expr: &'a Expr<'a>) -> (&'a Expr<'a>, usize) { . let mut count = 0; 59,934 ( 0.00%) let e = peel_hir_expr_while(expr, |e| match e.kind { . ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) => { . count += 1; . Some(e) . }, . _ => None, . }); . (e, count) 29,967 ( 0.00%) } . . /// Peels off all references on the type. Returns the underlying type and the number of references . /// removed. . pub fn peel_hir_ty_refs<'a>(mut ty: &'a hir::Ty<'a>) -> (&'a hir::Ty<'a>, usize) { . let mut count = 0; . loop { . match &ty.kind { . TyKind::Ref(_, ref_ty) => { -- line 2293 ---------------------------------------- -- line 2346 ---------------------------------------- . } . false . } . . static TEST_ITEM_NAMES_CACHE: OnceLock>>> = OnceLock::new(); . . /// Returns the names of the test items in the given module. . /// The names are sorted using the default `Symbol` ordering. 10 ( 0.00%) fn test_item_names(tcx: TyCtxt<'_>, module: LocalModId) -> Vec { . let cache = TEST_ITEM_NAMES_CACHE.get_or_init(|| Mutex::new(FxHashMap::default())); . let mut map = cache.lock().unwrap(); . match map.entry(module) { . Entry::Occupied(entry) => entry.get().clone(), . Entry::Vacant(entry) => { . let mut names = Vec::new(); . for id in tcx.hir_module_free_items(module) { 10 ( 0.00%) if matches!(tcx.def_kind(id.owner_id), DefKind::Const { .. }) . && let item = tcx.hir_item(id) . && let ItemKind::Const(ident, _generics, ty, _body) = item.kind . && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . // We could also check for the type name `test::TestDescAndFn` . && let Res::Def(DefKind::Struct, _) = path.res . && find_attr!(tcx, item.hir_id(), RustcTestMarker(..)) . { . names.push(ident.name); . } . } . names.sort_unstable(); 4 ( 0.00%) entry.insert(names).clone() . }, . } 8 ( 0.00%) } . . /// Checks if the function containing the given `HirId` is a `#[test]` function . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function 7 ( 0.00%) pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool { 4 ( 0.00%) let names = test_item_names(tcx, tcx.parent_module(id)); 595 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::test_item_names (1x) 102 ( 0.00%) => ???:::parent_module (1x) . // Without `--test` there are no test items, so the parent walk can never match. 1 ( 0.00%) if names.is_empty() { . return false; . } . once((id, tcx.hir_node(id))) . .chain(tcx.hir_parent_iter(id)) . // Since you can nest functions we need to collect all until we leave . // function scope . .any(|(_id, node)| { . if let Node::Item(item) = node -- line 2393 ---------------------------------------- -- line 2394 ---------------------------------------- . && let ItemKind::Fn { ident, .. } = item.kind . { . // Note that we have sorted the item names in the visitor, . // so the binary_search gets the same as `contains`, but faster. . return names.binary_search(&ident.name).is_ok(); . } . false . }) 6 ( 0.00%) } . . /// Checks if `fn_def_id` has a `#[test]` attribute applied . /// . /// This only checks directly applied attributes. To see if a node has a parent function marked with . /// `#[test]` use [`is_in_test_function`]. . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function . pub fn is_test_function(tcx: TyCtxt<'_>, fn_def_id: LocalDefId) -> bool { -- line 2410 ---------------------------------------- -- line 2420 ---------------------------------------- . } . } . . /// Checks if `id` has a `#[cfg(test)]` attribute applied . /// . /// This only checks directly applied attributes, to see if a node is inside a `#[cfg(test)]` parent . /// use [`is_in_cfg_test`] . pub fn is_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { 8 ( 0.00%) if let Some(cfgs) = find_attr!(tcx, id, CfgTrace(cfgs) => cfgs) 86 ( 0.00%) => ???:>::get_attrs (2x) . && cfgs . .iter() . .any(|(cfg, _)| matches!(cfg, CfgEntry::NameValue { name: sym::test, .. })) . { . true . } else { . false . } -- line 2436 ---------------------------------------- -- line 2437 ---------------------------------------- . } . . /// Checks if any parent node of `HirId` has `#[cfg(test)]` attribute applied . pub fn is_in_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_id_iter(id).any(|parent_id| is_cfg_test(tcx, parent_id)) . } . . /// Checks if the node is in a `#[test]` function or has any parent node marked `#[cfg(test)]` 10 ( 0.00%) pub fn is_in_test(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { 5 ( 0.00%) is_in_test_function(tcx, hir_id) || is_in_cfg_test(tcx, hir_id) 722 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test_function (1x) 8 ( 0.00%) } . . /// Checks if the item of any of its parents has `#[cfg(...)]` attribute applied. . pub fn inherits_cfg(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { . find_attr!(tcx, def_id, CfgTrace(..)) . || find_attr!( . tcx.hir_parent_id_iter(tcx.local_def_id_to_hir_id(def_id)) . .flat_map(|parent_id| tcx.hir_attrs(parent_id)), . CfgTrace(..) -- line 2455 ---------------------------------------- -- line 3679 ---------------------------------------- . cx.tcx.sess.edition().at_least_rust_2024() && msrv.meets(cx, msrvs::LET_CHAINS) . } . . /// Returns an iterator over successive parent nodes paired with the ID of the node which . /// immediatly preceeded them. . #[inline] . pub fn hir_parent_with_src_iter(tcx: TyCtxt<'_>, mut id: HirId) -> impl Iterator, HirId)> { . tcx.hir_parent_id_iter(id) 8 ( 0.00%) .map(move |parent| (tcx.hir_node(parent), mem::replace(&mut id, parent))) 52 ( 0.00%) => ???:::hir_node (1x) . } 199,822 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl ManualSliceSizeCalculation { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualSliceSizeCalculation { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind . && BinOpKind::Mul == op.node . && !expr.span.from_expansion() . && let Some((receiver, refs_count)) = simplify(cx, left, right) . && (!is_in_const_context(cx) || self.msrv.meets(cx, msrvs::CONST_SIZE_OF_VAL)) . { . let ctxt = expr.span.ctxt(); . let mut app = Applicability::MachineApplicable; . let deref = if refs_count > 0 { -- line 64 ---------------------------------------- -- line 74 ---------------------------------------- . MANUAL_SLICE_SIZE_CALCULATION, . expr.span, . "manual slice size calculation", . "try", . format!("{sugg}::mem::size_of_val({deref}{val_name})"), . app, . ); . } 239,736 ( 0.01%) } . } . . fn simplify<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { . let expr1 = expr_or_init(cx, expr1); -- line 90 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/self_named_constructors.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub SELF_NAMED_CONSTRUCTORS, . style, . "method should not have the same name as the type it is implemented for" . } . . declare_lint_pass!(SelfNamedConstructors => [SELF_NAMED_CONSTRUCTORS]); . . impl<'tcx> LateLintPass<'tcx> for SelfNamedConstructors { 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { 19,978 ( 0.00%) match impl_item.kind { . ImplItemKind::Fn(ref sig, _) => { 3 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() { 8 ( 0.00%) => ???:::implicit_self (1x) . return; . } . }, . _ => return, . } . 6 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 92 ( 0.00%) => ???:::hir_get_parent_item (1x) 4 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 51 ( 0.00%) => ???:::hir_expect_item (1x) 2 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 2 ( 0.00%) let ret_ty = return_ty(cx, impl_item.owner_id); 77 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (1x) . . // Do not check trait impls 4 ( 0.00%) if matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) { . return; . } . . // Ensure method is constructor-like . if let Some(self_adt) = self_ty.ty_adt_def() { 2 ( 0.00%) if !contains_adt_constructor(ret_ty, self_adt) { 202 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::contains_adt_constructor (1x) . return; . } . } else if !ret_ty.contains(self_ty) { . return; . } . . if let Some(self_def) = self_ty.ty_adt_def() . && let Some(self_local_did) = self_def.did().as_local() 3 ( 0.00%) && let Node::Item(x) = cx.tcx.hir_node_by_def_id(self_local_did) 3 ( 0.00%) && let Some(type_ident) = x.kind.ident() 11 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::ident (1x) 2 ( 0.00%) && let type_name = type_ident.name.as_str().to_lowercase() 190 ( 0.00%) => ???:::to_lowercase (1x) 1 ( 0.00%) && (impl_item.ident.name.as_str() == type_name 2 ( 0.00%) || impl_item.ident.name.as_str().replace('_', "") == type_name) 215 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/str.rs:::replace:: (1x) . { . span_lint( . cx, . SELF_NAMED_CONSTRUCTORS, . impl_item.span, . format!("constructor `{}` has the same name as the type", impl_item.ident.name), . ); . } 79,912 ( 0.00%) } . } 6 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl ExplicitWrite { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for ExplicitWrite { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // match call to unwrap 59,934 ( 0.00%) if let ExprKind::MethodCall(unwrap_fun, write_call, [], _) = expr.kind . && unwrap_fun.ident.name == sym::unwrap . // match call to write_fmt . && let ExprKind::MethodCall(write_fun, write_recv, [write_arg], _) = *look_in_block(cx, &write_call.kind) . && let ExprKind::Call(write_recv_path, []) = write_recv.kind . && write_fun.ident.name == sym::write_fmt . && let Some(def_id) = write_recv_path.basic_res().opt_def_id() . { . // match calls to std::io::stdout() / std::io::stderr () -- line 65 ---------------------------------------- -- line 105 ---------------------------------------- . EXPLICIT_WRITE, . expr.span, . format!("use of `{used}.unwrap()`"), . "try", . format!("{prefix}{sugg_mac}!({inputs_snippet})"), . applicability, . ); . } 239,736 ( 0.01%) } . } . . /// If `kind` is a block that looks like `{ let result = $expr; result }` then . /// returns $expr. Otherwise returns `kind`. . fn look_in_block<'tcx, 'hir>(cx: &LateContext<'tcx>, kind: &'tcx ExprKind<'hir>) -> &'tcx ExprKind<'hir> { . if let ExprKind::Block(block, _label @ None) = kind . && let Block { . stmts: [Stmt { kind: StmtKind::Let(local), .. }], -- line 121 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/dereference.rs -------------------------------------------------------------------------------- Ir -- line 146 ---------------------------------------- . . impl_lint_pass!(Dereferencing<'_> => [ . EXPLICIT_AUTO_DEREF, . EXPLICIT_DEREF_METHODS, . NEEDLESS_BORROW, . REF_BINDING_TO_REFERENCE, . ]); . 11 ( 0.00%) #[derive(Default)] . pub struct Dereferencing<'tcx> { . state: Option<(State, StateData<'tcx>)>, . . // While parsing a `deref` method call in ufcs form, the path to the function is itself an . // expression. This is to store the id of that expression so it can be skipped when . // `check_expr` is called for it. . skip_expr: Option, . -- line 162 ---------------------------------------- -- line 235 ---------------------------------------- . /// All the replacements which need to be made. . replacements: Vec<(Span, String)>, . /// The [`HirId`] that the lint should be emitted at. . hir_id: HirId, . } . . impl<'tcx> LateLintPass<'tcx> for Dereferencing<'tcx> { . #[expect(clippy::too_many_lines)] 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Skip path expressions from deref calls. e.g. `Deref::deref(e)` 59,934 ( 0.00%) if Some(expr.hir_id) == self.skip_expr.take() { . return; . } . . if let Some(local) = expr.res_local_id() { . self.check_local_usage(cx, expr, local); . } . . // Stop processing sub expressions when a macro call is seen 59,934 ( 0.00%) if expr.span.from_expansion() { . if let Some((state, data)) = self.state.take() { . self.report(cx, expr, state, data, cx.typeck_results()); . } . return; . } . . let typeck = cx.typeck_results(); . let Some((kind, sub_expr, skip_expr)) = try_parse_ref_op(cx.tcx, typeck, expr) else { . // The whole chain of reference operations has been seen 59,934 ( 0.00%) if let Some((state, data)) = self.state.take() { . self.report(cx, expr, state, data, typeck); . } . return; . }; . self.skip_expr = skip_expr; . . if is_from_proc_macro(cx, expr) { . if let Some((state, data)) = self.state.take() { -- line 272 ---------------------------------------- -- line 642 ---------------------------------------- . derefs_manually_drop: derefs_manually_drop || is_manually_drop(sub_expr_ty), . }, . data, . )); . }, . . (Some((state, data)), _) => self.report(cx, expr, state, data, typeck), . } 239,736 ( 0.01%) } . 7 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 5 ( 0.00%) if let PatKind::Binding(BindingMode::REF, id, name, _) = pat.kind { . if let Some(opt_prev_pat) = self.ref_locals.get_mut(&id) { . // This binding id has been seen before. Add this pattern to the list of changes. . if let Some(prev_pat) = opt_prev_pat { . if pat.span.from_expansion() { . // Doesn't match the context of the previous pattern. Can't lint here. . *opt_prev_pat = None; . } else { . prev_pat.spans.push(pat.span); -- line 661 ---------------------------------------- -- line 685 ---------------------------------------- . spans: vec![pat.span], . app, . replacements: vec![(pat.span, snip.into())], . hir_id: pat.hir_id, . }), . ); . } . } 8 ( 0.00%) } . 69,923 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'_>) { . if Some(body.id()) == self.current_body { . for pat in self.ref_locals.drain(..).filter_map(|(_, x)| x) { . let replacements = pat.replacements; . let app = pat.app; . let lint = if pat.always_deref { . NEEDLESS_BORROW . } else { . REF_BINDING_TO_REFERENCE -- line 703 ---------------------------------------- -- line 710 ---------------------------------------- . "this pattern creates a reference to a reference", . |diag| { . diag.multipart_suggestion("try", replacements, app); . }, . ); . } . self.current_body = None; . } 79,912 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { . // Only check for `impl Deref(Mut)`s if we're not already in one 10 ( 0.00%) if !self.in_deref_impl() && is_deref_or_derefmut_impl(cx, item) { . self.outermost_deref_impl = Some(item.owner_id); . } . } . . fn check_item_post(&mut self, _cx: &LateContext<'_>, item: &Item<'_>) { . // Only clear `self.outermost_deref_impl` if we're escaping the _outermost_ `impl Deref(Mut)` . if self.outermost_deref_impl == Some(item.owner_id) { . self.outermost_deref_impl = None; . } . } . } . . fn is_deref_or_derefmut_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 20 ( 0.00%) if let hir::ItemKind::Impl(impl_) = item.kind . && let Some(of_trait) = impl_.of_trait . && let Some(trait_id) = of_trait.trait_ref.trait_def_id() . { . cx.tcx.lang_items().deref_trait() == Some(trait_id) || cx.tcx.lang_items().deref_mut_trait() == Some(trait_id) . } else { . false . } . } . . fn try_parse_ref_op<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'_>, . expr: &'tcx Expr<'_>, . ) -> Option<(RefOp, &'tcx Expr<'tcx>, Option)> { 219,751 ( 0.01%) let (call_path_id, def_id, arg) = match expr.kind { . ExprKind::MethodCall(_, arg, [], _) => (None, typeck.type_dependent_def_id(expr.hir_id)?, arg), . ExprKind::Call( . &Expr { . kind: ExprKind::Path(QPath::Resolved(None, path)), . hir_id, . .. . }, 19,976 ( 0.00%) [arg], . ) => (Some(hir_id), path.res.opt_def_id()?, arg), . ExprKind::Unary(UnOp::Deref, sub_expr) if !typeck.expr_ty(sub_expr).is_raw_ptr() => { . return Some((RefOp::Deref, sub_expr, None)); . }, . ExprKind::AddrOf(BorrowKind::Ref, mutability, sub_expr) => { . return Some((RefOp::AddrOf(mutability), sub_expr, None)); . }, . _ => return None, -- line 767 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . impl<'tcx> Dereferencing<'tcx> { . fn in_deref_impl(&self) -> bool { . self.outermost_deref_impl.is_some() . } . . fn check_local_usage(&mut self, cx: &LateContext<'tcx>, e: &Expr<'tcx>, local: HirId) { 4 ( 0.00%) if let Some(outer_pat) = self.ref_locals.get_mut(&local) 12 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (1x) . && let Some(pat) = outer_pat . // Check for auto-deref . && !matches!( . cx.typeck_results().expr_adjustments(e), . [ . Adjustment { . kind: Adjust::Deref(_), . .. -- line 1046 ---------------------------------------- 59,943 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . } . . impl<'tcx> LateLintPass<'tcx> for UnitTypes { . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { . let_unit_value::check(cx, &self.format_args, local); . } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 89,901 ( 0.00%) unit_cmp::check(cx, expr); 869,043 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check (29,967x) 89,901 ( 0.00%) unit_arg::check(cx, expr); 8,358,446 ( 0.30%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs:clippy_lints::unit_types::unit_arg::check (29,967x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . . impl ManualAbsDiff { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualAbsDiff { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if !expr.span.from_expansion() . && let Some(if_expr) = If::hir(expr) . && let Some(r#else) = if_expr.r#else . && let ExprKind::Binary(op, rhs, lhs) = if_expr.cond.kind . && let (BinOpKind::Gt | BinOpKind::Ge, mut a, mut b) | (BinOpKind::Lt | BinOpKind::Le, mut b, mut a) = . (op.node, rhs, lhs) . && let Some((ty, b_n_refs)) = self.are_ty_eligible(cx, a, b) . && is_sub_expr(cx, if_expr.then, a, b, ty) . && is_sub_expr(cx, r#else, b, a, ty) -- line 66 ---------------------------------------- -- line 86 ---------------------------------------- . Sugg::hir(cx, a, "..").maybe_paren(), . "*".repeat(b_n_refs), . Sugg::hir(cx, b, "..") . ); . diag.span_suggestion(expr.span, "replace with `abs_diff`", sugg, applicability); . }, . ); . } 239,736 ( 0.01%) } . } . . impl ManualAbsDiff { . /// Returns a type if `a` and `b` are both of it, and this lint can be applied to that . /// type (currently, any primitive int, or a `Duration`) . fn are_ty_eligible<'tcx>(&self, cx: &LateContext<'tcx>, a: &Expr<'_>, b: &Expr<'_>) -> Option<(Ty<'tcx>, usize)> { . let is_int = |ty: Ty<'_>| matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) && self.msrv.meets(cx, msrvs::ABS_DIFF); . let is_duration = -- line 102 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs -------------------------------------------------------------------------------- Ir -- line 85 ---------------------------------------- . /// 'A..=F' . UpperHexLetter, . /// '0..=9' | 'a..=f' | 'A..=F' . HexDigit, . Otherwise, . } . . impl<'tcx> LateLintPass<'tcx> for ManualIsAsciiCheck { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if !matches!( 59,934 ( 0.00%) expr.kind, . ExprKind::Match(_, [_, ..], _) | ExprKind::MethodCall(_, _, [_], _) . ) { . return; . } . . if !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT) { . return; . } -- line 103 ---------------------------------------- -- line 127 ---------------------------------------- . let range = check_expr_range(start, end); . (arg, expr.span, range) . } else { . return; . }; . . let ty_sugg = get_ty_sugg(cx, arg); . check_is_ascii(cx, span, arg, &range, ty_sugg); 239,736 ( 0.01%) } . } . . fn get_ty_sugg<'tcx>(cx: &LateContext<'tcx>, arg: &Expr<'_>) -> Option<(Span, Ty<'tcx>)> { . let local_hid = arg.res_local_id()?; . if let Node::Param(Param { ty_span, span, .. }) = cx.tcx.parent_hir_node(local_hid) . // `ty_span` and `span` are the same for inferred type, thus a type suggestion must be given . && ty_span == span . { -- line 143 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . } . impl AlmostCompleteRange { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . impl EarlyLintPass for AlmostCompleteRange { . fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &Expr) { 59,932 ( 0.00%) if let ExprKind::Range(Some(start), Some(end), RangeLimits::HalfOpen) = &e.kind . && is_incomplete_range(start, end) . && !e.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . e.span, . "almost complete ascii range", -- line 52 ---------------------------------------- -- line 61 ---------------------------------------- . "use an inclusive range", . "..=".to_owned(), . Applicability::MaybeIncorrect, . ); . } . }, . ); . } 29,966 ( 0.00%) } . 6 ( 0.00%) fn check_pat(&mut self, cx: &EarlyContext<'_>, p: &Pat) { 2 ( 0.00%) if let PatKind::Range(Some(start), Some(end), kind) = &p.kind . && matches!(kind.node, RangeEnd::Excluded) . && is_incomplete_range(start, end) . && !p.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . p.span, -- line 80 ---------------------------------------- -- line 88 ---------------------------------------- . } else { . "...".to_owned() . }, . Applicability::MaybeIncorrect, . ); . }, . ); . } 7 ( 0.00%) } . . extract_msrv_attr!(); . } . . fn is_incomplete_range(start: &Expr, end: &Expr) -> bool { . match (&start.peel_parens().kind, &end.peel_parens().kind) { . (&ExprKind::Lit(start_lit), &ExprKind::Lit(end_lit)) => { . matches!( -- line 104 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs -------------------------------------------------------------------------------- Ir -- line 467 ---------------------------------------- . #[must_use = "returns a new pointer rather than modifying its argument"] . #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")] . #[inline(always)] . pub const fn wrapping_offset(self, count: isize) -> *mut T . where . T: Sized, . { . // SAFETY: the `arith_offset` intrinsic has no prerequisites to be called. 4 ( 0.00%) unsafe { intrinsics::arith_offset(self, count) as *mut T } . } . . /// Adds a signed offset in bytes to a pointer using wrapping arithmetic. . /// . /// `count` is in units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [wrapping_offset][pointer::wrapping_offset] on it. See that method -- line 483 ---------------------------------------- -- line 963 ---------------------------------------- . ( . this: *const () = self as *const (), . count: usize = count, . size: usize = size_of::(), . ) => runtime_add_nowrap(this, count, size) . ); . . // SAFETY: the caller must uphold the safety contract for `offset`. 369,951 ( 0.01%) unsafe { intrinsics::offset(self, count) } . } . . /// Adds an unsigned offset in bytes to a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [add][pointer::add] on it. See that method for documentation -- line 979 ---------------------------------------- -- line 1047 ---------------------------------------- . . if T::IS_ZST { . // Pointer arithmetic does nothing when the pointee is a ZST. . self . } else { . // SAFETY: the caller must uphold the safety contract for `offset`. . // Because the pointee is *not* a ZST, that means that `count` is . // at most `isize::MAX`, and thus the negation cannot overflow. 31,263 ( 0.00%) unsafe { intrinsics::offset(self, intrinsics::unchecked_sub(0, count as isize)) } . } . } . . /// Subtracts an unsigned offset in bytes from a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and -- line 1063 ---------------------------------------- 60,252 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_middle::ty::{self, Ty}; . . use super::CAST_PTR_ALIGNMENT; . . pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { . lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); . } . 149,835 ( 0.01%) pub(super) fn check_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::MethodCall(method_path, self_arg, [], _) = &expr.kind . && method_path.ident.name == sym::cast . && let Some(generic_args) = method_path.args . && let [GenericArg::Type(cast_to)] = generic_args.args . // There probably is no obvious reason to do this, just to be consistent with `as` cases. . && !is_hir_ty_cfg_dependant(cx, cast_to.as_unambig_ty()) . { . let (cast_from, cast_to) = (cx.typeck_results().expr_ty(self_arg), cx.typeck_results().expr_ty(expr)); . lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); . } 179,802 ( 0.01%) } . . fn lint_cast_ptr_alignment<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { . if let ty::RawPtr(from_ptr_ty, _) = *cast_from.kind() . && let ty::RawPtr(to_ptr_ty, _) = *cast_to.kind() . && let Ok(from_layout) = cx.layout_of(from_ptr_ty) . && let Ok(to_layout) = cx.layout_of(to_ptr_ty) . && from_layout.align.abi < to_layout.align.abi . // with c_void, we inherently need to trust the user -- line 34 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::source::snippet; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::symbol::sym; . . use super::OPTION_OPTION; . 119,856 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 69,916 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Option, def_id) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let Some(arg) = qpath_generic_tys(qpath).next() . && arg.basic_res().opt_def_id() == Some(def_id) . { . span_lint_and_then( . cx, . OPTION_OPTION, . hir_ty.span, . // use just `T` here, as the inner type is not what's problematic -- line 21 ---------------------------------------- -- line 29 ---------------------------------------- . "consider using `{inner_opt}`, or a custom enum if you need to distinguish all 3 cases" . )); . }, . ); . true . } else { . false . } 69,916 ( 0.00%) } 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/res.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . /// only returned so logic errors can be handled by not emitting a lint on . /// release builds. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_based_def(&self, node: impl HasHirId) -> Option { . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn f(typeck: &TypeckResults<'_>, id: HirId) -> Option { 29,964 ( 0.00%) if typeck.hir_owner == id.owner { 59,928 ( 0.00%) let def = typeck.type_dependent_def(id); 1,648,020 ( 0.06%) => ???:::type_dependent_def (29,964x) . debug_assert!( . def.is_some(), . "attempted type-dependent lookup for a node with no definition\ . \n node `{id:?}`", . ); . def . } else { . debug_assert!( -- line 58 ---------------------------------------- -- line 99 ---------------------------------------- . /// use for type dependant lookup. . fn opt_qpath(self) -> Option>; . . /// If this is a path gets its resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn res<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>) -> Res { . #[cfg_attr(debug_assertions, track_caller)] 29,964 ( 0.00%) fn f(qpath: &QPath<'_>, id: HirId, typeck: &TypeckResults<'_>) -> Res { 59,928 ( 0.00%) match *qpath { . QPath::Resolved(_, p) => p.res, 329,604 ( 0.01%) QPath::TypeRelative(..) if let Some((kind, id)) = typeck.ty_based_def(id) => Res::Def(kind, id), . QPath::TypeRelative(..) => Res::Err, . } 89,892 ( 0.00%) } . match self.opt_qpath() { 79,904 ( 0.00%) Some((qpath, id)) if let Some(typeck) = typeck.typeck_res() => f(qpath, id, typeck), 809,028 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f (9,988x) . _ => Res::Err, . } . } . . /// If this is a path with the specified name as its final segment gets its . /// resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] -- line 123 ---------------------------------------- -- line 285 ---------------------------------------- . #[inline] . fn opt_qpath(self) -> Option> { . Some((self.0, self.1)) . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx Expr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { 179,784 ( 0.01%) match &self.kind { 89,892 ( 0.00%) ExprKind::Path(qpath) => Some((qpath, self.hir_id)), . _ => None, . } . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx PatExpr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { . match &self.kind { -- line 302 ---------------------------------------- -- line 366 ---------------------------------------- . fn basic_res(self) -> &'a Res { . self.opt_res_path().1.map_or(&Res::Err, |p| &p.res) . } . . /// If this node is a path to a local gets the local's `HirId`. . #[inline] . fn res_local_id(self) -> Option { . if let (_, Some(p)) = self.opt_res_path() 10 ( 0.00%) && let Res::Local(id) = p.res . { . Some(id) . } else { . None . } . } . . /// If this node is a path to a local gets the local's `HirId` and identifier. -- line 382 ---------------------------------------- -- line 405 ---------------------------------------- . #[inline] . fn basic_res(self) -> &'a Res { . &self.res . } . } . impl<'a> MaybeResPath<'a> for &QPath<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 29,964 ( 0.00%) match *self { 3 ( 0.00%) QPath::Resolved(ty, path) => (ty, Some(path)), . QPath::TypeRelative(..) => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match *self { . QPath::TypeRelative(ty, seg) => Some((ty, seg)), . QPath::Resolved(..) => None, . } . } . } . impl<'a> MaybeResPath<'a> for &Expr<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 419,538 ( 0.01%) match &self.kind { . ExprKind::Path(qpath) => qpath.opt_res_path(), . _ => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match &self.kind { -- line 438 ---------------------------------------- -- line 518 ---------------------------------------- . . /// Gets this definition's id and kind. This will lookup the kind in the def . /// tree if needed. . fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)>; . . /// Gets the diagnostic name of this definition if it has one. . #[inline] . fn opt_diag_name<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 19,976 ( 0.00%) self.opt_def_id().and_then(|id| tcx.tcx().get_diagnostic_name(id)) 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . } . . /// Checks if this definition has the specified diagnostic name. . #[inline] . fn is_diag_item<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>, name: Symbol) -> bool { . self.opt_def_id() 29,970 ( 0.00%) .is_some_and(|id| tcx.tcx().is_diagnostic_item(name, id)) 44 ( 0.00%) => ???:::is_diagnostic_item (1x) . } . . /// Checks if this definition is the specified `LangItem`. . #[inline] . fn is_lang_item<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>, item: LangItem) -> bool { . self.opt_def_id() . .is_some_and(|id| tcx.tcx().lang_items().get(item) == Some(id)) . } -- line 541 ---------------------------------------- 259,697 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_main_separator_str.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . . impl ManualMainSeparatorStr { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualMainSeparatorStr { 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) let (target, _) = peel_hir_expr_refs(expr); 149,835 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (29,967x) 59,934 ( 0.00%) if let ExprKind::MethodCall(path, receiver, &[], _) = target.kind . && path.ident.name == sym::to_string . && let ExprKind::Path(QPath::Resolved(None, path)) = receiver.kind . && let Res::Def(DefKind::Const { .. }, receiver_def_id) = path.res . && cx.ty_based_def(target).opt_parent(cx).is_diag_item(cx, sym::ToString) . && cx.tcx.is_diagnostic_item(sym::path_main_separator, receiver_def_id) . && let ty::Ref(_, ty, Mutability::Not) = cx.typeck_results().expr_ty_adjusted(expr).kind() . && ty.is_str() . && self.msrv.meets(cx, msrvs::PATH_MAIN_SEPARATOR_STR) -- line 59 ---------------------------------------- -- line 63 ---------------------------------------- . MANUAL_MAIN_SEPARATOR_STR, . expr.span, . "taking a reference on `std::path::MAIN_SEPARATOR` conversion to `String`", . "replace with", . "std::path::MAIN_SEPARATOR_STR".to_owned(), . Applicability::MachineApplicable, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs -------------------------------------------------------------------------------- Ir -- line 439 ---------------------------------------- . /// let s = String::new(); . /// ``` . #[inline] . #[rustc_const_stable(feature = "const_string_new", since = "1.39.0")] . #[rustc_diagnostic_item = "string_new"] . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub const fn new() -> String { 27 ( 0.00%) String { vec: Vec::new() } . } . . /// Creates a new empty `String` with at least the specified capacity. . /// . /// `String`s have an internal buffer to hold their data. The capacity is . /// the length of that buffer, and can be queried with the [`capacity`] . /// method. This method creates an empty `String`, but one with an initial . /// buffer that can hold at least `capacity` bytes. This is useful when you -- line 455 ---------------------------------------- -- line 486 ---------------------------------------- . /// // ...but this may make the string reallocate . /// s.push('a'); . /// ``` . #[cfg(not(no_global_oom_handling))] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub fn with_capacity(capacity: usize) -> String { 119,899 ( 0.00%) String { vec: Vec::with_capacity(capacity) } . } . . /// Creates a new empty `String` with at least the specified capacity. . /// . /// # Errors . /// . /// Returns [`Err`] if the capacity exceeds `isize::MAX` bytes, . /// or if the memory allocator reports failure. -- line 502 ---------------------------------------- -- line 1009 ---------------------------------------- . /// }; . /// . /// assert_eq!("💖", sparkle_heart); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . pub unsafe fn from_utf8_unchecked(bytes: Vec) -> String { 264 ( 0.00%) String { vec: bytes } . } . . /// Converts a `String` into a byte vector. . /// . /// This consumes the `String`, so we do not need to copy its contents. . /// . /// # Examples . /// -- line 1025 ---------------------------------------- -- line 1432 ---------------------------------------- . pub fn push(&mut self, ch: char) { . let len = self.len(); . let ch_len = ch.len_utf8(); . self.reserve(ch_len); . . // SAFETY: Just reserved capacity for at least the length needed to encode `ch`. . unsafe { . core::char::encode_utf8_raw_unchecked(ch as u32, self.vec.as_mut_ptr().add(len)); 29 ( 0.00%) self.vec.set_len(len + ch_len); . } . } . . /// Returns a byte slice of this `String`'s contents. . /// . /// The inverse of this method is [`from_utf8`]. . /// . /// [`from_utf8`]: String::from_utf8 -- line 1448 ---------------------------------------- -- line 2501 ---------------------------------------- . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl Extend for String { . fn extend>(&mut self, iter: I) { . let iterator = iter.into_iter(); . let (lower_bound, _) = iterator.size_hint(); . self.reserve(lower_bound); 18 ( 0.00%) iterator.for_each(move |c| self.push(c)); . } . . #[inline] . fn extend_one(&mut self, c: char) { . self.push(c); . } . . #[inline] -- line 2517 ---------------------------------------- -- line 2944 ---------------------------------------- . // See , the last attempt . // to try to remove it. . #[inline] . default fn spec_to_string(&self) -> String { . let mut buf = String::new(); . let mut formatter = . core::fmt::Formatter::new(&mut buf, core::fmt::FormattingOptions::new()); . // Bypass format_args!() to avoid write_str with zero-length strs 3 ( 0.00%) fmt::Display::fmt(self, &mut formatter) 290 ( 0.00%) => ???:::fmt (1x) . .expect("a Display implementation returned an error unexpectedly"); 3 ( 0.00%) buf . } . } . . #[cfg(not(no_global_oom_handling))] . impl SpecToString for core::ascii::Char { . #[inline] . fn spec_to_string(&self) -> String { . self.as_str().to_owned() -- line 2962 ---------------------------------------- -- line 3373 ---------------------------------------- . Self::from_utf8(bytes) . } . } . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl fmt::Write for String { . #[inline] 7 ( 0.00%) fn write_str(&mut self, s: &str) -> fmt::Result { . self.push_str(s); . Ok(()) 7 ( 0.00%) } . . #[inline] . fn write_char(&mut self, c: char) -> fmt::Result { . self.push(c); . Ok(()) . } . } . -- line 3392 ---------------------------------------- 4 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs -------------------------------------------------------------------------------- Ir -- line 259 ---------------------------------------- . ignore_tys: DefIdSet, . // Cache checked types. We can recurse through a type multiple times so this . // can be hit quite frequently. . freeze_tys: FxHashMap, IsFreeze>, . } . . impl<'tcx> NonCopyConst<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf) -> Self { 4 ( 0.00%) Self { . ignore_tys: conf . .ignore_interior_mutability . .iter() 16 ( 0.00%) .flat_map(|ignored_ty| lookup_path_str(tcx, PathNS::Type, ignored_ty)) 334,755 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/paths.rs:clippy_utils::paths::lookup_path_str (4x) . .collect(), . freeze_tys: FxHashMap::default(), . } . } . . /// Checks if a value of the given type is `Freeze`, or may be depending on the value. 119,856 ( 0.00%) fn is_ty_freeze(&mut self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ty: Ty<'tcx>) -> IsFreeze { . // FIXME: this should probably be using the trait solver . let ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)) . .unwrap_or(ty); . match self.freeze_tys.entry(ty) { 19,974 ( 0.00%) Entry::Occupied(e) => *e.get(), . Entry::Vacant(e) => { . let e = e.insert(IsFreeze::Yes); 6 ( 0.00%) if ty.is_freeze(tcx, typing_env) { 1,485 ( 0.00%) => ???:::is_freeze (1x) . return IsFreeze::Yes; . } . let is_freeze = match *ty.kind() { . ty::Adt(adt, _) if adt.is_unsafe_cell() => { . *e = IsFreeze::No; . return IsFreeze::No; . }, . ty::Adt(adt, _) if self.ignore_tys.contains(&adt.did()) => return IsFreeze::Yes, -- line 295 ---------------------------------------- -- line 331 ---------------------------------------- . }, . }; . if !is_freeze.is_freeze() { . self.freeze_tys.insert(ty, is_freeze); . } . is_freeze . }, . } 79,904 ( 0.00%) } . . /// Checks if the given constant value is `Freeze`. Returns `Err` if the constant . /// cannot be read, but the result depends on the value. . fn is_value_freeze( . &mut self, . tcx: TyCtxt<'tcx>, . typing_env: TypingEnv<'tcx>, . ty: Ty<'tcx>, -- line 347 ---------------------------------------- -- line 709 ---------------------------------------- . _ => return None, . }; . src_expr = use_expr; . } . } . } . . impl<'tcx> LateLintPass<'tcx> for NonCopyConst<'tcx> { 35 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 10 ( 0.00%) if let ItemKind::Const(ident, .., ct_rhs) = item.kind . && !ident.is_special() . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { . IsFreeze::No => true, . IsFreeze::Yes => false, . IsFreeze::Maybe => match cx.tcx.const_eval_poly(item.owner_id.to_def_id()) { . Ok(val) if let Ok(is_freeze) = self.is_value_freeze(cx.tcx, cx.typing_env(), ty, val) => !is_freeze, . // FIXME: we just assume mgca rhs's are freeze -- line 726 ---------------------------------------- -- line 749 ---------------------------------------- . if implements_trait(cx, ty, sync_trait, &[]) { . diag.help("did you mean to make this a `static` item"); . } else { . diag.help("did you mean to make this a `thread_local!` item"); . } . }, . ); . } 40 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { . if let TraitItemKind::Const(_, ct_rhs_opt) = item.kind . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { . IsFreeze::No => true, . IsFreeze::Maybe if let Some(ct_rhs) = ct_rhs_opt => { . match cx.tcx.const_eval_poly(item.owner_id.to_def_id()) { -- line 765 ---------------------------------------- -- line 786 ---------------------------------------- . cx, . DECLARE_INTERIOR_MUTABLE_CONST, . item.ident.span, . "named constant with interior mutability", . ); . } . } . 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 19,978 ( 0.00%) if let ImplItemKind::Const(_, ct_rhs) = item.kind 29,964 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 149,820 ( 0.01%) && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { 590,955 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::is_ty_freeze (9,988x) 209,748 ( 0.01%) => ???:::typing_env (9,988x) . IsFreeze::Yes => false, . IsFreeze::No => { . // If this is a trait impl, check if the trait definition is the source . // of the cell. . if let Node::Item(parent_item) = cx.tcx.parent_hir_node(item.hir_id()) . && let ItemKind::Impl(impl_block) = parent_item.kind . && let Some(of_trait) = impl_block.of_trait . && let Some(trait_id) = of_trait.trait_ref.trait_def_id() -- line 805 ---------------------------------------- -- line 843 ---------------------------------------- . { . span_lint( . cx, . DECLARE_INTERIOR_MUTABLE_CONST, . item.ident.span, . "named constant with interior mutability", . ); . } 79,912 ( 0.00%) } . 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 69,923 ( 0.00%) if let ExprKind::Path(qpath) = &e.kind . && let typeck = cx.typeck_results() 209,759 ( 0.01%) && let Res::Def(DefKind::Const { .. } | DefKind::AssocConst { .. }, did) = typeck.qpath_res(qpath, e.hir_id) 669,211 ( 0.02%) => ???:::qpath_res (9,989x) . // As of `1.80` constant contexts can't borrow any type with interior mutability . && !is_in_const_context(cx) . && !self.is_ty_freeze(cx.tcx, cx.typing_env(), typeck.expr_ty(e)).is_freeze() . && let Some(borrow_src) = { . // The extra block helps formatting a lot. . if let Ok(val) = cx.tcx.const_eval_resolve( . cx.typing_env(), . UnevaluatedConst::new(did, typeck.node_args(e.hir_id)), -- line 864 ---------------------------------------- -- line 884 ---------------------------------------- . |diag| { . if let Some(note) = borrow_src.cause.note() { . diag.note(note); . } . diag.help("this lint can be silenced by assigning the value to a local variable before borrowing"); . }, . ); . } 239,736 ( 0.01%) } . } . . struct ReplaceAssocFolder<'tcx> { . tcx: TyCtxt<'tcx>, . trait_id: DefId, . self_ty: Ty<'tcx>, . } . impl<'tcx> TypeFolder> for ReplaceAssocFolder<'tcx> { -- line 900 ---------------------------------------- 39,954 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_error_messages/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 84 ---------------------------------------- . /// A collection of `Span`s. . /// . /// Spans have two orthogonal attributes: . /// . /// - They can be *primary spans*. In this case they are the locus of . /// the error, and would be rendered with `^^^`. . /// - They can have a *label*. In this case, the label is written next . /// to the mark in the snippet when we render. 69,923 ( 0.00%) #[derive(Clone, Debug, Hash, PartialEq, Eq, Encodable, Decodable, StableHash)] . pub struct MultiSpan { . primary_spans: Vec, 29,967 ( 0.00%) span_labels: Vec<(Span, DiagMessage)>, 319,616 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone (9,988x) . } . . impl MultiSpan { . #[inline] . pub fn new() -> MultiSpan { . MultiSpan { primary_spans: vec![], span_labels: vec![] } . } . -- line 103 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs -------------------------------------------------------------------------------- Ir -- line 264 ---------------------------------------- . | DefKind::Use . | DefKind::ExternCrate => "an", . DefKind::Macro(kinds) => kinds.article(), . _ => "a", . } . } . . pub fn ns(&self) -> Option { 54 ( 0.00%) match self { . DefKind::Mod . | DefKind::Struct . | DefKind::Union . | DefKind::Enum . | DefKind::Variant . | DefKind::Trait . | DefKind::TyAlias . | DefKind::ForeignTy -- line 280 ---------------------------------------- -- line 634 ---------------------------------------- . #[inline] . pub fn expect_full_res(&self) -> Res { . self.full_res().expect("unexpected unresolved segments") . } . } . . /// Different kinds of symbols can coexist even if they share the same textual name. . /// Therefore, they each have a separate universe (known as a "namespace"). 12 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Encodable, Decodable)] . #[derive(StableHash)] . pub enum Namespace { . /// The type namespace includes `struct`s, `enum`s, `union`s, `trait`s, and `mod`s . /// (and, by extension, crates). . /// . /// Note that the type namespace includes other items; this is not an . /// exhaustive list. . TypeNS, -- line 650 ---------------------------------------- -- line 784 ---------------------------------------- . where . Id: Debug, . { . self.opt_def_id().unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {self:?}")) . } . . /// Return `Some(..)` with the `DefId` of this `Res` if it has a ID, else `None`. . pub fn opt_def_id(&self) -> Option { 349,602 ( 0.01%) match *self { 279,688 ( 0.01%) Res::Def(_, id) => Some(id), . . Res::Local(..) . | Res::PrimTy(..) . | Res::SelfTyParam { .. } . | Res::SelfTyAlias { .. } . | Res::SelfCtor(..) . | Res::ToolMod . | Res::OpenMod(..) -- line 801 ---------------------------------------- -- line 893 ---------------------------------------- . Res::Def(DefKind::Macro(kinds), _) => Some(kinds), . Res::NonMacroAttr(..) => Some(MacroKinds::ATTR), . _ => None, . } . } . . /// Returns `None` if this is `Res::Err` . pub fn ns(&self) -> Option { 30 ( 0.00%) match self { . Res::Def(kind, ..) => kind.ns(), . Res::PrimTy(..) . | Res::SelfTyParam { .. } . | Res::SelfTyAlias { .. } . | Res::ToolMod . | Res::OpenMod(..) => Some(Namespace::TypeNS), . Res::SelfCtor(..) | Res::Local(..) => Some(Namespace::ValueNS), . Res::NonMacroAttr(..) => Some(Namespace::MacroNS), -- line 909 ---------------------------------------- 139,850 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs -------------------------------------------------------------------------------- Ir -- line 28 ---------------------------------------- . pub USELESS_CONCAT, . complexity, . "checks that the `concat` macro has at least two arguments" . } . . declare_lint_pass!(UselessConcat => [USELESS_CONCAT]); . . impl LateLintPass<'_> for UselessConcat { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // Check that the expression is generated by a macro. 89,901 ( 0.00%) if expr.span.from_expansion() . // Check that it's a string literal. . && let ExprKind::Lit(lit) = expr.kind . && let LitKind::Str(lit_s, _) = lit.node . // Get the direct parent of the expression. . && let Some(macro_call) = macro_backtrace(expr.span).next() . // Check if the `concat` macro from the `core` library. . && cx.tcx.is_diagnostic_item(sym::macro_concat, macro_call.def_id) . // We get the original code to parse it. -- line 46 ---------------------------------------- -- line 94 ---------------------------------------- . macro_call.span, . "unneeded use of `concat!` macro", . "replace with", . format!("{lit_s:?}"), . Applicability::MachineApplicable, . ); . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/macros.rs -------------------------------------------------------------------------------- Ir -- line 77 ---------------------------------------- . span_is_local(self.span) . } . } . . /// Returns an iterator of expansions that created the given span . pub fn expn_backtrace(mut span: Span) -> impl Iterator { . std::iter::from_fn(move || { . let ctxt = span.ctxt(); 29,968 ( 0.00%) if ctxt == SyntaxContext::root() { . return None; . } . let expn = ctxt.outer_expn(); . let data = expn.expn_data(); . span = data.call_site; . Some((expn, data)) . }) . } -- line 93 ---------------------------------------- -- line 129 ---------------------------------------- . }) . } . . /// If the macro backtrace of `span` has a macro call at the root expansion . /// (i.e. not a nested macro call), returns `Some` with the `MacroCall` . /// . /// If you only want to check whether the root macro has a specific name, . /// consider using [`matching_root_macro_call`] instead. 329,637 ( 0.01%) pub fn root_macro_call(span: Span) -> Option { . macro_backtrace(span).last() 239,736 ( 0.01%) } . . /// A combination of [`root_macro_call`] and . /// [`is_diagnostic_item`](rustc_middle::ty::TyCtxt::is_diagnostic_item) that returns a `MacroCall` . /// at the root expansion if only it matches the given name. 269,703 ( 0.01%) pub fn matching_root_macro_call(cx: &LateContext<'_>, span: Span, name: Symbol) -> Option { 59,934 ( 0.00%) root_macro_call(span).filter(|mc| cx.tcx.is_diagnostic_item(name, mc.def_id)) 1,348,515 ( 0.05%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (29,967x) 209,769 ( 0.01%) } . . /// Like [`root_macro_call`], but only returns `Some` if `node` is the "first node" . /// produced by the macro call, as in [`first_node_in_macro`]. . pub fn root_macro_call_first_node(cx: &LateContext<'_>, node: &impl HirNode) -> Option { 539,415 ( 0.02%) if first_node_in_macro(cx, node) != Some(ExpnId::root()) { 988,911 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (29,967x) . return None; . } . root_macro_call(node.span()) . } . . /// Like [`macro_backtrace`], but only returns macro calls where `node` is the "first node" of the . /// macro call, as in [`first_node_in_macro`]. . pub fn first_node_macro_backtrace(cx: &LateContext<'_>, node: &impl HirNode) -> impl Iterator { 59,934 ( 0.00%) let span = node.span(); 59,934 ( 0.00%) first_node_in_macro(cx, node) 988,911 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (29,967x) . .into_iter() . .flat_map(move |expn| macro_backtrace(span).take_while(move |macro_call| macro_call.expn != expn)) . } . . /// If `node` is the "first node" in a macro expansion, returns `Some` with the `ExpnId` of the . /// macro call site (i.e. the parent of the macro expansion). . /// . /// This generally means that `node` is the outermost node of an entire macro expansion, but there -- line 169 ---------------------------------------- -- line 174 ---------------------------------------- . /// just check the context of that span directly (e.g. `parent.span.from_expansion()`). . /// . /// If a macro call is in statement position, it expands to one or more statements. . /// In that case, each statement *and* their immediate descendants will all yield `Some` . /// with the `ExpnId` of the containing block. . /// . /// A node may be the "first node" of multiple macro calls in a macro backtrace. . /// The expansion of the outermost macro call site is returned in such cases. 2,157,651 ( 0.08%) pub fn first_node_in_macro(cx: &LateContext<'_>, node: &impl HirNode) -> Option { . // A node that is not from an expansion can never be the first node in a macro. This is the . // common case, so return before touching the cache. 1,198,695 ( 0.04%) if !node.span().from_expansion() { . return None; . } . . // The macro lints each query this for the node currently being visited, and the combined late . // pass runs all their `check_*` callbacks on that node back to back, so the redundant queries . // are consecutive. A single-slot memo of the last node collapses them to one backtrace walk in . // O(1) memory. The result is a pure function of the `HirId` (the HIR is frozen during lint . // passes), so returning the stored value on a key match is always correct. -- line 193 ---------------------------------------- -- line 195 ---------------------------------------- . if let Some((cached_id, cached)) = LAST_FIRST_NODE_IN_MACRO.get() . && cached_id == hir_id . { . return cached; . } . let result = first_node_in_macro_uncached(cx, node); . LAST_FIRST_NODE_IN_MACRO.set(Some((hir_id, result))); . result 2,157,651 ( 0.08%) } . . thread_local! { . static LAST_FIRST_NODE_IN_MACRO: Cell)>> = const { Cell::new(None) }; . } . . fn first_node_in_macro_uncached(cx: &LateContext<'_>, node: &impl HirNode) -> Option { . // get the macro expansion or return `None` if not found . // `macro_backtrace` importantly ignores desugaring expansions -- line 211 ---------------------------------------- -- line 426 ---------------------------------------- . match result { . ControlFlow::Break(is_assert_arg) => is_assert_arg, . ControlFlow::Continue(()) => true, . } . } . . /// Stores AST [`FormatArgs`] nodes for use in late lint passes, as they are in a desugared form in . /// the HIR 1 ( 0.00%) #[derive(Default, Clone)] . pub struct FormatArgsStorage(Arc>>); . . impl FormatArgsStorage { . /// Returns an AST [`FormatArgs`] node if a `format_args` expansion is found as a descendant of . /// `expn_id` . /// . /// See also [`find_format_arg_expr`] . pub fn get(&self, cx: &LateContext<'_>, start: &Expr<'_>, expn_id: ExpnId) -> Option<&FormatArgs> { -- line 442 ---------------------------------------- -- line 457 ---------------------------------------- . })?; . . debug_assert!(self.0.get().is_some(), "`FormatArgsStorage` not yet populated"); . . self.0.get()?.get(&format_args_expr.span.with_parent(None)) . } . . /// Should only be called by `FormatArgsCollector` 2 ( 0.00%) pub fn set(&self, format_args: FxHashMap) { . self.0 . .set(format_args) . .expect("`FormatArgsStorage::set` should only be called once"); 3 ( 0.00%) } . } . . /// Attempt to find the [`rustc_hir::Expr`] that corresponds to the [`FormatArgument`]'s value . pub fn find_format_arg_expr<'hir>(start: &'hir Expr<'hir>, target: &FormatArgument) -> Option<&'hir Expr<'hir>> { . let SpanData { . lo, . hi, . ctxt, -- line 477 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_help; . use clippy_utils::sym; . use rustc_hir as hir; . use rustc_hir::def_id::DefId; . use rustc_lint::LateContext; . . use super::LINKEDLIST; . 49,940 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, def_id: DefId) -> bool { 49,940 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::LinkedList, def_id) { 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . span_lint_and_help( . cx, . LINKEDLIST, . hir_ty.span, . "you seem to be using a `LinkedList`! Perhaps you meant some other data structure?", . None, . "a `VecDeque` might work", . ); . true . } else { . false . } 39,952 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/len_zero.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . . impl LenZero { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for LenZero { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if let ExprKind::Let(lt) = expr.kind . && match lt.pat.kind { . PatKind::Slice([], None, []) => true, . PatKind::Expr(lit) . if let PatExprKind::Lit { lit, .. } = lit.kind . && let LitKind::Str(lit, _) = lit.node => . { . lit.as_str().is_empty() . }, -- line 113 ---------------------------------------- -- line 127 ---------------------------------------- . lt.span, . "comparison to empty slice using `if let`", . "using `is_empty` is clearer and more explicit", . format!("{lit_str}.is_empty()"), . applicability, . ); . } . 59,934 ( 0.00%) if let ExprKind::MethodCall(method, lhs_expr, [rhs_expr], _) = expr.kind . && cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::PartialEq) . && !expr.span.from_expansion() . { . self.check_empty_expr( . cx, . expr.span, . lhs_expr, . peel_ref_operators(cx, rhs_expr), -- line 143 ---------------------------------------- -- line 144 ---------------------------------------- . if method.ident.name == sym::ne { . "!" . } else { . Default::default() . }, . ); . } . 59,934 ( 0.00%) if let ExprKind::Binary(Spanned { node: cmp, .. }, left, right) = expr.kind . && !expr.span.from_expansion() . { . // expr.span might contains parenthesis, see issue #10529 . let actual_span = span_without_enclosing_paren(cx, expr.span); . match cmp { . BinOpKind::Eq => { . self.check_cmp(cx, actual_span, left, right, "", 0); // len == 0 . self.check_cmp(cx, actual_span, right, left, "", 0); // 0 == len -- line 160 ---------------------------------------- -- line 171 ---------------------------------------- . self.check_cmp(cx, actual_span, left, right, "", 1); // len < 1 . self.check_cmp(cx, actual_span, right, left, "!", 0); // 0 < len . }, . BinOpKind::Ge => self.check_cmp(cx, actual_span, left, right, "!", 1), // len >= 1 . BinOpKind::Le => self.check_cmp(cx, actual_span, right, left, "!", 1), // 1 <= len . _ => (), . } . } 239,736 ( 0.01%) } . } . . impl LenZero { . fn check_cmp( . &self, . cx: &LateContext<'_>, . span: Span, . method: &Expr<'_>, -- line 187 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/to_digit_is_some.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl ToDigitIsSome { . pub(crate) fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ToDigitIsSome { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 59,934 ( 0.00%) if let hir::ExprKind::MethodCall(is_some_path, to_digit_expr, [], _) = &expr.kind . && is_some_path.ident.name == sym::is_some . { . let match_result = match to_digit_expr.kind { . hir::ExprKind::MethodCall(to_digits_path, char_arg, [radix_arg], _) => { . if to_digits_path.ident.name == sym::to_digit . && cx.typeck_results().expr_ty_adjusted(char_arg).is_char() . { . Some((true, char_arg, radix_arg)) -- line 60 ---------------------------------------- -- line 89 ---------------------------------------- . format!("{char_arg_snip}.is_digit({radix_snip})") . } else { . format!("char::is_digit({char_arg_snip}, {radix_snip})") . }, . applicability, . ); . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/attrs.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . use rustc_lexer::TokenKind; . use rustc_lint::LateContext; . use rustc_middle::ty::{AdtDef, TyCtxt}; . use rustc_session::Session; . use rustc_span::{Span, Symbol}; . use std::str::FromStr as _; . . /// Validates a single clippy attribute and emits errors for unknown or deprecated ones. 9 ( 0.00%) pub fn check_clippy_attr(sess: &Session, attr: &A) { 1 ( 0.00%) if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . let path_span = attr . .path_span() . .expect("Clippy attributes are unparsed and have a span"); . . match *segment2 { . sym::cyclomatic_complexity => { -- line 25 ---------------------------------------- -- line 40 ---------------------------------------- . | sym::msrv . | sym::has_significant_drop . | sym::format_args => {}, . _ => { . sess.dcx().span_err(path_span, "usage of unknown attribute"); . }, . } . } 7 ( 0.00%) } . . /// Given `attrs`, extract all the instances of a built-in Clippy attribute called `name` . pub fn get_builtin_attr<'a, A: AttributeExt + 'a>(attrs: &'a [A], name: Symbol) -> impl Iterator { . attrs.iter().filter(move |attr| { . if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . if *segment2 == sym::cyclomatic_complexity { -- line 56 ---------------------------------------- -- line 149 ---------------------------------------- . /// Initialize the stack starting with a default value, which usually comes from configuration . pub fn new(limit: u64) -> Self { . Self { . default: limit, . stack: vec![], . } . } . pub fn limit(&self) -> u64 { 1 ( 0.00%) self.stack.last().copied().unwrap_or(self.default) . } . pub fn push_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 159,860 ( 0.01%) parse_attrs(sess, attrs, name, |val| stack.push(val)); 799,314 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> (39,965x) . } . pub fn pop_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 159,860 ( 0.01%) parse_attrs(sess, attrs, name, |val| { 799,316 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> (39,965x) . let popped = stack.pop(); . debug_assert_eq!(popped, Some(val)); . }); . } . } . 799,300 ( 0.03%) fn parse_attrs(sess: &Session, attrs: &[impl AttributeExt], name: Symbol, mut f: F) { . for attr in get_builtin_attr(attrs, name) { . let Some(value) = attr.value_str() else { . sess.dcx().span_err(attr.span(), "bad clippy attribute"); . continue; . }; . let Ok(value) = u64::from_str(value.as_str()) else { . sess.dcx().span_err(attr.span(), "not a number"); . continue; . }; . f(value); . } 639,440 ( 0.02%) } 39,965 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/borrow_deref_ref.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . pub BORROW_DEREF_REF, . complexity, . "deref on an immutable reference returns the same type as itself" . } . . declare_lint_pass!(BorrowDerefRef => [BORROW_DEREF_REF]); . . impl<'tcx> LateLintPass<'tcx> for BorrowDerefRef { 179,802 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, addrof_target) = e.kind . && let ExprKind::Unary(UnOp::Deref, deref_target) = addrof_target.kind . && !matches!(deref_target.kind, ExprKind::Unary(UnOp::Deref, ..)) . && !e.span.from_expansion() . && !deref_target.span.from_expansion() . && !addrof_target.span.from_expansion() . && let ref_ty = cx.typeck_results().expr_ty(deref_target) . && let ty::Ref(_, inner_ty, Mutability::Not) = ref_ty.kind() . && get_parent_expr(cx, e).is_none_or(|parent| { -- line 63 ---------------------------------------- -- line 119 ---------------------------------------- . e.span, . "if you would like to deref, try using `&**`", . format!("&**{deref_text}"), . Applicability::MaybeIncorrect, . ); . }, . ); . } 209,769 ( 0.01%) } . } . . /// Checks if `expr` is used as part of a `let` statement containing a `ref mut` binding. . fn potentially_bound_to_mutable_ref<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> bool { . matches!(cx.tcx.parent_hir_node(expr.hir_id), Node::LetStmt(let_stmt) . if let_stmt.pat.contains_explicit_ref_binding() == Some(Mutability::Mut)) . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_sub.rs -------------------------------------------------------------------------------- Ir -- line 90 ---------------------------------------- . . impl ImplicitSaturatingSub { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ImplicitSaturatingSub { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . if let Some(higher::If { cond, then, r#else: None }) = higher::If::hir(expr) . . // Check if the conditional expression is a binary operation . && let ExprKind::Binary(ref cond_op, cond_left, cond_right) = cond.kind . { . check_with_condition(cx, expr, cond_op.node, cond_left, cond_right, then, self.msrv); -- line 107 ---------------------------------------- -- line 111 ---------------------------------------- . r#else: Some(else_block), . }) = higher::If::hir(expr) . && let ExprKind::Binary(ref cond_op, cond_left, cond_right) = cond.kind . { . check_manual_check( . cx, expr, cond_op, cond_left, cond_right, if_block, else_block, self.msrv, . ); . } 239,736 ( 0.01%) } . } . . #[expect(clippy::too_many_arguments)] . fn check_manual_check<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'tcx>, . condition: &BinOp, . left_hand: &Expr<'tcx>, -- line 127 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . /// Run one field's `check_*`. . /// . /// Fully qualified through [`rustc_lint::EarlyLintPass`] since some passes impl . /// both `EarlyLintPass` and `LateLintPass` with like-named methods, which would . /// be ambiguous on the concrete field type. . #[macro_export] . macro_rules! run_combined_early_lint_pass_field { . ($self:ident, $field:ident, $name:ident, ($($arg:expr),* $(,)?)) => { 2,717,400 ( 0.10%) rustc_lint::EarlyLintPass::$name(&mut $self.$field, $($arg),*); 24 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/duplicate_mod.rs:::check_crate_post (1x) . }; . } . . /// Forward one `check_*` method to every field of the combined pass. . #[macro_export] . macro_rules! expand_combined_early_lint_pass_method { . ([$($field:ident),*], $self:ident, $name:ident, $args:tt) => ({ . $($crate::run_combined_early_lint_pass_field!($self, $field, $name, $args);)* -- line 35 ---------------------------------------- -- line 36 ---------------------------------------- . }) . } . . /// Generate the combined `EarlyLintPass` impl's `check_*` methods, one per method . /// in rustc's early-pass method list. . #[macro_export] . macro_rules! expand_combined_early_lint_pass_methods { . ($fields:tt, [$($(#[$attr:meta])* fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( 1,059,109 ( 0.04%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::EarlyContext<'_>, $($param: $arg),*) { . $crate::expand_combined_early_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 369,699 ( 0.01%) })* . ) . } . . /// Declare the combined struct (one field per pass) plus its . /// `LintPass`/`EarlyLintPass` impls. The method list comes from . /// `rustc_lint::early_lint_methods!` so it can't drift from rustc's. . /// . /// Each entry is `Field: Type = constructor`; `new`'s params (`conf`, ...) come -- line 54 ---------------------------------------- -- line 60 ---------------------------------------- . $methods:tt . ) => { . #[allow(non_snake_case)] . pub struct $name { . $($field: $fty,)* . } . . impl $name { 9 ( 0.00%) pub fn new($($pname: $pty,)*) -> Self { 81 ( 0.00%) Self { . $($field: $ctor,)* . } 9 ( 0.00%) } . } . . #[allow(rustc::lint_pass_impl_without_macro)] . impl rustc_lint::LintPass for $name { . fn name(&self) -> &'static str { . stringify!($name) . } . fn get_lints(&self) -> rustc_lint::LintVec { -- line 80 ---------------------------------------- 5 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs -------------------------------------------------------------------------------- Ir -- line 256 ---------------------------------------- . . // There are other attributes, which are significant tokens -- check failed . _ => false, . } . } . } . . impl LateLintPass<'_> for CollapsibleIf { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::If(cond, then, else_) = &expr.kind . && !expr.span.from_expansion() . { . if let Some(else_) = else_ . // Short circuit if both `if` branches contain only a single `if {..} else {}`, as . // collapsing such blocks can lead to less readable code (#4971) . && !(single_inner_if_else(then) && single_inner_if_else(else_)) . && let ExprKind::Block(else_, None) = else_.kind . { -- line 273 ---------------------------------------- -- line 274 ---------------------------------------- . self.check_collapsible_else_if(cx, then.span, else_); . } else if else_.is_none() . && self.eligible_condition(cx, cond) . && let ExprKind::Block(then, None) = then.kind . { . self.check_collapsible_if_if(cx, expr, cond, then); . } . } 239,736 ( 0.01%) } . } . . /// Returns true if `expr` is a block that contains only one `if {..} else {}` statement . fn single_inner_if_else(expr: &Expr<'_>) -> bool { . if let ExprKind::Block(block, None) = expr.kind . && let Some(inner_expr) = expr_block(block) . && let ExprKind::If(_, _, else_) = inner_expr.kind . && else_.is_some() -- line 290 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . .tcx . .normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(proj)); . . nty.is_bool() . }) . } . . impl<'tcx> LateLintPass<'tcx> for BoolAssertComparison { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; . let eq_macro = match cx.tcx.get_diagnostic_name(macro_call.def_id) { . Some(sym::assert_eq_macro | sym::debug_assert_eq_macro) => true, . Some(sym::assert_ne_macro | sym::debug_assert_ne_macro) => false, . _ => return, . }; -- line 84 ---------------------------------------- -- line 148 ---------------------------------------- . . diag.multipart_suggestion( . format!("replace it with `{non_eq_mac}!(..)`"), . suggestions, . applicability, . ); . }, . ); 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use clippy_utils::{is_empty_block, is_expr_default, is_from_proc_macro}; . use rustc_errors::Applicability; . use rustc_hir::{Block, Expr, ExprKind, MatchSource, Node, StmtKind}; . use rustc_lint::LateContext; . use rustc_span::SyntaxContext; . . use super::{UNIT_ARG, utils}; . 269,703 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . . // apparently stuff in the desugaring of `?` can trigger this . // so check for that here . // only the calls to `Try::from_error` is marked as desugared, . // so we need to check both the current Expr and its parent. 89,898 ( 0.00%) if is_questionmark_desugar_marked_call(expr) { . return; . } 259,712 ( 0.01%) if let Node::Expr(parent_expr) = cx.tcx.parent_hir_node(expr.hir_id) 2,884,896 ( 0.10%) => ???:::parent_hir_node (29,967x) 59,928 ( 0.00%) && is_questionmark_desugar_marked_call(parent_expr) . { . return; . } . 99,892 ( 0.00%) let (receiver, args) = match expr.kind { . ExprKind::Call(_, args) => (None, args), . ExprKind::MethodCall(_, receiver, args, _) => (Some(receiver), args), . _ => return, . }; . . let args_to_recover = receiver . .into_iter() . .chain(args) . .filter(|arg| { 19,976 ( 0.00%) if cx.typeck_results().expr_ty(arg).is_unit() && !utils::is_unit_literal(arg) { 399,520 ( 0.01%) => ???:::expr_ty (9,988x) . !matches!( . &arg.kind, . ExprKind::Match(.., MatchSource::TryDesugar(_)) | ExprKind::Path(..) . ) . } else { . false . } . }) . .collect::>(); 9,988 ( 0.00%) if !args_to_recover.is_empty() && !is_from_proc_macro(cx, expr) { . lint_unit_args(cx, expr, args_to_recover.as_slice()); . } 239,736 ( 0.01%) } . . fn is_questionmark_desugar_marked_call(expr: &Expr<'_>) -> bool { . use rustc_span::hygiene::DesugaringKind; 69,919 ( 0.00%) if let ExprKind::Call(callee, _) = expr.kind { 89,892 ( 0.00%) callee.span.is_desugaring(DesugaringKind::QuestionMark) 2,876,544 ( 0.10%) => ???:::is_desugaring (29,964x) . } else { . false . } . } . . fn lint_unit_args<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>, args_to_recover: &[&'tcx Expr<'tcx>]) { . let mut applicability = Applicability::MachineApplicable; . let (singular, plural) = if args_to_recover.len() > 1 { -- line 69 ---------------------------------------- 49,940 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . } . } . . impl<'a, T: 'a> Drop for LockGuard<'a, T> { . #[inline] . fn drop(&mut self) { . // SAFETY (union access): We get `self.mode` from the lock operation so it is consistent . // with the `lock.mode` state. This means we access the right union fields. 235 ( 0.00%) match self.mode { . Mode::NoSync => { . let cell = unsafe { &self.lock.mode_union.no_sync }; . debug_assert!(cell.get()); . cell.set(false); . } . // SAFETY (unlock): We know that the lock is locked as this type is a proof of that. . Mode::Sync => unsafe { self.lock.mode_union.sync.unlock() }, . } -- line 64 ---------------------------------------- -- line 143 ---------------------------------------- . #[cold] . fn lock_held() -> ! { . panic!("lock was already held") . } . . // SAFETY: This is safe since the union fields are used in accordance with `mode` . // which also must match `self.mode` due to the safety precondition. . unsafe { 39,978 ( 0.00%) match mode { . Mode::NoSync => { 40,396 ( 0.00%) if self.mode_union.no_sync.replace(LOCKED) == LOCKED { . hint::cold_path(); . lock_held() . } . } . Mode::Sync => self.mode_union.sync.lock(), . } . } . LockGuard { lock: self, marker: PhantomData, mode } . } . . #[inline(always)] . #[track_caller] . pub fn lock(&self) -> LockGuard<'_, T> { 19,989 ( 0.00%) unsafe { self.lock_assume(self.mode) } . } . } . . unsafe impl DynSend for Lock {} . unsafe impl DynSync for Lock {} . . impl Lock { . #[inline(always)] -- line 175 ---------------------------------------- 19,998 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . use rustc_hir::intravisit::{Visitor, walk_expr}; . use rustc_hir::{Closure, Expr, ExprKind, HirId, LetStmt, Mutability, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::hir::nested_filter::OnlyBodies; . use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; . use rustc_span::Symbol; . use rustc_span::symbol::sym; . 209,769 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let Some(higher::WhileLet { if_then, let_pat, let_expr, label, .. }) = higher::WhileLet::hir(expr) . // check for `Some(..)` pattern . && let Some(some_pat) = as_some_pattern(cx, let_pat) . // check for call to `Iterator::next` . && let ExprKind::MethodCall(method_name, iter_expr, [], _) = let_expr.kind . && method_name.ident.name == sym::next . && cx.ty_based_def(let_expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) . && let Some(iter_expr_struct) = try_parse_iter_expr(cx, iter_expr) -- line 27 ---------------------------------------- -- line 61 ---------------------------------------- . WHILE_LET_ON_ITERATOR, . expr.span.with_hi(let_expr.span.hi()), . "this loop could be written as a `for` loop", . "try", . format!("{loop_label}for {loop_var} in {iterator_by_ref}"), . applicability, . ); . } 239,736 ( 0.01%) } . . #[derive(Debug)] . struct IterExpr { . /// The fields used, in order of child to parent. . fields: Vec, . /// The path being used. . path: Res, . /// Whether or not the iterator can be moved. -- line 77 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/precedence.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . pub PRECEDENCE_BITS, . restriction, . "operations mixing bit shifting with bit combining/masking" . } . . declare_lint_pass!(Precedence => [PRECEDENCE, PRECEDENCE_BITS]); . . impl EarlyLintPass for Precedence { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if expr.span.from_expansion() { . return; . } . 149,830 ( 0.01%) if let ExprKind::Binary(Spanned { node: op, .. }, ref left, ref right) = expr.kind { . let span_sugg = |lint: &'static Lint, expr: &Expr, sugg, appl| { . span_lint_and_sugg( . cx, . lint, . expr.span, . "operator precedence might not be obvious", . "consider parenthesizing your expression", . sugg, -- line 63 ---------------------------------------- -- line 119 ---------------------------------------- . vec![ . (closure.fn_decl_span.shrink_to_lo(), String::from("(")), . (closure.body.span.shrink_to_hi(), String::from(")")), . ], . Applicability::MachineApplicable, . ); . }); . } 239,728 ( 0.01%) } . } . . fn get_bin_opt(expr: &Expr) -> Option { . match expr.kind { . ExprKind::Binary(Spanned { node: op, .. }, _, _) => Some(op), . _ => None, . } . } -- line 135 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs -------------------------------------------------------------------------------- Ir -- line 129 ---------------------------------------- . /// assert!(b.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_is_empty", since = "1.39.0")] . #[rustc_no_implicit_autorefs] . #[inline] . #[must_use] . pub const fn is_empty(&self) -> bool { 1 ( 0.00%) self.len() == 0 . } . . /// Returns the first element of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let v = [10, 40, 30]; -- line 145 ---------------------------------------- -- line 148 ---------------------------------------- . /// let w: &[i32] = &[]; . /// assert_eq!(None, w.first()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn first(&self) -> Option<&T> { 199,931 ( 0.01%) if let [first, ..] = self { Some(first) } else { None } . } . . /// Returns a mutable reference to the first element of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 164 ---------------------------------------- -- line 191 ---------------------------------------- . /// assert_eq!(elements, &[1, 2]); . /// } . /// ``` . #[stable(feature = "slice_splits", since = "1.5.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn split_first(&self) -> Option<(&T, &[T])> { 200 ( 0.00%) if let [first, tail @ ..] = self { Some((first, tail)) } else { None } . } . . /// Returns the first and all the rest of the elements of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 207 ---------------------------------------- -- line 274 ---------------------------------------- . /// let w: &[i32] = &[]; . /// assert_eq!(None, w.last()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn last(&self) -> Option<&T> { 439,614 ( 0.02%) if let [.., last] = self { Some(last) } else { None } . } . . /// Returns a mutable reference to the last item in the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 290 ---------------------------------------- -- line 297 ---------------------------------------- . /// let y: &mut [i32] = &mut []; . /// assert_eq!(None, y.last_mut()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last", since = "1.83.0")] . #[inline] . #[must_use] . pub const fn last_mut(&mut self) -> Option<&mut T> { 2 ( 0.00%) if let [.., last] = self { Some(last) } else { None } . } . . /// Returns an array reference to the first `N` items in the slice. . /// . /// If the slice is not at least `N` in length, this will return `None`. . /// . /// # Examples . /// -- line 313 ---------------------------------------- -- line 320 ---------------------------------------- . /// . /// let w: &[i32] = &[]; . /// assert_eq!(Some(&[]), w.first_chunk::<0>()); . /// ``` . #[inline] . #[stable(feature = "slice_first_last_chunk", since = "1.77.0")] . #[rustc_const_stable(feature = "slice_first_last_chunk", since = "1.77.0")] . pub const fn first_chunk(&self) -> Option<&[T; N]> { 4 ( 0.00%) if self.len() < N { . None . } else { . // SAFETY: We explicitly check for the correct number of elements, . // and do not let the reference outlive the slice. . Some(unsafe { &*(self.as_ptr().cast_array()) }) . } . } . -- line 336 ---------------------------------------- -- line 2627 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub fn starts_with(&self, needle: &[T]) -> bool . where . T: PartialEq, . { . let n = needle.len(); 59,973 ( 0.00%) self.len() >= n && needle == &self[..n] . } . . /// Returns `true` if `needle` is a suffix of the slice or equal to the slice. . /// . /// # Examples . /// . /// ``` . /// let v = [10, 40, 30]; -- line 2643 ---------------------------------------- -- line 2658 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub fn ends_with(&self, needle: &[T]) -> bool . where . T: PartialEq, . { . let (m, n) = (self.len(), needle.len()); 19,991 ( 0.00%) m >= n && needle == &self[m - n..] . } . . /// Returns a subslice with the prefix removed. . /// . /// If the slice starts with `prefix`, returns the subslice after the prefix, wrapped in `Some`. . /// If `prefix` is empty, simply returns the original slice. If `prefix` is equal to the . /// original slice, returns an empty slice. . /// -- line 2674 ---------------------------------------- 20,160 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs -------------------------------------------------------------------------------- Ir -- line 584 ---------------------------------------- . use crate::num::NonZero; . use crate::ops::{self, ControlFlow, Deref, DerefMut, Residual, Try}; . use crate::panicking::{panic, panic_display}; . use crate::pin::Pin; . use crate::{cmp, convert, hint, mem, slice}; . . /// The `Option` type. See [the module level documentation](self) for more. . #[doc(search_unbox)] 16 ( 0.00%) #[derive(Copy, Debug, Hash)] . #[derive_const(Eq)] . #[rustc_diagnostic_item = "Option"] . #[lang = "Option"] . #[stable(feature = "rust1", since = "1.0.0")] . #[allow(clippy::derived_hash_with_manual_eq)] // PartialEq is manually implemented equivalently . pub enum Option { . /// No value. . #[lang = "None"] -- line 600 ---------------------------------------- -- line 626 ---------------------------------------- . /// let x: Option = None; . /// assert_eq!(x.is_some(), false); . /// ``` . #[must_use = "if you intended to assert that this has a value, consider `.unwrap()` instead"] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . pub const fn is_some(&self) -> bool { 199,800 ( 0.01%) matches!(*self, Some(_)) . } . . /// Returns `true` if the option is a [`Some`] and the value inside of it matches a predicate. . /// . /// # Examples . /// . /// ``` . /// let x: Option = Some(2); -- line 642 ---------------------------------------- -- line 652 ---------------------------------------- . /// assert_eq!(x.as_ref().is_some_and(|x| x.len() > 1), true); . /// println!("still alive {:?}", x); . /// ``` . #[must_use] . #[inline] . #[stable(feature = "is_some_and", since = "1.70.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn is_some_and(self, f: impl [const] FnOnce(T) -> bool + [const] Destruct) -> bool { 99,892 ( 0.00%) match self { . None => false, 21 ( 0.00%) Some(x) => f(x), . } . } . . /// Returns `true` if the option is a [`None`] value. . /// . /// # Examples . /// . /// ``` -- line 670 ---------------------------------------- -- line 701 ---------------------------------------- . /// assert_eq!(x.as_ref().is_none_or(|x| x.len() > 1), true); . /// println!("still alive {:?}", x); . /// ``` . #[must_use] . #[inline] . #[stable(feature = "is_none_or", since = "1.82.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn is_none_or(self, f: impl [const] FnOnce(T) -> bool + [const] Destruct) -> bool { 119,876 ( 0.00%) match self { . None => true, . Some(x) => f(x), . } . } . . ///////////////////////////////////////////////////////////////////////// . // Adapter for working with references . ///////////////////////////////////////////////////////////////////////// -- line 717 ---------------------------------------- -- line 735 ---------------------------------------- . /// // then consume *that* with `map`, leaving `text` on the stack. . /// let text_length: Option = text.as_ref().map(|s| s.len()); . /// println!("still can print text: {text:?}"); . /// ``` . #[inline] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . #[stable(feature = "rust1", since = "1.0.0")] . pub const fn as_ref(&self) -> Option<&T> { 79,952 ( 0.00%) match *self { . Some(ref x) => Some(x), . None => None, . } . } . . /// Converts from `&mut Option` to `Option<&mut T>`. . /// . /// # Examples -- line 751 ---------------------------------------- -- line 757 ---------------------------------------- . /// None => {}, . /// } . /// assert_eq!(x, Some(42)); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn as_mut(&mut self) -> Option<&mut T> { 120,061 ( 0.00%) match *self { . Some(ref mut x) => Some(x), . None => None, . } . } . . /// Converts from [Pin]<[&]Option\> to Option<[Pin]<[&]T>>. . /// . /// [&]: reference "shared reference" -- line 773 ---------------------------------------- -- line 802 ---------------------------------------- . None => None, . } . } . } . . #[inline] . const fn len(&self) -> usize { . // Using the intrinsic avoids emitting a branch to get the 0 or 1. 15 ( 0.00%) let discriminant: isize = crate::intrinsics::discriminant_value(self); . discriminant as usize . } . . /// Returns a slice of the contained value, if any. If this is `None`, an . /// empty slice is returned. This can be useful to have a single type of . /// iterator over an `Option` or slice. . /// . /// Note: Should you have an `Option<&T>` and wish to get a slice of `T`, -- line 818 ---------------------------------------- -- line 959 ---------------------------------------- . /// Styles"](../../std/error/index.html#common-message-styles) in the [`std::error`](../../std/error/index.html) module docs. . #[inline] . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "option_expect"] . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn expect(self, msg: &str) -> T { 299,668 ( 0.01%) match self { . Some(val) => val, . None => expect_failed(msg), . } . } . . /// Returns the contained [`Some`] value, consuming the `self` value. . /// . /// Because this function may panic, its use is generally discouraged. -- line 975 ---------------------------------------- -- line 1004 ---------------------------------------- . /// ``` . #[inline(always)] . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "option_unwrap"] . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn unwrap(self) -> T { 476 ( 0.00%) match self { 259 ( 0.00%) Some(val) => val, . None => unwrap_failed(), . } . } . . /// Returns the contained [`Some`] value or a provided default. . /// . /// Arguments passed to `unwrap_or` are eagerly evaluated; if you are passing . /// the result of a function call, it is recommended to use [`unwrap_or_else`], -- line 1021 ---------------------------------------- -- line 1032 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn unwrap_or(self, default: T) -> T . where . T: [const] Destruct, . { 12 ( 0.00%) match self { 2 ( 0.00%) Some(x) => x, . None => default, . } . } . . /// Returns the contained [`Some`] value or computes it from a closure. . /// . /// # Examples . /// -- line 1049 ---------------------------------------- -- line 1055 ---------------------------------------- . #[inline] . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn unwrap_or_else(self, f: F) -> T . where . F: [const] FnOnce() -> T + [const] Destruct, . { 79,907 ( 0.00%) match self { . Some(x) => x, . None => f(), . } . } . . /// Returns the contained [`Some`] value or a default. . /// . /// Consumes the `self` argument then, if [`Some`], returns the contained -- line 1071 ---------------------------------------- -- line 1087 ---------------------------------------- . /// [`FromStr`]: crate::str::FromStr . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn unwrap_or_default(self) -> T . where . T: [const] Default, . { 20,002 ( 0.00%) match self { 29,982 ( 0.00%) Some(x) => x, . None => T::default(), . } . } . . /// Returns the contained [`Some`] value, consuming the `self` value, . /// without checking that the value is not [`None`]. . /// . /// # Safety -- line 1104 ---------------------------------------- -- line 1154 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn map(self, f: F) -> Option . where . F: [const] FnOnce(T) -> U + [const] Destruct, . { 139,898 ( 0.00%) match self { 69,959 ( 0.00%) Some(x) => Some(f(x)), . None => None, . } . } . . /// Calls a function with a reference to the contained value if [`Some`]. . /// . /// Returns the original option. . /// -- line 1171 ---------------------------------------- -- line 1219 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use = "if you don't need the returned value, use `if let` instead"] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn map_or(self, default: U, f: F) -> U . where . F: [const] FnOnce(T) -> U + [const] Destruct, . U: [const] Destruct, . { 40,014 ( 0.00%) match self { . Some(t) => f(t), . None => default, . } 39,952 ( 0.00%) } . . /// Computes a default function result (if none), or . /// applies a different function to the contained value (if any). . /// . /// # Basic examples . /// . /// ``` . /// let k = 21; -- line 1239 ---------------------------------------- -- line 1266 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn map_or_else(self, default: D, f: F) -> U . where . D: [const] FnOnce() -> U + [const] Destruct, . F: [const] FnOnce(T) -> U + [const] Destruct, . { 9,991 ( 0.00%) match self { . Some(t) => f(t), . None => default(), . } . } . . /// Maps an `Option` to a `U` by applying function `f` to the contained . /// value if the option is [`Some`], otherwise if [`None`], returns the . /// [default value] for the type `U`. -- line 1282 ---------------------------------------- -- line 1533 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("flat_map", "flatmap")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn and_then(self, f: F) -> Option . where . F: [const] FnOnce(T) -> Option + [const] Destruct, . { 19,978 ( 0.00%) match self { 99,882 ( 0.00%) Some(x) => f(x), . None => None, . } . } . . /// Returns [`None`] if the option is [`None`], otherwise calls `predicate` . /// with the wrapped value and returns: . /// . /// - [`Some(t)`] if `predicate` returns `true` (where `t` is the wrapped -- line 1550 ---------------------------------------- -- line 1571 ---------------------------------------- . #[inline] . #[stable(feature = "option_filter", since = "1.27.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn filter

(self, predicate: P) -> Self . where . P: [const] FnOnce(&T) -> bool + [const] Destruct, . T: [const] Destruct, . { 89,901 ( 0.00%) if let Some(x) = self { . if predicate(&x) { . return Some(x); . } . } 29,967 ( 0.00%) None . } . . /// Returns the option if it contains a value, otherwise returns `optb`. . /// . /// Arguments passed to `or` are eagerly evaluated; if you are passing the . /// result of a function call, it is recommended to use [`or_else`], which is . /// lazily evaluated. . /// -- line 1592 ---------------------------------------- -- line 1642 ---------------------------------------- . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn or_else(self, f: F) -> Option . where . F: [const] FnOnce() -> Option + [const] Destruct, . //FIXME(const_hack): this `T: [const] Destruct` is unnecessary, but even precise live drops can't tell . // no value of type `T` gets dropped here . T: [const] Destruct, . { 9 ( 0.00%) match self { . x @ Some(_) => x, . None => f(), . } . } . . /// Returns [`Some`] if exactly one of `self`, `optb` is [`Some`], otherwise returns [`None`]. . /// . /// # Examples -- line 1658 ---------------------------------------- -- line 2130 ---------------------------------------- . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn copied(self) -> Option . where . T: Copy, . { . // FIXME(const-hack): this implementation, which sidesteps using `Option::map` since it's not const . // ready yet, should be reverted when possible to avoid code repetition . match self { 82 ( 0.00%) Some(&v) => Some(v), . None => None, . } . } . . /// Maps an `Option<&T>` to an `Option` by cloning the contents of the . /// option. . /// . /// # Examples -- line 2146 ---------------------------------------- -- line 2266 ---------------------------------------- . const impl Clone for Option . where . // FIXME(const_hack): the T: [const] Destruct should be inferred from the Self: [const] Destruct in clone_from. . // See https://github.com/rust-lang/rust/issues/144207 . T: [const] Clone + [const] Destruct, . { . #[inline] . fn clone(&self) -> Self { 21 ( 0.00%) match self { . Some(x) => Some(x.clone()), . None => None, . } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . match (self, source) { -- line 2282 ---------------------------------------- -- line 2431 ---------------------------------------- . impl crate::marker::StructuralPartialEq for Option {} . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq for Option { . #[inline] . fn eq(&self, other: &Self) -> bool { . // Spelling out the cases explicitly optimizes better than . // `_ => false` 709,322 ( 0.03%) match (self, other) { . (Some(l), Some(r)) => *l == *r, . (Some(_), None) => false, . (None, Some(_)) => false, . (None, None) => true, . } . } . } . -- line 2447 ---------------------------------------- -- line 2861 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . Some(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 119,950 ( 0.00%) match self { . Some(v) => ControlFlow::Continue(v), . None => ControlFlow::Break(None), . } . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . // Note: manually specifying the residual type instead of using the default to work around . // https://github.com/rust-lang/rust/issues/99940 . const impl ops::FromResidual> for Option { . #[inline] . fn from_residual(residual: Option) -> Self { . match residual { 199 ( 0.00%) None => None, . } . } . } . . #[diagnostic::do_not_recommend] . #[unstable(feature = "try_trait_v2_yeet", issue = "96374")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl ops::FromResidual> for Option { -- line 2892 ---------------------------------------- 300,165 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs -------------------------------------------------------------------------------- Ir -- line 222 ---------------------------------------- . ); . } . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for StringPatterns { 179,802 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if !expr.span.from_expansion() . && let ExprKind::MethodCall(method, receiver, args, _) = expr.kind . && let method_name = method.ident.name . && let Some(&(_, pos)) = PATTERN_METHODS . .iter() . .find(|(array_method_name, _)| *array_method_name == method_name) . && let Some(arg) = args.get(pos) . && let ty::Ref(_, ty, _) = cx.typeck_results().expr_ty_adjusted(receiver).kind() . && ty.is_str() . { . check_single_char_pattern_lint(cx, arg); . . check_manual_pattern_char_comparison(cx, arg, self.msrv); . } 179,802 ( 0.01%) } . } 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs -------------------------------------------------------------------------------- Ir -- line 117 ---------------------------------------- . struct ItemInfo { . kind: ItemKindDescr, . name: Option, . span: Span, . mod_items: Option, . } . . impl ItemInfo { 119,928 ( 0.00%) fn new(kind: ItemKindDescr, ident: Option, span: Span, mod_items: Option) -> Self { 79,952 ( 0.00%) Self { . kind, . name: ident.map(|ident| ident.name), . span: match ident { 9,991 ( 0.00%) Some(ident) => span.with_hi(ident.span.hi()), . None => span.shrink_to_lo(), . }, . mod_items, . } 79,952 ( 0.00%) } . } . . pub struct EmptyLineAfter { . items: Vec, . } . . impl EmptyLineAfter { . pub fn new() -> Self { -- line 143 ---------------------------------------- -- line 453 ---------------------------------------- . StopKind::Doc(_) => format!("if the comment should document the {desc} use an inner doc comment"), . }, . suggestions, . Applicability::MaybeIncorrect, . ); . } . } . 129,922 ( 0.00%) fn check_item_kind(&mut self, cx: &EarlyContext<'_>, info: ItemInfo, attrs: &[Attribute], id: NodeId) { . self.items.push(info); . . let mut outer = attrs . .iter() 2 ( 0.00%) .filter(|attr| attr.style == AttrStyle::Outer && !attr.span.from_expansion()) . .map(|attr| Stop::from_attr(cx, attr)) . .collect::>>() . .unwrap_or_default(); . 9,994 ( 0.00%) if outer.is_empty() { . return; . } . . // Push a fake attribute Stop for the item itself so we check for gaps between the last outer . // attr/doc comment and the item they apply to . let span = self.items.last().unwrap().span; . if !span.from_expansion() . && let Ok(line) = cx.sess().source_map().lookup_line(span.lo()) -- line 479 ---------------------------------------- -- line 498 ---------------------------------------- . let pos = pos + 1; . if let Some(gap) = Gap::new(cx, &outer[last..pos], &outer[pos..]) { . last = pos; . gaps.push(gap); . } . } . . self.check_gaps(cx, &gaps, id); 79,952 ( 0.00%) } . } . . fn assoc_item_descr(kind: &AssocItemKind) -> &'static str { 49,945 ( 0.00%) match kind { . AssocItemKind::Const(_) => "constant item", . AssocItemKind::Fn(_) => "function", . AssocItemKind::Type(_) => "type alias", . AssocItemKind::MacCall(_) => "item macro invocation", . AssocItemKind::Delegation(_) => "delegated function", . AssocItemKind::DelegationMac(_) => "delegation", . } . } . . impl EarlyLintPass for EmptyLineAfter { 9 ( 0.00%) fn check_crate(&mut self, _: &EarlyContext<'_>, krate: &Crate) { . self.items.push(ItemInfo { . kind: ItemKindDescr::Crate, . name: Some(kw::Crate), 1 ( 0.00%) span: krate.spans.inner_span.with_hi(krate.spans.inner_span.lo()), . mod_items: krate . .items . .iter() 12 ( 0.00%) .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) 4 ( 0.00%) .map(|i| i.id) . .next(), . }); 8 ( 0.00%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . fn check_impl_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . fn check_trait_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . 79,912 ( 0.00%) fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 39,956 ( 0.00%) let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); 59,934 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); 729,197 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (9,989x) 49,945 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 1,078,812 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (9,989x) 59,934 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { . let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); . let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); . self.check_item_kind(cx, info, &item.attrs, item.id); . } . 50 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 26 ( 0.00%) let (kind, mod_items) = match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, _, _)) => { . let first = items . .iter() . .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) . .map(|i| i.id) . .next(); . (ItemKindDescr::Module, first) . }, . ItemKind::Mod(..) => (ItemKindDescr::Module, None), 20 ( 0.00%) _ => (ItemKindDescr::Other(item.kind.descr()), None), . }; 25 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, mod_items); 351 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (5x) 25 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 553 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (5x) 40 ( 0.00%) } . } 28 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . init: Option<&'a Expr<'a>>, . } . . struct UsageInfo<'a> { . cast_to: Option>, . in_generic_context: bool, . } . 79,912 ( 0.00%) pub(super) fn check<'a>(cx: &LateContext<'a>, body: &Body<'a>) { . let mut bindings: FxHashMap> = FxHashMap::default(); . 9,989 ( 0.00%) for_each_expr_without_closures(body.value, |expr| { 149,833 ( 0.01%) match expr.kind { 1 ( 0.00%) ExprKind::Block(block, _) => { 1 ( 0.00%) for stmt in block.stmts { . if let StmtKind::Let(let_stmt) = stmt.kind { . collect_binding_from_local(cx, let_stmt, &mut bindings); . } . } . }, . ExprKind::Let(let_expr) => { . collect_binding_from_let(cx, let_expr, &mut bindings); . }, . _ => {}, . } . ControlFlow::<()>::Continue(()) . }); . . #[allow(rustc::potential_query_instability)] 29,967 ( 0.00%) let mut binding_vec: Vec<_> = bindings.into_iter().collect(); . binding_vec.sort_by_key(|(_, info)| info.ty_span.lo()); . 9,989 ( 0.00%) for (hir_id, binding_info) in binding_vec { . check_binding_usages(cx, body, hir_id, &binding_info); . } 79,912 ( 0.00%) } . . fn collect_binding_from_let<'a>( . cx: &LateContext<'a>, . let_expr: &rustc_hir::LetExpr<'a>, . bindings: &mut FxHashMap>, . ) { . if let_expr.ty.is_none() . || let_expr.span.from_expansion() -- line 62 ---------------------------------------- 29,966 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs -------------------------------------------------------------------------------- Ir -- line 104 ---------------------------------------- . Self { . allow_indexing_slicing_in_tests: conf.allow_indexing_slicing_in_tests, . suppress_restriction_lint_in_const: conf.suppress_restriction_lint_in_const, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for IndexingSlicing { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Index(array, index, _) = &expr.kind . && (!self.suppress_restriction_lint_in_const || !cx.tcx.hir_is_inside_const_context(expr.hir_id)) . && let expr_ty = cx.typeck_results().expr_ty(array) . && let mut deref = deref_chain(cx, expr_ty) . && deref.any(|l| { . l.peel_refs().is_slice() . || l.peel_refs().is_array() . || ty_has_applicable_get_function(cx, l.peel_refs(), expr_ty, expr) . }) -- line 121 ---------------------------------------- -- line 223 ---------------------------------------- . diag.help("consider using `.get(n)` or `.get_mut(n)` instead"); . . if cx.tcx.hir_is_inside_const_context(expr.hir_id) { . diag.note(note); . } . }); . } . } 239,736 ( 0.01%) } . } . . /// Returns a tuple of options with the start and end (exclusive) values of . /// the range. If the start or end is not constant, None is returned. . fn to_const_range(cx: &LateContext<'_>, range: higher::Range<'_>, array_size: u128) -> (Option, Option) { . let ecx = ConstEvalCtxt::new(cx); . let s = range.start.map(|expr| ecx.eval(expr)); . let start = match s { -- line 239 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs -------------------------------------------------------------------------------- Ir -- line 523 ---------------------------------------- . lint: &'static Lint, . span: Option, . decorate: impl for<'a> Diagnostic<'a, ()>, . ); . . /// Emit a lint at `span` from a lint struct (some type that implements `Diagnostic`, . /// typically generated by `#[derive(Diagnostic)]`). . #[track_caller] 99,889 ( 0.00%) fn emit_span_lint>( . &self, . lint: &'static Lint, . span: S, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { . self.opt_span_lint(lint, Some(span), decorator); 69,923 ( 0.00%) } . . /// This returns the lint level spec for the given lint at the current location. . fn get_lint_level_spec(&self, lint: &'static Lint) -> LevelSpec; . . /// This function can be used to manually fulfill an expectation. This can . /// be used for lints which contain several spans, and should be suppressed, . /// if either location was marked with an expectation. . /// -- line 546 ---------------------------------------- -- line 584 ---------------------------------------- . } . } . . impl<'tcx> LintContext for LateContext<'tcx> { . type LintExpectationId = StableLintExpectationId; . . /// Gets the overall compiler `Session` object. . fn sess(&self) -> &Session { 449,567 ( 0.02%) self.tcx.sess . } . . fn opt_span_lint>( . &self, . lint: &'static Lint, . span: Option, . decorate: impl for<'a> Diagnostic<'a, ()>, . ) { 2 ( 0.00%) let hir_id = self.last_node_with_lint_attrs; . 2 ( 0.00%) match span { 7 ( 0.00%) Some(s) => self.tcx.emit_node_span_lint(lint, hir_id, s, decorate), . None => self.tcx.emit_node_lint(lint, hir_id, decorate), . } . } . . fn get_lint_level_spec(&self, lint: &'static Lint) -> StableLevelSpec { . self.tcx.lint_level_spec_at_node(lint, self.last_node_with_lint_attrs) . } . } -- line 612 ---------------------------------------- -- line 660 ---------------------------------------- . } . . /// Gets the type-checking results for the current body. . /// As this will ICE if called outside bodies, only call when working with . /// `Expr` or `Pat` nodes (they are guaranteed to be found only in bodies). . #[inline] . #[track_caller] . pub fn typeck_results(&self) -> &'tcx ty::TypeckResults<'tcx> { 149,834 ( 0.01%) self.typeck_results.expect("`LateContext::typeck_results` called outside of body") . } . . /// Returns the final resolution of a `QPath`, or `Res::Err` if unavailable. . /// Unlike `.typeck_results().qpath_res(qpath, id)`, this can be used even outside . /// bodies (e.g. for paths in `hir::Ty`), without any risk of ICE-ing. . pub fn qpath_res(&self, qpath: &hir::QPath<'_>, id: hir::HirId) -> Res { . match *qpath { . hir::QPath::Resolved(_, path) => path.res, -- line 676 ---------------------------------------- -- line 949 ---------------------------------------- . fn data_layout(&self) -> &abi::TargetDataLayout { . &self.tcx.data_layout . } . } . . impl<'tcx> ty::layout::HasTyCtxt<'tcx> for LateContext<'tcx> { . #[inline] . fn tcx(&self) -> TyCtxt<'tcx> { 19,976 ( 0.00%) self.tcx . } . } . . impl<'tcx> ty::layout::HasTypingEnv<'tcx> for LateContext<'tcx> { . #[inline] . fn typing_env(&self) -> ty::TypingEnv<'tcx> { . self.typing_env() . } -- line 965 ---------------------------------------- 39,970 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs -------------------------------------------------------------------------------- Ir -- line 879 ---------------------------------------- . Self: Sized, . F: FnMut(Self::Item), . { . #[inline] . fn call(mut f: impl FnMut(T)) -> impl FnMut((), T) { . move |(), item| f(item) . } . 20,051 ( 0.00%) self.fold((), call(f)); 14,447 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, alloc::vec::Vec, ::new::{closure#0}>, as core::iter::traits::collect::Extend>::extend, alloc::vec::Vec, ::new::{closure#0}>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, ()), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, ())>>::extend, alloc::vec::Vec, ::new::{closure#0}>, as core::iter::traits::collect::Extend>::extend, alloc::vec::Vec, ::new::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> (2x) . } . . /// Creates an iterator which uses a closure to determine if an element . /// should be yielded. . /// . /// Given an element the closure must return `true` or `false`. The returned . /// iterator will yield only the elements for which the closure returns . /// `true`. -- line 895 ---------------------------------------- -- line 2078 ---------------------------------------- . // accidentally noticed that some rustc iterators had malformed `size_hint`s, . // so this will help catch such things in debug-assertions-std runners, . // even if users won't actually ever see it. . if cfg!(debug_assertions) { . let hint = self.size_hint(); . assert!(hint.1.is_none_or(|high| high >= hint.0), "Malformed size_hint {hint:?}"); . } . 8 ( 0.00%) FromIterator::from_iter(self) 47 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, usize)>>::from_iter::>, clippy_lints::ptr::ptr_arg::check_ptr_arg_usage::{closure#1}>> (1x) . } . . /// Fallibly transforms an iterator into a collection, short circuiting if . /// a failure is encountered. . /// . /// `try_collect()` is a variation of [`collect()`][`collect`] that allows fallible . /// conversions during collection. Its main use case is simplifying conversions from . /// iterators yielding [`Option`][`Option`] into `Option>`, or similarly for other [`Try`] -- line 2094 ---------------------------------------- -- line 2481 ---------------------------------------- . #[stable(feature = "iterator_try_fold", since = "1.27.0")] . fn try_fold(&mut self, init: B, mut f: F) -> R . where . Self: Sized, . F: [const] FnMut(B, Self::Item) -> R + [const] Destruct, . R: [const] Try, . { . let mut accum = init; 829,121 ( 0.03%) while let Some(x) = self.next() { 7 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs: as core::iter::traits::iterator::Iterator>::next (1x) 212 ( 0.00%) accum = f(accum, x)?; . } . try { accum } . } . . /// An iterator method that applies a fallible function to each item in the . /// iterator, stopping at the first error and returning that error. . /// . /// This can also be thought of as the fallible form of [`for_each()`] -- line 2498 ---------------------------------------- -- line 2658 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . fn fold(mut self, init: B, mut f: F) -> B . where . Self: Sized + [const] Destruct, . F: [const] FnMut(B, Self::Item) -> B + [const] Destruct, . { . let mut accum = init; 6 ( 0.00%) while let Some(x) = self.next() { . accum = f(accum, x); . } 449,505 ( 0.02%) accum . } . . /// Reduces the elements to a single one, by repeatedly applying a reducing . /// operation. . /// . /// If the iterator is empty, returns [`None`]; otherwise, returns the . /// result of the reduction. . /// -- line 2677 ---------------------------------------- -- line 3468 ---------------------------------------- . /// . /// let (x, (y, z)): (Vec<_>, (Vec<_>, Vec<_>)) = a.into_iter().unzip(); . /// assert_eq!(x, [1, 4]); . /// assert_eq!(y, [2, 5]); . /// assert_eq!(z, [3, 6]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_non_const_trait_method] 16 ( 0.00%) fn unzip(self) -> (FromA, FromB) . where . FromA: Default + Extend, . FromB: Default + Extend, . Self: Sized + Iterator, . { . let mut unzipped: (FromA, FromB) = Default::default(); . unzipped.extend(self); 20 ( 0.00%) unzipped 18 ( 0.00%) } . . /// Creates an iterator which copies all of its elements. . /// . /// This is useful when you have an iterator over `&T`, but you need an . /// iterator over `T`. . /// . /// # Examples . /// -- line 3493 ---------------------------------------- 359,727 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/permissions_set_readonly_false.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . "Checks for calls to `std::fs::Permissions.set_readonly` with argument `false`" . } . . declare_lint_pass!(PermissionsSetReadonlyFalse => [ . PERMISSIONS_SET_READONLY_FALSE, . ]); . . impl<'tcx> LateLintPass<'tcx> for PermissionsSetReadonlyFalse { 89,901 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::MethodCall(path, receiver, [arg], _) = &expr.kind . && let ExprKind::Lit(lit) = &arg.kind . && LitKind::Bool(false) == lit.node . && path.ident.name == sym::set_readonly . && cx . .typeck_results() . .expr_ty(receiver) . .is_diag_item(cx, sym::FsPermissions) . { -- line 44 ---------------------------------------- -- line 51 ---------------------------------------- . diag.note("on Unix platforms this results in the file being world writable"); . diag.help( . "you can set the desired permissions using `PermissionsExt`. For more information, see\n\ . https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html", . ); . }, . ); . } 119,868 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub REDUNDANT_ASYNC_BLOCK, . complexity, . "`async { future.await }` can be replaced by `future`" . } . . declare_lint_pass!(RedundantAsyncBlock => [REDUNDANT_ASYNC_BLOCK]); . . impl<'tcx> LateLintPass<'tcx> for RedundantAsyncBlock { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 29,967 ( 0.00%) let span = expr.span; 119,868 ( 0.00%) if !span.in_external_macro(cx.tcx.sess.source_map()) && 239,736 ( 0.01%) let Some(body_expr) = desugar_async_block(cx, expr) && 299,670 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:clippy_lints::redundant_async_block::desugar_async_block (29,967x) . let Some(expr) = desugar_await(peel_blocks(body_expr)) && . // The await prefix must not come from a macro as its content could change in the future. . expr.span.eq_ctxt(body_expr.span) && . // The await prefix must implement Future, as implementing IntoFuture is not enough. . let Some(future_trait) = cx.tcx.lang_items().future_trait() && . implements_trait(cx, cx.typeck_results().expr_ty(expr), future_trait, &[]) && . // An async block does not have immediate side-effects from a `.await` point-of-view. . (!expr.can_have_side_effects() || desugar_async_block(cx, expr).is_some()) && -- line 54 ---------------------------------------- -- line 59 ---------------------------------------- . REDUNDANT_ASYNC_BLOCK, . span, . "this async expression only awaits a single future", . "you can reduce it to", . snippet(cx, shortened_span, "..").into_owned(), . Applicability::MachineApplicable, . ); . } 239,736 ( 0.01%) } . } . . /// If `expr` is a desugared `async` block, return the original expression if it does not capture . /// any variable by ref. 89,901 ( 0.00%) fn desugar_async_block<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 59,934 ( 0.00%) if let ExprKind::Closure(Closure { body, def_id, kind, .. }) = expr.kind . && let body = cx.tcx.hir_body(*body) . && matches!( . kind, . ClosureKind::Coroutine(CoroutineKind::Desugared( . CoroutineDesugaring::Async, . CoroutineSource::Block . )) . ) -- line 81 ---------------------------------------- -- line 89 ---------------------------------------- . .iter() . .all(|place| matches!(place.info.capture_kind, UpvarCapture::ByValue)) . }) . }) . .then_some(body.value) . } else { . None . } 119,868 ( 0.00%) } 29,967 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs -------------------------------------------------------------------------------- Ir -- line 145 ---------------------------------------- . return; . } . . mut_from_ref::check(cx, sig, None); . ptr_arg::check_trait_item(cx, item.owner_id, sig); . } . } . 89,901 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 29,967 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(body.value.hir_id); 19,978 ( 0.00%) let (item_id, sig, is_trait_item) = match parents.next() { . Some((_, Node::Item(i))) => { . if let ItemKind::Fn { sig, .. } = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::ImplItem(i))) => { 19,978 ( 0.00%) if !matches!(parents.next(), 29,967 ( 0.00%) Some((_, Node::Item(i))) if matches!(&i.kind, ItemKind::Impl(i) if i.of_trait.is_none()) . ) { . return; . } 19,978 ( 0.00%) if let ImplItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::TraitItem(i))) => { . if let TraitItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, true) . } else { . return; . } . }, . _ => return, . }; . 4 ( 0.00%) mut_from_ref::check(cx, sig, Some(body)); 108 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (1x) 6 ( 0.00%) ptr_arg::check_body(cx, body, item_id, sig, is_trait_item); 299 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_body (1x) 79,913 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let ExprKind::Binary(op, l, r) = expr.kind . && (op.node == BinOpKind::Eq || op.node == BinOpKind::Ne) . { . #[expect( . clippy::collapsible_if, . reason = "the outer `if`s check the HIR, the inner ones run lints" -- line 195 ---------------------------------------- 19,983 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs -------------------------------------------------------------------------------- Ir . use rustc_ast::ast::{LitFloatType, LitIntType, LitKind}; . use std::iter; . . /// Represents the base of a numeric literal, used for parsing and formatting. 29,964 ( 0.00%) #[derive(Debug, PartialEq, Eq, Copy, Clone)] . pub enum Radix { . /// A binary literal (e.g., `0b1010`) . Binary, . /// An octal literal (e.g., `0o670`) . Octal, . /// A decimal literal (e.g., `123`) . Decimal, . /// A hexadecimal literal (e.g., `0xFF`) -- line 13 ---------------------------------------- -- line 47 ---------------------------------------- . pub exponent: Option<(&'a str, &'a str)>, . . /// The type suffix, including preceding underscore if present. . pub suffix: Option<&'a str>, . } . . impl<'a> NumericLiteral<'a> { . /// Attempts to parse a `NumericLiteral` from the source string of an `ast::LitKind`. 89,892 ( 0.00%) pub fn from_lit_kind(src: &'a str, lit_kind: &LitKind) -> Option> { . let unsigned_src = src.strip_prefix('-').map_or(src, |s| s); . if lit_kind.is_numeric() . && unsigned_src . .trim_start() . .chars() . .next() . .is_some_and(|c| c.is_ascii_digit()) . { . let (unsuffixed, suffix) = split_suffix(src, lit_kind); 29,964 ( 0.00%) let float = matches!(lit_kind, LitKind::Float(..)); 39,952 ( 0.00%) Some(NumericLiteral::new(unsuffixed, suffix, float)) 719,136 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (9,988x) . } else { . None . } 79,904 ( 0.00%) } . . /// Parses a raw numeric literal string into its structured `NumericLiteral` parts. . #[must_use] 69,916 ( 0.00%) pub fn new(lit: &'a str, suffix: Option<&'a str>, float: bool) -> Self { . let unsigned_lit = lit.trim_start_matches('-'); . // Determine delimiter for radix prefix, if present, and radix. 9,988 ( 0.00%) let radix = if unsigned_lit.starts_with("0x") { . Radix::Hexadecimal 9,988 ( 0.00%) } else if unsigned_lit.starts_with("0b") { . Radix::Binary 9,988 ( 0.00%) } else if unsigned_lit.starts_with("0o") { . Radix::Octal . } else { . Radix::Decimal . }; . . // Grab part of the literal after prefix, if present. . let (prefix, mut sans_prefix) = if radix == Radix::Decimal { . (None, lit) . } else { . let (p, s) = lit.split_at(2); . (Some(p), s) . }; . 19,976 ( 0.00%) if suffix.is_some() && sans_prefix.ends_with('_') { . // The '_' before the suffix isn't part of the digits . sans_prefix = &sans_prefix[..sans_prefix.len() - 1]; . } . . let (integer, fraction, exponent) = Self::split_digit_parts(sans_prefix, float); . 149,820 ( 0.01%) Self { . radix, . prefix, . integer, . fraction, . exponent, . suffix, . } 89,892 ( 0.00%) } . . /// Checks if the literal's radix is `Radix::Decimal` . pub fn is_decimal(&self) -> bool { . self.radix == Radix::Decimal . } . . fn split_digit_parts(digits: &str, float: bool) -> (&str, Option<&str>, Option<(&str, &str)>) { . let mut integer = digits; . let mut fraction = None; . let mut exponent = None; . 19,976 ( 0.00%) if float { . for (i, c) in digits.char_indices() { . match c { . '.' => { . integer = &digits[..i]; . fraction = Some(&digits[i + 1..]); . }, . 'e' | 'E' => { . let exp_start = if digits[..i].ends_with('_') { i - 1 } else { i }; -- line 130 ---------------------------------------- -- line 235 ---------------------------------------- . .map_or((src, None), |split_pos| { . let (unsuffixed, suffix) = src.split_at(split_pos); . (unsuffixed, Some(suffix)) . }) . } . . fn lit_suffix_length(lit_kind: &LitKind) -> Option { . debug_assert!(lit_kind.is_numeric()); 19,976 ( 0.00%) let suffix = match lit_kind { 39,952 ( 0.00%) LitKind::Int(_, int_lit_kind) => match int_lit_kind { . LitIntType::Signed(int_ty) => Some(int_ty.name_str()), . LitIntType::Unsigned(uint_ty) => Some(uint_ty.name_str()), . LitIntType::Unsuffixed => None, . }, . LitKind::Float(_, float_lit_kind) => match float_lit_kind { . LitFloatType::Suffixed(float_ty) => Some(float_ty.name_str()), . LitFloatType::Unsuffixed => None, . }, -- line 252 ---------------------------------------- 99,880 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/await_holding_invalid.rs -------------------------------------------------------------------------------- Ir -- line 178 ---------------------------------------- . AWAIT_HOLDING_REFCELL_REF, . ]); . . pub struct AwaitHolding { . def_ids: DefIdMap<(&'static str, &'static DisallowedPathWithoutReplacement)>, . } . . impl AwaitHolding { 8 ( 0.00%) pub(crate) fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { . let (def_ids, _) = create_disallowed_map( . tcx, . &conf.await_holding_invalid_types, . PathNS::Type, . crate::disallowed_types::def_kind_predicate, . "type", . false, . ); . Self { def_ids } 8 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for AwaitHolding { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 59,934 ( 0.00%) if let hir::ExprKind::Closure(hir::Closure { . kind: hir::ClosureKind::Coroutine(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Async, _)), . def_id, . .. . }) = expr.kind . && let Some(coroutine_layout) = cx.tcx.mir_coroutine_witnesses(*def_id) . { . self.check_interior_types(cx, coroutine_layout); . } 239,736 ( 0.01%) } . } . . impl AwaitHolding { . fn check_interior_types(&self, cx: &LateContext<'_>, coroutine: &CoroutineLayout<'_>) { . for (ty_index, ty_cause) in coroutine.field_tys.iter_enumerated() { . if let rustc_middle::ty::Adt(adt, _) = ty_cause.ty.kind() { . let await_points = || { . coroutine -- line 218 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/octal_escapes.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . pub OCTAL_ESCAPES, . suspicious, . "string escape sequences looking like octal characters" . } . . declare_lint_pass!(OctalEscapes => [OCTAL_ESCAPES]); . . impl EarlyLintPass for OctalEscapes { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Lit(lit) = &expr.kind . // The number of bytes from the start of the token to the start of literal's text. 69,916 ( 0.00%) && let start_offset = BytePos::from_u32(match lit.kind { . LitKind::Str => 1, . LitKind::ByteStr | LitKind::CStr => 2, . _ => return, . }) . && !expr.span.in_external_macro(cx.sess().source_map()) . { . let s = lit.symbol.as_str(); . let mut iter = s.as_bytes().iter(); -- line 64 ---------------------------------------- -- line 107 ---------------------------------------- . ); . }); . } else { . break; . } . } . } . } 239,728 ( 0.01%) } . } 19,976 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::def_id::DefId; . use rustc_hir::{QPath, Ty, TyKind}; . use rustc_lint::LateContext; . use std::borrow::Cow; . . use super::RC_BUFFER; . 99,880 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 9,988 ( 0.00%) let mut app = Applicability::Unspecified; 89,892 ( 0.00%) let rc = match cx.tcx.get_diagnostic_name(def_id) { 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; . if let Some(ty) = qpath_generic_tys(qpath).next() . && let Some(alternate) = match_buffer_type(cx, ty, &mut app) . { . span_lint_and_then( -- line 23 ---------------------------------------- -- line 28 ---------------------------------------- . |diag| { . diag.span_suggestion_verbose(ty.span, "try", alternate, app); . }, . ); . true . } else { . false . } 79,904 ( 0.00%) } . . fn match_buffer_type( . cx: &LateContext<'_>, . ty: &Ty<'_>, . applicability: &mut Applicability, . ) -> Option> { . let id = ty.basic_res().opt_def_id()?; . let path = match cx.tcx.get_diagnostic_name(id) { -- line 44 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::Attribute; . use rustc_hir::attrs::AttributeKind; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::SUSPICIOUS_DOC_COMMENTS; . 279,755 ( 0.01%) pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) -> bool { . let replacements: Vec<_> = collect_doc_replacements(attrs); . 79,930 ( 0.00%) if let Some((&(lo_span, _), &(hi_span, _))) = replacements.first().zip(replacements.last()) { . span_lint_and_then( . cx, . SUSPICIOUS_DOC_COMMENTS, . lo_span.to(hi_span), . "this is an outer doc comment and does not apply to the parent module or crate", . |diag| { . diag.multipart_suggestion( . "use an inner doc comment to document the parent module or crate", -- line 23 ---------------------------------------- -- line 26 ---------------------------------------- . ); . }, . ); . . true . } else { . false . } 319,720 ( 0.01%) } . . fn collect_doc_replacements(attrs: &[Attribute]) -> Vec<(Span, String)> { . attrs . .iter() . .filter_map(|attr| { 2 ( 0.00%) if let Attribute::Parsed(AttributeKind::DocComment { . style: AttrStyle::Outer, . kind: DocFragmentKind::Sugared(comment_kind), . comment, . .. . }) = attr . && let Some(com) = comment.as_str().strip_prefix('!') . { . let sugg = match comment_kind { . CommentKind::Block => format!("/*!{com}*/"), . CommentKind::Line => format!("//!{com}"), . }; . Some((attr.span(), sugg)) . } else { 1 ( 0.00%) None . } . }) . .collect() . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs -------------------------------------------------------------------------------- Ir -- line 121 ---------------------------------------- . /// Check that a range is in bounds for slicing a string. . /// If this returns true, it is safe to call `slice.get_unchecked(range)` or . /// `slice.get_unchecked_mut(range)`. . #[inline(always)] . const fn check_range(slice: &str, range: crate::range::Range) -> bool { . let crate::range::Range { start, end } = range; . let bytes = slice.as_bytes(); . 90,026 ( 0.00%) if start > end || end > slice.len() { . return false; . } . 40,006 ( 0.00%) if start == slice.len() { . // If `start == slice.len()`, then `end == slice.len()` must also be true. . return true; . } . . // SAFETY: . // `start > end || end > slice.len()` is false, so `start <= end <= slice.len()` is true. . // `start == slice.len()` is false, so `start < slice.len()` is also true. . // . // No need to check for `end == 0`, because if `end == 0` is true then `start == slice.len()` . // would also be true, which is already handled above. . unsafe { 60,001 ( 0.00%) (start == 0 || bytes.as_ptr().add(start).read().is_utf8_char_boundary()) 40,000 ( 0.00%) && (end == slice.len() || bytes.as_ptr().add(end).read().is_utf8_char_boundary()) . } . } . . /// Implements substring slicing with syntax `&self[begin .. end]` or `&mut . /// self[begin .. end]`. . /// . /// Returns a slice of the given string from the byte range . /// [`begin`, `end`). -- line 154 ---------------------------------------- -- line 213 ---------------------------------------- . end: usize = self.end, . len: usize = slice.len() . ) => end >= start && end <= len, . ); . . // SAFETY: the caller guarantees that `self` is in bounds of `slice` . // which satisfies all the conditions for `add`. . unsafe { 69,956 ( 0.00%) let new_len = unchecked_sub(self.end, self.start); . slice.as_ptr().add(self.start).cast_slice(new_len) as *const str . } . } . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . let slice = slice as *mut [u8]; . -- line 229 ---------------------------------------- -- line 254 ---------------------------------------- . } . . #[stable(feature = "new_range_api", since = "1.96.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex for range::Range { . type Output = str; . #[inline] . fn get(self, slice: &str) -> Option<&Self::Output> { 29,997 ( 0.00%) if check_range(slice, self) { . // SAFETY: just checked that `self` is in bounds, . // and we are passing in a safe reference, so the return value will also be one. . // We also checked char boundaries, so this is valid UTF-8. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } -- line 270 ---------------------------------------- -- line 297 ---------------------------------------- . end: usize = self.end, . len: usize = slice.len() . ) => end >= start && end <= len, . ); . . // SAFETY: the caller guarantees that `self` is in bounds of `slice` . // which satisfies all the conditions for `add`. . unsafe { 1 ( 0.00%) let new_len = unchecked_sub(self.end, self.start); . slice.as_ptr().add(self.start).cast_slice(new_len) as *const str . } . } . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . let slice = slice as *mut [u8]; . -- line 313 ---------------------------------------- 9,996 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/question_mark.rs -------------------------------------------------------------------------------- Ir -- line 602 ---------------------------------------- . . impl QuestionMark { . fn inside_try_block(&self) -> bool { . self.try_block_depth_stack.last() > Some(&0) . } . } . . fn is_try_block(cx: &LateContext<'_>, bl: &Block<'_>) -> bool { 4 ( 0.00%) if let Some(expr) = bl.expr 4 ( 0.00%) && let ExprKind::Call(callee, [_]) = expr.kind . && let ExprKind::Path(qpath) = callee.kind . && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromOutput) . { . true . } else { . false . } . } . . fn is_inferred_ret_closure(expr: &Expr<'_>) -> bool { 209,769 ( 0.01%) let ExprKind::Closure(closure) = expr.kind else { . return false; . }; . . match closure.fn_decl.output { . FnRetTy::Return(ret_ty) => ret_ty.is_suggestable_infer_ty(), . FnRetTy::DefaultReturn(_) => true, . } . } -- line 630 ---------------------------------------- -- line 642 ---------------------------------------- . } . . if !self.inside_try_block() && !is_in_const_context(cx) { . check_let_some_else_return_none(cx, stmt); . } . self.check_manual_let_else(cx, stmt); . } . 299,670 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if is_inferred_ret_closure(expr) { . self.inferred_ret_closure_stack += 1; . return; . } . . // Cheap `if`/`match` check before the costlier lint level and const context queries. . if matches!(expr.kind, ExprKind::If(..) | ExprKind::Match(..)) . && !self.inside_try_block() . && !is_in_const_context(cx) -- line 659 ---------------------------------------- -- line 662 ---------------------------------------- . { . check_is_none_or_err_and_early_return(cx, expr); . check_if_let_some_or_err_and_early_return(cx, expr); . . if self.inferred_ret_closure_stack == 0 { . check_if_try_match(cx, expr); . } . } 239,736 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { . if is_inferred_ret_closure(expr) { . self.inferred_ret_closure_stack -= 1; . } . } . . fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 1 ( 0.00%) if is_try_block(cx, block) { . *self . .try_block_depth_stack . .last_mut() . .expect("blocks are always part of bodies and must have a depth") += 1; . } . } . . fn check_body(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { -- line 687 ---------------------------------------- -- line 688 ---------------------------------------- . self.try_block_depth_stack.push(0); . } . . fn check_body_post(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { . self.try_block_depth_stack.pop(); . } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 1 ( 0.00%) if is_try_block(cx, block) { . *self . .try_block_depth_stack . .last_mut() . .expect("blocks are always part of bodies and must have a depth") -= 1; . } . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ranges.rs -------------------------------------------------------------------------------- Ir -- line 184 ---------------------------------------- . . impl Ranges { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Ranges { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = expr.kind . && matches!( . op.node, . BinOpKind::And | BinOpKind::BitAnd | BinOpKind::Or | BinOpKind::BitOr . ) . && self.msrv.meets(cx, msrvs::RANGE_CONTAINS) . && !is_in_const_context(cx) . { . check_possible_range_contains(cx, op.node, l, r, expr, expr.span); . } . 179,802 ( 0.01%) if let Some(range) = higher::Range::hir(cx, expr) { 1,378,497 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . check_exclusive_range_plus_one(cx, expr, &range); . check_inclusive_range_minus_one(cx, expr, &range); . check_reversed_empty_range(cx, expr, &range); . } 239,736 ( 0.01%) } . } . . fn check_possible_range_contains( . cx: &LateContext<'_>, . op: BinOpKind, . left: &Expr<'_>, . right: &Expr<'_>, . expr: &Expr<'_>, -- line 217 ---------------------------------------- 29,967 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/panicking_overflow_checks.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . correctness, . "overflow checks which will panic in debug mode" . } . . declare_lint_pass!(PanickingOverflowChecks => [PANICKING_OVERFLOW_CHECKS]); . . impl<'tcx> LateLintPass<'tcx> for PanickingOverflowChecks { . // a + b < a, a > a + b, a < a - b, a - b > a 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Binary(op, lhs, rhs) = expr.kind . && let (lt, gt) = match op.node { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . } . && let ctxt = expr.span.ctxt() . && let (op_lhs, op_rhs, other, commutative) = match (<.kind, >.kind) { . (&ExprKind::Binary(op, lhs, rhs), _) if op.node == BinOpKind::Add && ctxt == lt.span.ctxt() => { -- line 61 ---------------------------------------- -- line 76 ---------------------------------------- . { . span_lint( . cx, . PANICKING_OVERFLOW_CHECKS, . expr.span, . "you are trying to use classic C overflow conditions that will fail in Rust", . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs -------------------------------------------------------------------------------- Ir -- line 292 ---------------------------------------- . . impl MemReplace { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for MemReplace { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 79,910 ( 0.00%) if let ExprKind::Call(func, [dest, src]) = expr.kind . // Check that `expr` is a call to `mem::replace()` . && let ExprKind::Path(ref func_qpath) = func.kind . && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() . && cx.tcx.is_diagnostic_item(sym::mem_replace, def_id) . // Check that second argument is `Option::None` . && !check_replace_option_with_none(cx, src, dest, expr.span) . && !check_replace_option_with_some(cx, src, dest, expr.span, self.msrv) . && !check_replace_with_default(cx, src, dest, expr, self.msrv) . { . check_replace_with_uninit(cx, src, dest, expr.span); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zero_repeat_side_effects.rs -------------------------------------------------------------------------------- Ir -- line 40 ---------------------------------------- . pub ZERO_REPEAT_SIDE_EFFECTS, . suspicious, . "usage of zero-sized initializations of arrays or vecs causing side effects" . } . . declare_lint_pass!(ZeroRepeatSideEffects => [ZERO_REPEAT_SIDE_EFFECTS]); . . impl LateLintPass<'_> for ZeroRepeatSideEffects { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 119,868 ( 0.00%) if let Some(args) = VecArgs::hir(cx, expr) 1,028,815 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . && let VecArgs::Repeat(inner_expr, len) = args . && let ExprKind::Lit(l) = len.kind . && let LitKind::Int(Pu128(0), _) = l.node . { . inner_check(cx, expr, inner_expr, true); . } . // Lint only if the length is a literal zero, and not a path to any constants. . // NOTE(@y21): When reading `[f(); LEN]`, I intuitively expect that the function is called and it . // doesn't seem as confusing as `[f(); 0]`. It would also have false positives when eg. . // the const item depends on `#[cfg]s` and has different values in different compilation . // sessions). 59,934 ( 0.00%) else if let ExprKind::Repeat(inner_expr, const_arg) = expr.kind . && let ConstArgKind::Anon(anon_const) = const_arg.kind . && let length_expr = cx.tcx.hir_body(anon_const.body).value . && !length_expr.span.from_expansion() . && let ExprKind::Lit(literal) = length_expr.kind . && let LitKind::Int(Pu128(0), _) = literal.node . { . inner_check(cx, expr, inner_expr, false); . } 149,835 ( 0.01%) } . } . . fn inner_check(cx: &LateContext<'_>, expr: &'_ Expr<'_>, inner_expr: &'_ Expr<'_>, is_vec: bool) { . // check if expr is a call or has a call inside it . if inner_expr.can_have_side_effects() { . let parent_hir_node = cx.tcx.parent_hir_node(expr.hir_id); . let inner_expr_ty = cx.typeck_results().expr_ty(inner_expr); . let return_type = cx.typeck_results().expr_ty(expr); -- line 78 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 177 ---------------------------------------- . } . } . . #[inline] . pub fn with_session_globals(f: F) -> R . where . F: FnOnce(&SessionGlobals) -> R, . { 79,956 ( 0.00%) SESSION_GLOBALS.with(f) 272 ( 0.00%) => /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> (3x) 92 ( 0.00%) => /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> (2x) . } . . /// Default edition, no source map. . pub fn create_default_session_globals_then(f: impl FnOnce() -> R) -> R { . create_session_globals_then(edition::DEFAULT_EDITION, &[], None, f) . } . . // If this ever becomes non thread-local, `decode_syntax_context` -- line 193 ---------------------------------------- -- line 228 ---------------------------------------- . } . } . . #[inline] . pub fn with_metavar_spans(f: impl FnOnce(&MetavarSpansMap) -> R) -> R { . with_session_globals(|session_globals| f(&session_globals.metavar_spans)) . } . 1 ( 0.00%) bitflags::bitflags! { . /// Scopes used to determined if it need to apply to `--remap-path-prefix` . #[derive(Debug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd, Hash)] . pub struct RemapPathScopeComponents: u8 { . /// Apply remappings to the expansion of `std::file!()` macro . const MACRO = 1 << 0; . /// Apply remappings to printed compiler diagnostics . const DIAGNOSTICS = 1 << 1; . /// Apply remappings to debug information -- line 244 ---------------------------------------- -- line 387 ---------------------------------------- . /// Returns the path suitable for reading from the file system on the local host, . /// if this information exists. . /// . /// May not exists if the filename was imported from another crate. . /// . /// Avoid embedding this in build artifacts; prefer `path()` or `embeddable_name()`. . #[inline] . pub fn local_path(&self) -> Option<&Path> { 1 ( 0.00%) if self.was_not_remapped() { . Some(&self.maybe_remapped.name) . } else if let Some(local) = &self.local { . Some(&local.name) . } else { . None . } . } . -- line 403 ---------------------------------------- -- line 702 ---------------------------------------- . Span::new(self.lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_lo(&self, lo: BytePos) -> Span { . Span::new(lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_hi(&self, hi: BytePos) -> Span { 5 ( 0.00%) Span::new(self.lo, hi, self.ctxt, self.parent) . } . /// Avoid if possible, `Span::map_ctxt` should be preferred. . #[inline] . fn with_ctxt(&self, ctxt: SyntaxContext) -> Span { . Span::new(self.lo, self.hi, ctxt, self.parent) . } . /// Avoid if possible, `Span::with_parent` should be preferred. . #[inline] -- line 718 ---------------------------------------- -- line 745 ---------------------------------------- . fn cmp(&self, rhs: &Self) -> Ordering { . Ord::cmp(&self.data(), &rhs.data()) . } . } . . impl Span { . #[inline] . pub fn lo(self) -> BytePos { 9 ( 0.00%) self.data().lo . } . #[inline] . pub fn with_lo(self, lo: BytePos) -> Span { . self.data().with_lo(lo) . } . #[inline] . pub fn hi(self) -> BytePos { 9,995 ( 0.00%) self.data().hi . } . #[inline] . pub fn with_hi(self, hi: BytePos) -> Span { . self.data().with_hi(hi) . } . #[inline] . pub fn with_ctxt(self, ctxt: SyntaxContext) -> Span { . self.map_ctxt(|_| ctxt) -- line 769 ---------------------------------------- -- line 775 ---------------------------------------- . } . . /// Returns whether this span originates in a foreign crate's external macro. . /// . /// This is used to test whether a lint should not even begin to figure out whether it should . /// be reported on the current node. . #[inline] . pub fn in_external_macro(self, sm: &SourceMap) -> bool { 269,732 ( 0.01%) self.ctxt().in_external_macro(sm) 101 ( 0.00%) => ???:::in_external_macro (1x) . } . . /// Returns `true` if `span` originates in a derive-macro's expansion. . pub fn in_derive_expansion(self) -> bool { . matches!(self.ctxt().outer_expn_data().kind, ExpnKind::Macro(MacroKind::Derive, _)) . } . . /// Return whether `span` is generated by `async` or `await`. -- line 791 ---------------------------------------- -- line 2649 ---------------------------------------- . impl Pos for $ident { . #[inline(always)] . fn from_usize(n: usize) -> $ident { . $ident(n as $inner_ty) . } . . #[inline(always)] . fn to_usize(&self) -> usize { 19,978 ( 0.00%) self.0 as usize . } . . #[inline(always)] . fn from_u32(n: u32) -> $ident { . $ident(n as $inner_ty) . } . . #[inline(always)] -- line 2665 ---------------------------------------- -- line 2677 ---------------------------------------- . } . } . . impl Sub for $ident { . type Output = $ident; . . #[inline(always)] . fn sub(self, rhs: $ident) -> $ident { 3 ( 0.00%) $ident(self.0 - rhs.0) . } . } . )* . }; . } . . impl_pos! { . /// A byte offset. . /// . /// Keep this small (currently 32-bits), as AST contains a lot of them. 3 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Debug)] . pub struct BytePos(pub u32); . . /// A byte offset relative to file beginning. . #[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Debug, StableHash)] . pub struct RelativeBytePos(pub u32); . . /// A character offset. . /// -- line 2704 ---------------------------------------- 199,822 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs -------------------------------------------------------------------------------- Ir -- line 228 ---------------------------------------- . /// `LintPass::check_*` function, consider using [`span_lint_hir_and_then`] instead. . /// This is needed for `#[allow]` and `#[expect]` attributes to work on the node . /// highlighted in the displayed warning. . /// . /// If you're unsure which function you should use, you can test if the `#[expect]` attribute works . /// where you would expect it to. . /// If it doesn't, you likely need to use [`span_lint_hir_and_then`] instead. . #[track_caller] 14 ( 0.00%) pub fn span_lint_and_then(cx: &C, lint: &'static Lint, sp: S, msg: M, f: F) . where . C: LintContext, . S: Into, . M: Into, . F: FnOnce(&mut Diag<'_, ()>), . { . struct ClippyDiag)>(F); . -- line 244 ---------------------------------------- -- line 247 ---------------------------------------- . let mut lint = Diag::new(dcx, level, ""); . (self.0)(&mut lint); . lint . } . } . . let sp = sp.into(); . #[expect(clippy::disallowed_methods)] 59,929 ( 0.00%) cx.emit_span_lint( 5,157,600 ( 0.18%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::emit_span_lint::::{closure#0}>> (9,988x) . lint, . sp.clone(), 319,634 ( 0.01%) ClippyDiag(|diag: &mut Diag<'_, ()>| { . diag.primary_message(msg); . diag.span(sp); . f(diag); . docs_link(diag, lint); . . #[cfg(debug_assertions)] . validate_diag(diag); . }), . ); 8 ( 0.00%) } . . /// Like [`span_lint`], but emits the lint at the node identified by the given `HirId`. . /// . /// This is in contrast to [`span_lint`], which always emits the lint at the node that was last . /// passed to the `LintPass::check_*` function. . /// . /// The `HirId` is used for checking lint level attributes and to fulfill lint expectations defined . /// via the `#[expect]` attribute. -- line 276 ---------------------------------------- 79,917 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs -------------------------------------------------------------------------------- Ir -- line 5094 ---------------------------------------- . allowed_dotfiles: FxHashSet<&'static str>, . format_args: FormatArgsStorage, . allow_unwrap_types: Vec, . unwrap_allowed_ids: FxHashSet, . unwrap_allowed_aliases: Vec, . } . . impl Methods { 10 ( 0.00%) pub fn new(conf: &'static Conf, format_args: FormatArgsStorage) -> Self { . let mut allowed_dotfiles: FxHashSet<_> = conf.allowed_dotfiles.iter().map(|s| &**s).collect(); . allowed_dotfiles.extend(DEFAULT_ALLOWED_DOTFILES); . 21 ( 0.00%) Self { 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, 1 ( 0.00%) msrv: conf.msrv.into(), . allow_expect_in_tests: conf.allow_expect_in_tests, . allow_unwrap_in_tests: conf.allow_unwrap_in_tests, 1 ( 0.00%) allow_expect_in_consts: conf.allow_expect_in_consts, 1 ( 0.00%) allow_unwrap_in_consts: conf.allow_unwrap_in_consts, 6 ( 0.00%) allowed_dotfiles, 1 ( 0.00%) format_args, 3 ( 0.00%) allow_unwrap_types: conf.allow_unwrap_types.clone(), 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone (1x) . unwrap_allowed_ids: FxHashSet::default(), . unwrap_allowed_aliases: Vec::new(), . } 9 ( 0.00%) } . } . . /// Extracts a method call name, args, and `Span` of the method name. . /// This ensures that neither the receiver nor any of the arguments . /// come from expansion. . pub fn method_call<'tcx>(recv: &'tcx Expr<'tcx>) -> Option<(Symbol, &'tcx Expr<'tcx>, &'tcx [Expr<'tcx>], Span, Span)> { . if let ExprKind::MethodCall(path, receiver, args, call_span) = recv.kind . && !args.iter().any(|e| e.range_span().unwrap_or(e.span).from_expansion()) -- line 5127 ---------------------------------------- -- line 5129 ---------------------------------------- . { . Some((path.ident.name, receiver, args, path.ident.span, call_span)) . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for Methods { 8 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'tcx>) { . for s in &self.allow_unwrap_types { . let def_ids = clippy_utils::paths::lookup_path_str(cx.tcx, clippy_utils::paths::PathNS::Type, s); . for def_id in def_ids { . if cx.tcx.def_kind(def_id) == rustc_hir::def::DefKind::TyAlias { . self.unwrap_allowed_aliases.push(def_id); . } else { . self.unwrap_allowed_ids.insert(def_id); . } . } . } 8 ( 0.00%) } . 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . 169,817 ( 0.01%) match expr.kind { 39,952 ( 0.00%) ExprKind::Call(func, args) => { 49,940 ( 0.00%) unnecessary_fallible_conversions::check_function(cx, expr, func); 2,327,204 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check_function (9,988x) 109,868 ( 0.00%) manual_c_str_literals::check(cx, expr, func, args, self.msrv); 709,148 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs:clippy_lints::methods::manual_c_str_literals::check (9,988x) 79,904 ( 0.00%) useless_nonzero_new_unchecked::check(cx, expr, func, args, self.msrv); 239,712 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs:clippy_lints::methods::useless_nonzero_new_unchecked::check (9,988x) 79,904 ( 0.00%) io_other_error::check(cx, expr, func, args, self.msrv); 29,964 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/io_other_error.rs:clippy_lints::methods::io_other_error::check (9,988x) 99,880 ( 0.00%) swap_with_temporary::check(cx, expr, func, args); 189,772 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:clippy_lints::methods::swap_with_temporary::check (9,988x) 59,928 ( 0.00%) ip_constant::check(cx, expr, func, args); 269,676 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs:clippy_lints::methods::ip_constant::check (9,988x) 29,964 ( 0.00%) clone_on_copy::check_function(cx, expr); 2,746,700 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_function (9,988x) 109,868 ( 0.00%) unwrap_expect_used::check_call( 1,618,056 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check_call (9,988x) . cx, . expr, . func, . args, 9,988 ( 0.00%) self.allow_unwrap_in_tests, 9,988 ( 0.00%) self.allow_expect_in_tests, 9,988 ( 0.00%) self.allow_unwrap_in_consts, 9,988 ( 0.00%) self.allow_expect_in_consts, 9,988 ( 0.00%) &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . ); . }, . ExprKind::MethodCall(..) => { . self.check_methods(cx, expr); . }, . ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne => { . let mut info = BinaryExprInfo { -- line 5181 ---------------------------------------- -- line 5186 ---------------------------------------- . }; . lint_binary_expr_with_method_call(cx, &mut info); . }, . ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Or => { . manual_is_variant_and::check_or(cx, expr, lhs, rhs, self.msrv); . }, . _ => (), . } 239,736 ( 0.01%) } . 99,890 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx hir::ImplItem<'_>) { 29,967 ( 0.00%) if impl_item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 19,981 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, id) = impl_item.kind { 5 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 92 ( 0.00%) => ???:::hir_get_parent_item (1x) 4 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 51 ( 0.00%) => ???:::hir_expect_item (1x) 3 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 4 ( 0.00%) let implements_trait = matches!(item.kind, hir::ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })); . . let method_sig = cx.tcx.fn_sig(impl_item.owner_id).instantiate_identity().skip_norm_wip(); 2 ( 0.00%) let method_sig = cx.tcx.instantiate_bound_regions_with_erased(method_sig); 72 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (1x) 1 ( 0.00%) let first_arg_ty_opt = method_sig.inputs().iter().next().copied(); 8 ( 0.00%) should_implement_trait::check_impl_item(cx, impl_item, self_ty, implements_trait, first_arg_ty_opt, sig); 97 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/should_implement_trait.rs:clippy_lints::methods::should_implement_trait::check_impl_item (1x) . 4 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() 8 ( 0.00%) => ???:::implicit_self (1x) . && !(self.avoid_breaking_exported_api . && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id)) . && let Some(first_arg) = iter_input_pats(sig.decl, cx.tcx.hir_body(id)).next() . && let Some(first_arg_ty) = first_arg_ty_opt . { . wrong_self_convention::check( . cx, . impl_item.ident.name, -- line 5220 ---------------------------------------- -- line 5223 ---------------------------------------- . first_arg.pat.span, . implements_trait, . false, . ); . } . . new_ret_no_self::check_impl_item(cx, impl_item, self_ty, implements_trait); . } 79,912 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { . if let TraitItemKind::Fn(ref sig, _) = item.kind . && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { . if sig.decl.implicit_self().has_implicit_self() . && let Some(first_arg_hir_ty) = sig.decl.inputs.first() . && let Some(&first_arg_ty) = cx -- line 5239 ---------------------------------------- 19,982 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs -------------------------------------------------------------------------------- Ir -- line 731 ---------------------------------------- . valid_idents: &'static FxHashSet, . check_private_items: bool, . } . . impl Documentation { . pub fn new(conf: &'static Conf) -> Self { . Self { . valid_idents: &conf.doc_valid_idents, 3 ( 0.00%) check_private_items: conf.check_private_items, . } . } . } . . impl EarlyLintPass for Documentation { 279,755 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[rustc_ast::Attribute]) { . include_in_doc_without_cfg::check(cx, attrs); 319,720 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for Documentation { 399,650 ( 0.01%) fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { 399,650 ( 0.01%) let Some(headers) = check_attrs(cx, self.valid_idents, attrs) else { . return; . }; . 669,425 ( 0.02%) match cx.tcx.hir_node(cx.last_node_with_lint_attrs) { 2,243,380 ( 0.08%) => ???:::hir_node (39,965x) 6 ( 0.00%) Node::Field(FieldDef { span, safety, .. }) => match (headers.safety, safety) { . (false, Safety::Unsafe) => span_lint( . cx, . MISSING_SAFETY_DOC, . *span, . "docs for unsafe field missing `# Safety` section", . ), . (true, Safety::Safe) if cx.tcx.features().unsafe_fields() => span_lint_and_help( . cx, -- line 765 ---------------------------------------- -- line 766 ---------------------------------------- . UNNECESSARY_SAFETY_DOC, . *span, . "field with `# Safety` documentation is not marked unsafe", . None, . "if the field has safety invariants, mark it `unsafe`", . ), . _ => (), . }, 5 ( 0.00%) Node::Item(item) => { . too_long_first_doc_paragraph::check( . cx, . item, . attrs, 10 ( 0.00%) headers.first_paragraph_text_len, 5 ( 0.00%) headers.first_paragraph_md_len, 5 ( 0.00%) self.check_private_items, . ); 25 ( 0.00%) match item.kind { . ItemKind::Fn { sig, body, .. } . if !(is_entrypoint_fn(cx, item.owner_id.to_def_id()) . || item.span.in_external_macro(cx.tcx.sess.source_map())) => . { . missing_headers::check(cx, item.owner_id, sig, headers, Some(body), self.check_private_items); . }, . ItemKind::Trait { safety, .. } => match (headers.safety, safety) { . (false, Safety::Unsafe) => span_lint( -- line 791 ---------------------------------------- -- line 807 ---------------------------------------- . }, . Node::TraitItem(trait_item) => { . if let TraitItemKind::Fn(sig, ..) = trait_item.kind . && !trait_item.span.in_external_macro(cx.tcx.sess.source_map()) . { . missing_headers::check(cx, trait_item.owner_id, sig, headers, None, self.check_private_items); . } . }, 9,989 ( 0.00%) Node::ImplItem(impl_item) => { 19,982 ( 0.00%) if let ImplItemKind::Fn(sig, body_id) = impl_item.kind 5 ( 0.00%) && !impl_item.span.in_external_macro(cx.tcx.sess.source_map()) 5 ( 0.00%) && !is_trait_impl_item(cx, impl_item.hir_id()) 161 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (1x) . { 7 ( 0.00%) missing_headers::check( 25,923 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (1x) . cx, 2 ( 0.00%) impl_item.owner_id, . sig, . headers, . Some(body_id), 1 ( 0.00%) self.check_private_items, . ); . } . }, . _ => {}, . } 319,720 ( 0.01%) } . } . . #[derive(Copy, Clone)] . struct Fragments<'a> { . doc: &'a str, . fragments: &'a [DocFragment], . } . -- line 840 ---------------------------------------- -- line 867 ---------------------------------------- . // We don't want the parser to choke on intra doc links. Since we don't . // actually care about rendering them, just pretend that all broken links . // point to a fake address. . #[expect(clippy::unnecessary_wraps)] // we're following a type signature . fn fake_broken_link_callback<'a>(_: BrokenLink<'_>) -> Option<(CowStr<'a>, CowStr<'a>)> { . Some(("fake".into(), "fake".into())) . } . 239,790 ( 0.01%) if suspicious_doc_comments::check(cx, attrs) || is_doc_hidden(attrs) { 2,357,962 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check (39,965x) . return None; . } . 79,930 ( 0.00%) let (fragments, _) = attrs_to_doc_fragments( . attrs.iter().filter_map(|attr| { . if attr.doc_str_and_fragment_kind().is_none() || attr.span().in_external_macro(cx.sess().source_map()) { . None . } else { . Some((attr, None)) . } . }), . true, -- line 887 ---------------------------------------- -- line 889 ---------------------------------------- . . let mut doc = String::with_capacity(fragments.iter().map(|frag| frag.doc.as_str().len() + 1).sum()); . . for fragment in &fragments { . add_doc_fragment(&mut doc, fragment); . } . doc.pop(); . 39,965 ( 0.00%) if doc.trim().is_empty() { 119,895 ( 0.00%) if let Some(span) = span_of_fragments(&fragments) { 479,580 ( 0.02%) => ???:rustc_resolve::rustdoc::span_of_fragments (39,965x) . span_lint_and_help( . cx, . EMPTY_DOCS, . span, . "empty doc comment", . None, . "consider removing or filling it", . ); . } 119,895 ( 0.00%) return Some(DocHeaders::default()); . } . . // Only emits the allow-by-default `DOC_LINK_CODE`; skip its extra markdown reparse when it's off. . if !clippy_utils::is_lint_allowed(cx, DOC_LINK_CODE, cx.last_node_with_lint_attrs) { . check_for_code_clusters( . cx, . pulldown_cmark::Parser::new_with_broken_link_callback( . &doc, -- line 916 ---------------------------------------- 129,895 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub PARTIALEQ_TO_NONE, . style, . "Binary comparison to `Option::None` relies on `T: PartialEq`, which is unneeded" . } . . declare_lint_pass!(PartialeqToNone => [PARTIALEQ_TO_NONE]); . . impl<'tcx> LateLintPass<'tcx> for PartialeqToNone { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . // Skip expanded code, as we have no control over it anyway... 59,934 ( 0.00%) if e.span.from_expansion() { . return; . } . . // If the expression is of type `Option` . let is_ty_option = |expr: &Expr<'_>| { . cx.typeck_results() . .expr_ty(expr) . .peel_refs() . .is_diag_item(cx, sym::Option) . }; . . // If the expression is a literal `Option::None` . let is_none_ctor = . |expr: &Expr<'_>| !expr.span.from_expansion() && is_none_expr(cx, peel_hir_expr_refs(expr).0); . 29,967 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 59,934 ( 0.00%) if let ExprKind::Binary(op, left_side, right_side) = e.kind { . // All other comparisons (e.g. `>= None`) have special meaning wrt T . let is_eq = match op.node { . BinOpKind::Eq => true, . BinOpKind::Ne => false, . _ => return, . }; . . // We are only interested in comparisons between `Option` and a literal `Option::None` -- line 72 ---------------------------------------- -- line 97 ---------------------------------------- . "use `Option::is_none()` instead" . } else { . "use `Option::is_some()` instead" . }, . sugg, . applicability, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . pub struct Gated

{ . pub(crate) active: bool, . pub(crate) pass: P, . } . . impl Gated

{ . #[inline] . pub fn new bool>(is_active: &F, pass: P) -> Self { 70 ( 0.00%) let active = is_active(&pass.get_lints()); 368 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint_defs/src/lib.rs:::get_lints (1x) 361 ( 0.00%) Gated { active, pass } 90 ( 0.00%) => ???:0x0000000000173dc0 (3x) . } . } . . /// Run one field's `check_*`, if that field is active. . /// . /// Fully qualified through [`rustc_lint::LateLintPass`] since some passes impl . /// both `EarlyLintPass` and `LateLintPass` with like-named methods, which would . /// be ambiguous on the concrete field type. The args arrive as one `tt` and are . /// re-parsed here so the per-field and per-argument repetitions never share a . /// nesting level. . #[macro_export] . macro_rules! run_combined_late_lint_pass_field { . ($self:ident, $field:ident, $name:ident, ($($arg:expr),* $(,)?)) => { 15,973,775 ( 0.56%) if $self.$field.active { 13,156,217 ( 0.47%) rustc_lint::LateLintPass::$name(&mut $self.$field.pass, $($arg),*); 354 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/items_after_test_module.rs:::check_mod (1x) . } . }; . } . . /// Forward one `check_*` method to every field of the combined pass. . #[macro_export] . macro_rules! expand_combined_late_lint_pass_method { . ([$($field:ident),*], $self:ident, $name:ident, $args:tt) => ({ -- line 48 ---------------------------------------- -- line 50 ---------------------------------------- . }) . } . . /// Generate the combined `LateLintPass` impl's `check_*` methods, one per method . /// in rustc's late-pass method list. . #[macro_export] . macro_rules! expand_combined_late_lint_pass_methods { . ($fields:tt, [$($(#[$attr:meta])* fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( 1,668,511 ( 0.06%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::LateContext<'tcx>, $($param: $arg),*) { . $crate::expand_combined_late_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 969,160 ( 0.03%) })* . ) . } . . /// Declare the combined struct (one [`Gated`] field per pass) plus its . /// `LintPass`/`LateLintPass` impls. The method list comes from . /// `rustc_lint::late_lint_methods!` so it can't drift from rustc's. . /// . /// Each entry is `Field: Type = constructor`; `new`'s params (`tcx`, `conf`, ...) -- line 68 ---------------------------------------- -- line 74 ---------------------------------------- . $methods:tt . ) => { . #[allow(non_snake_case)] . pub struct $name<'tcx> { . $($field: $crate::combined_late_pass::Gated<$fty>,)* . } . . impl<'tcx> $name<'tcx> { 17 ( 0.00%) pub fn new bool>($($pname: $pty,)* is_active: &F) -> Self { 55 ( 0.00%) Self { 9 ( 0.00%) $($field: $crate::combined_late_pass::Gated::new(is_active, $ctor),)* . } 8 ( 0.00%) } . } . . #[allow(rustc::lint_pass_impl_without_macro)] . impl<'tcx> rustc_lint::LintPass for $name<'tcx> { . fn name(&self) -> &'static str { . stringify!($name) . } 10 ( 0.00%) fn get_lints(&self) -> rustc_lint::LintVec { 1 ( 0.00%) => ???:std::exception::~exception() (1x) . // Reserve at least one slot per pass up front to skip the early reallocations. . let mut lints = Vec::with_capacity([$(stringify!($field)),*].len()); 3 ( 0.00%) $(lints.extend(self.$field.pass.get_lints());)* 368 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint_defs/src/lib.rs:::get_lints (1x) 3 ( 0.00%) lints 9 ( 0.00%) } . } . . impl<'tcx> rustc_lint::LateLintPass<'tcx> for $name<'tcx> { . $crate::expand_combined_late_lint_pass_methods!([$($field),*], $methods); . } . }; . } 229,967 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format_impl.rs -------------------------------------------------------------------------------- Ir -- line 103 ---------------------------------------- . pub struct FormatImpl { . format_args: FormatArgsStorage, . // Whether we are inside Display or Debug trait impl - None for neither . format_trait_impl: Option, . } . . impl FormatImpl { . pub fn new(format_args: FormatArgsStorage) -> Self { 2 ( 0.00%) Self { . format_args, . format_trait_impl: None, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FormatImpl { . fn check_impl_item(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { 49,945 ( 0.00%) self.format_trait_impl = is_format_trait_impl(cx, impl_item); 39,956 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (9,989x) . } . . fn check_impl_item_post(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { . // Assume no nested Impl of Debug and Display within each other 39,956 ( 0.00%) if is_format_trait_impl(cx, impl_item).is_some() { 39,956 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (9,989x) . self.format_trait_impl = None; . } . } . 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if let Some(format_trait_impl) = self.format_trait_impl { . let linter = FormatImplExpr { . cx, . format_args: &self.format_args, . expr, . format_trait_impl, . }; . linter.check_to_string_in_display(); . linter.check_self_in_format_args(); . linter.check_print_in_format_impl(); . } 239,736 ( 0.01%) } . } . . struct FormatImplExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . format_args: &'a FormatArgsStorage, . expr: &'tcx Expr<'tcx>, . format_trait_impl: FormatTraitNames, . } -- line 150 ---------------------------------------- -- line 250 ---------------------------------------- . format!("{replacement}!(..)") . }, . Applicability::HasPlaceholders, . ); . } . } . } . 19,978 ( 0.00%) fn is_format_trait_impl(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) -> Option { 19,978 ( 0.00%) if impl_item.ident.name == sym::fmt . && let ImplItemKind::Fn(_, body_id) = impl_item.kind . && let Some(Impl { . of_trait: Some(of_trait), . .. . }) = get_parent_as_impl(cx.tcx, impl_item.hir_id()) . && let Some(did) = of_trait.trait_ref.trait_def_id() . && let Some(name) = cx.tcx.get_diagnostic_name(did) . && matches!(name, sym::Debug | sym::Display) -- line 267 ---------------------------------------- -- line 272 ---------------------------------------- . .get(1) . .and_then(|param| param.pat.simple_ident()) . .map(|ident| ident.name); . . Some(FormatTraitNames { name, formatter_name }) . } else { . None . } 19,978 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::{qpath_generic_tys, sym}; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::Symbol; . . use super::BOX_COLLECTION; . 119,856 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 29,964 ( 0.00%) if Some(def_id) == cx.tcx.lang_items().owned_box() 299,640 ( 0.01%) => ???:::lang_items (9,988x) . && let Some(item_type) = get_std_collection(cx, qpath) . { . let generic = match item_type { . sym::String => "", . _ => "<..>", . }; . . let box_content = format!("{item_type}{generic}"); -- line 20 ---------------------------------------- -- line 25 ---------------------------------------- . format!("you seem to be trying to use `Box<{box_content}>`. Consider using just `{box_content}`"), . None, . format!("`{box_content}` is already on the heap, `Box<{box_content}>` makes an extra allocation"), . ); . true . } else { . false . } 79,904 ( 0.00%) } . . fn get_std_collection(cx: &LateContext<'_>, qpath: &QPath<'_>) -> Option { . let param = qpath_generic_tys(qpath).next()?; . let id = param.basic_res().opt_def_id()?; . cx.tcx . .get_diagnostic_name(id) . .filter(|&name| { . matches!( -- line 41 ---------------------------------------- 9,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . #[must_use = "iterators are lazy and do nothing unless consumed"] . #[stable(feature = "rust1", since = "1.0.0")] . pub struct FlatMap { . inner: FlattenCompat, ::IntoIter>, . } . . impl U> FlatMap { . pub(in crate::iter) fn new(iter: I, f: F) -> FlatMap { 239,744 ( 0.01%) FlatMap { inner: FlattenCompat::new(iter.map(f)) } . } . . pub(crate) fn into_parts(self) -> (Option, Option, Option) { . ( . self.inner.frontiter, . self.inner.iter.into_inner().map(Map::into_inner), . self.inner.backiter, . ) -- line 31 ---------------------------------------- -- line 242 ---------------------------------------- . self.inner.try_fold(init, fold) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 129,896 ( 0.00%) self.inner.fold(init, fold) . } . . #[inline] . fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { . self.inner.advance_by(n) . } . . #[inline] -- line 258 ---------------------------------------- -- line 383 ---------------------------------------- . fn iter_fold(self, mut acc: Acc, mut fold: Fold) -> Acc . where . Fold: FnMut(Acc, U) -> Acc, . { . #[inline] . fn flatten( . fold: &mut impl FnMut(Acc, T::IntoIter) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc + '_ { 6 ( 0.00%) move |acc, iter| fold(acc, iter.into_iter()) . } . 20,005 ( 0.00%) if let Some(iter) = self.frontiter { . acc = fold(acc, iter); . } . 15 ( 0.00%) acc = self.iter.fold(acc, flatten(&mut fold)); . 49,976 ( 0.00%) if let Some(iter) = self.backiter { . acc = fold(acc, iter); . } . . acc . } . . /// Folds over the inner iterators as long as the given function returns successfully, . /// always storing the most recent inner iterator in `self.frontiter`. -- line 408 ---------------------------------------- -- line 421 ---------------------------------------- . fold: &'a mut impl FnMut(Acc, &mut T::IntoIter) -> R, . ) -> impl FnMut(Acc, T) -> R + 'a { . move |acc, iter| fold(acc, frontiter.insert(iter.into_iter())) . } . . if let Some(iter) = &mut self.frontiter { . acc = fold(acc, iter)?; . } 89,901 ( 0.00%) self.frontiter = None; . . acc = self.iter.try_fold(acc, flatten(&mut self.frontiter, &mut fold))?; 29,967 ( 0.00%) self.frontiter = None; . 59,934 ( 0.00%) if let Some(iter) = &mut self.backiter { . acc = fold(acc, iter)?; . } . self.backiter = None; . . try { acc } . } . } . -- line 442 ---------------------------------------- -- line 518 ---------------------------------------- . type Item = U::Item; . . #[inline] . default fn next(&mut self) -> Option { . loop { . if let elt @ Some(_) = and_then_or_clear(&mut self.frontiter, Iterator::next) { . return elt; . } 15 ( 0.00%) match self.iter.next() { . None => return and_then_or_clear(&mut self.backiter, Iterator::next), . Some(inner) => self.frontiter = Some(inner.into_iter()), . } . } . } . . #[inline] . default fn size_hint(&self) -> (usize, Option) { -- line 534 ---------------------------------------- 69,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . "detects cases of references to owned empty strings being passed as an argument to a function expecting `&str`" . } . . declare_lint_pass!(UnnecessaryOwnedEmptyStrings => [ . UNNECESSARY_OWNED_EMPTY_STRINGS, . ]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyStrings { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 59,934 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner_expr) = expr.kind . && let ExprKind::Call(fun, args) = inner_expr.kind . && let ExprKind::Path(ref qpath) = fun.kind . && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() . && let ty::Ref(_, inner_str, _) = cx.typeck_results().expr_ty_adjusted(expr).kind() . && inner_str.is_str() . { . let fun_name = cx.tcx.get_diagnostic_name(fun_def_id); . if fun_name == Some(sym::string_new) { -- line 48 ---------------------------------------- -- line 69 ---------------------------------------- . expr.span, . "usage of `&String::from(\"\")` for a function expecting a `&str` argument", . "try", . "\"\"".to_owned(), . Applicability::MachineApplicable, . ); . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/strings.rs -------------------------------------------------------------------------------- Ir -- line 278 ---------------------------------------- . } . } . } . . // Max length a b"foo" string can take . const MAX_LENGTH_BYTE_STRING_LIT: usize = 32; . . impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use rustc_ast::LitKind; . 249,724 ( 0.01%) if let ExprKind::Call(fun, [bytes_arg]) = e.kind . // Find `std::str::converts::from_utf8` or `std::primitive::str::from_utf8` 29,964 ( 0.00%) && let Some(sym::str_from_utf8 | sym::str_inherent_from_utf8) = 9,988 ( 0.00%) fun.res(cx).opt_diag_name(cx) . . // Find string::as_bytes . && let ExprKind::AddrOf(BorrowKind::Ref, _, args) = bytes_arg.kind . && let ExprKind::Index(left, right, _) = args.kind . && let (method_names, expressions, _) = method_calls(left, 1) . && method_names == [sym::as_bytes] . && expressions.len() == 1 . && expressions[0].1.is_empty() -- line 300 ---------------------------------------- -- line 315 ---------------------------------------- . e.span, . "calling a slice of `as_bytes()` with `from_utf8` should be not necessary", . "try", . format!("Some(&{snippet_app}[{right_snip}])"), . applicability, . ); . } . 59,934 ( 0.00%) if !e.span.in_external_macro(cx.sess().source_map()) . && let ExprKind::MethodCall(path, receiver, ..) = &e.kind . && path.ident.name == sym::as_bytes . && let ExprKind::Lit(lit) = &receiver.kind . && let LitKind::Str(lit_content, _) = &lit.node . { . let callsite = snippet(cx, receiver.span.source_callsite(), r#""foo""#); . let mut applicability = Applicability::MachineApplicable; . if callsite.starts_with("include_str!") { -- line 331 ---------------------------------------- -- line 362 ---------------------------------------- . snippet_with_applicability(cx, receiver.span, r#""foo""#, &mut applicability) . ), . applicability, . ); . } . } . } . 29,967 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = &e.kind . && path.ident.name == sym::into_bytes . && let ExprKind::MethodCall(path, recv, [], _) = &recv.kind . && matches!(path.ident.name, sym::to_owned | sym::to_string) . && let ExprKind::Lit(lit) = &recv.kind . && let LitKind::Str(lit_content, _) = &lit.node . && lit_content.as_str().is_ascii() . && lit_content.as_str().len() <= MAX_LENGTH_BYTE_STRING_LIT . && !recv.span.from_expansion() -- line 378 ---------------------------------------- -- line 387 ---------------------------------------- . "consider using a byte string literal instead", . format!( . "b{}.to_vec()", . snippet_with_applicability(cx, recv.span, r#""..""#, &mut applicability) . ), . applicability, . ); . } 239,736 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for StrToString { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . if expr.span.from_expansion() { . return; . } . -- line 403 ---------------------------------------- -- line 438 ---------------------------------------- . "str::to_owned".to_string(), . Applicability::MachineApplicable, . ); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for TrimSplitWhitespace { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . let tyckres = cx.typeck_results(); 59,934 ( 0.00%) if let ExprKind::MethodCall(path, split_recv, [], split_ws_span) = expr.kind . && path.ident.name == sym::split_whitespace . && let Some(split_ws_def_id) = tyckres.type_dependent_def_id(expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::str_split_whitespace, split_ws_def_id) . && let ExprKind::MethodCall(path, _trim_recv, [], trim_span) = split_recv.kind . && let trim_fn_name @ (sym::trim | sym::trim_start | sym::trim_end) = path.ident.name . && let Some(trim_def_id) = tyckres.type_dependent_def_id(split_recv.hir_id) . && is_one_of_trim_diagnostic_items(cx, trim_def_id) . { -- line 456 ---------------------------------------- -- line 459 ---------------------------------------- . TRIM_SPLIT_WHITESPACE, . trim_span.with_hi(split_ws_span.lo()), . format!("found call to `str::{trim_fn_name}` before `str::split_whitespace`"), . format!("remove `{trim_fn_name}()`"), . String::new(), . Applicability::MachineApplicable, . ); . } 239,736 ( 0.01%) } . } . . fn is_one_of_trim_diagnostic_items(cx: &LateContext<'_>, trim_def_id: DefId) -> bool { . matches!( . cx.tcx.get_diagnostic_name(trim_def_id), . Some(sym::str_trim | sym::str_trim_start | sym::str_trim_end) . ) . } -- line 475 ---------------------------------------- 39,955 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs -------------------------------------------------------------------------------- Ir -- line 2128 ---------------------------------------- . // `ArcInner` structure itself is `Sync` because the inner data is . // `Sync` as well, so we're ok loaning out an immutable pointer to these . // contents. . unsafe { self.ptr.as_ref() } . } . . // Non-inlined part of `drop`. . #[inline(never)] 2 ( 0.00%) unsafe fn drop_slow(&mut self) { . // Drop the weak ref collectively held by all strong references when this . // variable goes out of scope. This ensures that the memory is deallocated . // even if the destructor of `T` panics. . // Take a reference to `self.alloc` instead of cloning because 1. it'll last long . // enough, and 2. you should be able to drop `Arc`s with unclonable allocators 2 ( 0.00%) let _weak = Weak { ptr: self.ptr, alloc: &self.alloc }; . . // Destroy the data at this time, even though we must not free the box . // allocation itself (there might still be weak pointers lying around). . // We cannot use `get_mut_unchecked` here, because `self.alloc` is borrowed. . unsafe { ptr::drop_in_place(&mut (*self.ptr.as_ptr()).data) }; . } . . /// Returns `true` if the two `Arc`s point to the same allocation in a vein similar to -- line 2150 ---------------------------------------- -- line 2424 ---------------------------------------- . // the worst already happened and we actually do overflow the `usize` counter. However, that . // requires the counter to grow from `isize::MAX` to `usize::MAX` between the increment . // above and the `abort` below, which seems exceedingly unlikely. . // . // This is a global invariant, and also applies when using a compare-exchange loop to increment . // counters in other methods. . // Otherwise, the counter could be brought to an almost-overflow using a compare-exchange loop, . // and then overflow using a few `fetch_add`s. 20 ( 0.00%) if old_size > MAX_REFCOUNT { . abort(); . } . 18 ( 0.00%) unsafe { Self::from_inner_in(self.ptr, self.alloc.clone()) } . } . } . . #[unstable(feature = "ergonomic_clones", issue = "132290")] . impl UseCloned for Arc {} . . #[unstable(feature = "share_trait", issue = "156756")] . impl Share for Arc {} . . #[stable(feature = "rust1", since = "1.0.0")] . impl Deref for Arc { . type Target = T; . . #[inline] . fn deref(&self) -> &T { 279,714 ( 0.01%) &self.inner().data . } . } . . #[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")] . unsafe impl PinCoerceUnsized for Arc {} . . #[unstable(feature = "deref_pure_trait", issue = "87121")] . unsafe impl DerefPure for Arc {} -- line 2460 ---------------------------------------- -- line 2850 ---------------------------------------- . /// drop(foo); // Doesn't print anything . /// drop(foo2); // Prints "dropped!" . /// ``` . #[inline] . fn drop(&mut self) { . // Because `fetch_sub` is already atomic, we do not need to synchronize . // with other threads unless we are going to delete the object. This . // same logic applies to the below `fetch_sub` to the `weak` count. 20,011 ( 0.00%) if self.inner().strong.fetch_sub(1, Release) != 1 { . return; . } . . // This fence is needed to prevent reordering of use of the data and . // deletion of the data. Because it is marked `Release`, the decreasing . // of the reference count synchronizes with this `Acquire` fence. This . // means that use of the data happens before decreasing the reference . // count, which happens before this fence, which happens before the -- line 2866 ---------------------------------------- -- line 2893 ---------------------------------------- . // used by Default::default. . debug_assert!( . !ptr::addr_eq(self.ptr.as_ptr(), &STATIC_INNER_SLICE.inner), . "Arcs backed by a static should never reach a strong count of 0. \ . Likely decrement_strong_count or from_raw were called too many times.", . ); . . unsafe { 6 ( 0.00%) self.drop_slow(); 100 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>>>::drop_slow (1x) 75 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>>>::drop_slow (1x) . } . } . } . . impl Arc { . /// Attempts to downcast the `Arc` to a concrete type. . /// . /// # Examples -- line 2909 ---------------------------------------- -- line 3372 ---------------------------------------- . } . } . . /// Returns `None` when the pointer is dangling and there is no allocated `ArcInner`, . /// (i.e., when this `Weak` was created by `Weak::new`). . #[inline] . fn inner(&self) -> Option> { . let ptr = self.ptr.as_ptr(); 2 ( 0.00%) if is_dangling(ptr) { . None . } else { . // We are careful to *not* create a reference covering the "data" field, as . // the field may be mutated concurrently (for example, if the last `Arc` . // is dropped, the data field will be dropped in-place). . Some(unsafe { WeakInner { strong: &(*ptr).strong, weak: &(*ptr).weak } }) . } . } -- line 3388 ---------------------------------------- -- line 3524 ---------------------------------------- . // the memory orderings . // . // It's not necessary to check for the locked state here, because the . // weak count can only be locked if there was precisely one weak ref, . // meaning that drop could only subsequently run ON that remaining weak . // ref, which can only happen after the lock is released. . let inner = if let Some(inner) = self.inner() { inner } else { return }; . 2 ( 0.00%) if inner.weak.fetch_sub(1, Release) == 1 { . acquire!(inner.weak); . . // Make sure we aren't trying to "deallocate" the shared static for empty slices . // used by Default::default. . debug_assert!( . !ptr::addr_eq(self.ptr.as_ptr(), &STATIC_INNER_SLICE.inner), . "Arc/Weaks backed by a static should never be deallocated. \ . Likely decrement_strong_count or from_raw were called too many times.", -- line 3540 ---------------------------------------- 929,020 ( 0.03%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/repeat_vec_with_capacity.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . diag.note(note); . diag.span_suggestion_verbose(span, sugg_msg, sugg, Applicability::MaybeIncorrect); . }, . ); . } . . /// Checks `vec![Vec::with_capacity(x); n]` . fn check_vec_macro(cx: &LateContext<'_>, expr: &Expr<'_>) { 89,901 ( 0.00%) if let Some(VecArgs::Repeat(repeat_expr, len_expr)) = VecArgs::hir(cx, expr) 1,028,815 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . && matching_root_macro_call(cx, expr.span, sym::vec_macro).is_some() . && fn_def_id(cx, repeat_expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::vec_with_capacity, did)) . && !len_expr.span.from_expansion() . && let Some(Constant::Int(2..)) = ConstEvalCtxt::new(cx).eval(expr_or_init(cx, len_expr)) . { . emit_lint( . cx, . expr.span.source_callsite(), -- line 88 ---------------------------------------- -- line 95 ---------------------------------------- . snippet(cx, repeat_expr.span, "..") . ), . ); . } . } . . /// Checks `iter::repeat(Vec::with_capacity(x))` . fn check_repeat_fn(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Msrv) { 59,934 ( 0.00%) if !expr.span.from_expansion() 169,805 ( 0.01%) && fn_def_id(cx, expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::iter_repeat, did)) 2,077,609 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (29,967x) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let ExprKind::Call(_, [repeat_expr]) = expr.kind . && fn_def_id(cx, repeat_expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::vec_with_capacity, did)) . && !repeat_expr.span.from_expansion() . && let Some(exec_context) = std_or_core(cx) . && msrv.meets(cx, msrvs::REPEAT_WITH) . { . emit_lint( . cx, -- line 112 ---------------------------------------- -- line 118 ---------------------------------------- . "{exec_context}::iter::repeat_with(|| {})", . snippet(cx, repeat_expr.span, "..") . ), . ); . } . } . . impl LateLintPass<'_> for RepeatVecWithCapacity { 329,637 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . check_vec_macro(cx, expr); 29,967 ( 0.00%) check_repeat_fn(cx, expr, self.msrv); 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . . #[derive(Default)] . pub struct MainRecursion { . has_no_std_attr: bool, . } . . impl LateLintPass<'_> for MainRecursion { . fn check_crate(&mut self, cx: &LateContext<'_>) { 3 ( 0.00%) self.has_no_std_attr = is_no_std_crate(cx); 44 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_no_std_crate (1x) . } . 119,868 ( 0.00%) fn check_expr_post(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 139,844 ( 0.00%) if self.has_no_std_attr { . return; . } . . if let ExprKind::Call(func, []) = &expr.kind . && let ExprKind::Path(QPath::Resolved(_, path)) = &func.kind . && let Some(def_id) = path.res.opt_def_id() . && is_entrypoint_fn(cx, def_id) . { -- line 49 ---------------------------------------- -- line 51 ---------------------------------------- . cx, . MAIN_RECURSION, . func.span, . format!("recursing into entrypoint `{}`", snippet(cx, func.span, "main")), . None, . "consider using another function for this recursion", . ); . } 149,835 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/regex.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . #[derive(Copy, Clone)] . enum RegexKind { . Unicode, . UnicodeSet, . Bytes, . BytesSet, . } . 7 ( 0.00%) #[derive(Default)] . pub struct Regex { . definitions: DefIdMap, . loop_stack: Vec<(OwnerId, Span)>, . } . . impl<'tcx> LateLintPass<'tcx> for Regex { 7 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'tcx>) { . let mut resolve = |path: &PathLookup, kind: RegexKind| { . for &id in path.get(cx) { . self.definitions.insert(id, kind); . } . }; . . resolve(&paths::REGEX_NEW, RegexKind::Unicode); . resolve(&paths::REGEX_BUILDER_NEW, RegexKind::Unicode); . resolve(&paths::REGEX_SET_NEW, RegexKind::UnicodeSet); . resolve(&paths::REGEX_BYTES_NEW, RegexKind::Bytes); . resolve(&paths::REGEX_BYTES_BUILDER_NEW, RegexKind::Bytes); . resolve(&paths::REGEX_BYTES_SET_NEW, RegexKind::BytesSet); 6 ( 0.00%) } . 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 249,724 ( 0.01%) if let ExprKind::Call(fun, [arg]) = expr.kind 9,988 ( 0.00%) && let Some(def_id) = fun.res(cx).opt_def_id() . && let Some(regex_kind) = self.definitions.get(&def_id) . { . if let Some(&(loop_item_id, loop_span)) = self.loop_stack.last() . && loop_item_id == fun.hir_id.owner . && (matches!(arg.kind, ExprKind::Lit(_)) || const_str(cx, arg).is_some()) . { . span_lint_and_help( . cx, -- line 150 ---------------------------------------- -- line 157 ---------------------------------------- . } . . match regex_kind { . RegexKind::Unicode => check_regex(cx, arg, true), . RegexKind::UnicodeSet => check_set(cx, arg, true), . RegexKind::Bytes => check_regex(cx, arg, false), . RegexKind::BytesSet => check_set(cx, arg, false), . } 59,934 ( 0.00%) } else if let ExprKind::Loop(block, _, _, span) = expr.kind { . self.loop_stack.push((block.hir_id.owner, span)); . } 239,736 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 209,769 ( 0.01%) if matches!(expr.kind, ExprKind::Loop(..)) { . self.loop_stack.pop(); . } . } . } . . fn lint_syntax_error(cx: &LateContext<'_>, error: ®ex_syntax::Error, unescaped: &str, base: Span, offset: u8) { . let parts: Option<(_, _, &dyn Display)> = match &error { . regex_syntax::Error::Parse(e) => Some((e.span(), e.auxiliary_span(), e.kind())), -- line 179 ---------------------------------------- 9,989 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_octal_unix_permissions.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub NON_OCTAL_UNIX_PERMISSIONS, . correctness, . "use of non-octal value to set unix file permissions, which will be translated into octal" . } . . declare_lint_pass!(NonOctalUnixPermissions => [NON_OCTAL_UNIX_PERMISSIONS]); . . impl<'tcx> LateLintPass<'tcx> for NonOctalUnixPermissions { 119,868 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 129,859 ( 0.00%) match &expr.kind { . ExprKind::MethodCall(path, func, [param], _) => { . if let Some(adt) = cx.typeck_results().expr_ty(func).peel_refs().ty_adt_def() . && matches!( . (cx.tcx.get_diagnostic_name(adt.did()), path.ident.name), . (Some(sym::FsOpenOptions | sym::DirBuilder), sym::mode) . | (Some(sym::FsPermissions), sym::set_mode) . ) . && let ExprKind::Lit(_) = param.kind -- line 51 ---------------------------------------- -- line 52 ---------------------------------------- . && param.span.eq_ctxt(expr.span) . && param . .span . .check_text(cx, |src| !matches!(src.as_bytes(), [b'0', b'o' | b'b', ..])) . { . show_error(cx, param); . } . }, 19,976 ( 0.00%) ExprKind::Call(func, [param]) => { 39,952 ( 0.00%) if let ExprKind::Path(ref path) = func.kind 39,952 ( 0.00%) && let Some(def_id) = cx.qpath_res(path, func.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 49,940 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::permissions_from_mode, def_id) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let ExprKind::Lit(_) = param.kind . && param.span.eq_ctxt(expr.span) . && param . .span . .check_text(cx, |src| !matches!(src.as_bytes(), [b'0', b'o' | b'b', ..])) . { . show_error(cx, param); . } . }, . _ => {}, . } 149,835 ( 0.01%) } . } . . fn show_error(cx: &LateContext<'_>, param: &Expr<'_>) { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . NON_OCTAL_UNIX_PERMISSIONS, . param.span, -- line 83 ---------------------------------------- 29,964 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/mod.rs -------------------------------------------------------------------------------- Ir -- line 406 ---------------------------------------- . . pub struct Types { . vec_box_size_threshold: u64, . type_complexity_threshold: u64, . avoid_breaking_exported_api: bool, . } . . impl<'tcx> LateLintPass<'tcx> for Types { 12 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: FnKind<'_>, . decl: &FnDecl<'tcx>, . _: &Body<'_>, . _: Span, . def_id: LocalDefId, . ) { 5 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 2 ( 0.00%) .hir_node_by_def_id(cx.tcx.hir_get_parent_item(cx.tcx.local_def_id_to_hir_id(def_id)).def_id) 92 ( 0.00%) => ???:::hir_get_parent_item (1x) . { 5 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 2 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(def_id); 57 ( 0.00%) => ???:::is_exported (1x) . 2 ( 0.00%) self.check_fn_decl( . cx, . decl, . CheckTyContext { . is_in_trait_impl, 4 ( 0.00%) in_body: matches!(fn_kind, FnKind::Closure), . is_exported, . ..CheckTyContext::default() . }, . ); 8 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 15 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 255 ( 0.00%) => ???:::is_exported (5x) . 25 ( 0.00%) match item.kind { . ItemKind::Static(_, _, ty, _) | ItemKind::Const(_, _, ty, _) => self.check_ty( . cx, . ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ), . // functions, enums, structs, impls and traits are covered . _ => (), . } . } . 69,923 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { 19,978 ( 0.00%) match item.kind { 9,988 ( 0.00%) ImplItemKind::Const(ty, _) => { 39,952 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 39,952 ( 0.00%) .hir_node_by_def_id(cx.tcx.hir_get_parent_item(item.hir_id()).def_id) 918,896 ( 0.03%) => ???:::hir_get_parent_item (9,988x) . { 79,904 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 29,964 ( 0.00%) self.check_ty( 8,679,572 ( 0.31%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (9,988x) . cx, . ty, . CheckTyContext { . is_in_trait_impl, . ..CheckTyContext::default() . }, . ); . }, . // Methods are covered by check_fn. . // Type aliases are ignored because oftentimes it's impossible to . // make type alias declaration in trait simpler, see #1013 . ImplItemKind::Fn(..) | ImplItemKind::Type(..) => (), . } 79,912 ( 0.00%) } . . fn check_field_def(&mut self, cx: &LateContext<'tcx>, field: &hir::FieldDef<'tcx>) { 2 ( 0.00%) if field.span.from_expansion() { . return; . } . 3 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(field.def_id); 42 ( 0.00%) => ???:::is_exported (1x) . 5 ( 0.00%) self.check_ty( 213 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (1x) . cx, 1 ( 0.00%) field.ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ); . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &TraitItem<'tcx>) { -- line 508 ---------------------------------------- -- line 540 ---------------------------------------- . ); . } . } . } . . impl Types { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) vec_box_size_threshold: conf.vec_box_size_threshold, 1 ( 0.00%) type_complexity_threshold: conf.type_complexity_threshold, 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, . } . } . . fn check_fn_decl<'tcx>(&mut self, cx: &LateContext<'tcx>, decl: &FnDecl<'tcx>, context: CheckTyContext) { . // Ignore functions in trait implementations as they are usually forced by the trait definition. . // . // FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard . // to check. 3 ( 0.00%) if context.is_in_trait_impl { . return; . } . 1 ( 0.00%) for input in decl.inputs { 4 ( 0.00%) self.check_ty(cx, input, context); 213 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (1x) . } . 3 ( 0.00%) if let FnRetTy::Return(ty) = decl.output { 4 ( 0.00%) self.check_ty(cx, ty, context); 213 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (1x) . } . } . . /// Recursively check for `TypePass` lints in the given type. Stop at the first . /// lint found. . /// . /// The parameter `is_local` distinguishes the context of the type. 109,901 ( 0.00%) fn check_ty<'tcx>(&mut self, cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, mut context: CheckTyContext) { 39,964 ( 0.00%) if hir_ty.span.from_expansion() { . return; . } . . // Skip trait implementations; see issue #605. . if context.is_in_trait_impl { . return; . } . 29,973 ( 0.00%) if !context.is_nested_call && type_complexity::check(cx, hir_ty, self.type_complexity_threshold) { . return; . } . 69,937 ( 0.00%) match hir_ty.kind { 29,973 ( 0.00%) TyKind::Path(ref qpath) if !context.in_body => { 19,982 ( 0.00%) let hir_id = hir_ty.hir_id; 29,973 ( 0.00%) let res = cx.qpath_res(qpath, hir_id); 229,793 ( 0.01%) => ???:::qpath_res (9,991x) . if let Some(def_id) = res.opt_def_id() . && self.is_type_change_allowed(context) . { . // All lints that are being checked in this block are guarded by . // the `avoid_breaking_exported_api` configuration. When adding a . // new lint, please also add the name to the configuration documentation . // in `clippy_config::conf` . . let mut triggered = false; 59,928 ( 0.00%) triggered |= box_collection::check(cx, hir_ty, qpath, def_id); 559,328 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check (9,988x) 79,904 ( 0.00%) triggered |= redundant_allocation::check(cx, hir_ty, qpath, def_id); 1,088,692 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check (9,988x) 69,916 ( 0.00%) triggered |= rc_buffer::check(cx, hir_ty, qpath, def_id); 719,136 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check (9,988x) 89,892 ( 0.00%) triggered |= vec_box::check(cx, hir_ty, qpath, def_id, self.vec_box_size_threshold); 719,136 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check (9,988x) 69,916 ( 0.00%) triggered |= option_option::check(cx, hir_ty, qpath, def_id); 709,148 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check (9,988x) 59,928 ( 0.00%) triggered |= linked_list::check(cx, hir_ty, def_id); 579,304 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs:clippy_lints::types::linked_list::check (9,988x) 79,904 ( 0.00%) triggered |= rc_mutex::check(cx, hir_ty, qpath, def_id); 669,196 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check (9,988x) 49,940 ( 0.00%) triggered |= owned_cow::check(cx, qpath, def_id); 689,172 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check (9,988x) . 159,808 ( 0.01%) if triggered { . return; . } . } 39,964 ( 0.00%) match *qpath { . QPath::Resolved(Some(ty), p) => { . context.is_nested_call = true; . self.check_ty(cx, ty, context); . for ty in p.segments.iter().flat_map(|seg| { . seg.args . .as_ref() . .map_or_else(|| [].iter(), |params| params.args.iter()) . .filter_map(|arg| match arg { -- line 624 ---------------------------------------- -- line 626 ---------------------------------------- . _ => None, . }) . }) { . self.check_ty(cx, ty.as_unambig_ty(), context); . } . }, . QPath::Resolved(None, p) => { . context.is_nested_call = true; 19,982 ( 0.00%) for ty in p.segments.iter().flat_map(|seg| { . seg.args . .as_ref() . .map_or_else(|| [].iter(), |params| params.args.iter()) . .filter_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), . _ => None, . }) . }) { -- line 642 ---------------------------------------- -- line 678 ---------------------------------------- . TyKind::Tup(tys) => { . context.is_nested_call = true; . for ty in tys { . self.check_ty(cx, ty, context); . } . }, . _ => {}, . } 79,928 ( 0.00%) } . . /// This function checks if the type is allowed to change in the current context . /// based on the `avoid_breaking_exported_api` configuration . fn is_type_change_allowed(&self, context: CheckTyContext) -> bool { . !(context.is_exported && self.avoid_breaking_exported_api) . } . } . -- line 694 ---------------------------------------- 89,917 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub SWAP_PTR_TO_REF, . suspicious, . "call to `mem::swap` using pointer derived references" . } . . declare_lint_pass!(SwapPtrToRef => [SWAP_PTR_TO_REF]); . . impl LateLintPass<'_> for SwapPtrToRef { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 79,910 ( 0.00%) if let ExprKind::Call(fn_expr, [arg1, arg2]) = e.kind . && fn_expr.basic_res().is_diag_item(cx, sym::mem_swap) . && let ctxt = e.span.ctxt() . && let (from_ptr1, arg1_span) = is_ptr_to_ref(cx, arg1, ctxt) . && let (from_ptr2, arg2_span) = is_ptr_to_ref(cx, arg2, ctxt) . && (from_ptr1 || from_ptr2) . { . span_lint_and_then( . cx, -- line 52 ---------------------------------------- -- line 63 ---------------------------------------- . "use ptr::swap", . format!("core::ptr::swap({snip1}, {snip2})"), . app, . ); . } . }, . ); . } 239,736 ( 0.01%) } . } . . /// Checks if the expression converts a mutable pointer to a mutable reference. If it is, also . /// returns the span of the pointer expression if it's suitable for making a suggestion. . fn is_ptr_to_ref(cx: &LateContext<'_>, e: &Expr<'_>, ctxt: SyntaxContext) -> (bool, Option) { . if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, borrowed_expr) = e.kind . && let ExprKind::Unary(UnOp::Deref, derefed_expr) = borrowed_expr.kind . && cx.typeck_results().expr_ty(derefed_expr).is_raw_ptr() -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs -------------------------------------------------------------------------------- Ir -- line 59 ---------------------------------------- . impl_lint_pass!(DisallowedFields => [DISALLOWED_FIELDS]); . . pub struct DisallowedFields { . disallowed: DefIdMap<(&'static str, &'static DisallowedPath)>, . } . . impl DisallowedFields { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 8 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_fields, . PathNS::Field, . |def_kind| matches!(def_kind, DefKind::Field), . "field", . false, . ); 4 ( 0.00%) Self { disallowed } . } . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedFields { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 129,857 ( 0.00%) let (id, span) = match &expr.kind { 109,876 ( 0.00%) ExprKind::Path(path) if let Res::Def(_, id) = cx.qpath_res(path, expr.hir_id) => (id, expr.span), 779,087 ( 0.03%) => ???:::qpath_res (9,989x) . ExprKind::Field(e, ident) => { . // Very round-about way to get the field `DefId` from the expr: first we get its . // parent `Ty`. Then we go through all its fields to find the one with the expected . // name and get the `DefId` from it. . if let Some(parent_ty) = cx.typeck_results().expr_ty_adjusted_opt(e) . && let Some(field_def_id) = get_field_def_id_by_name(parent_ty, ident.name) . { . (field_def_id, ident.span) -- line 90 ---------------------------------------- -- line 98 ---------------------------------------- . span_lint_and_then( . cx, . DISALLOWED_FIELDS, . span, . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(span), . ); . } 179,802 ( 0.01%) } . 8 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 2 ( 0.00%) let PatKind::Struct(struct_path, pat_fields, _) = pat.kind else { . return; . }; . match cx.typeck_results().qpath_res(&struct_path, pat.hir_id) { . Res::Def(DefKind::Struct, struct_def_id) => { . let adt_def = cx.tcx.adt_def(struct_def_id); . for field in pat_fields { . if let Some(def_id) = adt_def.all_fields().find_map(|adt_field| { . if field.ident.name == adt_field.name { -- line 117 ---------------------------------------- -- line 151 ---------------------------------------- . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(field.span), . ); . } . } . }, . _ => {}, . } 8 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . #[clippy::version = "1.74.0"] . pub RESERVE_AFTER_INITIALIZATION, . complexity, . "`reserve` called immediately after `Vec` creation" . } . . impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]); . 1 ( 0.00%) #[derive(Default)] . pub struct ReserveAfterInitialization { . searcher: Option, . } . . struct VecReserveSearcher { . local_id: HirId, . err_span: Span, . init_part: String, -- line 45 ---------------------------------------- -- line 62 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 1 ( 0.00%) self.searcher = None; . } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { . if let Some(init_expr) = local.init . && let PatKind::Binding(BindingMode::MUT, id, _, None) = local.pat.kind . && !local.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, init_expr) . && !matches!( -- line 78 ---------------------------------------- -- line 92 ---------------------------------------- . "..", . ) . .into_owned(), . space_hint: String::new(), . }); . } . } . 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,901 ( 0.00%) if self.searcher.is_none() . && let ExprKind::Assign(left, right, _) = expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind . && let Res::Local(id) = path.res . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, right) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) -- line 109 ---------------------------------------- -- line 116 ---------------------------------------- . cx, . left.span.shrink_to_lo().to(right.span.source_callsite().shrink_to_lo()), . "..", . ) . .into_owned(), // see `assign_expression` test . space_hint: String::new(), . }); . } 239,736 ( 0.01%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . if let Some(searcher) = self.searcher.take() { . if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind . && let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::reserve . && !is_from_proc_macro(cx, expr) -- line 132 ---------------------------------------- -- line 137 ---------------------------------------- . ..searcher . }); . } else { . searcher.display_err(cx); . } . } . } . 4 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 2 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } 4 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs -------------------------------------------------------------------------------- Ir -- line 59 ---------------------------------------- . . impl NeedlessNonzeroGet { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessNonzeroGet { 239,736 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 209,769 ( 0.01%) match expr.kind { . // `.get().()` . ExprKind::MethodCall(method, get_call, [], _) . if let Some((recv, nz_ty, nonzero_did, get_span)) = nonzero_get(cx, get_call) . // The outer call must resolve to an inherent method. A trait method of the same . // name could resolve differently once the receiver becomes a `NonZero`. . && let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) . && cx.tcx.trait_of_assoc(method_did).is_none() . // Dropping `get` must leave the expression's type unchanged. Methods whose -- line 76 ---------------------------------------- -- line 100 ---------------------------------------- . && let Some(trait_id) = cx.tcx.lang_items().get(trait_lang_item) . && has_nonzero_operator(cx, lhs, recv, nz_ty, trait_id, self.msrv) => . { . emit_unnecessary_get(cx, expr, get_call, recv, get_span, op.node.as_str()); . }, . . _ => {}, . } 239,736 ( 0.01%) } . } . . /// Returns the receiver, its `NonZero` type and definition, and the `get` identifier span when . /// `expr` is an inherent `NonZero::get()` call. . fn nonzero_get<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, Ty<'tcx>, DefId, Span)> { -- line 116 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs -------------------------------------------------------------------------------- Ir -- line 518 ---------------------------------------- . Sugg::NonParen(format!("{}.{}", outer_sugg.maybe_paren(), first.name).into()), . ) . } else { . (outer_type, outer_sugg) . } . } . } . impl<'tcx> LateLintPass<'tcx> for Transmute { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 89,898 ( 0.00%) if let ExprKind::Call(path_expr, [arg]) = e.kind 39,952 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = path_expr.kind . && let Some(def_id) = path.res.opt_def_id() . && cx.tcx.is_diagnostic_item(sym::transmute, def_id) . { . // Avoid suggesting non-const operations in const contexts: . // - from/to bits (https://github.com/rust-lang/rust/issues/73736) . // - dereferencing raw pointers (https://github.com/rust-lang/rust/issues/51911) . // - char conversions (https://github.com/rust-lang/rust/issues/89259) . let const_context = is_in_const_context(cx); -- line 536 ---------------------------------------- -- line 563 ---------------------------------------- . | (unsound_collection_transmute::check(cx, e, from_ty, to_ty) . || transmute_undefined_repr::check(cx, e, from_ty, to_ty)) . | (eager_transmute::check(cx, e, arg, from_ty, to_ty)); . . if !linted { . transmutes_expressible_as_ptr_casts::check(cx, e, from_ty, from_ty_adjusted, to_ty, arg, const_context); . } . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . /// work, we get a false positive warning on the `$v.push(3)` which really requires `$v` to . /// be a vector. . span_to_state: BTreeMap, . allow_in_test: bool, . } . . impl UselessVec { . pub fn new(conf: &'static Conf) -> Self { 5 ( 0.00%) Self { . too_large_for_stack: conf.too_large_for_stack, . msrv: conf.msrv.into(), . span_to_state: BTreeMap::new(), 2 ( 0.00%) allow_in_test: conf.allow_useless_vec_in_tests, . } . } . } . . declare_clippy_lint! { . /// ### What it does . /// Checks for usage of `vec![..]` when using `[..]` would . /// be possible. -- line 63 ---------------------------------------- -- line 166 ---------------------------------------- . VecToArray::Impossible . } . }, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for UselessVec { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 119,868 ( 0.00%) if let Some(vec_args) = higher::VecArgs::hir(cx, expr.peel_borrows()) 1,028,815 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . // The `vec![]` or `&vec![]` invocation span. . && let vec_span = expr.span.parent_callsite().unwrap_or(expr.span) . && !vec_span.from_expansion() . { . if self.allow_in_test && is_in_test(cx.tcx, expr.hir_id) { . return; . } . -- line 183 ---------------------------------------- -- line 232 ---------------------------------------- . }); . } . }, . VecToArray::Impossible => { . self.span_to_state.insert(vec_span, VecState::NoChange); . }, . } . } 239,736 ( 0.01%) } . 8 ( 0.00%) fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { 10 ( 0.00%) for (span, state) in mem::take(&mut self.span_to_state) { . if let VecState::Change { . suggest_ty, . vec_snippet, . expr_hir_id, . } = state . { . span_lint_hir_and_then(cx, USELESS_VEC, expr_hir_id, span, "useless use of `vec!`", |diag| { . let help_msg = format!("you can use {} directly", suggest_ty.desc()); -- line 251 ---------------------------------------- -- line 255 ---------------------------------------- . Applicability::Unspecified . } else { . Applicability::MachineApplicable . }; . diag.span_suggestion(span, help_msg, vec_snippet, applicability); . }); . } . } 8 ( 0.00%) } . } . . #[derive(Copy, Clone)] . pub(crate) enum SuggestedType { . /// Suggest using a slice `&[..]` / `&mut [..]` . SliceRef(Mutability), . /// Suggest using an array: `[..]` . Array, -- line 271 ---------------------------------------- 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } else { . write!(f, "an array") . } . } . } . . impl LateLintPass<'_> for SingleRangeInVecInit { . #[expect(clippy::too_many_lines)] 269,703 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . // inner_expr: `vec![0..200]` or `[0..200]` . // ^^^^^^ ^^^^^^^ . // span: `vec![0..200]` or `[0..200]` . // ^^^^^^^^^^^^ ^^^^^^^^ . // suggested_type: What to print, "an array" or "a `Vec`" 59,934 ( 0.00%) let (inner_expr, span, suggested_type) = if let ExprKind::Array([inner_expr]) = expr.kind . && !expr.span.from_expansion() . { . (inner_expr, expr.span, SuggestedType::Array) . } else if let Some(macro_call) = root_macro_call_first_node(cx, expr) . && let Some(VecArgs::Vec([expr])) = VecArgs::hir(cx, expr) . { . (expr, macro_call.span, SuggestedType::Vec) . } else { -- line 87 ---------------------------------------- -- line 188 ---------------------------------------- . format!("if you wanted {suggested_type} of len {end_snippet}, try"), . format!("{start_snippet}; {end_snippet}"), . applicability, . ); . } . } . }, . ); 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{Impl, ImplItem, ImplItemKind, ItemKind, Node, TraitRef}; . use rustc_lint::LateContext; . use rustc_span::Span; . use rustc_span::symbol::{Ident, kw}; . use std::iter; . . use super::RENAMED_FUNCTION_PARAMS; . 69,923 ( 0.00%) pub(super) fn check_impl_item(cx: &LateContext<'_>, item: &ImplItem<'_>, ignored_traits: &DefIdSet) { 19,978 ( 0.00%) if !item.span.from_expansion() 19,980 ( 0.00%) && let ImplItemKind::Fn(_, body_id) = item.kind 5 ( 0.00%) && let parent_node = cx.tcx.parent_hir_node(item.hir_id()) 146 ( 0.00%) => ???:::parent_hir_node (1x) 3 ( 0.00%) && let Node::Item(parent_item) = parent_node 3 ( 0.00%) && let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. 1 ( 0.00%) }) = &parent_item.kind . && let Some(did) = cx.tcx.trait_item_of(item.owner_id) . && !is_from_ignored_trait(&of_trait.trait_ref, ignored_traits) . { . let mut param_idents_iter = cx.tcx.hir_body_param_idents(body_id); . let mut default_param_idents_iter = cx.tcx.fn_arg_idents(did).iter().copied(); . . let renames = RenamedFnArgs::new(&mut default_param_idents_iter, &mut param_idents_iter); . if !renames.0.is_empty() { -- line 28 ---------------------------------------- -- line 38 ---------------------------------------- . format!("consider using the default name{plural}"), . renames.0, . Applicability::Unspecified, . ); . }, . ); . } . } 79,912 ( 0.00%) } . . struct RenamedFnArgs(Vec<(Span, String)>); . . impl RenamedFnArgs { . /// Comparing between an iterator of default names and one with current names, . /// then collect the ones that got renamed. . fn new(default_idents: &mut I1, current_idents: &mut I2) -> Self . where -- line 54 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs -------------------------------------------------------------------------------- Ir -- line 361 ---------------------------------------- . /// let mut map = HashMap::with_hasher(s); . /// map.insert(1, 2); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "hashmap_build_hasher", since = "1.7.0")] . #[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")] . pub const fn with_hasher(hash_builder: S) -> HashMap { 239,832 ( 0.01%) HashMap { base: base::HashMap::with_hasher(hash_builder) } . } . . /// Creates an empty `HashMap` with at least the specified capacity, using . /// `hasher` to hash the keys. . /// . /// The hash map will be able to hold at least `capacity` elements without . /// reallocating. This method is allowed to allocate for more elements than . /// `capacity`. If `capacity` is zero, the hash map will not allocate. -- line 377 ---------------------------------------- -- line 1006 ---------------------------------------- . /// assert_eq!(letters[&'s'], 2); . /// assert_eq!(letters[&'t'], 3); . /// assert_eq!(letters[&'u'], 1); . /// assert_eq!(letters.get(&'y'), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A> { 9,988 ( 0.00%) map_entry(self.base.rustc_entry(key)) . } . . /// Returns a reference to the value corresponding to the key. . /// . /// The key may be any borrowed form of the map's key type, but . /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for . /// the key type. . /// -- line 1022 ---------------------------------------- -- line 1032 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn get(&self, k: &Q) -> Option<&V> . where . K: Borrow, . Q: Hash + Eq, . { 2 ( 0.00%) self.base.get(k) 4 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/raw.rs:>::get:: (1x) . } . . /// Returns the key-value pair corresponding to the supplied key. This is . /// potentially useful: . /// - for key types where non-identical keys can be considered equal; . /// - for getting the `&K` stored key value from a borrowed `&Q` lookup key; or . /// - for getting a reference to a key with the same lifetime as the collection. . /// -- line 1048 ---------------------------------------- -- line 1326 ---------------------------------------- . /// assert_eq!(map.insert(37, "c"), Some("b")); . /// assert_eq!(map[&37], "c"); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("push", "append", "put")] . #[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_insert")] . pub fn insert(&mut self, k: K, v: V) -> Option { 6 ( 0.00%) self.base.insert(k, v) 264 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/map.rs:>::insert (1x) . } . . /// Tries to insert a key-value pair into the map, and returns . /// a mutable reference to the value in the entry. . /// . /// If the map already had this key present, nothing is updated, and . /// an error containing the occupied entry, key, and the value is returned. . /// -- line 1342 ---------------------------------------- -- line 1388 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("delete", "take")] . pub fn remove(&mut self, k: &Q) -> Option . where . K: Borrow, . Q: Hash + Eq, . { 1 ( 0.00%) self.base.remove(k) . } . . /// Removes a key from the map, returning the stored key and value if the . /// key was previously in the map. . /// . /// The key may be any borrowed form of the map's key type, but . /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for . /// the key type. -- line 1404 ---------------------------------------- -- line 1431 ---------------------------------------- . where . K: Clone, . V: Clone, . S: Clone, . A: Allocator + Clone, . { . #[inline] . fn clone(&self) -> Self { 14 ( 0.00%) Self { base: self.base.clone() } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . self.base.clone_from(&source.base); . } . } . -- line 1447 ---------------------------------------- -- line 3006 ---------------------------------------- . where . K: Eq + Hash, . S: BuildHasher + Default, . { . /// Constructs a `HashMap` from an iterator of key-value pairs. . /// . /// If the iterator produces any pairs with equal keys, . /// all but one of the corresponding values will be dropped. 33 ( 0.00%) fn from_iter>(iter: T) -> HashMap { . let mut map = HashMap::with_hasher(Default::default()); 30,024 ( 0.00%) map.extend(iter); 154 ( 0.00%) => ???:0x0000000000173dc0 (2x) 79,966 ( 0.00%) map 34 ( 0.00%) } . } . . /// Inserts all new key-values from the iterator and replaces values with existing . /// keys with new values returned from the iterator. . #[stable(feature = "rust1", since = "1.0.0")] . impl Extend<(K, V)> for HashMap . where . K: Eq + Hash, . S: BuildHasher, . A: Allocator, . { . #[inline] . fn extend>(&mut self, iter: T) { 4 ( 0.00%) self.base.extend(iter) 619 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/map.rs:, rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<(&str, std::collections::hash::set::HashSet<&str, rustc_hash::FxBuildHasher>)>>::extend::<[(&str, std::collections::hash::set::HashSet<&str, rustc_hash::FxBuildHasher>); 3]> (1x) . } . . #[inline] . fn extend_one(&mut self, (k, v): (K, V)) { . self.base.insert(k, v); . } . . #[inline] -- line 3040 ---------------------------------------- -- line 3066 ---------------------------------------- . Extend::<(K, V)>::extend_reserve(self, additional) . } . } . . #[inline] . fn map_entry<'a, K: 'a, V: 'a, A: Allocator>( . raw: base::RustcEntry<'a, K, V, A>, . ) -> Entry<'a, K, V, A> { 38 ( 0.00%) match raw { . base::RustcEntry::Occupied(base) => Entry::Occupied(OccupiedEntry { base }), . base::RustcEntry::Vacant(base) => Entry::Vacant(VacantEntry { base }), . } . } . . #[inline] . pub(super) fn map_try_reserve_error(err: hashbrown::TryReserveError) -> TryReserveError { . match err { -- line 3082 ---------------------------------------- 159,887 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . diag.span_suggestion(e.span, "try", suggestion, applicability); . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessParensOnRangeLiterals { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 149,835 ( 0.01%) if let Some(higher::Range { start, end, .. }) = higher::Range::hir(cx, expr) { 1,378,497 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) . if let Some(start) = start { . check_for_parens(cx, start, true); . } . if let Some(end) = end { . check_for_parens(cx, end, false); . } . } . } -- line 87 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_span::symbol::sym; . . use super::VEC_BOX; . 109,868 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . hir_ty: &hir::Ty<'_>, . qpath: &QPath<'tcx>, . def_id: DefId, . box_size_threshold: u64, . ) -> bool { 79,904 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Vec, def_id) 439,472 ( 0.02%) => ???:::is_diagnostic_item (9,988x) . && let Some(last) = last_path_segment(qpath).args . // Get the _ part of Vec<_> . && let Some(GenericArg::Type(ty)) = last.args.first() . // extract allocator from the Vec for later . && let vec_alloc_ty = last.args.get(1) . // ty is now _ at this point . && let TyKind::Path(ref ty_qpath) = ty.kind . && let res = cx.qpath_res(ty_qpath, ty.hir_id) -- line 30 ---------------------------------------- -- line 69 ---------------------------------------- . "try", . format!("Vec<{}>", snippet(cx, boxed_ty.span, "..")), . Applicability::Unspecified, . ); . true . } else { . false . } 79,904 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default_constructed_unit_structs.rs -------------------------------------------------------------------------------- Ir -- line 54 ---------------------------------------- . if let hir::TyKind::Path(ref qpath) = ty.kind { . is_ty_alias(qpath) . } else { . false . } . } . . impl LateLintPass<'_> for DefaultConstructedUnitStructs { 209,769 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 79,910 ( 0.00%) if let ExprKind::Call(fn_expr, &[]) = expr.kind . // make sure we have a call to `Default::default` . && let ExprKind::Path(ref qpath @ hir::QPath::TypeRelative(base, _)) = fn_expr.kind . // make sure this isn't a type alias: . // `::Assoc` cannot be used as a constructor . && !is_alias(*base) . && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) . // make sure we have a struct with no fields (unit struct) -- line 71 ---------------------------------------- -- line 91 ---------------------------------------- . diag.multipart_suggestion( . "remove this call to `default`", . removals, . Applicability::MachineApplicable, . ); . }, . ); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/formatting.rs -------------------------------------------------------------------------------- Ir -- line 141 ---------------------------------------- . POSSIBLE_MISSING_COMMA, . POSSIBLE_MISSING_ELSE, . SUSPICIOUS_ASSIGNMENT_FORMATTING, . SUSPICIOUS_ELSE_FORMATTING, . SUSPICIOUS_UNARY_OP_FORMATTING, . ]); . . impl EarlyLintPass for Formatting { 8 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . for w in block.stmts.windows(2) { . if let (StmtKind::Expr(first), StmtKind::Expr(second) | StmtKind::Semi(second)) = (&w[0].kind, &w[1].kind) { . check_missing_else(cx, first, second); . } . } 8 ( 0.00%) } . 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . check_assign(cx, expr); . check_unop(cx, expr); . check_else(cx, expr); . check_array(cx, expr); 239,728 ( 0.01%) } . } . . /// Implementation of the `SUSPICIOUS_ASSIGNMENT_FORMATTING` lint. . fn check_assign(cx: &EarlyContext<'_>, expr: &Expr) { 89,898 ( 0.00%) if let ExprKind::Assign(ref lhs, ref rhs, _) = expr.kind . && !lhs.span.from_expansion() . && !rhs.span.from_expansion() . { . let eq_span = lhs.span.between(rhs.span); . if let ExprKind::Unary(op, ref sub_rhs) = rhs.kind . && let Some(eq_snippet) = snippet_opt(cx, eq_span) . { . let op = op.as_str(); -- line 175 ---------------------------------------- -- line 188 ---------------------------------------- . ); . } . } . } . } . . /// Implementation of the `SUSPICIOUS_UNARY_OP_FORMATTING` lint. . fn check_unop(cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Binary(ref binop, ref lhs, ref rhs) = expr.kind . && !lhs.span.from_expansion() && !rhs.span.from_expansion() . // span between BinOp LHS and RHS . && let binop_span = lhs.span.between(rhs.span) . // if RHS is an UnOp . && let ExprKind::Unary(op, ref un_rhs) = rhs.kind . // from UnOp operator to UnOp operand . && let unop_operand_span = rhs.span.until(un_rhs.span) . && let Some(binop_snippet) = snippet_opt(cx, binop_span) -- line 204 ---------------------------------------- -- line 220 ---------------------------------------- . None, . format!("put a space between `{binop_str}` and `{unop_str}` and remove the space after `{unop_str}`"), . ); . } . } . . /// Implementation of the `SUSPICIOUS_ELSE_FORMATTING` lint for weird `else`. . fn check_else(cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::If(_, then, Some(else_)) = &expr.kind . && (is_block(else_) || is_if(else_)) . && !then.span.from_expansion() && !else_.span.from_expansion() . && !expr.span.in_external_macro(cx.sess().source_map()) . . // workaround for rust-lang/rust#43081 . && expr.span.lo().0 != 0 && expr.span.hi().0 != 0 . . // this will be a span from the closing ‘}’ of the “then” block (excluding) to -- line 236 ---------------------------------------- -- line 282 ---------------------------------------- . } . . fn indentation(cx: &EarlyContext<'_>, span: Span) -> usize { . cx.sess().source_map().lookup_char_pos(span.lo()).col.0 . } . . /// Implementation of the `POSSIBLE_MISSING_COMMA` lint for array . fn check_array(cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::Array(ref array) = expr.kind { . for element in array { . if let ExprKind::Binary(ref op, ref lhs, _) = element.kind . && has_unary_equivalent(op.node) . && lhs.span.eq_ctxt(op.span) . && let space_span = lhs.span.between(op.span) . && let Some(space_snippet) = snippet_opt(cx, space_span) . && let lint_span = lhs.span.with_lo(lhs.span.hi()) . && space_snippet.contains('\n') -- line 298 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs -------------------------------------------------------------------------------- Ir -- line 852 ---------------------------------------- . Self { . msrv: conf.msrv.into(), . enforce_iter_loop_reborrow: conf.enforce_iter_loop_reborrow, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Loops { 329,637 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) let for_loop = higher::ForLoop::hir(expr); 449,505 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (29,967x) 29,967 ( 0.00%) if let Some(higher::ForLoop { . pat, . arg, . body, . loop_id, . span, . label, 59,934 ( 0.00%) }) = for_loop . { . // we don't want to check expanded macros . // this check is not at the top of the function . // since higher::for_loop expressions are marked as expansions . if body.span.from_expansion() { . return; . } . self.check_for_loop(cx, pat, arg, body, expr, span, label); . if let ExprKind::Block(block, _) = body.kind { . never_loop::check(cx, block, loop_id, span, for_loop.as_ref()); . } . } . . // we don't want to check expanded macros 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } . . // check for never_loop 89,901 ( 0.00%) if let ExprKind::Loop(block, ..) = expr.kind { . never_loop::check(cx, block, expr.hir_id, expr.span, None); . } . . // check for `loop { if let {} else break }` that could be `while let` . // (also matches an explicit "match" instead of "if let") . // (even if the "match" or "if let" is used for declaration) . // (also matches on `let {} else break`) . if let ExprKind::Loop(block, label, LoopSource::Loop, _) = expr.kind { . // also check for empty `loop {}` statements, skipping those in #[panic_handler] . empty_loop::check(cx, expr, block); . while_let_loop::check(cx, expr, block); . infinite_loop::check(cx, expr, block, label); . } . 59,934 ( 0.00%) while_let_on_iterator::check(cx, expr); 509,439 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::check (29,967x) . . if let Some(higher::While { . condition, body, span, .. . }) = higher::While::hir(expr) . { . while_immutable_condition::check(cx, condition, body); . while_float::check(cx, condition); . missing_spin_loop::check(cx, condition, body); . manual_while_let_some::check(cx, condition, body, span); . } . 59,934 ( 0.00%) if let ExprKind::MethodCall(path, recv, args, _) = expr.kind { . let name = path.ident.name; . . let is_iterator_method = || { . cx.ty_based_def(expr) . .assoc_fn_parent(cx) . .is_diag_item(cx, sym::Iterator) . }; . -- line 924 ---------------------------------------- -- line 947 ---------------------------------------- . { . never_loop::check_iterator_reduction(cx, expr, recv, closure); . } . }, . . _ => {}, . } . } 239,736 ( 0.01%) } . } . . impl Loops { . #[expect(clippy::too_many_arguments)] . fn check_for_loop<'tcx>( . &self, . cx: &LateContext<'tcx>, . pat: &'tcx Pat<'_>, -- line 963 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . . pub struct RawStrings { . pub allow_one_hash_in_raw_strings: bool, . } . . impl RawStrings { . pub fn new(conf: &'static Conf) -> Self { . Self { 1 ( 0.00%) allow_one_hash_in_raw_strings: conf.allow_one_hash_in_raw_strings, . } . } . } . . impl EarlyLintPass for RawStrings { 269,694 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 129,854 ( 0.00%) if let ExprKind::FormatArgs(format_args) = &expr.kind . && !format_args.span.in_external_macro(cx.sess().source_map()) . && format_args.span.check_text(cx, |src| src.starts_with('r')) . && let Some(str) = snippet_opt(cx.sess(), format_args.span) . && let count_hash = str.bytes().skip(1).take_while(|b| *b == b'#').count() . && let Some(str) = str.get(count_hash + 2..str.len() - count_hash - 1) . { . self.check_raw_string( . cx, -- line 83 ---------------------------------------- -- line 84 ---------------------------------------- . str, . format_args.span, . "r", . u8::try_from(count_hash).unwrap(), . "string", . ); . } . 39,952 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 49,940 ( 0.00%) && let (prefix, max) = match lit.kind { . LitKind::StrRaw(max) => ("r", max), . LitKind::ByteStrRaw(max) => ("br", max), . LitKind::CStrRaw(max) => ("cr", max), . _ => return, . } . && !expr.span.in_external_macro(cx.sess().source_map()) . && expr.span.check_text(cx, |src| src.starts_with(prefix)) . { . self.check_raw_string(cx, lit.symbol.as_str(), expr.span, prefix, max, lit.kind.descr()); . } 239,728 ( 0.01%) } . } . . impl RawStrings { . fn check_raw_string(&self, cx: &EarlyContext<'_>, str: &str, lit_span: Span, prefix: &str, max: u8, descr: &str) { . if !str.contains(['\\', '"']) { . span_lint_and_then( . cx, . NEEDLESS_RAW_STRINGS, -- line 112 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs -------------------------------------------------------------------------------- Ir -- line 378 ---------------------------------------- . /// . /// For more details, see the equivalent method on a raw pointer, [`pointer::map_addr`]. . /// . /// This is a [Strict Provenance][crate::ptr#strict-provenance] API. . #[must_use] . #[inline] . #[stable(feature = "strict_provenance", since = "1.84.0")] . pub fn map_addr(self, f: impl FnOnce(NonZero) -> NonZero) -> Self { 2 ( 0.00%) self.with_addr(f(self.addr())) . } . . /// Acquires the underlying `*mut` pointer. . /// . /// # Examples . /// . /// ``` . /// use std::ptr::NonNull; -- line 394 ---------------------------------------- -- line 446 ---------------------------------------- . #[stable(feature = "nonnull", since = "1.25.0")] . #[rustc_const_stable(feature = "const_nonnull_as_ref", since = "1.73.0")] . #[must_use] . #[inline(always)] . pub const unsafe fn as_ref<'a>(&self) -> &'a T { . // SAFETY: the caller must guarantee that `self` meets all the . // requirements for a reference. . // `cast_const` avoids a mutable raw pointer deref. 289,773 ( 0.01%) unsafe { &*self.as_ptr().cast_const() } . } . . /// Returns a unique reference to the value. If the value may be uninitialized, [`as_uninit_mut`] . /// must be used instead. . /// . /// For the shared counterpart see [`as_ref`]. . /// . /// [`as_uninit_mut`]: NonNull::as_uninit_mut -- line 462 ---------------------------------------- -- line 619 ---------------------------------------- . pub const unsafe fn add(self, count: usize) -> Self . where . T: Sized, . { . // SAFETY: the caller must uphold the safety contract for `offset`. . // Additionally safety contract of `offset` guarantees that the resulting pointer is . // pointing to an allocation, there can't be an allocation at null, thus it's safe to . // construct `NonNull`. 50,127 ( 0.00%) unsafe { transmute(intrinsics::offset(self.as_ptr(), count)) } . } . . /// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`). . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`add`][NonNull::add] on it. See that method for documentation -- line 635 ---------------------------------------- -- line 1655 ---------------------------------------- . #[stable(feature = "nonnull", since = "1.25.0")] . impl Eq for NonNull {} . . #[stable(feature = "nonnull", since = "1.25.0")] . impl PartialEq for NonNull { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn eq(&self, other: &Self) -> bool { 1,473,124 ( 0.05%) self.as_ptr() == other.as_ptr() . } . } . . #[stable(feature = "nonnull", since = "1.25.0")] . impl Ord for NonNull { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn cmp(&self, other: &Self) -> Ordering { -- line 1671 ---------------------------------------- 20,090 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs -------------------------------------------------------------------------------- Ir -- line 54 ---------------------------------------- . . span_lint_and_sugg(cx, BORROW_AS_PTR, span, "borrow as raw pointer", "try", suggestion, app); . return true; . } . false . } . . /// Check for an implicit cast from reference to raw pointer outside an explicit `as`. 119,868 ( 0.00%) pub(super) fn check_implicit_cast<'cx>(cx: &LateContext<'cx>, expr: &Expr<'cx>) { 89,901 ( 0.00%) if !expr.span.from_expansion() . && let ExprKind::AddrOf(BorrowKind::Ref, _, pointee) = expr.kind . && !matches!(get_parent_expr(cx, expr).map(|e| e.kind), Some(ExprKind::Cast(..))) . && let [deref, borrow] = cx.typeck_results().expr_adjustments(expr) . && matches!(deref.kind, Adjust::Deref(..)) . && let Adjust::Borrow(AutoBorrow::RawPtr(mutability)) = borrow.kind . // Do not suggest taking a raw pointer to a temporary value . && !is_expr_temporary_value(cx, pointee) . && !is_from_proc_macro(cx, expr) -- line 71 ---------------------------------------- -- line 74 ---------------------------------------- . diag.span_suggestion_verbose( . expr.span.until(pointee.span), . "use a raw pointer instead", . format!("&raw {} ", mutability.ptr_str()), . Applicability::MachineApplicable, . ); . }); . } 149,835 ( 0.01%) } 59,934 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/replace_box.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . #[clippy::version = "1.92.0"] . pub REPLACE_BOX, . perf, . "assigning a newly created box to `Box` is inefficient" . } . . impl_lint_pass!(ReplaceBox => [REPLACE_BOX]); . 5 ( 0.00%) #[derive(Default)] . pub struct ReplaceBox { . consumed_locals: FxHashSet, . loaded_bodies: SmallVec<[BodyId; 2]>, . } . . impl ReplaceBox { . fn get_consumed_locals(&mut self, cx: &LateContext<'_>) -> &FxHashSet { . if let Some(body_id) = cx.enclosing_body -- line 53 ---------------------------------------- -- line 66 ---------------------------------------- . } . . &self.consumed_locals . } . } . . impl LateLintPass<'_> for ReplaceBox { . fn check_body_post(&mut self, _: &LateContext<'_>, body: &Body<'_>) { 19,978 ( 0.00%) if self.loaded_bodies.first().is_some_and(|&x| x == body.id()) { . self.consumed_locals.clear(); . self.loaded_bodies.clear(); . } . } . 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = &expr.kind . && !lhs.span.from_expansion() . && !rhs.span.from_expansion() . && let lhs_ty = cx.typeck_results().expr_ty(lhs) . && let Some(inner_ty) = lhs_ty.boxed_ty() . // No diagnostic for late-initialized locals . && lhs.res_local_id().is_none_or(|local| local_is_initialized(cx, local)) . // No diagnostic if this is a local that has been moved, or the field . // of a local that has been moved, or several chained field accesses of a local -- line 89 ---------------------------------------- -- line 132 ---------------------------------------- . expr.span, . "replace existing content with inner value instead", . suggestion, . app, . ); . }); . } . } 239,736 ( 0.01%) } . } . . fn is_default_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . matches!(expr.kind, ExprKind::Call(func, _args) if is_default_equivalent_call(cx, func, Some(expr))) . } . . fn get_box_new_payload<'tcx>(cx: &LateContext<'_>, expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::Call(box_new, [arg]) = expr.kind -- line 148 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs -------------------------------------------------------------------------------- Ir -- line 118 ---------------------------------------- . return true; . } . inner = i; . } . false . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessBool { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use self::Expression::{Bool, RetBool}; 59,934 ( 0.00%) if !e.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: Some(else_expr), . }) = higher::If::hir(e) . && !span_contains_comment(cx, e.span) . { . let reduce = |ret, not| { -- line 136 ---------------------------------------- -- line 214 ---------------------------------------- . e.span, . "this if-then-else expression assigns a bool literal", . "you can reduce it to", . sugg, . applicability, . ); . } . } 239,736 ( 0.01%) } . 7 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . // Detect the early-return form: . // if c { . // return Ok(true); . // } . // Ok(false) . // and reduce it to `Ok(c)`. The optional `Ok(..)` wrapper can be any tuple-like . // constructor (or absent), as long as the guard and the trailing expression use the . // same one. Constructors are pure, so folding the condition in keeps the behavior. 3 ( 0.00%) if let Some(tail) = block.expr 2 ( 0.00%) && !tail.span.from_expansion() 3 ( 0.00%) && let [.., last_stmt] = block.stmts . && let StmtKind::Semi(if_expr) | StmtKind::Expr(if_expr) = last_stmt.kind . && !if_expr.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: None, . }) = higher::If::hir(if_expr) . && let ExprKind::Ret(Some(ret)) = peel_blocks_with_stmt(then).kind -- line 243 ---------------------------------------- -- line 274 ---------------------------------------- . NEEDLESS_BOOL, . span, . "this `if` guard returns a bool literal and is followed by another", . "you can reduce it to", . sugg, . applicability, . ); . } 8 ( 0.00%) } . } . . /// Returns the optional constructor call wrapping a bool literal (e.g. the `Ok` in `Ok(true)`) . /// along with the bool value. The constructor is returned as the unresolved callee expression; . /// resolving it to a `DefId` (via [`wrapper_ctors_match`]) needs `qpath_res`, which is . /// comparatively expensive, so callers should only do that once the cheap bool-value comparison . /// has passed. A bare bool literal yields `None`. . fn fetch_bool_and_wrapper<'tcx>(expr: &'tcx Expr<'tcx>) -> Option<(Option<&'tcx Expr<'tcx>>, bool)> { -- line 290 ---------------------------------------- 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/mod.rs -------------------------------------------------------------------------------- Ir -- line 174 ---------------------------------------- . . pub struct CopyAndPaste<'tcx> { . interior_mut: InteriorMut<'tcx>, . } . . impl<'tcx> CopyAndPaste<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf) -> Self { . Self { 4 ( 0.00%) interior_mut: InteriorMut::new(tcx, &conf.ignore_interior_mutability), 13,442 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::new (1x) . } . } . } . . impl<'tcx> LateLintPass<'tcx> for CopyAndPaste<'tcx> { 269,703 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if expr.span.from_expansion() { . return; . } 149,835 ( 0.01%) if matches!(expr.kind, ExprKind::If(..)) && !is_else_clause(cx.tcx, expr) { . let (conds, blocks) = if_sequence(expr); . ifs_same_cond::check(cx, &conds, &mut self.interior_mut); . same_functions_in_if_cond::check(cx, &conds); . let all_same = . !is_lint_allowed(cx, IF_SAME_THEN_ELSE, expr.hir_id) && if_same_then_else::check(cx, &conds, &blocks); . if !all_same && conds.len() != blocks.len() { . branches_sharing_code::check(cx, &conds, &blocks, expr); . } . } else if let ExprKind::Match(_, arms, _) = expr.kind { . branches_sharing_code::check_match(cx, expr, arms); . } 239,736 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_else.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . style, . "empty else branch" . } . . declare_lint_pass!(NeedlessElse => [NEEDLESS_ELSE]); . . impl EarlyLintPass for NeedlessElse { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 59,932 ( 0.00%) if let ExprKind::If(_, then_block, Some(else_clause)) = &expr.kind . && let ExprKind::Block(block, _) = &else_clause.kind . && !expr.span.from_expansion() . && !else_clause.span.from_expansion() . && block.stmts.is_empty() . && let range = (then_block.span.hi()..expr.span.hi()).trim_start(cx) . && range.clone().check_text(cx, |src| { . // Ignore else blocks that contain comments or #[cfg]s . !src.contains(['/', '#']) -- line 48 ---------------------------------------- -- line 53 ---------------------------------------- . NEEDLESS_ELSE, . range.with_ctxt(expr.span.ctxt()), . "this `else` branch is empty", . "you can remove it", . String::new(), . Applicability::MachineApplicable, . ); . } 29,966 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . * Return statement . * A body's value (single line closure) . * . * What do we not match: . * Implicit calls to `from(..)` on the error value . */ . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Ret(Some(e)) = expr.kind { . check(cx, e); . } . } . . fn check_body(&mut self, cx: &LateContext<'_>, body: &'_ Body<'_>) { 19,981 ( 0.00%) if let ExprKind::Block( . Block { . expr: . Some(Expr { . kind: ExprKind::DropTemps(async_body), . .. . }), . .. . }, . _, 9,992 ( 0.00%) ) = body.value.kind . { . if let ExprKind::Block(Block { expr: Some(expr), .. }, ..) = async_body.kind { . check(cx, expr.peel_blocks()); . } . } else { . check(cx, body.value.peel_blocks()); . } . } . } . . fn check(cx: &LateContext<'_>, expr: &Expr<'_>) { 49,942 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 39,952 ( 0.00%) && let Res::Def(DefKind::Ctor(..), ctor_id) = path.res(cx) . && let Some(variant_id) = cx.tcx.opt_parent(ctor_id) . && let variant = if cx.tcx.lang_items().option_some_variant() == Some(variant_id) { . "Some" . } else if cx.tcx.lang_items().result_ok_variant() == Some(variant_id) { . "Ok" . } else { . return; . } -- line 105 ---------------------------------------- -- line 128 ---------------------------------------- . String::new(), . ), . ], . Applicability::MachineApplicable, . ); . }, . ); . } 9,989 ( 0.00%) } 79,904 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . . impl ManualBits { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualBits { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::Binary(bin_op, left_expr, right_expr) = expr.kind . && let BinOpKind::Mul = &bin_op.node . && !expr.span.from_expansion() . && let ctxt = expr.span.ctxt() . && left_expr.span.ctxt() == ctxt . && right_expr.span.ctxt() == ctxt . && let Some((real_ty_span, resolved_ty, other_expr)) = get_one_size_of_ty(cx, left_expr, right_expr) . && matches!(resolved_ty.kind(), ty::Int(_) | ty::Uint(_)) . && let ExprKind::Lit(lit) = &other_expr.kind -- line 59 ---------------------------------------- -- line 69 ---------------------------------------- . MANUAL_BITS, . expr.span, . "usage of `size_of::()` to obtain the size of `T` in bits", . "consider using", . sugg, . app, . ); . } 239,736 ( 0.01%) } . } . . fn get_one_size_of_ty<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'_>, . expr2: &'tcx Expr<'_>, . ) -> Option<(Span, Ty<'tcx>, &'tcx Expr<'tcx>)> { . match (get_size_of_ty(cx, expr1), get_size_of_ty(cx, expr2)) { -- line 85 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unused_rounding.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . pub UNUSED_ROUNDING, . nursery, . "Uselessly rounding a whole number floating-point literal" . } . . declare_lint_pass!(UnusedRounding => [UNUSED_ROUNDING]); . . fn is_useless_rounding(cx: &EarlyContext<'_>, expr: &Expr) -> Option<(Symbol, String)> { 59,932 ( 0.00%) if let ExprKind::MethodCall(MethodCall { . seg: name_ident, . receiver, . .. . }) = &expr.kind . && let method_name = name_ident.ident.name . && matches!(method_name, sym::ceil | sym::floor | sym::round) . && let ExprKind::Lit(token_lit) = &receiver.kind . && token_lit.is_semantic_float() -- line 45 ---------------------------------------- -- line 48 ---------------------------------------- . { . Some((method_name, snippet(cx, receiver.span, "..").into())) . } else { . None . } . } . . impl EarlyLintPass for UnusedRounding { 209,762 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . if let Some((method_name, float)) = is_useless_rounding(cx, expr) { . span_lint_and_sugg( . cx, . UNUSED_ROUNDING, . expr.span, . format!("used the `{method_name}` method with a whole number float"), . format!("remove the `{method_name}` method call"), . float, . Applicability::MachineApplicable, . ); . } 239,728 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . sym::add, . sym::wrapping_add, . sym::sub, . sym::wrapping_sub, . sym::offset, . sym::wrapping_offset, . ]; . 189,787 ( 0.01%) if let ExprKind::Call(func, [.., count]) = expr.kind . // Find calls to ptr::{copy, copy_nonoverlapping} . // and ptr::swap_nonoverlapping, 29,964 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 49,940 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 129,844 ( 0.00%) && matches!(cx.tcx.get_diagnostic_name(def_id), Some( 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . sym::ptr_copy . | sym::ptr_copy_nonoverlapping . | sym::ptr_slice_from_raw_parts . | sym::ptr_slice_from_raw_parts_mut . | sym::ptr_swap_nonoverlapping . | sym::slice_from_raw_parts . | sym::slice_from_raw_parts_mut . )) -- line 92 ---------------------------------------- -- line 106 ---------------------------------------- . cx.typeck_results().expr_ty(ptr_self).kind() . { . return Some((*pointee_ty, count)); . } . None . } . . impl<'tcx> LateLintPass<'tcx> for SizeOfInElementCount { 179,802 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . const HELP_MSG: &str = "use a count of elements instead of a count of bytes\ . , it already gets multiplied by the size of the type"; . . const LINT_MSG: &str = "found a count of bytes \ . instead of a count of elements of `T`"; . . if let Some((pointee_ty, count_expr)) = get_pointee_ty_and_count_expr(cx, expr) . // Using a number of bytes for a byte type isn't suspicious -- line 122 ---------------------------------------- -- line 126 ---------------------------------------- . . // Find a size_of call in the count parameter expression and . // check that it's the same type . && let Some(ty_used_for_size_of) = get_size_of_ty(cx, count_expr, false) . && pointee_ty == ty_used_for_size_of . { . span_lint_and_help(cx, SIZE_OF_IN_ELEMENT_COUNT, count_expr.span, LINT_MSG, None, HELP_MSG); . } 179,802 ( 0.01%) } . } 19,976 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs -------------------------------------------------------------------------------- Ir -- line 454 ---------------------------------------- . /// let mut vec: Vec = Vec::new(); . /// ``` . #[inline] . #[rustc_const_stable(feature = "const_vec_new", since = "1.39.0")] . #[rustc_diagnostic_item = "vec_new"] . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub const fn new() -> Self { 249,926 ( 0.01%) Vec { buf: RawVec::new(), len: 0 } . } . . /// Constructs a new, empty `Vec` with at least the specified capacity. . /// . /// The vector will be able to hold at least `capacity` elements without . /// reallocating. This method is allowed to allocate for more elements than . /// `capacity`. If `capacity` is zero, the vector will not allocate. . /// -- line 470 ---------------------------------------- -- line 961 ---------------------------------------- . /// // A vector of a zero-sized type will always over-allocate, since no . /// // allocation is necessary . /// let vec_units = Vec::<(), System>::with_capacity_in(10, System); . /// assert_eq!(vec_units.capacity(), usize::MAX); . /// ``` . #[inline] . #[unstable(feature = "allocator_api", issue = "32838")] . pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { 139,938 ( 0.00%) Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } . } . . /// Appends an element to the back of a collection. . /// . /// # Panics . /// . /// Panics if the new capacity exceeds `isize::MAX` _bytes_. . /// -- line 977 ---------------------------------------- -- line 1021 ---------------------------------------- . /// capacity after the push, *O*(*capacity*) time is taken to copy the . /// vector's elements to a larger allocation. This expensive operation is . /// offset by the *capacity* *O*(1) insertions it allows. . #[inline] . #[stable(feature = "push_mut", since = "1.95.0")] . #[must_use = "if you don't need a reference to the value, use `Vec::push` instead"] . pub fn push_mut(&mut self, value: T) -> &mut T { . // Inform codegen that the length does not change across grow_one(). 21,360 ( 0.00%) let len = self.len; . // This will panic or abort if we would allocate > isize::MAX bytes . // or if the length increment would overflow for zero-sized types. 43,053 ( 0.00%) if len == self.buf.capacity() { 261 ( 0.00%) self.buf.grow_one(); 14,957 ( 0.00%) => ???:>::grow_one (60x) . } . unsafe { . let end = self.as_mut_ptr().add(len); . ptr::write(end, value); 43,233 ( 0.00%) self.len = len + 1; . // SAFETY: We just wrote a value to the pointer that will live the lifetime of the reference. . &mut *end . } . } . } . . impl Vec { . /// Constructs a new, empty `Vec`. -- line 1046 ---------------------------------------- -- line 1188 ---------------------------------------- . capacity: usize, . alloc: A, . ) -> Self { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::from_raw_parts_in requires that length <= capacity", . (length: usize = length, capacity: usize = capacity) => length <= capacity . ); 957 ( 0.00%) unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } . } . . #[doc(alias = "from_non_null_parts_in")] . /// Creates a `Vec` directly from a `NonNull` pointer, a length, a capacity, . /// and an allocator. . /// . /// # Safety . /// -- line 1204 ---------------------------------------- -- line 1453 ---------------------------------------- . /// let mut vec = vec![1]; . /// vec.reserve(10); . /// assert!(vec.capacity() >= 11); . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_reserve"] . pub fn reserve(&mut self, additional: usize) { 16 ( 0.00%) self.buf.reserve(self.len, additional); . } . . /// Reserves the minimum capacity for at least `additional` more elements to . /// be inserted in the given `Vec`. Unlike [`reserve`], this will not . /// deliberately over-allocate to speculatively avoid frequent allocations. . /// After calling `reserve_exact`, capacity will be greater than or equal to . /// `self.len() + additional`. Does nothing if the capacity is already . /// sufficient. -- line 1469 ---------------------------------------- -- line 1590 ---------------------------------------- . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn shrink_to_fit(&mut self) { . // The capacity is never less than the length, and there's nothing to do when . // they are equal, so we can avoid the panic case in `RawVec::shrink_to_fit` . // by only calling it with a greater capacity. 3 ( 0.00%) if self.capacity() > self.len { . self.buf.shrink_to_fit(self.len); . } . } . . /// Shrinks the capacity of the vector with a lower bound. . /// . /// The capacity will remain at least as large as both the length . /// and the supplied value. -- line 1606 ---------------------------------------- -- line 1857 ---------------------------------------- . // * obeys size and address-wrapping constraints . // . // * We only construct `&mut` references to `self.buf` through `&mut self` methods; borrow- . // check ensures that it is not possible to mutably alias `self.buf` within the . // returned lifetime. . unsafe { . // normally this would use `slice::from_raw_parts`, but it's . // instantiated often enough that avoiding the UB check is worth it 300,381 ( 0.01%) &*core::intrinsics::aggregate_raw_ptr::<*const [T], _, _>(self.as_ptr(), self.len) . } . } . . /// Extracts a mutable slice of the entire vector. . /// . /// Equivalent to `&mut s[..]`. . /// . /// # Examples -- line 1873 ---------------------------------------- -- line 1896 ---------------------------------------- . // * obeys size and address-wrapping constraints . // . // * We only construct references to `self.buf` through `&self` and `&mut self` methods; . // borrow-check ensures that it is not possible to construct a reference to `self.buf` . // within the returned lifetime. . unsafe { . // normally this would use `slice::from_raw_parts_mut`, but it's . // instantiated often enough that avoiding the UB check is worth it 49,962 ( 0.00%) &mut *core::intrinsics::aggregate_raw_ptr::<*mut [T], _, _>(self.as_mut_ptr(), self.len) . } . } . . /// Returns a raw pointer to the vector's buffer, or a dangling raw pointer . /// valid for zero sized reads if the vector didn't allocate. . /// . /// The caller must ensure that the vector outlives the pointer this . /// function returns, or else it will end up dangling. -- line 1912 ---------------------------------------- -- line 2216 ---------------------------------------- . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . pub const unsafe fn set_len(&mut self, new_len: usize) { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::set_len requires that new_len <= capacity()", . (new_len: usize = new_len, capacity: usize = self.capacity()) => new_len <= capacity . ); . 10,062 ( 0.00%) self.len = new_len; . } . . /// Removes an element from the vector and returns it. . /// . /// The removed element is replaced by the last element of the vector. . /// . /// This does not preserve ordering of the remaining elements, but is *O*(1). . /// If you need to preserve the element order, use [`remove`] instead. -- line 2232 ---------------------------------------- -- line 2505 ---------------------------------------- . /// ``` . #[stable(feature = "vec_retain_mut", since = "1.61.0")] . pub fn retain_mut(&mut self, mut f: F) . where . F: FnMut(&mut T) -> bool, . { . let original_len = self.len(); . 4 ( 0.00%) if original_len == 0 { . // Empty case: explicit return allows better optimization, vs letting compiler infer it . return; . } . . // Vec: [Kept, Kept, Hole, Hole, Hole, Hole, Unchecked, Unchecked] . // | ^- write ^- read | . // |<- original_len ->| . // Kept: Elements which predicate returns true on. -- line 2521 ---------------------------------------- -- line 2865 ---------------------------------------- . /// . /// # Time complexity . /// . /// Takes *O*(1) time. . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_pop"] . pub fn pop(&mut self) -> Option { 59,952 ( 0.00%) if self.len == 0 { . None . } else { . unsafe { 39,969 ( 0.00%) self.len -= 1; . core::hint::assert_unchecked(self.len < self.capacity()); . Some(ptr::read(self.as_ptr().add(self.len()))) . } . } . } . . /// Removes and returns the last element from a vector if the predicate . /// returns `true`, or [`None`] if the predicate returns false or the vector -- line 2885 ---------------------------------------- -- line 2973 ---------------------------------------- . Ok(()) . } . . /// Appends elements to `self` from other buffer without reserving additional capacity. . #[inline] . unsafe fn append_elements_unreserved(&mut self, other: *const [T]) { . let count = other.len(); . let len = self.len(); 6 ( 0.00%) if count > 0 { . unsafe { . ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) . }; . } 574 ( 0.00%) self.len += count; . } . . /// Removes the subslice indicated by the given range from the vector, . /// returning a double-ended iterator over the removed subslice. . /// . /// If the iterator is dropped before being fully consumed, . /// it drops the remaining removed elements. . /// -- line 2994 ---------------------------------------- -- line 3074 ---------------------------------------- . . // SAFETY: . // - `elems` comes directly from `as_mut_slice` and is therefore valid. . // - Setting `self.len` before calling `drop_in_place` means that, . // if an element's `Drop` impl panics, the vector's `Drop` impl will . // do nothing (leaking the rest of the elements) instead of dropping . // some twice. . unsafe { 2 ( 0.00%) self.len = 0; . ptr::drop_in_place(elems); . } . } . . /// Returns the number of elements in the vector, also referred to . /// as its 'length'. . /// . /// # Examples -- line 3090 ---------------------------------------- -- line 3093 ---------------------------------------- . /// let a = vec![1, 2, 3]; . /// assert_eq!(a.len(), 3); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")] . #[rustc_confusables("length", "size")] . pub const fn len(&self) -> usize { 20,059 ( 0.00%) let len = self.len; . . // SAFETY: The maximum capacity of `Vec` is `isize::MAX` bytes, so the maximum value can . // be returned is `usize::checked_div(size_of::()).unwrap_or(usize::MAX)`, which . // matches the definition of `T::MAX_SLICE_LEN`. . unsafe { intrinsics::assume(len <= T::MAX_SLICE_LEN) }; . . len . } -- line 3109 ---------------------------------------- -- line 3118 ---------------------------------------- . /// . /// v.push(1); . /// assert!(!v.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_is_empty"] . #[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")] . pub const fn is_empty(&self) -> bool { 20,004 ( 0.00%) self.len() == 0 . } . . /// Splits the collection into two at the given index. . /// . /// Returns a newly allocated vector containing the elements in the range . /// `[at, len)`. After the call, the original vector will be left containing . /// the elements `[0, at)` with its previous capacity unchanged. . /// -- line 3134 ---------------------------------------- -- line 3868 ---------------------------------------- . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl Clone for Vec { . /// Creates a new `Vec` by deep-copying the contents of an existing `Vec`. . /// . /// This method will allocate a new `Vec` and `clone` all of `self`'s contents . /// into it. The capacity of the duplicate `Vec` is not forced to match the . /// capacity of the original. 69,944 ( 0.00%) fn clone(&self) -> Self { . let alloc = self.allocator().clone(); 2 ( 0.00%) <[T]>::to_vec_in(&**self, alloc) 89,926 ( 0.00%) } . . /// Overwrites the contents of `self` with a clone of the contents of `source`. . /// . /// This method is preferred over simply assigning `source.clone()` to `self`, . /// as it avoids reallocation if possible. Additionally, if the element type . /// `T` overrides `clone_from()`, this will reuse the resources of `self`'s . /// elements as well. . /// -- line 3887 ---------------------------------------- -- line 3988 ---------------------------------------- . /// LONG_LIVED.lock().unwrap().push(result); . /// } . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl FromIterator for Vec { . #[inline] . fn from_iter>(iter: I) -> Vec { 9,994 ( 0.00%) >::from_iter(iter.into_iter()) 479,725 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter (9,994x) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl IntoIterator for Vec { . type Item = T; . type IntoIter = IntoIter; . -- line 4004 ---------------------------------------- -- line 4026 ---------------------------------------- . let buf = me.buf.non_null(); . let begin = buf.as_ptr(); . let end = if T::IS_ZST { . begin.wrapping_byte_add(me.len()) . } else { . begin.add(me.len()) as *const T . }; . let cap = me.buf.capacity(); 7 ( 0.00%) IntoIter { buf, phantom: PhantomData, cap, alloc, ptr: buf, end } . } . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl<'a, T, A: Allocator> IntoIterator for &'a Vec { . type Item = &'a T; . type IntoIter = slice::Iter<'a, T>; -- line 4042 ---------------------------------------- -- line 4056 ---------------------------------------- . } . } . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl Extend for Vec { . #[inline] . fn extend>(&mut self, iter: I) { 1 ( 0.00%) >::spec_extend(self, iter.into_iter()) 4,546 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs: as alloc::vec::spec_extend::SpecExtend>>::spec_extend (1x) . } . . #[inline] . fn extend_one(&mut self, item: T) { . self.push(item); . } . . #[inline] -- line 4072 ---------------------------------------- -- line 4092 ---------------------------------------- . fn extend_desugared>(&mut self, mut iterator: I) { . // This is the case for a general iterator. . // . // This function should be the moral equivalent of: . // . // for item in iterator { . // self.push(item); . // } 270 ( 0.00%) while let Some(element) = iterator.next() { 2,135 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml_parser-1.1.2+spec-1.1.0/src/lexer/mod.rs:::next (29x) . let len = self.len(); 76 ( 0.00%) if len == self.capacity() { . let (lower, _) = iterator.size_hint(); . self.reserve(lower.saturating_add(1)); . } . unsafe { . ptr::write(self.as_mut_ptr().add(len), element); . // Since next() executes user code which can panic we have to bump the length . // after each step. . // NB can't overflow since we would have had to alloc the address space 38 ( 0.00%) self.set_len(len + 1); . } . } . } . . // specific extend for `TrustedLen` iterators, called both by the specializations . // and internal places where resolving specialization makes compilation slower . #[cfg(not(no_global_oom_handling))] . fn extend_trusted(&mut self, iterator: impl iter::TrustedLen) { -- line 4119 ---------------------------------------- -- line 4345 ---------------------------------------- . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe impl<#[may_dangle] T: [const] Destruct, A: [const] Allocator + [const] Destruct> Drop . for Vec . { 35 ( 0.00%) fn drop(&mut self) { . unsafe { . // use drop for [T] . // use a raw slice to refer to the elements of the vector as weakest necessary type; . // could avoid questions of validity in certain cases 10,030 ( 0.00%) self.as_mut_ptr().cast_slice(self.len).drop_in_place() . } . // RawVec handles deallocation 42 ( 0.00%) } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_default", issue = "143894")] . const impl Default for Vec { . /// Creates an empty `Vec`. . /// . /// The vector will not allocate until elements are pushed onto it. -- line 4369 ---------------------------------------- 61,214 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_checked_ops.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . . #[derive(Copy, Clone)] . enum NonZeroBranch { . Then, . Else, . } . . impl LateLintPass<'_> for ManualCheckedOps { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 59,934 ( 0.00%) if let ExprKind::If(cond, then, r#else) = expr.kind . && !expr.span.from_expansion() . && let Some((divisor, branch)) = divisor_from_condition(cond) . // This lint is intended for unsigned integers only. . // . // For signed integers, the most direct refactor to `checked_div` is often not . // semantically equivalent to the original guard. For example, `rhs > 0` deliberately . // excludes negative divisors, while `checked_div` would return `Some` for `rhs = -2`. . // Also, `checked_div` can return `None` for `MIN / -1`, which requires additional -- line 58 ---------------------------------------- -- line 118 ---------------------------------------- . diag.span_label(*first, "division performed here"); . if !rest.is_empty() { . diag.span_labels(rest.to_vec(), "... and here"); . } . } . diag.help("consider using `checked_div`"); . }); . } 239,736 ( 0.01%) } . } . . #[derive(Copy, Clone, Eq, PartialEq)] . enum UseKind { . Division, . Other, . } . -- line 134 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . declare_lint_pass!(DropForgetRef => [DROP_NON_DROP, FORGET_NON_DROP, MEM_FORGET]); . . const DROP_NON_DROP_SUMMARY: &str = "call to `std::mem::drop` with a value that does not implement `Drop`. \ . Dropping such a type only extends its contained lifetimes"; . const FORGET_NON_DROP_SUMMARY: &str = "call to `std::mem::forget` with a value that does not implement `Drop`. \ . Forgetting such a type is the same as dropping it"; . . impl<'tcx> LateLintPass<'tcx> for DropForgetRef { 209,769 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 89,898 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 29,964 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 39,952 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 779,064 ( 0.03%) => ???:::qpath_res (9,988x) 49,940 ( 0.00%) && let Some(fn_name) = cx.tcx.get_diagnostic_name(def_id) 429,484 ( 0.02%) => ???:::get_diagnostic_name (9,988x) . { . let arg_ty = cx.typeck_results().expr_ty(arg); . let is_copy = is_copy(cx, arg_ty); . let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr); . let (lint, msg, note_span) = match fn_name { . // early return for uplifted lints: dropping_references, dropping_copy_types, forgetting_references, . // forgetting_copy_types . sym::mem_drop if arg_ty.is_ref() && !drop_is_single_call_in_arm => return, -- line 93 ---------------------------------------- -- line 127 ---------------------------------------- . let note = format!("argument has type `{arg_ty}`"); . if let Some(span) = note_span { . diag.span_note(span, note); . } else { . diag.note(note); . } . }); . } 239,736 ( 0.01%) } . } . . // dropping returned value of a function like in the following snippet is considered idiomatic, see . // #9482 for examples match { . // => drop(fn_with_side_effect_and_returning_some_value()), . // .. . // } . fn is_single_call_in_arm<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'_>, drop_expr: &'tcx Expr<'_>) -> bool { -- line 143 ---------------------------------------- 29,964 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs -------------------------------------------------------------------------------- Ir -- line 167 ---------------------------------------- . /// assert!(!s.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_str_is_empty", since = "1.39.0")] . #[rustc_no_implicit_autorefs] . #[must_use] . #[inline] . pub const fn is_empty(&self) -> bool { 39,977 ( 0.00%) self.len() == 0 . } . . /// Converts a slice of bytes to a string slice. . /// . /// A string slice ([`&str`]) is made of bytes ([`u8`]), and a byte slice . /// ([`&[u8]`][byteslice]) is made of bytes, so this function converts between . /// the two. Not all byte slices are valid string slices, however: [`&str`] requires . /// that it is valid UTF-8. `from_utf8()` checks to ensure that the bytes are valid -- line 183 ---------------------------------------- -- line 371 ---------------------------------------- . #[stable(feature = "is_char_boundary", since = "1.9.0")] . #[rustc_const_stable(feature = "const_is_char_boundary", since = "1.86.0")] . #[inline] . pub const fn is_char_boundary(&self, index: usize) -> bool { . // 0 is always ok. . // Test for 0 explicitly so that it can optimize out the check . // easily and skip reading string data for that case. . // Note that optimizing `self.get(..index)` relies on this. 10,016 ( 0.00%) if index == 0 { . return true; . } . 74 ( 0.00%) if index >= self.len() { . // For `true` we have two options: . // . // - index == self.len() . // Empty strings are valid, so return true . // - index > self.len() . // In this case return false . // . // The check is placed exactly here, because it improves generated -- line 391 ---------------------------------------- -- line 934 ---------------------------------------- . /// assert_eq!(None, s.split_at_checked(16)); // Beyond the string length . /// ``` . #[inline] . #[must_use] . #[stable(feature = "split_at_checked", since = "1.80.0")] . #[rustc_const_stable(feature = "const_str_split_at", since = "1.86.0")] . pub const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)> { . // is_char_boundary checks that the index is in [0, .len()] 29,996 ( 0.00%) if self.is_char_boundary(mid) { . // SAFETY: just checked that `mid` is on a char boundary. . Some(unsafe { self.split_at_unchecked(mid) }) . } else { . None . } . } . . /// Divides one mutable string slice into two at an index. -- line 950 ---------------------------------------- -- line 997 ---------------------------------------- . #[inline] . const unsafe fn split_at_unchecked(&self, mid: usize) -> (&str, &str) { . let len = self.len(); . let ptr = self.as_ptr(); . // SAFETY: caller guarantees `mid` is on a char boundary. . unsafe { . ( . from_utf8_unchecked(slice::from_raw_parts(ptr, mid)), 16 ( 0.00%) from_utf8_unchecked(slice::from_raw_parts(ptr.add(mid), len - mid)), . ) . } . } . . /// Divides one string slice into two at an index. . /// . /// # Safety . /// -- line 1013 ---------------------------------------- -- line 1489 ---------------------------------------- . /// let s = "Löwe 老虎 Léopard"; . /// let x: &[_] = &['1', '2']; . /// . /// assert_eq!(s.find(x), None); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn find(&self, pat: P) -> Option { 6 ( 0.00%) pat.into_searcher(self).next_match().map(|(i, _)| i) 293 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::next_match (2x) . } . . /// Returns the byte index for the first character of the last match of the pattern in . /// this string slice. . /// . /// Returns [`None`] if the pattern doesn't match. . /// . /// The [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a -- line 1505 ---------------------------------------- -- line 1663 ---------------------------------------- . /// ``` . /// . /// Use [`split_whitespace`] for this behavior. . /// . /// [`split_whitespace`]: str::split_whitespace . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn split(&self, pat: P) -> Split<'_, P> { 14 ( 0.00%) Split(SplitInternal { . start: 0, . end: self.len(), . matcher: pat.into_searcher(self), . allow_trailing_empty: true, . finished: false, . }) . } . -- line 1679 ---------------------------------------- -- line 1978 ---------------------------------------- . /// assert_eq!("cfg".split_once('='), None); . /// assert_eq!("cfg=".split_once('='), Some(("cfg", ""))); . /// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo"))); . /// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar"))); . /// ``` . #[stable(feature = "str_split_once", since = "1.52.0")] . #[inline] . pub fn split_once(&self, delimiter: P) -> Option<(&'_ str, &'_ str)> { 99 ( 0.00%) let (start, end) = delimiter.into_searcher(self).next_match()?; 4,121 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::next_match (33x) . // SAFETY: `Searcher` is known to return valid indices. . unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } . } . . /// Splits the string on the last occurrence of the specified delimiter and . /// returns prefix before delimiter and suffix after delimiter. . /// . /// # Examples -- line 1994 ---------------------------------------- -- line 2179 ---------------------------------------- . /// assert_eq!("Hello\tworld", s.trim()); . /// ``` . #[inline] . #[must_use = "this returns the trimmed string as a slice, \ . without modifying the original"] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "str_trim"] . pub fn trim(&self) -> &str { 79,941 ( 0.00%) self.trim_matches(char::is_whitespace) 639,440 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::trim_matches::<::is_whitespace> (39,965x) . } . . /// Returns a string slice with leading whitespace removed. . /// . /// 'Whitespace' is defined according to the terms of the Unicode Derived . /// Core Property `White_Space`, which includes newlines. . /// . /// # Text directionality -- line 2195 ---------------------------------------- -- line 2218 ---------------------------------------- . /// assert!(Some('ע') == s.trim_start().chars().next()); . /// ``` . #[inline] . #[must_use = "this returns the trimmed string as a new slice, \ . without modifying the original"] . #[stable(feature = "trim_direction", since = "1.30.0")] . #[rustc_diagnostic_item = "str_trim_start"] . pub fn trim_start(&self) -> &str { 9,989 ( 0.00%) self.trim_start_matches(char::is_whitespace) 289,652 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::trim_start_matches::<::is_whitespace> (9,988x) . } . . /// Returns a string slice with trailing whitespace removed. . /// . /// 'Whitespace' is defined according to the terms of the Unicode Derived . /// Core Property `White_Space`, which includes newlines. . /// . /// # Text directionality -- line 2234 ---------------------------------------- -- line 2369 ---------------------------------------- . /// A more complex pattern, using a closure: . /// . /// ``` . /// assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar"); . /// ``` . #[must_use = "this returns the trimmed string as a new slice, \ . without modifying the original"] . #[stable(feature = "rust1", since = "1.0.0")] 119,910 ( 0.00%) pub fn trim_matches(&self, pat: P) -> &str . where . for<'a> P::Searcher<'a>: DoubleEndedSearcher<'a>, . { . let mut i = 0; . let mut j = 0; . let mut matcher = pat.into_searcher(self); . if let Some((a, b)) = matcher.next_reject() { . i = a; -- line 2385 ---------------------------------------- -- line 2386 ---------------------------------------- . j = b; // Remember earliest known match, correct it below if . // last match is different . } . if let Some((_, b)) = matcher.next_reject_back() { . j = b; . } . // SAFETY: `Searcher` is known to return valid indices. . unsafe { self.get_unchecked(i..j) } 119,910 ( 0.00%) } . . /// Returns a string slice with all prefixes that match a pattern . /// repeatedly removed. . /// . /// The [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a . /// function or closure that determines if a character matches. . /// . /// [`char`]: prim@char -- line 2402 ---------------------------------------- -- line 2416 ---------------------------------------- . /// assert_eq!("123foo1bar123".trim_start_matches(char::is_numeric), "foo1bar123"); . /// . /// let x: &[_] = &['1', '2']; . /// assert_eq!("12foo1bar12".trim_start_matches(x), "foo1bar12"); . /// ``` . #[must_use = "this returns the trimmed string as a new slice, \ . without modifying the original"] . #[stable(feature = "trim_direction", since = "1.30.0")] 19,978 ( 0.00%) pub fn trim_start_matches(&self, pat: P) -> &str { . let mut i = self.len(); . let mut matcher = pat.into_searcher(self); . if let Some((a, _)) = matcher.next_reject() { . i = a; . } . // SAFETY: `Searcher` is known to return valid indices. . unsafe { self.get_unchecked(i..self.len()) } 9,989 ( 0.00%) } . . /// Returns a string slice with the prefix removed. . /// . /// If the string starts with the pattern `prefix`, returns the substring after the prefix, . /// wrapped in `Some`. Unlike [`trim_start_matches`], this method removes the prefix exactly once. . /// . /// If the string does not start with `prefix`, returns `None`. . /// -- line 2440 ---------------------------------------- -- line 3316 ---------------------------------------- . unsafe { from_utf8_unchecked_mut(&mut []) } . } . } . . impl_fn_for_zst! { . /// A nameable, cloneable fn type . #[derive(Clone)] . struct LinesMap impl<'a> Fn = |line: &'a str| -> &'a str { 1 ( 0.00%) let Some(line) = line.strip_suffix('\n') else { return line }; . let Some(line) = line.strip_suffix('\r') else { return line }; . line . }; . . #[derive(Clone)] . struct CharEscapeDebugContinue impl Fn = |c: char| -> char::EscapeDebug { . c.escape_debug_ext(EscapeDebugExtArgs { . escape_grapheme_extender: false, -- line 3332 ---------------------------------------- 37 ( 0.00%) -------------------------------------------------------------------------------- The following files chosen for auto-annotation could not be found: -------------------------------------------------------------------------------- /rust/deps/hashbrown-0.17.1/src/map.rs /rust/deps/hashbrown-0.17.1/src/raw.rs /rust/deps/scoped-tls-1.0.1/src/lib.rs /rust/deps/smallvec-1.15.1/src/lib.rs /rust/deps/thin-vec-0.2.19/src/lib.rs /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/pa.c /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/tcache.c include/jemalloc/internal/arena_inlines_b.h include/jemalloc/internal/atomic.h include/jemalloc/internal/bit_util.h include/jemalloc/internal/bitmap.h include/jemalloc/internal/cache_bin.h include/jemalloc/internal/div.h include/jemalloc/internal/edata.h include/jemalloc/internal/emap.h include/jemalloc/internal/fb.h include/jemalloc/internal/jemalloc_internal_inlines_a.h include/jemalloc/internal/jemalloc_internal_inlines_b.h include/jemalloc/internal/jemalloc_internal_inlines_c.h include/jemalloc/internal/mutex.h include/jemalloc/internal/ph.h include/jemalloc/internal/rtree.h include/jemalloc/internal/sz.h include/jemalloc/internal/tcache_inlines.h include/jemalloc/internal/thread_event.h include/jemalloc/internal/ticker.h include/jemalloc/internal/tsd.h include/jemalloc/internal/tsd_tls.h include/jemalloc/internal/util.h src/arena.c src/base.c src/emap.c src/eset.c src/extent.c src/hook.c src/sz.c src/tcache.c src/thread_event.c -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 207,518,065 ( 7.34%) events annotated