-------------------------------------------------------------------------------- Profile data file 'results/clgout-nightly-2026-08-14-unused-warnings-Clippy-IncrPatched0-Threads1' (creator: callgrind-3.25.1) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 270550020 Trigger: Program termination Profiled target: /home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver --crate-name issue_43572_unused_uses --edition=2015 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values()) -C metadata=2ef834a936dc714e -C extra-filename=-d23290637858be87 --out-dir /tmp/.tmpb2Vr1V/target/debug/deps -L dependency=/tmp/.tmpb2Vr1V/target/debug/deps -C incremental=/tmp/.tmpb2Vr1V/incremental-state -Wclippy::all -Zthreads=1 -Adeprecated -Aunknown-lints -Zincremental-verify-ich (PID 729196, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: on -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 1,592,101,733 (100.0%) PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 63,883,784 ( 4.01%) ???:::resolve_ident_in_scope_set_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,595,432 ( 2.93%) ???:::try_mark_previous_green'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,434,064 ( 2.29%) ???:::try_mark_previous_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,975,765 ( 2.26%) ???:0x0000000000173dc0 [/usr/lib/libc.so.6] 31,542,406 ( 1.98%) ???:::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,537,566 ( 1.98%) ???:::next_token_from_cursor [???] 29,450,051 ( 1.85%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,271,441 ( 1.65%) ???:::alloc_and_color_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,952,777 ( 1.63%) ???:::stable_hash_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,619,097 ( 1.61%) ???:::get_lint_level_spec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,961,896 ( 1.51%) ???:::resolve_crate::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,987,958 ( 1.38%) ???:::call_once_force::<>>>::initialize<>>>::get_or_init<::fingerprint_map::{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] 20,725,117 ( 1.30%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,091,565 ( 1.26%) ???:::advance_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,524,182 ( 1.23%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,228,599 ( 1.14%) ???:::lookup_char_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,638,072 ( 1.11%) ???:::add_import::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,162,087 ( 0.89%) ???:::hash_owner_nodes::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,905,468 ( 0.87%) ???:rustc_ast_lowering::lower_to_hir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,772,230 ( 0.87%) include/jemalloc/internal/rtree.h:free 13,318,998 ( 0.84%) ???:::short_write_process_buffer::<8> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,180,000 ( 0.83%) ???:::finalize_import::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,124,017 ( 0.82%) ???:::make_owner_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,123,356 ( 0.82%) ???:rustc_middle::dep_graph::graph::hash_result:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,023,175 ( 0.82%) ???:::to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,767,711 ( 0.80%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,255,673 ( 0.77%) ???:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,934,328 ( 0.75%) ???:> 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,520,000 ( 0.66%) ???:::write_import_resolutions::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,875,594 ( 0.62%) ???:rustc_query_impl::execution::try_execute_query::>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,796,166 ( 0.62%) ???:rustc_query_impl::execution::try_execute_query::>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,762,082 ( 0.61%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,745,312 ( 0.61%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,607,842 ( 0.60%) include/jemalloc/internal/rtree.h:tcache_bin_flush_small 9,560,349 ( 0.60%) ???:::resolve_imports [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,280,348 ( 0.58%) ???:::edition [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,249,388 ( 0.58%) ???:rustc_query_impl::execution::try_execute_query::>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,037,717 ( 0.57%) ???:rustc_query_impl::execution::try_execute_query::>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,716,274 ( 0.55%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,690,360 ( 0.55%) ???:> 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] 8,649,850 ( 0.54%) ???:::brg_visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,531,110 ( 0.54%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,415,877 ( 0.53%) ???:::check_item [???] 8,091,222 ( 0.51%) include/jemalloc/internal/jemalloc_internal_inlines_c.h:malloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 8,072,838 ( 0.51%) /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 8,003,101 ( 0.50%) ???:::hir_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,962,388 ( 0.50%) ???:rustc_middle::dep_graph::graph::hash_result:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,956,743 ( 0.50%) ???:::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,914,414 ( 0.50%) ???:, 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,860,261 ( 0.49%) ???:::resolve_path_with_ribs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,704,970 ( 0.48%) ???:::mark_live_symbols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,680,883 ( 0.48%) /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] 7,497,975 ( 0.47%) src/arena.c:malloc_default 7,318,184 ( 0.46%) ???:rustc_privacy::check_mod_privacy [???] 7,302,934 ( 0.46%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,051,805 ( 0.44%) ???:::exec_cache_promotions'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,815,908 ( 0.43%) ???: 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] 6,194,274 ( 0.39%) ???: as core::iter::traits::collect::FromIterator<(rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::query::on_disk_cache::AbsoluteBytePos)>>::from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,108,321 ( 0.38%) ???:::hir_maybe_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,001,926 ( 0.38%) ???:::span_data_to_lines_and_cols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,908,912 ( 0.37%) ???:0x00000000001747c0 [/usr/lib/libc.so.6] 5,881,142 ( 0.37%) ???: as rustc_ast::visit::Visitor>::visit_item [???] 5,801,114 ( 0.36%) ???:::parse_item_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,780,000 ( 0.36%) ???:::span_to_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,760,000 ( 0.36%) ???:>::reserve_rehash::, ()>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,740,147 ( 0.36%) ???:::build_reduced_graph_for_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,621,164 ( 0.35%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,615,875 ( 0.35%) include/jemalloc/internal/cache_bin.h:malloc 5,602,955 ( 0.35%) ???:<[(rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::query::on_disk_cache::AbsoluteBytePos)] as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,521,656 ( 0.35%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,435,314 ( 0.34%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,395,999 ( 0.34%) ???:> 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,388,663 ( 0.34%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,346,143 ( 0.34%) ???:> 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,281,130 ( 0.33%) ???:<[rustc_hir::hir::PathSegment] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,201,303 ( 0.33%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 5,114,009 ( 0.32%) ???:core::slice::sort::unstable::quicksort::quicksort::<(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span), <[(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span)]>::sort_unstable_by_key::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,105,170 ( 0.32%) ???:::hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,981,921 ( 0.31%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,941,795 ( 0.31%) ???:::lex_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,861,458 ( 0.31%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,846,634 ( 0.30%) ???:rustc_ty_utils::ty::param_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,837,815 ( 0.30%) include/jemalloc/internal/cache_bin.h:free 4,800,554 ( 0.30%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item [???] 4,741,185 ( 0.30%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,701,533 ( 0.30%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,683,686 ( 0.29%) ???:>::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] 4,660,230 ( 0.29%) ???: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] 4,580,827 ( 0.29%) ???:::resolve_crate::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,551,196 ( 0.29%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,541,165 ( 0.29%) ???:rustc_ast::visit::visit_items:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,461,220 ( 0.28%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,380,876 ( 0.28%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,301,290 ( 0.27%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,200,233 ( 0.26%) ???:::lower_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,151,551 ( 0.26%) ???:::visit_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,140,637 ( 0.26%) ???:::take [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,085,310 ( 0.26%) ???:md5::compress::soft::compress [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,081,224 ( 0.26%) ???:rustc_middle::dep_graph::graph::hash_result:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,060,812 ( 0.26%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,046,985 ( 0.25%) include/jemalloc/internal/sz.h:malloc 4,041,308 ( 0.25%) ???:::lower_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,041,159 ( 0.25%) ???:::try_plant_decl_into_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,002,256 ( 0.25%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,883,103 ( 0.24%) include/jemalloc/internal/emap.h:tcache_bin_flush_small 3,832,644 ( 0.24%) ???: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] 3,821,146 ( 0.24%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,800,805 ( 0.24%) ???: as rustc_ast::visit::Visitor>::visit_id [???] 3,761,286 ( 0.24%) ???:::parse_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,760,930 ( 0.24%) ???:::unused_import [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,755,523 ( 0.24%) ???:rustc_privacy::effective_visibilities'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,704,287 ( 0.23%) ???: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] 3,640,052 ( 0.23%) ???:::def_id_partial_cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,580,358 ( 0.22%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,460,600 ( 0.22%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,441,488 ( 0.22%) ???:0x000000000000fb40 [/usr/lib/ld-linux-x86-64.so.2] 3,415,109 ( 0.21%) ???: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] 3,401,588 ( 0.21%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,400,103 ( 0.21%) ???:::check_stability_allow_unstable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,380,845 ( 0.21%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,363,551 ( 0.21%) include/jemalloc/internal/edata.h:tcache_bin_flush_small 3,222,824 ( 0.20%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,203,131 ( 0.20%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,101,535 ( 0.19%) ???: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] 3,054,609 ( 0.19%) ???:::get_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,989,561 ( 0.19%) include/jemalloc/internal/sz.h:realloc 2,920,861 ( 0.18%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::ty::generics::Generics>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,900,363 ( 0.18%) ???:::lower_use_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,880,864 ( 0.18%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,760,754 ( 0.17%) ???:rustc_query_impl::query_impl::lookup_stability::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,720,559 ( 0.17%) ???:::hir_get_parent_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,716,923 ( 0.17%) ???:pthread_mutex_unlock [/usr/lib/libc.so.6] 2,715,906 ( 0.17%) ???:rustc_passes::dead::check_mod_deathness'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,702,795 ( 0.17%) ???:::exec_cache_promotions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,680,539 ( 0.17%) ???:::bump [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,677,971 ( 0.17%) ???:, 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,659,234 ( 0.17%) ???:> 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,638,838 ( 0.17%) ???:, 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,620,884 ( 0.16%) ???:::add_early_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,578,961 ( 0.16%) ???:rustc_query_impl::execution::ensure_can_skip_execution::, rustc_middle::dep_graph::graph::DepNodeIndex>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,560,601 ( 0.16%) ???:, 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,560,000 ( 0.16%) ???:::opt_span_lint:: [???] 2,523,516 ( 0.16%) ???:::par_items::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,521,092 ( 0.16%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,499,782 ( 0.16%) include/jemalloc/internal/arena_inlines_b.h:tcache_bin_flush_small 2,480,053 ( 0.16%) ???: as rustc_ast::visit::Visitor>::visit_use_tree [???] 2,461,107 ( 0.15%) ???:::parse_path_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,460,000 ( 0.15%) ???:::parse_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,421,295 ( 0.15%) ???:::parse_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,412,871 ( 0.15%) ???:::check_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,374,936 ( 0.15%) include/jemalloc/internal/thread_event.h:malloc 2,355,132 ( 0.15%) ???:pthread_mutex_trylock [/usr/lib/libc.so.6] 2,340,174 ( 0.15%) ???:::new_import_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,340,000 ( 0.15%) ???:::handle_res'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,320,771 ( 0.15%) ???:rustc_query_impl::query_impl::hir_owner_parent_q::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,315,331 ( 0.15%) src/arena.c:realloc 2,292,110 ( 0.14%) ???:rustc_interface::passes::emit_delayed_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,246,630 ( 0.14%) ???:rustc_query_impl::plumbing::promote_from_disk_inner::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,240,240 ( 0.14%) ???:::update_decl_chain [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,232,817 ( 0.14%) ???:rustc_lint::expect::lint_expectations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,221,873 ( 0.14%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,205,792 ( 0.14%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,200,345 ( 0.14%) ???:rustc_hir::intravisit::walk_item:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,199,695 ( 0.14%) ???:> 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] 2,180,247 ( 0.14%) ???:::build_reduced_graph_for_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,177,414 ( 0.14%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,140,430 ( 0.13%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,140,000 ( 0.13%) ???:rustc_resolve::check_unused::calc_unused_spans [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,117,257 ( 0.13%) include/jemalloc/internal/bit_util.h:malloc_default 2,092,109 ( 0.13%) ???:::short_write_process_buffer::<1> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,080,223 ( 0.13%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,074,407 ( 0.13%) /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] 2,060,063 ( 0.13%) ???:::handle_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,020,018 ( 0.13%) ???:::visit_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,000,600 ( 0.13%) ???:rustc_query_impl::query_impl::hir_owner::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,980,640 ( 0.12%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,980,495 ( 0.12%) ???:::lookup_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,968,564 ( 0.12%) ???:::visit_item::{closure#0}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,944,564 ( 0.12%) include/jemalloc/internal/bitmap.h:tcache_bin_flush_small 1,940,485 ( 0.12%) ???:rustc_query_impl::query_impl::hir_attr_map::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,940,312 ( 0.12%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,932,700 ( 0.12%) ???:::short_write_process_buffer::<4> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,932,105 ( 0.12%) ???:::is_impl_trait_in_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,915,986 ( 0.12%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,912,232 ( 0.12%) ???:rustc_passes::check_attr::check_mod_attrs [???] 1,912,169 ( 0.12%) ???:rustc_passes::stability::check_mod_unstable_api_usage [???] 1,880,672 ( 0.12%) ???:rustc_query_impl::query_impl::explicit_clauses_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,880,521 ( 0.12%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,860,723 ( 0.12%) ???:rustc_query_impl::query_impl::clauses_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,846,420 ( 0.12%) ???:rustc_hir_analysis::coherence::inherent_impls_overlap::crate_inherent_impls_overlap_check'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,840,737 ( 0.12%) ???:rustc_query_impl::query_impl::def_span::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,840,302 ( 0.12%) ???:>>::walk_ref [???] 1,820,633 ( 0.11%) ???:rustc_query_impl::query_impl::inferred_outlives_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,780,506 ( 0.11%) ???:core::ptr::drop_glue::> [???] 1,780,166 ( 0.11%) ???:::set_bindings_effective_visibilities'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,760,176 ( 0.11%) ???:::check_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,760,000 ( 0.11%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,752,285 ( 0.11%) include/jemalloc/internal/cache_bin.h:malloc_default 1,726,648 ( 0.11%) ???:::get_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,720,934 ( 0.11%) ???:::parse_limited_sym [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,720,258 ( 0.11%) ???:::span_to_location_info [???] 1,720,000 ( 0.11%) ???:::parse_ident_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,711,782 ( 0.11%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,690,576 ( 0.11%) ???:0x000000000000ba80 [/usr/lib/ld-linux-x86-64.so.2] 1,686,508 ( 0.11%) ???:rustc_metadata::foreign_modules::collect'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,680,558 ( 0.11%) ???:::opt_item_name:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,680,433 ( 0.11%) ???:rustc_query_impl::query_impl::param_env::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,680,000 ( 0.11%) ???:::get_diagnostic_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,660,498 ( 0.10%) ???:rustc_query_impl::query_impl::shallow_lint_levels_on::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,650,649 ( 0.10%) ???:rustc_hir_analysis::coherence::inherent_impls::crate_inherent_impls'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,631,848 ( 0.10%) ???: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] 1,620,087 ( 0.10%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,619,356 ( 0.10%) include/jemalloc/internal/sz.h:free 1,600,428 ( 0.10%) ???:rustc_ast::visit::walk_item_inner::> [???] 1,565,955 ( 0.10%) ???:>::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,555,703 ( 0.10%) ???:rustc_middle::dep_graph::graph::hash_result::<&rustc_middle::hir::ModuleItems> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,543,570 ( 0.10%) ???:0x0000000000173660 [/usr/lib/libc.so.6] 1,540,677 ( 0.10%) 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] 1,533,970 ( 0.10%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,531,882 ( 0.10%) ???:::is_conditionally_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,520,933 ( 0.10%) ???:<&rustc_middle::ty::list::RawList as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,520,522 ( 0.10%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,500,375 ( 0.09%) ???:rustc_query_impl::query_impl::source_span::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,469,356 ( 0.09%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:clippy_utils::str_utils::to_camel_case 1,458,423 ( 0.09%) include/jemalloc/internal/div.h:tcache_bin_flush_small 1,420,397 ( 0.09%) ???:::parse_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,420,041 ( 0.09%) site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,420,000 ( 0.09%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,402,129 ( 0.09%) include/jemalloc/internal/rtree.h:realloc 1,381,051 ( 0.09%) ???:::in_external_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,371,685 ( 0.09%) ???:::hir_item [???] 1,371,685 ( 0.09%) ???:::hir_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,341,312 ( 0.08%) ???:::lower_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,320,264 ( 0.08%) ???: 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] 1,300,352 ( 0.08%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,280,512 ( 0.08%) ???:::is_exported [???] 1,280,074 ( 0.08%) ???:::adjust [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,273,111 ( 0.08%) include/jemalloc/internal/arena_inlines_b.h:malloc_default 1,271,770 ( 0.08%) ???: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] 1,262,994 ( 0.08%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,242,866 ( 0.08%) /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] 1,224,921 ( 0.08%) site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,219,892 ( 0.08%) ???:core::iter::adapters::map::map_fold::::definitions::{closure#0}, core::iter::adapters::map::map_fold>::extend_trusted, core::iter::adapters::map::Map, ::owners::{closure#0}>>, core::iter::adapters::map::Map, ::owners::{closure#1}>>, core::iter::adapters::map::Map, ::owners::{closure#2}>>, core::iter::adapters::map::Map, ::owners::{closure#3}>>, ::definitions::{closure#0}>, rustc_middle::hir::map::crate_hash::{closure#2}::{closure#0}>>::{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] 1,214,030 ( 0.08%) ???:>::reserve::do_reserve_and_handle:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,200,800 ( 0.08%) ???:::hir_attrs'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,197,082 ( 0.08%) ???:::check_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,191,343 ( 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,182,669 ( 0.07%) ???:::finish_grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,171,646 ( 0.07%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,160,290 ( 0.07%) ???: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] 1,155,258 ( 0.07%) ???:rustc_lint::levels::skippable_lints'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,140,398 ( 0.07%) ???:>::grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,140,296 ( 0.07%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,140,285 ( 0.07%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,134,037 ( 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,133,930 ( 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,105,717 ( 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,105,411 ( 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,100,275 ( 0.07%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,087,789 ( 0.07%) ???:0x000000000000aec0 [/usr/lib/ld-linux-x86-64.so.2] 1,080,110 ( 0.07%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,080,090 ( 0.07%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,040,435 ( 0.07%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,040,204 ( 0.07%) ???:::parse_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,029,067 ( 0.06%) ???:::alloc_and_color_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,020,306 ( 0.06%) 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,020,207 ( 0.06%) ???: as rustc_hir::intravisit::Visitor>::visit_path [???] 1,017,019 ( 0.06%) /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] 1,011,658 ( 0.06%) ???:rustc_privacy::effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,001,524 ( 0.06%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,000,000 ( 0.06%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 980,421 ( 0.06%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 980,288 ( 0.06%) ???:rustc_query_impl::query_impl::check_well_formed::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 980,271 ( 0.06%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 972,282 ( 0.06%) include/jemalloc/internal/util.h:tcache_bin_flush_small 960,318 ( 0.06%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 960,268 ( 0.06%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 960,114 ( 0.06%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 951,101 ( 0.06%) include/jemalloc/internal/tcache_inlines.h:malloc_default 940,243 ( 0.06%) ???:::check_item [???] 920,691 ( 0.06%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 880,310 ( 0.06%) ???:::lower_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 880,170 ( 0.06%) site/frontend/rust-clippy/clippy_lints/src/four_forward_slashes.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 873,430 ( 0.05%) include/jemalloc/internal/arena_inlines_b.h:realloc 866,761 ( 0.05%) ???:core::slice::sort::unstable::quicksort::quicksort::<(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span), <[(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span)]>::sort_unstable_by_key::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 860,430 ( 0.05%) ???:::instantiate_identity_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 860,311 ( 0.05%) ???: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] 855,575 ( 0.05%) include/jemalloc/internal/thread_event.h:realloc 840,630 ( 0.05%) ???:rustc_interface::callbacks::track_span_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 840,333 ( 0.05%) ???:rustc_passes::entry::entry_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 840,042 ( 0.05%) ???:>::from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 810,160 ( 0.05%) include/jemalloc/internal/tsd_tls.h:free [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 810,159 ( 0.05%) include/jemalloc/internal/atomic.h:free 800,000 ( 0.05%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:<&str as core::str::pattern::Pattern>::is_contained_in [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 794,687 ( 0.05%) include/jemalloc/internal/rtree.h:pa_alloc 789,707 ( 0.05%) include/jemalloc/internal/ph.h:pa_alloc 786,560 ( 0.05%) include/jemalloc/internal/tcache_inlines.h:realloc 780,234 ( 0.05%) ???:::resolve_doc_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 780,198 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 760,226 ( 0.05%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 760,166 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/item_name_repetitions.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 756,142 ( 0.05%) /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 740,460 ( 0.05%) include/jemalloc/internal/cache_bin.h:realloc 740,378 ( 0.05%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 720,288 ( 0.05%) ???:stacker::remaining_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 720,087 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/missing_enforced_import_rename.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 720,022 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 705,351 ( 0.04%) ???:::slice_write_process_buffer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 700,215 ( 0.04%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 700,140 ( 0.04%) ???:::parse_outer_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 667,245 ( 0.04%) ???:dladdr [/usr/lib/libc.so.6] 660,223 ( 0.04%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 660,152 ( 0.04%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 660,107 ( 0.04%) /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_item 660,000 ( 0.04%) ???:::lint_if_path_starts_with_module'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 640,377 ( 0.04%) ???:rustc_ast::visit::walk_item_inner:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 640,211 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 640,200 ( 0.04%) ???:thin_vec::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 640,160 ( 0.04%) ???:rustc_passes::dead::check_mod_deathness::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 640,138 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 640,000 ( 0.04%) ???:::as_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 640,000 ( 0.04%) ???:core::ptr::drop_glue::<::check_unused::{closure#4}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 620,155 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 620,060 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 620,000 ( 0.04%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 620,000 ( 0.04%) ???:::lint_if_path_starts_with_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 601,020 ( 0.04%) ???:rust_psm_stack_pointer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 595,752 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:clippy_utils::str_utils::to_camel_case 594,398 ( 0.04%) include/jemalloc/internal/edata.h:pa_alloc 592,283 ( 0.04%) ???:rustc_hir_analysis::check::wfcheck::check_type_wf'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,997 ( 0.04%) include/jemalloc/internal/ph.h:tcache_bin_flush_small 586,611 ( 0.04%) include/jemalloc/internal/atomic.h:tcache_bin_flush_small 580,463 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 580,214 ( 0.04%) ???: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] 580,029 ( 0.04%) ???:::with_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 580,028 ( 0.04%) ???:::future_proof_import [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 575,731 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_utils::str_utils::to_camel_case 566,865 ( 0.04%) /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_utils::str_utils::to_camel_case 560,513 ( 0.04%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 560,246 ( 0.04%) ???:rustc_span::hygiene::decode_syntax_context::::decode_syntax_context::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 560,144 ( 0.04%) 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] 544,893 ( 0.03%) include/jemalloc/internal/sz.h:pa_alloc 540,045 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,045 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,045 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,045 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,045 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,045 ( 0.03%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 534,534 ( 0.03%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 522,074 ( 0.03%) src/base.c:pa_alloc 520,130 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_non_exhaustive.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 507,882 ( 0.03%) src/eset.c:pa_alloc 500,441 ( 0.03%) /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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 500,225 ( 0.03%) 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] 500,144 ( 0.03%) ???:::walk:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 500,075 ( 0.03%) 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] 500,031 ( 0.03%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 500,000 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:::check_item 499,255 ( 0.03%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 494,041 ( 0.03%) include/jemalloc/internal/sz.h:malloc_default 480,384 ( 0.03%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::hir::ModuleItems>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 480,147 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 480,000 ( 0.03%) ???:::map_ctxt::<::with_ctxt::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 478,937 ( 0.03%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:malloc_default 461,131 ( 0.03%) ???:rustc_span::normalize_src [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 460,138 ( 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] 460,115 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_item_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 457,898 ( 0.03%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_stashed 447,436 ( 0.03%) ???:::pad [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 440,639 ( 0.03%) ???: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,264 ( 0.03%) ???:core::unicode::unicode_data::conversions::to_upper [???] 440,251 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 440,198 ( 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] 440,125 ( 0.03%) 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] 440,112 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:clippy_lints::attrs::mixed_attributes_style::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 440,110 ( 0.03%) 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] 440,022 ( 0.03%) ???:::record_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 440,000 ( 0.03%) ???:::get_diagnostic_name'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 440,000 ( 0.03%) ???:::eat_path_sep [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 440,000 ( 0.03%) ???:::check_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 420,105 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 420,105 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/enum_clike.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 420,105 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/module_style.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 420,105 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/module_style.rs:::check_item_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 420,105 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 400,132 ( 0.03%) /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 400,120 ( 0.03%) ???:rustc_query_impl::query_impl::source_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] 400,120 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes 400,104 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 400,100 ( 0.03%) ???: 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] 389,108 ( 0.02%) include/jemalloc/internal/mutex.h:malloc_default 381,234 ( 0.02%) ???:::resolve_path_with_ribs'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,496 ( 0.02%) include/jemalloc/internal/thread_event.h:malloc_default 380,137 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 380,114 ( 0.02%) 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] 380,114 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post 380,095 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 380,095 ( 0.02%) /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] 380,095 ( 0.02%) ???:::check_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,095 ( 0.02%) ???:::check_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,095 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/new_without_default.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 380,087 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_self_imports.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 374,940 ( 0.02%) include/jemalloc/internal/edata.h:malloc_default 370,927 ( 0.02%) include/jemalloc/internal/tsd.h:realloc 370,232 ( 0.02%) include/jemalloc/internal/ticker.h:malloc_default 366,649 ( 0.02%) ???:0x0000000000029600 [/usr/lib/ld-linux-x86-64.so.2] 366,030 ( 0.02%) ???:__rustc::__rust_alloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 360,163 ( 0.02%) 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] 360,163 ( 0.02%) 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] 360,090 ( 0.02%) ???:::insert_nested [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 360,090 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/infallible_try_from.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 360,090 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/large_enum_variant.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 360,041 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs:clippy_lints::attrs::useless_attribute::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 343,818 ( 0.02%) ???:::fill_well_known'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 340,171 ( 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 340,153 ( 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] 340,153 ( 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] 340,094 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/derivable_impls.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/derive/mod.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/duplicate_mod.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/impl_hash_with_borrow_str_and_bytes.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_noop_waker.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/non_canonical_impls.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/partial_pub_fields.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/partialeq_ne_impl.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,085 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/serde_api.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 340,017 ( 0.02%) ???:::visit_item_id_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 340,017 ( 0.02%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 320,331 ( 0.02%) ???:rustc_ast_lowering::index_ast [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 320,106 ( 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] 320,080 ( 0.02%) /rust/deps/hashbrown-0.17.1/src/raw.rs:)>>::remove_entry::>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 320,080 ( 0.02%) ???:::is_public_at_level [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 320,000 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:::check_item 318,779 ( 0.02%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 304,366 ( 0.02%) src/hook.c:realloc 300,362 ( 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:::finish_grow [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 300,180 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/mod.rs:::fold::<(), core::iter::traits::iterator::Iterator::for_each::call>::extend::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 300,090 ( 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] 300,075 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/levels.rs:::check_item 300,075 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/levels.rs:::check_item_post 300,075 ( 0.02%) ???:::check_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 300,075 ( 0.02%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 300,045 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:::trim_matches::<::is_whitespace> 288,851 ( 0.02%) src/tcache.c:malloc_default 283,511 ( 0.02%) include/jemalloc/internal/fb.h:pa_alloc 280,084 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,070 ( 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_item 274,449 ( 0.02%) ???:::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] 268,998 ( 0.02%) /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::str_utils::to_camel_case 260,078 ( 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] 260,065 ( 0.02%) ???:rustc_passes::dead::check_mod_deathness::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 260,000 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/array/iter.rs:::check_item 257,171 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,297 ( 0.02%) src/extent.c:pa_alloc 248,154 ( 0.02%) include/jemalloc/internal/atomic.h:realloc 243,948 ( 0.02%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:realloc 242,798 ( 0.02%) ???:>::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] 241,031 ( 0.02%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,308 ( 0.02%) ???:>::with_lint_attrs::::{closure#0}>::{closure#0} [???] 240,188 ( 0.02%) ???:rustc_metadata::creader::fn_spans [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,108 ( 0.02%) ???:rustc_resolve::rustdoc::span_of_fragments [???] 240,090 ( 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> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 240,072 ( 0.02%) /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> 240,068 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::check_item 240,036 ( 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_item 240,000 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 237,676 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 235,622 ( 0.01%) ???:__cxa_finalize [/usr/lib/libc.so.6] 228,977 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:clippy_utils::str_utils::to_camel_case 220,132 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/mod.rs:clippy_utils::str_utils::to_camel_case 220,066 ( 0.01%) ???: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] 220,066 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 220,055 ( 0.01%) ???:rustc_query_impl::query_impl::hir_owner_parent_q::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] 220,055 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_item_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 220,046 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_item 220,033 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_item 219,430 ( 0.01%) include/jemalloc/internal/rtree.h:pa_dalloc 215,101 ( 0.01%) include/jemalloc/internal/tsd.h:malloc_default 214,283 ( 0.01%) ???:::register_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,924 ( 0.01%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 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,772 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_small 200,943 ( 0.01%) ???:std::exception::~exception() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,090 ( 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 200,031 ( 0.01%) ???:::descent_to_ambiguity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,000 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:clippy_lints::unsafe_removed_from_name::check_use_tree 200,000 ( 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:clippy_lints::unsafe_removed_from_name::check_use_tree 191,942 ( 0.01%) ???:0x000000000000ad20 [/usr/lib/ld-linux-x86-64.so.2] 190,323 ( 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] 182,979 ( 0.01%) include/jemalloc/internal/tsd_tls.h:realloc 180,099 ( 0.01%) ???:>>,)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 180,089 ( 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 180,087 ( 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 180,081 ( 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] 180,045 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 180,045 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_item 180,027 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::trim_matches::<::is_whitespace> 180,000 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/index_range.rs:::check_item 176,999 ( 0.01%) include/jemalloc/internal/edata.h:pa_dalloc 168,948 ( 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:clippy_utils::str_utils::to_camel_case 167,432 ( 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] 161,670 ( 0.01%) include/jemalloc/internal/ph.h:pa_dalloc 160,578 ( 0.01%) include/jemalloc/internal/tsd_tls.h:malloc_default 160,275 ( 0.01%) ???:)>>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,268 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,193 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::finish_grow 160,051 ( 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:::trim_matches::<::is_whitespace> 160,042 ( 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_item 160,040 ( 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_item_kind 160,040 ( 0.01%) ???:::check_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,040 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs:::check_item_post 160,040 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_item 160,040 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/doc/too_long_first_doc_paragraph.rs:::check_attributes 160,040 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_item 160,040 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_item 160,032 ( 0.01%) ???:rustc_query_impl::query_impl::check_well_formed::execute_query_incr::__rust_end_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 155,504 ( 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] 150,149 ( 0.01%) ???:::finish128_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,188 ( 0.01%) ???:::hash_one::<&std::path::PathBuf> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,241 ( 0.01%) ???:rustc_passes::lang_items::get_lang_items'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 141,870 ( 0.01%) include/jemalloc/internal/sz.h:tcache_bin_flush_small 140,167 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::finish_grow 140,143 ( 0.01%) ???:rustc_privacy::check_private_in_public'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,084 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/index_range.rs:::fold::<(), core::iter::traits::iterator::Iterator::for_each::call>::extend::{closure#0}>::{closure#0}> 140,070 ( 0.01%) ???:core::ptr::drop_glue::, rustc_ast::ast::AstOwner)>>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,052 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::check_item 140,035 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs:::check_item_kind 140,035 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item 140,021 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item 140,012 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_item 140,007 ( 0.01%) ???:::descent_to_ambiguity'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,004 ( 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_item 140,000 ( 0.01%) ???:::take'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,840 ( 0.01%) include/jemalloc/internal/bit_util.h:pa_alloc 135,188 ( 0.01%) include/jemalloc/internal/mutex.h:pa_alloc 134,484 ( 0.01%) include/jemalloc/internal/bit_util.h:realloc 132,408 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 131,743 ( 0.01%) src/sz.c:pa_alloc 128,923 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::str_utils::to_camel_case 128,089 ( 0.01%) ???:rustc_data_structures::outline::<::lines::{closure#0}, &[rustc_span::RelativeBytePos]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,474 ( 0.01%) ???:__cxa_atexit [/usr/lib/libc.so.6] 125,291 ( 0.01%) ???:::intern_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,758 ( 0.01%) ???:rustc_interface::passes::resolver_for_lowering_raw'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,270 ( 0.01%) ???:rustc_lint::lint_mod'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,246 ( 0.01%) ???:rustc_middle::hir::map::hir_crate_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,210 ( 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 120,210 ( 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 120,189 ( 0.01%) ???:rustc_middle::hir::map::hir_module_items'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,139 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::finish_grow 120,112 ( 0.01%) ???:rustc_ast_passes::feature_gate::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,088 ( 0.01%) ???:::visit_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,078 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes 120,078 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes_post 120,075 ( 0.01%) ???:::visit_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,074 ( 0.01%) ???:>::process_mod [???] 120,056 ( 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] 120,056 ( 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] 120,054 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 120,051 ( 0.01%) ???:::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,032 ( 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:clippy_lints::attrs::mixed_attributes_style::check 120,030 ( 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 120,030 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item_post 120,030 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_item_kind 120,030 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/set.rs:clippy_lints::attrs::mixed_attributes_style::check 120,030 ( 0.01%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::attrs::mixed_attributes_style::check 120,026 ( 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_item 120,024 ( 0.01%) ???:>>::walk_ref [???] 120,018 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::check_item 120,018 ( 0.01%) 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] 120,006 ( 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_item 120,000 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:clippy_lints::unsafe_removed_from_name::check_use_tree 120,000 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_item 120,000 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:clippy_lints::unsafe_removed_from_name::check_use_tree 116,143 ( 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] 116,121 ( 0.01%) include/jemalloc/internal/atomic.h:pa_alloc 109,160 ( 0.01%) ???:core::slice::sort::shared::pivot::median3_rec::<(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span), <[(rustc_span::def_id::DefPathHash, rustc_span::span_encoding::Span)]>::sort_unstable_by_key::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 107,677 ( 0.01%) include/jemalloc/internal/mutex.h:tcache_bin_flush_small 105,321 ( 0.01%) ???: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] 101,993 ( 0.01%) include/jemalloc/internal/rtree.h:ecache_evict 100,202 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,090 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:>::reserve::do_reserve_and_handle:: 100,045 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes 100,033 ( 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::attrs::mixed_attributes_style::check 100,025 ( 0.01%) /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_item 100,025 ( 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_item 100,025 ( 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_item_post 100,025 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:)>>::remove_entry::>::{closure#0}> 100,025 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item_kind 100,025 ( 0.01%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_item 100,025 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_item 100,009 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:::check_item 100,000 ( 0.01%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:clippy_lints::unsafe_removed_from_name::check_use_tree 99,425 ( 0.01%) include/jemalloc/internal/rtree.h:free_default 99,230 ( 0.01%) ???:0x0000000000067b30 [/usr/lib/libc.so.6] 97,474 ( 0.01%) ???:0x0000000000040520 [/usr/lib/libc.so.6] 96,652 ( 0.01%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,569 ( 0.01%) ???: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,345 ( 0.01%) src/extent.c:tcache_bin_flush_small 92,276 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,340 ( 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/jemalloc.c:free_default [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] -------------------------------------------------------------------------------- -- 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/collect.rs -------------------------------------------------------------------------------- Ir -- line 315 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_iter", issue = "92476")] . const impl IntoIterator for I { . type Item = I::Item; . type IntoIter = I; . . #[inline] . fn into_iter(self) -> I { 140,080 ( 0.01%) self . } . } . . /// Extend a collection with the contents of an iterator. . /// . /// Iterators produce a series of values, and collections can also be thought . /// of as a series of values. The `Extend` trait bridges this gap, allowing you . /// to extend a collection by including the contents of that iterator. When -- line 331 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/large_enum_variant.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . pub fn new(conf: &'static Conf) -> Self { . Self { . maximum_size_difference_allowed: conf.enum_variant_size_threshold, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for LargeEnumVariant { 160,040 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &Item<'tcx>) { 40,010 ( 0.00%) if let ItemKind::Enum(ident, _, ref def) = item.kind . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && let ty::Adt(adt, subst) = ty.kind() . && adt.variants().len() > 1 . && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { . let variants_size = AdtVariantInfo::new(cx, *adt, subst); . . let mut difference = variants_size[0].size - variants_size[1].size; -- line 85 ---------------------------------------- -- line 150 ---------------------------------------- . return; . } . } . diag.span_help(def.variants[variants_size[0].ind].span, help_text); . }, . ); . } . } 160,040 ( 0.01%) } . } . . fn maybe_copy<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . if let ty::Adt(_def, args) = ty.kind() . && args.types().next().is_some() . && let Some(copy_trait) = cx.tcx.lang_items().copy_trait() . { . return cx.tcx.non_blanket_impls_for_ty(copy_trait, ty).next().is_some(); -- line 166 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/infallible_try_from.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub INFALLIBLE_TRY_FROM, . suspicious, . "TryFrom with infallible Error type" . } . . declare_lint_pass!(InfallibleTryFrom => [INFALLIBLE_TRY_FROM]); . . impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom { 160,040 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 40,010 ( 0.00%) let ItemKind::Impl(imp) = item.kind else { return }; . let Some(of_trait) = imp.of_trait else { return }; . let Some(trait_def_id) = of_trait.trait_ref.trait_def_id() else { . return; . }; . if !cx.tcx.is_diagnostic_item(sym::TryFrom, trait_def_id) { . return; . } . for ii in cx -- line 56 ---------------------------------------- -- line 75 ---------------------------------------- . span_lint( . cx, . INFALLIBLE_TRY_FROM, . span, . "infallible TryFrom impl; consider implementing From instead", . ); . } . } 160,040 ( 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 { 60,030 ( 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 { 60,030 ( 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 { 261 ( 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)); 148,935 ( 0.01%) 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); 40,024 ( 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 2740 ---------------------------------------- . fn default() -> String { . String::new() . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl fmt::Display for String { . #[inline] 1 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 2 ( 0.00%) fmt::Display::fmt(&**self, f) 161 ( 0.00%) => ???:::fmt (1x) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl fmt::Debug for String { . #[inline] . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . fmt::Debug::fmt(&**self, f) -- line 2757 ---------------------------------------- -- 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 ---------------------------------------- 3 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs -------------------------------------------------------------------------------- Ir -- line 57 ---------------------------------------- . pub struct DefinitionInModuleRoot { . /// Stack tracking whether items at the current nesting level are in a . /// `mod.rs` file. When the stack is empty, we are at crate root depth . /// (not linted). . module_stack: Vec, . } . . impl EarlyLintPass for DefinitionInModuleRoot { 160,040 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { . // Handle module items: push state for their children. 60,015 ( 0.00%) match &item.kind { . ItemKind::Mod(.., ModKind::Loaded(_, Inline::No { .. }, mod_spans, ..)) => { . let file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); . self.module_stack.push(is_mod_rs(&file)); . return; . }, . ItemKind::Mod(..) => { . // Inline module or unloaded — children are not in a root file. . self.module_stack.push(false); . return; . }, . _ => {}, . } . . // Skip items from macro expansion. 40,010 ( 0.00%) if item.span.from_expansion() { . return; . } . . // Only lint inside mod.rs files (not at crate root depth). . if !self.module_stack.last().copied().unwrap_or(false) { . return; . } . -- line 90 ---------------------------------------- -- line 101 ---------------------------------------- . span_lint_and_help( . cx, . DEFINITION_IN_MODULE_ROOT, . item.span, . "definition in module root file", . None, . help, . ); 160,040 ( 0.01%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &ast::Item) { 160,040 ( 0.01%) if matches!(item.kind, ItemKind::Mod(..)) { . self.module_stack.pop(); . } . } . } . . /// Returns a human-readable kind string for flagged items, or `None` for . /// items that are allowed in root files (modules, imports, re-exports, . /// `#[macro_export]` macros). -- line 120 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . /// . /// # Safety . /// . /// `bytes` must produce a valid UTF-8-like (UTF-8 or WTF-8) string . #[unstable(feature = "str_internals", issue = "none")] . #[inline] . pub unsafe fn next_code_point<'a, I: Iterator>(bytes: &mut I) -> Option { . // Decode UTF-8 168,949 ( 0.01%) let x = *bytes.next()?; 357,901 ( 0.02%) if x < 128 { . return Some(x as u32); . } . . // Multibyte case follows . // Decode from a byte combination out of: [[[x y] z] w] . // NOTE: Performance is sensitive to the exact formulation here . let init = utf8_first_byte(x, 2); . // SAFETY: `bytes` produces an UTF-8-like string, -- line 46 ---------------------------------------- -- line 76 ---------------------------------------- . /// `bytes` must produce a valid UTF-8-like (UTF-8 or WTF-8) string . #[inline] . pub(super) unsafe fn next_code_point_reverse<'a, I>(bytes: &mut I) -> Option . where . I: DoubleEndedIterator, . { . // Decode UTF-8 . let w = match *bytes.next_back()? { 60,030 ( 0.00%) next_byte if next_byte < 128 => return Some(next_byte as u32), . back_byte => back_byte, . }; . . // Multibyte case follows . // Decode from a byte combination out of: [x [y [z w]]] . let mut ch; . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. -- line 92 ---------------------------------------- 208,968 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . pub CRATE_IN_MACRO_DEF, . suspicious, . "using `crate` in a macro definition" . } . . declare_lint_pass!(CrateInMacroDef => [CRATE_IN_MACRO_DEF]); . . impl EarlyLintPass for CrateInMacroDef { 60,015 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 40,010 ( 0.00%) if let ItemKind::MacroDef(_, macro_def) = &item.kind . && item.attrs.iter().any(is_macro_export) . && let Some(span) = contains_unhygienic_crate_reference(¯o_def.body.tokens) . { . span_lint_and_sugg( . cx, . CRATE_IN_MACRO_DEF, . span, . "`crate` references the macro call's crate", . "to reference the macro definition's crate, use", . String::from("$crate"), . Applicability::MachineApplicable, . ); . } 80,020 ( 0.01%) } . } . . fn is_macro_export(attr: &Attribute) -> bool { . if let AttrKind::Normal(normal) = &attr.kind . && let [segment] = normal.item.path.segments.as_slice() . { . segment.ident.name == sym::macro_export . } else { -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/missing_enforced_import_rename.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . .map(move |id| (id, rename)) . }) . .collect(), . } . } . } . . impl LateLintPass<'_> for ImportRename { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 80,012 ( 0.01%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind { . // use `present_items` because it could be in any of type_ns, value_ns, macro_ns 340,000 ( 0.02%) for res in path.res.present_items() { . if let Res::Def(_, id) = res . && let Some(name) = self.renames.get(&id) . // Remove semicolon since it is not present for nested imports . && let span_without_semi = cx.sess().source_map().span_until_char(item.span, ';') . && let Some(snip) = span_without_semi.get_text(cx) . && let Some(import) = match snip.split_once(" as ") { . None => Some(snip.as_str()), . Some((import, rename)) => { -- line 84 ---------------------------------------- -- line 98 ---------------------------------------- . "this import should be renamed", . "try", . format!("{import} as {name}"), . Applicability::MachineApplicable, . ); . } . } . } 160,040 ( 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 { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 40,010 ( 0.00%) if let ItemKind::Fn { 3 ( 0.00%) generics, . body: body_id, . .. . } = item.kind 3 ( 0.00%) && !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(); . } 160,040 ( 0.01%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { . // Only lint on inherent methods, not trait methods. . if let ImplItemKind::Fn(.., body_id) = item.kind . && !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)) -- line 283 ---------------------------------------- 3 ( 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 { 160,040 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 20,006 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 160,040 ( 0.01%) } . 24 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 9 ( 0.00%) if has_attr(cx, expr.hir_id) { . println!("{expr:#?}"); . } 24 ( 0.00%) } . . 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 54 ---------------------------------------- . fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) { . if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } . } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool { 60,021 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 177 ( 0.00%) => ???:::hir_attrs (3x) 1 ( 0.00%) get_builtin_attr(attrs, sym::dump).count() > 0 . } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/serde_api.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . pub SERDE_API_MISUSE, . correctness, . "various things that will negatively affect your serde experience" . } . . declare_lint_pass!(SerdeApi => [SERDE_API_MISUSE]); . . impl<'tcx> LateLintPass<'tcx> for SerdeApi { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . items, . .. . }) = item.kind . { . let did = of_trait.trait_ref.path.res.def_id(); . if paths::SERDE_DE_VISITOR.matches(cx, did) { . let mut seen_str = None; -- line 36 ---------------------------------------- -- line 49 ---------------------------------------- . cx, . SERDE_API_MISUSE, . span, . "you should not implement `visit_string` without also implementing `visit_str`", . ); . } . } . } 160,040 ( 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_nested.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . pub(super) trait SpecFromIterNested { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIterNested for Vec . where . I: Iterator, . { 160,247 ( 0.01%) 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. 60,052 ( 0.00%) let mut vector = match iterator.next() { 440,123 ( 0.03%) => /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 (20,005x) . 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 200,263 ( 0.01%) } . } . . 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); 24 ( 0.00%) vector 40 ( 0.00%) } . } 44 ( 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)) 703,034 ( 0.04%) => /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. . 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 -- line 279 ---------------------------------------- -- line 709 ---------------------------------------- . _ => return None, . }; . src_expr = use_expr; . } . } . } . . impl<'tcx> LateLintPass<'tcx> for NonCopyConst<'tcx> { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 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"); . } . }, . ); . } 160,040 ( 0.01%) } . . 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 845 ---------------------------------------- . cx, . DECLARE_INTERIOR_MUTABLE_CONST, . item.ident.span, . "named constant with interior mutability", . ); . } . } . 21 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 6 ( 0.00%) if let ExprKind::Path(qpath) = &e.kind . && let typeck = cx.typeck_results() . && let Res::Def(DefKind::Const { .. } | DefKind::AssocConst { .. }, did) = typeck.qpath_res(qpath, e.hir_id) . // 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( -- line 862 ---------------------------------------- -- 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"); . }, . ); . } 24 ( 0.00%) } . } . . struct ReplaceAssocFolder<'tcx> { . tcx: TyCtxt<'tcx>, . trait_id: DefId, . self_ty: Ty<'tcx>, . } . impl<'tcx> TypeFolder> for ReplaceAssocFolder<'tcx> { -- line 900 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 60,040 ( 0.00%) 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 { 18 ( 0.00%) match self { . None => false, 49 ( 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 { 40,012 ( 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> { 60 ( 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> { 180,191 ( 0.01%) 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 { 24 ( 0.00%) 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 { 94 ( 0.00%) match self { 62 ( 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, . { 7 ( 0.00%) match self { 4 ( 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, . { 3 ( 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, . { 40,031 ( 0.00%) match self { 60,015 ( 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, . { 100,062 ( 0.01%) match self { 40,044 ( 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, . { 20,059 ( 0.00%) match self { . Some(t) => f(t), . None => default, . } . } . . /// Computes a default function result (if none), or . /// applies a different function to the contained value (if any). . /// -- line 1235 ---------------------------------------- -- 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, . { 2 ( 0.00%) match self { 6 ( 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, . { 9 ( 0.00%) if let Some(x) = self { . if predicate(&x) { . return Some(x); . } . } 3 ( 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, . { 4 ( 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 { 74 ( 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` 120,180 ( 0.01%) 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 { 94 ( 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 { 8 ( 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 ---------------------------------------- 60,331 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/str_utils.rs -------------------------------------------------------------------------------- Ir -- line 262 ---------------------------------------- . /// Returns a `CamelCase` version of the input . /// ```no_run . /// use clippy_utils::str_utils::to_camel_case; . /// assert_eq!(to_camel_case("abc_def"), "AbcDef"); . /// assert_eq!(to_camel_case("a_b_c_d"), "ABCD"); . /// assert_eq!(to_camel_case("abc_d_d"), "AbcDD"); . /// assert_eq!(to_camel_case("abc1_d_d"), "Abc1DD"); . /// ``` 180,090 ( 0.01%) pub fn to_camel_case(item_name: &str) -> String { . let mut s = String::new(); . let mut up = true; . for c in item_name.chars() { . if c.is_uppercase() { . // we only turn snake case text into CamelCase . return item_name.to_string(); . } 446,811 ( 0.03%) if c == '_' { . up = true; . continue; . } 297,870 ( 0.02%) if up { . up = false; . s.extend(c.to_uppercase()); . } else { . s.push(c); . } . } 120,060 ( 0.01%) s 180,090 ( 0.01%) } . . #[cfg(test)] . mod test { . use super::*; . . #[test] . fn camel_case_start_full() { . assert_eq!(camel_case_start("AbcDef"), StrIndex::new(0, 0)); -- line 298 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . match (ptr).guaranteed_eq(null_mut()) { . Some(res) => res, . // To remain maximally conservative, we stop execution when we don't . // know whether the pointer is null or not. . // We can *not* return `false` here, that would be unsound in `NonNull::new`! . None => panic!("null-ness of this pointer cannot be determined in const context"), . } . } else { 140,221 ( 0.01%) ptr.addr() == 0 . } . ) . } . . /// Casts to a pointer of another type. . #[stable(feature = "ptr_cast", since = "1.38.0")] . #[rustc_const_stable(feature = "const_ptr_cast", since = "1.38.0")] . #[rustc_diagnostic_item = "const_ptr_cast"] -- line 46 ---------------------------------------- -- line 262 ---------------------------------------- . /// [`as_uninit_ref`]: #method.as_uninit_ref . /// [`as_ref_unchecked`]: #method.as_ref_unchecked . #[stable(feature = "ptr_as_ref", since = "1.9.0")] . #[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")] . #[inline] . pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> { . // SAFETY: the caller must guarantee that `self` is valid . // for a reference if it isn't null. 60,030 ( 0.00%) if self.is_null() { None } else { unsafe { Some(&*self) } } . } . . /// Returns a shared reference to the value behind the pointer. . /// If the pointer may be null or the value may be uninitialized, [`as_uninit_ref`] must be used instead. . /// If the pointer may be null, but the value is known to have been initialized, [`as_ref`] must be used instead. . /// . /// [`as_ref`]: #method.as_ref . /// [`as_uninit_ref`]: #method.as_uninit_ref -- line 278 ---------------------------------------- -- line 615 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const unsafe fn offset_from(self, origin: *const T) -> isize . where . T: Sized, . { . let pointee_size = size_of::(); . assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); . // SAFETY: the caller must uphold the safety contract for `ptr_offset_from`. 48 ( 0.00%) unsafe { intrinsics::ptr_offset_from(self, origin) } . } . . /// Calculates the distance between two pointers within the same allocation. The returned value is in . /// units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`offset_from`][pointer::offset_from] on it. See that method for . /// documentation and safety requirements. -- line 631 ---------------------------------------- -- line 725 ---------------------------------------- . this: *const () = self as *const (), . origin: *const () = origin as *const (), . ) => runtime_ptr_ge(this, origin) . ); . . let pointee_size = size_of::(); . assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); . // SAFETY: the caller must uphold the safety contract for `ptr_offset_from_unsigned`. 98 ( 0.00%) unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } . } . . /// Calculates the distance between two pointers within the same allocation, *where it's known that . /// `self` is equal to or greater than `origin`*. The returned value is in . /// units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`offset_from_unsigned`][pointer::offset_from_unsigned] on it. -- line 741 ---------------------------------------- -- line 863 ---------------------------------------- . ( . 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`. 40,086 ( 0.00%) 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 879 ---------------------------------------- -- line 1590 ---------------------------------------- . #[diagnostic::on_const( . message = "pointers cannot be reliably compared during const eval", . note = "see issue #53020 for more information" . )] . impl PartialEq for *const T { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn eq(&self, other: &*const T) -> bool { 20,011 ( 0.00%) *self == *other . } . } . . /// Pointer equality is an equivalence relation. . #[stable(feature = "rust1", since = "1.0.0")] . #[diagnostic::on_const( . message = "pointers cannot be reliably compared during const eval", . note = "see issue #53020 for more information" -- line 1606 ---------------------------------------- 39 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derivable_impls.rs -------------------------------------------------------------------------------- Ir -- line 222 ---------------------------------------- . suggestions, . Applicability::MachineApplicable, . ); . }); . } . } . . impl<'tcx> LateLintPass<'tcx> for DerivableImpls { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . items: [child], . self_ty, . constness, . .. . }) = item.kind . && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) . && !item.span.from_expansion() -- line 239 ---------------------------------------- -- line 264 ---------------------------------------- . args, . cx.tcx.typeck_body(*b), . is_const, . ); . } else if adt_def.is_enum() && self.msrv.meets(cx, msrvs::DEFAULT_ENUM_ATTRIBUTE) { . check_enum(cx, item, func_expr, adt_def, is_const); . } . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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); 460,132 ( 0.03%) self.msrv.check_attributes(attrs); 60,047 ( 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 (20,004x) . } . . fn check_attributes_post(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 440,126 ( 0.03%) self.msrv.check_attributes_post(attrs); 60,047 ( 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 (20,004x) . } . }; . } . . /// 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 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"); 6 ( 0.00%) cx.enclosing_body.is_some_and(|id| { 3 ( 0.00%) cx.tcx 15 ( 0.00%) .hir_body_const_context(cx.tcx.hir_body_owner_def_id(id)) 660 ( 0.00%) => ???:::hir_body_const_context (3x) 414 ( 0.00%) => ???:::hir_body_owner_def_id (3x) . .is_some() . }) 3 ( 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 . pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { -- line 237 ---------------------------------------- -- line 1055 ---------------------------------------- . } . } . // Reverse `matched` so that it is in the same order as `methods`. . matched.reverse(); . Some(matched) . } . . /// Returns `true` if the provided `def_id` is an entrypoint to a program. 27 ( 0.00%) pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool { 3 ( 0.00%) cx.tcx . .entry_fn(()) . .is_some_and(|(entry_fn_def_id, _)| def_id == entry_fn_def_id) 24 ( 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. 3 ( 0.00%) pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 6 ( 0.00%) get_parent_expr_for_hir(cx, e.hir_id) 6 ( 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>> { 12 ( 0.00%) match cx.tcx.parent_hir_node(hir_id) { 366 ( 0.00%) => ???:::parent_hir_node (3x) . 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 1545 ---------------------------------------- . && let Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } = path.res . { . return true; . } . false . } . . pub fn iter_input_pats<'tcx>(decl: &FnDecl<'_>, body: &'tcx Body<'_>) -> impl Iterator> { 3 ( 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. 32 ( 0.00%) pub fn is_lint_allowed(cx: &LateContext<'_>, lint: &'static Lint, id: HirId) -> bool { 16 ( 0.00%) cx.tcx.lint_level_spec_at_node(lint, id).is_allow() 2,443 ( 0.00%) => ???:::lint_level_spec_at_node (8x) 16 ( 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. 21 ( 0.00%) pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_owner_iter(id) 15 ( 0.00%) .filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_)))) . .any(|(id, _)| find_attr!(tcx, id.def_id, AutomaticallyDerived)) 21 ( 0.00%) } . . /// Checks if the given `DefId` matches the `libc` item. . 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. . cx.tcx.crate_name(did.krate) == sym::libc && cx.tcx.def_path_str(did).ends_with(name.as_str()) . } . -- line 1708 ---------------------------------------- -- 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 { 11 ( 0.00%) find_attr!(cx.tcx, crate, NoStd) 55 ( 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() {} . /// } . /// ``` 18 ( 0.00%) pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool { 24 ( 0.00%) if let Node::Item(item) = cx.tcx.parent_hir_node(hir_id) { 780 ( 0.00%) => ???:::parent_hir_node (6x) . matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) . } else { . false . } 12 ( 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. 12 ( 0.00%) pub fn fn_def_id(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 3 ( 0.00%) fn_def_id_with_node_args(cx, expr).map(|(did, _)| did) 78 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (3x) 6 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call, . /// as well as its node args. 21 ( 0.00%) pub fn fn_def_id_with_node_args<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'_>, . ) -> Option<(DefId, GenericArgsRef<'tcx>)> { . let typeck = cx.typeck_results(); 15 ( 0.00%) match &expr.kind { . ExprKind::MethodCall(..) => Some(( . typeck.type_dependent_def_id(expr.hir_id)?, . typeck.node_args(expr.hir_id), . )), . ExprKind::Call( . Expr { . kind: ExprKind::Path(qpath), . hir_id: path_hir_id, -- line 2125 ---------------------------------------- -- line 2134 ---------------------------------------- . { . Some((id, typeck.node_args(*path_hir_id))) . } else { . None . } . }, . _ => None, . } 27 ( 0.00%) } . . /// 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. 6 ( 0.00%) pub fn peel_hir_expr_refs<'a>(expr: &'a Expr<'a>) -> (&'a Expr<'a>, usize) { . let mut count = 0; 6 ( 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) 3 ( 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 ---------------------------------------- 148,966 ( 0.01%) -------------------------------------------------------------------------------- -- 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)] 24 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Skip path expressions from deref calls. e.g. `Deref::deref(e)` 6 ( 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 6 ( 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 6 ( 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), . } 24 ( 0.00%) } . . fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { . 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. -- line 658 ---------------------------------------- -- line 687 ---------------------------------------- . replacements: vec![(pat.span, snip.into())], . hir_id: pat.hir_id, . }), . ); . } . } . } . 21 ( 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; . } 24 ( 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 40,010 ( 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 { 80,020 ( 0.01%) 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)> { 18 ( 0.00%) 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, . .. . }, . [arg], -- line 759 ---------------------------------------- 40,016 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/enum_clike.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . correctness, . "C-like enums that are `repr(isize/usize)` and have values that don't fit into an `i32`" . } . . declare_lint_pass!(UnportableVariant => [ENUM_CLIKE_UNPORTABLE_VARIANT]); . . impl<'tcx> LateLintPass<'tcx> for UnportableVariant { . #[expect(clippy::cast_possible_wrap)] 160,040 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 100,025 ( 0.01%) if cx.tcx.data_layout.pointer_size().bits() != 64 { . return; . } . if let ItemKind::Enum(_, _, def) = &item.kind { . for var in def.variants { . if let Some(anon_const) = &var.disr_expr { . let def_id = cx.tcx.hir_body_owner_def_id(anon_const.body); . let mut ty = cx . .tcx -- line 46 ---------------------------------------- -- line 69 ---------------------------------------- . ENUM_CLIKE_UNPORTABLE_VARIANT, . var.span, . "C-like enum variant discriminant is not portable to 32-bit targets", . ); . } . } . } . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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. 141,914 ( 0.01%) unsafe { crate::intrinsics::copy_nonoverlapping(src, dst, count) } 372 ( 0.00%) => ???:0x0000000000173dc0 (26x) . } . . /// 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) . ); 52 ( 0.00%) crate::intrinsics::write_bytes(dst, val, count) 22 ( 0.00%) => ???:0x00000000001747c0 (2x) . } . } . . /// 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"] 160,994 ( 0.01%) pub(crate) const unsafe fn drop_glue(_: &mut T) 292 ( 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:: (3x) . 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]>) { 18 ( 0.00%) let a = *x; . let b = *y; 53 ( 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) . ); 220,131 ( 0.01%) 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) . ); 123,815 ( 0.01%) 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 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 { 12 ( 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 ---------------------------------------- 20,404 ( 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/lib.rs -------------------------------------------------------------------------------- Ir -- line 177 ---------------------------------------- . } . } . . #[inline] . pub fn with_session_globals(f: F) -> R . where . F: FnOnce(&SessionGlobals) -> R, . { 80,018 ( 0.01%) 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 { 17 ( 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 { 20,013 ( 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 { 14 ( 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 774 ---------------------------------------- . !self.is_dummy() && sm.is_span_accessible(self) . } . . /// 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] 12 ( 0.00%) pub fn in_external_macro(self, sm: &SourceMap) -> bool { 140,070 ( 0.01%) self.ctxt().in_external_macro(sm) 2,020,109 ( 0.13%) => ???:::in_external_macro (20,001x) . } . . /// 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 { 6 ( 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 { 7 ( 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. 6 ( 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 ---------------------------------------- 40,083 ( 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/array/iter.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . // . // The docs even show a transmute from an array of `MaybeUninit` to . // an array of `T`. . // . // With that, this initialization satisfies the invariants. . // . // FIXME: If normal `transmute` ever gets smart enough to allow this . // directly, use it instead of `transmute_unchecked`. 260,000 ( 0.02%) let data: [MaybeUninit; N] = unsafe { transmute_unchecked(self) }; . // SAFETY: The original array was entirely initialized and the alive . // range we're passing here represents that fact. . let inner = unsafe { InnerSized::new_unchecked(IndexRange::zero_to(N), data) }; 55 ( 0.00%) IntoIter { inner: ManuallyDrop::new(inner) } 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) . } . } . . impl IntoIter { . /// Creates a new iterator over the given `array`. . #[stable(feature = "array_value_iter", since = "1.51.0")] . #[deprecated(since = "1.59.0", note = "use `IntoIterator::into_iter` instead")] . pub fn new(array: [T; N]) -> Self { -- line 85 ---------------------------------------- 17 ( 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/ops/index_range.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . /// # Safety . /// - Can only be called when `start < end`, aka when `len > 0`. . #[inline] . const unsafe fn next_unchecked(&mut self) -> usize { . debug_assert!(self.start < self.end); . . let value = self.start; . // SAFETY: The range isn't empty, so this cannot overflow 20,000 ( 0.00%) self.start = unsafe { value.unchecked_add(1) }; . value . } . . /// # Safety . /// - Can only be called when `start < end`, aka when `len > 0`. . #[inline] . const unsafe fn next_back_unchecked(&mut self) -> usize { . debug_assert!(self.start < self.end); -- line 71 ---------------------------------------- -- line 114 ---------------------------------------- . let suffix = Self { start: mid, end: self.end }; . self.end = mid; . suffix . } . . #[inline] . const fn assume_range(&self) { . // SAFETY: This is the type invariant 40,032 ( 0.00%) unsafe { crate::hint::assert_unchecked(self.start <= self.end) } . } . } . . impl Iterator for IndexRange { . type Item = usize; . . #[inline] . fn next(&mut self) -> Option { 180,000 ( 0.01%) if self.len() > 0 { . // SAFETY: We just checked that the range is non-empty . unsafe { Some(self.next_unchecked()) } . } else { . None . } . } . . #[inline] -- line 139 ---------------------------------------- -- line 159 ---------------------------------------- . Self: Sized, . F: FnMut(B, Self::Item) -> R, . R: Try, . { . // `Range` needs to check `start < end`, but thanks to our type invariant . // we can loop on the stricter `start != end`. . . self.assume_range(); 80,194 ( 0.01%) while self.start != self.end { . // SAFETY: We just checked that the range is non-empty . let i = unsafe { self.next_unchecked() }; . accum = f(accum, i)?; . } . try { accum } . } . } . -- line 175 ---------------------------------------- 40,039 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_canonical_impls.rs -------------------------------------------------------------------------------- Ir -- line 125 ---------------------------------------- . partial_ord_trait: Option, . ord_trait: Option, . clone_trait: Option, . copy_trait: Option, . } . . impl NonCanonicalImpls { . pub(crate) fn new(tcx: TyCtxt<'_>) -> Self { 2 ( 0.00%) let lang_items = tcx.lang_items(); 40 ( 0.00%) => ???:::lang_items (1x) . Self { . partial_ord_trait: lang_items.partial_ord_trait(), 3 ( 0.00%) ord_trait: tcx.get_diagnostic_item(sym::Ord), 106 ( 0.00%) => ???:::get_diagnostic_item (1x) . clone_trait: lang_items.clone_trait(), . copy_trait: lang_items.copy_trait(), . } . } . } . . /// The traits that this lint looks at . enum Trait { . Clone, . PartialOrd, . } . . impl LateLintPass<'_> for NonCanonicalImpls { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(impl_) = item.kind . // Both `PartialOrd` and `Clone` have one required method, and `PartialOrd` can have 5 methods in total . && (1..=5).contains(&impl_.items.len()) . && let Some(of_trait) = impl_.of_trait . && let Some(trait_did) = of_trait.trait_ref.trait_def_id() . // Check this early to hopefully bail out as soon as possible . && let trait_ = if Some(trait_did) == self.clone_trait { . Trait::Clone . } else if Some(trait_did) == self.partial_ord_trait { -- line 159 ---------------------------------------- -- line 201 ---------------------------------------- . && let Some((assoc, body, block)) = . assoc_fns.find(|(assoc, _, _)| assoc.ident.name == sym::partial_cmp) . { . check_partial_ord_on_ord(cx, assoc, item, body, block); . } . }, . } . } 160,040 ( 0.01%) } . } . . fn is_deref_self(expr: &Expr<'_>) -> bool { . if let ExprKind::Unary(UnOp::Deref, deref) = expr.kind . && let ExprKind::Path(qpath) = deref.kind . && last_path_segment(&qpath).ident.name == kw::SelfLower . { . return true; -- line 217 ---------------------------------------- 3 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 140,063 ( 0.01%) pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) -> bool { . let replacements: Vec<_> = collect_doc_replacements(attrs); . 40,018 ( 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 . } 160,072 ( 0.01%) } . . fn collect_doc_replacements(attrs: &[Attribute]) -> Vec<(Span, String)> { . attrs . .iter() . .filter_map(|attr| { 4 ( 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 { 2 ( 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/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 { 80,065 ( 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. 40,044 ( 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 ---------------------------------------- 180,158 ( 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` 33 ( 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>)> { 12 ( 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 . .instantiate_bound_regions_with_erased(cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip().output()); . . // for async functions, peel through `impl Future` to get `T` . if cx.tcx.ty_is_opaque_future(ty) -- line 32 ---------------------------------------- -- line 38 ---------------------------------------- . if let ty::Adt(adt_def, args) = ty.kind() . && cx.tcx.is_diagnostic_item(sym::Result, adt_def.did()) . { . let err_ty = args.type_at(1); . return Some((hir_ty, err_ty)); . } . } . None 27 ( 0.00%) } . 180,045 ( 0.01%) pub(super) fn check_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::Item<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { 40,010 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind 36 ( 0.00%) && let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) 423 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::result_err_ty (3x) . { . 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); . } 160,040 ( 0.01%) } . . pub(super) fn check_impl_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::ImplItem<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { -- line 72 ---------------------------------------- -- 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}>`")); . }, . ); . } . } . } . 21 ( 0.00%) pub(super) fn check_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx hir::Expr<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . ) { 6 ( 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); . } 24 ( 0.00%) } 6 ( 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/pattern.rs -------------------------------------------------------------------------------- Ir -- line 324 ---------------------------------------- . } . } . . /// Finds the next [`Reject`][SearchStep::Reject] result. . /// See [`next_back()`][ReverseSearcher::next_back]. . #[inline] . fn next_reject_back(&mut self) -> Option<(usize, usize)> { . loop { 35 ( 0.00%) match self.next_back() { . SearchStep::Reject(a, b) => return Some((a, b)), . SearchStep::Done => return None, . _ => continue, . } . } . } . } . -- line 340 ---------------------------------------- -- line 433 ---------------------------------------- . #[inline] . fn next_match(&mut self) -> Option<(usize, usize)> { . loop { . // get the haystack after the last character found . let bytes = self.haystack.as_bytes().get(self.finger..self.finger_back)?; . // the last byte of the utf8 encoded needle . // SAFETY: we have an invariant that `utf8_size < 5` . let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size() - 1) }; 185 ( 0.00%) if let Some(index) = memchr::memchr(last_byte, bytes) { . // The new finger is the index of the byte we found, . // plus one, since we memchr'd for the last byte of the character. . // . // Note that this doesn't always give us a finger on a UTF8 boundary. . // If we *didn't* find our character . // we may have indexed to the non-last byte of a 3-byte or 4-byte character. . // We can't just skip to the next valid starting byte because a character like . // ꁁ (U+A041 YI SYLLABLE PA), utf-8 `EA 81 81` will have us always find -- line 449 ---------------------------------------- -- line 451 ---------------------------------------- . // . // However, this is totally okay. While we have the invariant that . // self.finger is on a UTF8 boundary, this invariant is not relied upon . // within this method (it is relied upon in CharSearcher::next()). . // . // We only exit this method when we reach the end of the string, or if we . // find something. When we find something the `finger` will be set . // to a UTF8 boundary. 44 ( 0.00%) self.finger += index + 1; 66 ( 0.00%) if self.finger >= self.utf8_size() { . let found_char = self.finger - self.utf8_size(); . if let Some(slice) = self.haystack.as_bytes().get(found_char..self.finger) { 66 ( 0.00%) if slice == &self.utf8_encoded[0..self.utf8_size()] { . return Some((found_char, self.finger)); . } . } . } . } else { . // found nothing, exit . self.finger = self.finger_back; . return None; -- line 471 ---------------------------------------- -- line 691 ---------------------------------------- . fn next(&mut self) -> SearchStep { . let s = &mut self.char_indices; . // Compare lengths of the internal byte slice iterator . // to find length of current char . let pre_len = s.iter.iter.len(); . if let Some((i, c)) = s.next() { . let len = s.iter.iter.len(); . let char_len = pre_len - len; 14 ( 0.00%) if self.char_eq.matches(c) { . return SearchStep::Match(i, i + char_len); . } else { . return SearchStep::Reject(i, i + char_len); . } . } . SearchStep::Done . } . } -- line 707 ---------------------------------------- -- line 970 ---------------------------------------- . /// ``` . /// assert_eq!("Hello world".find("world"), Some(6)); . /// ``` . impl<'b> Pattern for &'b str { . type Searcher<'a> = StrSearcher<'a, 'b>; . . #[inline] . fn into_searcher(self, haystack: &str) -> StrSearcher<'_, 'b> { 245 ( 0.00%) StrSearcher::new(haystack, self) 7,062 ( 0.00%) => ???:::new (33x) . } . . /// Checks whether the pattern matches at the front of the haystack. . #[inline] . fn is_prefix_of(self, haystack: &str) -> bool { . haystack.as_bytes().starts_with(self.as_bytes()) . } . . /// Checks whether the pattern matches anywhere in the haystack . #[inline] 400,000 ( 0.03%) fn is_contained_in(self, haystack: &str) -> bool { . if self.len() == 0 { . return true; . } . 80,000 ( 0.01%) match self.len().cmp(&haystack.len()) { . Ordering::Less => { . if self.len() == 1 { . return haystack.as_bytes().contains(&self.as_bytes()[0]); . } . . #[cfg(any( . all(target_arch = "x86_64", target_feature = "sse2"), . all(target_arch = "loongarch64", target_feature = "lsx"), -- line 1002 ---------------------------------------- -- line 1007 ---------------------------------------- . return result; . } . } . . self.into_searcher(haystack).next_match().is_some() . } . _ => self == haystack, . } 320,000 ( 0.02%) } . . /// Removes the pattern from the front of haystack, if it matches. . #[inline] . fn strip_prefix_of(self, haystack: &str) -> Option<&str> { 6 ( 0.00%) if self.is_prefix_of(haystack) { . // SAFETY: prefix was just verified to exist. . unsafe { Some(haystack.get_unchecked(self.as_bytes().len()..)) } . } else { . None . } . } . . /// Checks whether the pattern matches at the back of the haystack. -- line 1028 ---------------------------------------- -- line 1035 ---------------------------------------- . } . . /// Removes the pattern from the back of haystack, if it matches. . #[inline] . fn strip_suffix_of<'a>(self, haystack: &'a str) -> Option<&'a str> . where . Self::Searcher<'a>: ReverseSearcher<'a>, . { 2 ( 0.00%) if self.is_suffix_of(haystack) { 2 ( 0.00%) let i = haystack.len() - self.as_bytes().len(); . // SAFETY: suffix was just verified to exist. . unsafe { Some(haystack.get_unchecked(..i)) } . } else { . None . } . } . . #[inline] -- line 1052 ---------------------------------------- -- line 1165 ---------------------------------------- . } . otherwise => otherwise, . } . } . } . } . . #[inline] 297 ( 0.00%) fn next_match(&mut self) -> Option<(usize, usize)> { 96 ( 0.00%) match self.searcher { . StrSearcherImpl::Empty(..) => loop { . match self.next() { . SearchStep::Match(a, b) => return Some((a, b)), . SearchStep::Done => return None, . SearchStep::Reject(..) => {} . } . }, . StrSearcherImpl::TwoWay(ref mut searcher) => { 97 ( 0.00%) let is_long = searcher.memory == usize::MAX; . // write out `true` and `false` cases to encourage the compiler . // to specialize the two cases separately. 49 ( 0.00%) if is_long { . searcher.next::( . self.haystack.as_bytes(), . self.needle.as_bytes(), . true, . ) . } else { . searcher.next::( . self.haystack.as_bytes(), . self.needle.as_bytes(), . false, . ) . } . } . } 264 ( 0.00%) } . } . . unsafe impl<'a, 'b> ReverseSearcher<'a> for StrSearcher<'a, 'b> { . #[inline] . fn next_back(&mut self) -> SearchStep { . match self.searcher { . StrSearcherImpl::Empty(ref mut searcher) => { . if searcher.is_finished { -- line 1209 ---------------------------------------- -- line 1446 ---------------------------------------- . . #[inline] . fn byteset_create(bytes: &[u8]) -> u64 { . bytes.iter().fold(0, |a, &b| (1 << (b & 0x3f)) | a) . } . . #[inline] . fn byteset_contains(&self, byte: u8) -> bool { 548 ( 0.00%) (self.byteset >> ((byte & 0x3f) as usize)) & 1 != 0 . } . . // One of the main ideas of Two-Way is that we factorize the needle into . // two halves, (u, v), and begin trying to find v in the haystack by scanning . // left to right. If v matches, we try to match u by scanning right to left. . // How far we can jump when we encounter a mismatch is all based on the fact . // that (u, v) is a critical factorization for the needle. . #[inline] . fn next(&mut self, haystack: &[u8], needle: &[u8], long_period: bool) -> S::Output . where . S: TwoWayStrategy, . { . // `next()` uses `self.position` as its cursor . let old_pos = self.position; 48 ( 0.00%) let needle_last = needle.len() - 1; . 'search: loop { . // Check that we have room to search in . // position + needle_last can not overflow if we assume slices . // are bounded by isize's range. 304 ( 0.00%) let tail_byte = match haystack.get(self.position + needle_last) { . Some(&b) => b, . None => { 30 ( 0.00%) self.position = haystack.len(); . return S::rejecting(old_pos, self.position); . } . }; . . if S::use_early_reject() && old_pos != self.position { . return S::rejecting(old_pos, self.position); . } . . // Quickly skip by large portions unrelated to our substring 418 ( 0.00%) if !self.byteset_contains(tail_byte) { 498 ( 0.00%) self.position += needle.len(); . if !long_period { . self.memory = 0; . } . continue 'search; . } . . // See if the right part of the needle matches . let start = -- line 1496 ---------------------------------------- -- line 1497 ---------------------------------------- . if long_period { self.crit_pos } else { cmp::max(self.crit_pos, self.memory) }; . for i in start..needle.len() { . // SAFETY: on every iteration of `'search`, the `haystack.get(self.position + needle_last)` . // check returned `Some`, so `self.position + needle_last < haystack.len()`. . // Since `i < needle.len()` implies `i <= needle_last`, we have . // `self.position + i < haystack.len()`. . // Every path that mutates `self.position` below either returns or re-enters `'search`, . // which re-runs the check before reaching the loop again. 157 ( 0.00%) if needle[i] != unsafe { *haystack.get_unchecked(self.position + i) } { 18 ( 0.00%) self.position += i - self.crit_pos + 1; 6 ( 0.00%) if !long_period { . self.memory = 0; . } . continue 'search; . } . } . . // See if the left part of the needle matches . let start = if long_period { 0 } else { self.memory }; -- line 1515 ---------------------------------------- -- line 1528 ---------------------------------------- . continue 'search; . } . } . . // We have found a match! . let match_pos = self.position; . . // Note: add self.period instead of needle.len() to have overlapping matches 38 ( 0.00%) self.position += needle.len(); . if !long_period { 28 ( 0.00%) self.memory = 0; // set to needle.len() - self.period for overlapping matches . } . . return S::matching(match_pos, match_pos + needle.len()); . } . } . . // Follows the ideas in `next()`. . // -- line 1546 ---------------------------------------- -- line 1759 ---------------------------------------- . false . } . #[inline] . fn rejecting(_a: usize, _b: usize) -> Self::Output { . None . } . #[inline] . fn matching(a: usize, b: usize) -> Self::Output { 30 ( 0.00%) Some((a, b)) . } . } . . /// Emit Rejects regularly . enum RejectAndMatch {} . . impl TwoWayStrategy for RejectAndMatch { . type Output = SearchStep; -- line 1775 ---------------------------------------- 1,158 ( 0.00%) -------------------------------------------------------------------------------- -- 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. 18 ( 0.00%) pub fn check_clippy_attr(sess: &Session, attr: &A) { 2 ( 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"); . }, . } . } 14 ( 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| { 2 ( 0.00%) if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . if *segment2 == sym::cyclomatic_complexity { . return false; . } . *segment2 == name . } else { . false -- line 61 ---------------------------------------- -- 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 { 3 ( 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; 80,036 ( 0.01%) parse_attrs(sess, attrs, name, |val| stack.push(val)); 400,287 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> (20,009x) . } . pub fn pop_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 80,036 ( 0.01%) parse_attrs(sess, attrs, name, |val| { 400,289 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> (20,009x) . let popped = stack.pop(); . debug_assert_eq!(popped, Some(val)); . }); . } . } . 400,180 ( 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); . } 320,144 ( 0.02%) } 20,009 ( 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_ast/src/ast.rs -------------------------------------------------------------------------------- Ir -- line 4197 ---------------------------------------- . Delegation(Box), . /// A list or glob delegation item (`reuse prefix::{a, b, c}`, `reuse prefix::*`). . /// Treated similarly to a macro call and expanded early. . DelegationMac(Box), . } . . impl ItemKind { . pub fn ident(&self) -> Option { 100,029 ( 0.01%) match *self { 1 ( 0.00%) ItemKind::ExternCrate(_, ident) . | ItemKind::Static(StaticItem { ident, .. }) . | ItemKind::Const(ConstItem { ident, .. }) 6 ( 0.00%) | ItemKind::Fn(Fn { ident, .. }) . | ItemKind::Mod(_, ident, _) . | ItemKind::TyAlias(TyAlias { ident, .. }) . | ItemKind::Enum(ident, ..) . | ItemKind::Struct(ident, ..) . | ItemKind::Union(ident, ..) . | ItemKind::Trait(Trait { ident, .. }) . | ItemKind::TraitAlias(TraitAlias { ident, .. }) . | ItemKind::MacroDef(ident, _) -- line 4217 ---------------------------------------- 40,016 ( 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 { 240,060 ( 0.02%) fn new(kind: ItemKindDescr, ident: Option, span: Span, mod_items: Option) -> Self { 160,040 ( 0.01%) Self { . kind, . name: ident.map(|ident| ident.name), . span: match ident { 4 ( 0.00%) Some(ident) => span.with_hi(ident.span.hi()), . None => span.shrink_to_lo(), . }, . mod_items, . } 160,040 ( 0.01%) } . } . . 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, . ); . } . } . 260,065 ( 0.02%) 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(); . 20,005 ( 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); 160,040 ( 0.01%) } . } . . fn assoc_item_descr(kind: &AssocItemKind) -> &'static str { . 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) { -- line 541 ---------------------------------------- -- line 549 ---------------------------------------- . } . . 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); . } . 200,050 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 100,026 ( 0.01%) 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), 80,020 ( 0.01%) _ => (ItemKindDescr::Other(item.kind.descr()), None), . }; 100,025 ( 0.01%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, mod_items); 1,000,342 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (20,005x) 100,025 ( 0.01%) self.check_item_kind(cx, info, &item.attrs, item.id); 2,160,553 ( 0.14%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (20,005x) 160,040 ( 0.01%) } . } 40,028 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs -------------------------------------------------------------------------------- Ir -- line 33 ---------------------------------------- . SyntheticAttr::CfgTrace(_) => Self::CfgTrace, . SyntheticAttr::CfgAttrTrace(_) => Self::CfgAttrTrace, . }, . AttrKind::DocComment(..) => Self::Doc, . } . } . } . 200,050 ( 0.01%) pub(super) fn check(cx: &EarlyContext<'_>, item_span: Span, attrs: &[Attribute]) { . let mut inner_attr_kind: FxHashSet = FxHashSet::default(); . let mut outer_attr_kind: FxHashSet = FxHashSet::default(); . . let source_map = cx.sess().source_map(); 60,015 ( 0.00%) let item_src = source_map.lookup_source_file(item_span.lo()); 1,980,495 ( 0.12%) => ???:::lookup_source_file (20,005x) . . for attr in attrs { 2 ( 0.00%) if attr.span.from_expansion() || !attr_in_same_src_as_item(source_map, &item_src, attr.span) { . continue; . } . . let kind: SimpleAttrKind = (&attr.kind).into(); . match attr.style { . AttrStyle::Inner => { . if outer_attr_kind.contains(&kind) { . lint_mixed_attrs(cx, attrs); -- line 57 ---------------------------------------- -- line 63 ---------------------------------------- . if inner_attr_kind.contains(&kind) { . lint_mixed_attrs(cx, attrs); . return; . } . outer_attr_kind.insert(kind); . }, . } . } 160,040 ( 0.01%) } . . fn lint_mixed_attrs(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . let mut attrs_iter = attrs.iter().filter(|attr| !attr.span.from_expansion()); . let span = if let (Some(first), Some(last)) = (attrs_iter.next(), attrs_iter.next_back()) { . first.span.with_hi(last.span.hi()) . } else { . return; . }; -- line 79 ---------------------------------------- 20,005 ( 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/symbol.rs -------------------------------------------------------------------------------- Ir -- line 2670 ---------------------------------------- . pub const fn new(n: u32) -> Self { . Symbol(SymbolIndex::from_u32(n)) . } . . /// Maps a string to its interned representation. . #[rustc_diagnostic_item = "SymbolIntern"] . #[inline] . pub fn intern(str: &str) -> Self { 181 ( 0.00%) with_session_globals(|session_globals| session_globals.symbol_interner.intern_str(str)) 1,995 ( 0.00%) => ???:::intern_str (15x) . } . . /// Access the underlying string. This is a slowish operation because it . /// requires locking the symbol interner. . /// . /// Note that the lifetime of the return value is a lie. It's not the same . /// as `&self`, but actually tied to the lifetime of the underlying . /// interner. Interners are long-lived, and there are very few of them, and . /// this function is typically used for short-lived things, so in practice . /// it works out ok. . #[inline] . pub fn as_str(&self) -> &str { . with_session_globals(|session_globals| unsafe { 240,010 ( 0.02%) std::mem::transmute::<&str, &str>(session_globals.symbol_interner.get_str(*self)) 560,112 ( 0.04%) => ???:::get_str (20,004x) . }) . } . . pub fn as_u32(self) -> u32 { . self.0.as_u32() . } . . pub fn is_empty(self) -> bool { -- line 2700 ---------------------------------------- 20,006 ( 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.rs -------------------------------------------------------------------------------- Ir -- line 24 ---------------------------------------- . pub(super) trait SpecFromIter { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIter for Vec . where . I: Iterator, . { 200,050 ( 0.01%) default fn from_iter(iterator: I) -> Self { 20,046 ( 0.00%) SpecFromIterNested::from_iter(iterator) 138 ( 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 (3x) 180,045 ( 0.01%) } . } . . 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: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs -------------------------------------------------------------------------------- Ir -- line 268 ---------------------------------------- . /// . /// This default shouldn't be overridden without good reason, . /// such as when forwarding to another PartialEq implementation. . #[inline] . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "cmp_partialeq_ne"] . fn ne(&self, other: &Rhs) -> bool { 21 ( 0.00%) !self.eq(other) 141 ( 0.00%) => ???:::eq (3x) . } . } . . /// Derive macro generating an impl of the trait [`PartialEq`]. . /// The behavior of this macro is described in detail [here](PartialEq#derivable). . #[rustc_builtin_macro] . #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] . #[allow_internal_unstable(core_intrinsics, structural_match)] -- line 284 ---------------------------------------- -- line 486 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_lt(), false); . /// assert_eq!(Ordering::Greater.is_lt(), false); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_lt(self) -> bool { 1 ( 0.00%) self.as_raw() < 0 . } . . /// Returns `true` if the ordering is the `Greater` variant. . /// . /// # Examples . /// . /// ``` . /// use std::cmp::Ordering; -- line 502 ---------------------------------------- -- line 505 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_gt(), false); . /// assert_eq!(Ordering::Greater.is_gt(), true); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_gt(self) -> bool { 11 ( 0.00%) self.as_raw() > 0 . } . . /// Returns `true` if the ordering is either the `Less` or `Equal` variant. . /// . /// # Examples . /// . /// ``` . /// use std::cmp::Ordering; -- line 521 ---------------------------------------- -- line 543 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_ge(), true); . /// assert_eq!(Ordering::Greater.is_ge(), true); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_ge(self) -> bool { 6 ( 0.00%) self.as_raw() >= 0 . } . . /// Reverses the `Ordering`. . /// . /// * `Less` becomes `Greater`. . /// * `Greater` becomes `Less`. . /// * `Equal` becomes `Equal`. . /// -- line 559 ---------------------------------------- -- line 1043 ---------------------------------------- . #[inline] . #[must_use] . #[rustc_diagnostic_item = "cmp_ord_max"] . fn max(self, other: Self) -> Self . where . Self: Sized + [const] Destruct, . { . if other < self { self } else { other } 80,183 ( 0.01%) } . . /// Compares and returns the minimum of two values. . /// . /// Returns the first argument if the comparison determines them to be equal. . /// . /// # Examples . /// . /// ``` -- line 1059 ---------------------------------------- -- line 1082 ---------------------------------------- . #[inline] . #[must_use] . #[rustc_diagnostic_item = "cmp_ord_min"] . fn min(self, other: Self) -> Self . where . Self: Sized + [const] Destruct, . { . if other < self { other } else { self } 63 ( 0.00%) } . . /// Restrict a value to a certain interval. . /// . /// Returns `max` if `self` is greater than `max`, and `min` if `self` is . /// less than `min`. Otherwise this returns `self`. . /// . /// # Panics . /// -- line 1098 ---------------------------------------- -- line 1722 ---------------------------------------- . #[stable(feature = "cmp_min_max_by", since = "1.53.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . pub const fn max_by Ordering>( . v1: T, . v2: T, . compare: F, . ) -> T { . if compare(&v1, &v2).is_gt() { v1 } else { v2 } 48 ( 0.00%) } . . /// Returns the element that gives the maximum value from the specified function. . /// . /// Returns the second argument if the comparison determines them to be equal. . /// . /// # Examples . /// . /// ``` -- line 1738 ---------------------------------------- -- line 1889 ---------------------------------------- . /// NOTE: Calling this on a non-primitive type (such as `()`) . /// leads to an infinitely-looping self-recursive implementation. . macro_rules! impl_partial_eq_for_primitive { . ($($t:ty)*) => ($( . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq for $t { . #[inline] 252 ( 0.00%) fn eq(&self, other: &Self) -> bool { *self == *other } . // Override the default to use the primitive implementation for `!=`. . #[inline] . fn ne(&self, other: &Self) -> bool { *self != *other } . } . )*) . } . . impl_partial_eq_for_primitive! { -- line 1905 ---------------------------------------- -- line 1928 ---------------------------------------- . } . . eq_impl! { () bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } . . #[rustfmt::skip] . macro_rules! partial_ord_methods_primitive_impl { . () => { . #[inline(always)] 20,088 ( 0.00%) fn lt(&self, other: &Self) -> bool { *self < *other } . #[inline(always)] . fn le(&self, other: &Self) -> bool { *self <= *other } . #[inline(always)] . fn gt(&self, other: &Self) -> bool { *self > *other } . #[inline(always)] . fn ge(&self, other: &Self) -> bool { *self >= *other } . . // These implementations are the same for `Ord` or `PartialOrd` types -- line 1944 ---------------------------------------- -- line 2135 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq<&B> for &A . where . A: [const] PartialEq, . { . #[inline] . fn eq(&self, other: &&B) -> bool { 1 ( 0.00%) PartialEq::eq(*self, *other) . } . #[inline] . fn ne(&self, other: &&B) -> bool { . PartialEq::ne(*self, *other) . } . } . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -- line 2151 ---------------------------------------- 20,076 ( 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 . 20,005 ( 0.00%) let mut residual = None; . let shunt = GenericShunt { iter, residual: &mut residual }; . let value = f(shunt); 40,010 ( 0.00%) match residual { . Some(r) => FromResidual::from_residual(r), 60,015 ( 0.00%) None => Try::from_output(value), . } . } . . impl Iterator for GenericShunt<'_, I, R> . where . I: Iterator>, . { . type Item = ::Output; . 200,050 ( 0.01%) fn next(&mut self) -> Option { . self.try_for_each(ControlFlow::Break).break_value() 180,045 ( 0.01%) } . . 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: /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); 40,022 ( 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(); . 20,009 ( 0.00%) unindent_doc_fragments(&mut doc_fragments); 440,198 ( 0.03%) => ???:rustc_resolve::rustdoc::unindent_doc_fragments (20,009x) . 120,054 ( 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 ---------------------------------------- 4 ( 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/result.rs -------------------------------------------------------------------------------- Ir -- line 706 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . #[rustc_diagnostic_item = "result_ok_method"] . pub const fn ok(self) -> Option . where . T: [const] Destruct, . E: [const] Destruct, . { 8 ( 0.00%) match self { . Ok(x) => Some(x), . Err(_) => None, . } . } . . /// Converts from `Result` to [`Option`]. . /// . /// Converts `self` into an [`Option`], consuming `self`, -- line 722 ---------------------------------------- -- line 828 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn map(self, op: F) -> Result . where . F: [const] FnOnce(T) -> U + [const] Destruct, . { 2 ( 0.00%) match self { . Ok(t) => Ok(op(t)), . Err(e) => Err(e), . } . } . . /// Returns the provided default (if [`Err`]), or . /// applies a function to the contained value (if [`Ok`]). . /// -- line 844 ---------------------------------------- -- line 957 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn map_err(self, op: O) -> Result . where . O: [const] FnOnce(E) -> F + [const] Destruct, . { 40,048 ( 0.00%) match self { 40,048 ( 0.00%) Ok(t) => Ok(t), . Err(e) => Err(op(e)), . } . } . . /// Calls a function with a reference to the contained value if [`Ok`]. . /// . /// Returns the original result. . /// -- line 974 ---------------------------------------- -- line 1222 ---------------------------------------- . /// ``` . #[inline(always)] . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn unwrap(self) -> T . where . E: fmt::Debug, . { 2 ( 0.00%) match self { . Ok(t) => t, . Err(e) => unwrap_failed("called `Result::unwrap()` on an `Err` value", &e), . } . } . . /// Returns the contained [`Ok`] value or a default . /// . /// Consumes the `self` argument then, if [`Ok`], returns the contained -- line 1238 ---------------------------------------- -- line 1612 ---------------------------------------- . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn unwrap_or_else(self, op: F) -> T . where . F: [const] FnOnce(E) -> T + [const] Destruct, . { . match self { 6 ( 0.00%) Ok(t) => t, . Err(e) => op(e), . } . } . . /// Returns the contained [`Ok`] value, consuming the `self` value, . /// without checking that the value is not an [`Err`]. . /// . /// # Safety -- line 1628 ---------------------------------------- -- line 1643 ---------------------------------------- . /// unsafe { x.unwrap_unchecked() }; // Undefined behavior! . /// ``` . #[inline] . #[track_caller] . #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] . #[rustc_const_unstable(feature = "const_result_unwrap_unchecked", issue = "148714")] . pub const unsafe fn unwrap_unchecked(self) -> T { . match self { 4 ( 0.00%) Ok(t) => t, . Err(e) => { . // FIXME(const-hack): to avoid E: const Destruct bound . super::mem::forget(e); . // SAFETY: the safety contract must be upheld by the caller. . unsafe { hint::unreachable_unchecked() } . } . } . } -- line 1659 ---------------------------------------- -- line 1714 ---------------------------------------- . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . pub const fn copied(self) -> Result . where . T: Copy, . { . // FIXME(const-hack): this implementation, which sidesteps using `Result::map` since it's not const . // ready yet, should be reverted when possible to avoid code repetition . match self { 128 ( 0.00%) Ok(&v) => Ok(v), . Err(e) => Err(e), . } . } . . /// Maps a `Result<&T, E>` to a `Result` by cloning the contents of the . /// `Ok` part. . /// . /// # Examples -- line 1730 ---------------------------------------- -- line 2169 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . Ok(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 40,048 ( 0.00%) match self { 20,022 ( 0.00%) Ok(v) => ControlFlow::Continue(v), . Err(e) => ControlFlow::Break(Err(e)), . } . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl> ops::FromResidual> -- line 2186 ---------------------------------------- 60,080 ( 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 { 36 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: FnKind<'_>, . decl: &FnDecl<'tcx>, . _: &Body<'_>, . _: Span, . def_id: LocalDefId, . ) { 12 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 6 ( 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) 405 ( 0.00%) => ???:::hir_get_parent_item (3x) . { . matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 6 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(def_id); 48 ( 0.00%) => ???:::is_exported (3x) . 6 ( 0.00%) self.check_fn_decl( . cx, . decl, . CheckTyContext { . is_in_trait_impl, 12 ( 0.00%) in_body: matches!(fn_kind, FnKind::Closure), . is_exported, . ..CheckTyContext::default() . }, . ); 24 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 60,015 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 320,080 ( 0.02%) => ???:::is_exported (20,005x) . 100,025 ( 0.01%) match item.kind { . ItemKind::Static(_, _, ty, _) | ItemKind::Const(_, _, ty, _) => self.check_ty( . cx, . ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ), -- line 457 ---------------------------------------- -- 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. 9 ( 0.00%) if context.is_in_trait_impl { . return; . } . 3 ( 0.00%) for input in decl.inputs { . self.check_ty(cx, input, context); . } . 6 ( 0.00%) if let FnRetTy::Return(ty) = decl.output { . self.check_ty(cx, ty, context); . } . } . . /// 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. -- line 575 ---------------------------------------- 14 ( 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 . } . }}; 80,073 ( 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 . 2 ( 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 153 ---------------------------------------- . impl<'a, T> Iterator for $name<'a, T> { . type Item = $elem; . . #[inline] . fn next(&mut self) -> Option<$elem> { . // intentionally not using the helpers because this is . // one of the most mono'd things in the library. . 1 ( 0.00%) let ptr = self.ptr; 1 ( 0.00%) let end_or_len = self.end_or_len; . // SAFETY: See inner comments. (For some reason having multiple . // block breaks inlining this -- if you can fix that please do!) . unsafe { . if T::IS_ZST { . let len = end_or_len.addr(); . if len == 0 { . return None; . } -- line 170 ---------------------------------------- -- 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.) 770,948 ( 0.05%) 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. 3 ( 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 970 ( 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) }; 819 ( 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() { 494 ( 0.00%) 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() { 61 ( 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() { 14 ( 0.00%) if let Some(y) = f(x) { 24 ( 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 (2x) . 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() { 196 ( 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); . } 132 ( 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 ---------------------------------------- 341,220 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs -------------------------------------------------------------------------------- Ir -- line 118 ---------------------------------------- . replacement, . Applicability::MaybeIncorrect, . ); . }, . ); . } . . impl LateLintPass<'_> for UpperCaseAcronyms { 200,050 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, it: &Item<'_>) { . // do not lint public items or in macros 60,015 ( 0.00%) if it.span.in_external_macro(cx.sess().source_map()) 140,021 ( 0.01%) || (self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(it.owner_id.def_id)) 320,048 ( 0.02%) => ???:::is_exported (20,003x) . { . return; . } 80,012 ( 0.01%) match it.kind { . ItemKind::TyAlias(ident, ..) | ItemKind::Struct(ident, ..) | ItemKind::Trait { ident, .. } => { . check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); . }, . ItemKind::Enum(ident, _, ref enumdef) => { . check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); . // check enum variants separately because again we only want to lint on private enums and . // the fn check_variant does not know about the vis of the enum of its variants . enumdef.variants.iter().for_each(|variant| { . check_ident(cx, &variant.ident, variant.hir_id, self.upper_case_acronyms_aggressive); . }); . }, . _ => {}, . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partialeq_ne_impl.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub PARTIALEQ_NE_IMPL, . complexity, . "re-implementing `PartialEq::ne`" . } . . declare_lint_pass!(PartialEqNeImpl => [PARTIALEQ_NE_IMPL]); . . impl<'tcx> LateLintPass<'tcx> for PartialEqNeImpl { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . items: impl_items, . .. . }) = item.kind . && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) . && let Some(eq_trait) = cx.tcx.lang_items().eq_trait() . && of_trait.trait_ref.path.res.def_id() == eq_trait . { -- line 44 ---------------------------------------- -- line 49 ---------------------------------------- . PARTIALEQ_NE_IMPL, . impl_item.hir_id(), . cx.tcx.def_span(impl_item.owner_id), . "re-implementing `PartialEq::ne` is unnecessary", . ); . } . } . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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 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. . 20,091 ( 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 { 252 ( 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. . 6 ( 0.00%) if self < rhs { . None . } else { . // SAFETY: just checked this can't overflow 135 ( 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 { 52 ( 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,788 ( 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 { 20,350 ( 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 { 40,386 ( 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) { 120,237 ( 0.01%) 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 ---------------------------------------- 80,258 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_noop_waker.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . . impl ManualNoopWaker { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualNoopWaker { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 40,010 ( 0.00%) if let ItemKind::Impl(imp) = item.kind . && let Some(trait_ref) = imp.of_trait . && let Some(trait_id) = trait_ref.trait_ref.trait_def_id() . && cx.tcx.is_diagnostic_item(sym::Wake, trait_id) . && self.msrv.meets(cx, msrvs::WAKER_NOOP) . { . for impl_item_ref in imp.items { . let impl_item = cx . .tcx -- line 62 ---------------------------------------- -- line 75 ---------------------------------------- . cx, . MANUAL_NOOP_WAKER, . trait_ref.trait_ref.path.span, . "manual implementation of a no-op waker", . None, . "use `std::task::Waker::noop()` instead", . ); . } 160,040 ( 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),* $(,)?)) => { 3,823,027 ( 0.24%) if $self.$field.active { 2,002,293 ( 0.13%) rustc_lint::LateLintPass::$name(&mut $self.$field.pass, $($arg),*); 42,812 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/cargo/mod.rs:::check_crate (1x) 1,274 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_crate (1x) 84 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_crate (1x) 19 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_crate (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),*);)*]) => ( 660,418 ( 0.04%) $(#[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),*)); 360,239 ( 0.02%) })* . ) . } . . /// 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); . } . }; . } 253 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/module_style.rs -------------------------------------------------------------------------------- Ir -- line 109 ---------------------------------------- . mod_file: Arc, . mod_ident: Ident, . path_from_working_dir: Option, . contains_external: bool, . has_path_attr: bool, . is_cfg_test: bool, . } . 7 ( 0.00%) #[derive(Default)] . pub struct ModStyle { . working_dir: Option, . regular_mod_stack: Vec, . inline_mod_stack: Vec, . } . . impl ModStyle { . fn inside_cfg_test_inline_mod(&self) -> bool { -- line 125 ---------------------------------------- -- line 128 ---------------------------------------- . . fn get_relative_path_from_working_dir(&self, file: &SourceFile) -> Option { . try_trim_file_path_prefix(file, self.working_dir.as_ref()?).map(Path::to_path_buf) . } . } . . impl EarlyLintPass for ModStyle { . fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { 3 ( 0.00%) self.working_dir = cx.sess().source_map().working_dir().local_path().map(Path::to_path_buf); . } . 200,050 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 20,005 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 20,005 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 20,005 ( 0.00%) && cx.builder.lint_level_spec(INLINE_MODULES).is_allow() . { . return; . } . if let ItemKind::Mod(_, mod_ident, ModKind::Loaded(_, inline_or_not, mod_spans, ..)) = &item.kind { . let has_path_attr = item.attrs.iter().any(|attr| attr.has_name(sym::path)); . let mod_file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); . let path_from_working_dir = self.get_relative_path_from_working_dir(&mod_file); . let current = ModState { -- line 150 ---------------------------------------- -- line 184 ---------------------------------------- . Inline::No { .. } => { . if !has_path_attr && let Some(last) = self.regular_mod_stack.last_mut() { . last.contains_external = true; . } . self.regular_mod_stack.push(current); . }, . } . } 160,040 ( 0.01%) } . 200,050 ( 0.01%) fn check_item_post(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 20,005 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 20,005 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 20,005 ( 0.00%) && cx.builder.lint_level_spec(INLINE_MODULES).is_allow() . { . return; . } . . if let ItemKind::Mod(.., ModKind::Loaded(_, inline_or_not, ..)) = &item.kind { . match inline_or_not { . Inline::Yes => { . self.inline_mod_stack.pop(); -- line 205 ---------------------------------------- -- line 212 ---------------------------------------- . if current.contains_external { . check_self_named_module(cx, path, ¤t.mod_file); . } . check_mod_module(cx, path, ¤t.mod_file); . } . }, . } . } 160,040 ( 0.01%) } . } . . fn check_self_named_module(cx: &EarlyContext<'_>, path: &Path, file: &SourceFile) { . if !path.ends_with("mod.rs") { . let mut mod_folder = path.with_extension(""); . span_lint_and_then( . cx, . SELF_NAMED_MODULE_FILES, -- line 228 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 20,006 ( 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 100,030 ( 0.01%) pub fn meets(self, cx: &LateContext<'_>, required: RustcVersion) -> bool { . self.current(cx).is_none_or(|msrv| msrv >= required) 80,024 ( 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) 20,007 ( 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); . } 120,034 ( 0.01%) } . . pub fn check_attributes_post(&mut self, attrs: &[Attribute]) { . if parse_attrs(attrs).is_some() { . self.stack.pop(); . } 120,034 ( 0.01%) } . } . . fn parse_attrs(attrs: &[impl AttributeExt]) -> Option { 88 ( 0.00%) let msrv_attr = attrs.iter().find(|attr| attr.path_matches(&[sym::clippy, sym::msrv]))?; 88 ( 0.00%) => ???:::path_matches (11x) . . let msrv = msrv_attr.value_str()?; . . parse_version(msrv) . } . 160,048 ( 0.01%) pub fn check_attrs(sess: &Session, attrs: &[impl AttributeExt]) { 8 ( 0.00%) let mut msrv_attrs = attrs.iter().filter(|attr| attr.path_matches(&[sym::clippy, sym::msrv])); 16 ( 0.00%) => ???:::path_matches (2x) . . 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")); . } 160,048 ( 0.01%) } 40,015 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partial_pub_fields.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub PARTIAL_PUB_FIELDS, . restriction, . "partial fields of a struct are public" . } . . declare_lint_pass!(PartialPubFields => [PARTIAL_PUB_FIELDS]); . . impl EarlyLintPass for PartialPubFields { 140,035 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 40,010 ( 0.00%) let ItemKind::Struct(_, _, ref st) = item.kind else { . return; . }; . . let mut fields = st.fields().iter(); . let Some(first_field) = fields.next() else { . // Empty struct. . return; . }; -- line 53 ---------------------------------------- -- line 66 ---------------------------------------- . } else if all_pub && !field.vis.kind.is_pub() { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, PARTIAL_PUB_FIELDS, field.vis.span, msg, |diag| { . diag.help("consider using public field here"); . }); . return; . } . } 160,040 ( 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_lint/src/levels.rs -------------------------------------------------------------------------------- Ir -- line 482 ---------------------------------------- . } . } . . impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> . where . LevelSpec: Into, . { . pub(crate) fn sess(&self) -> &Session { 80,028 ( 0.01%) self.sess . } . . pub(crate) fn features(&self) -> &Features { . self.features . } . . fn add_command_line(&mut self) { . for &(ref lint_name, level) in &self.sess.opts.lint_opts { -- line 498 ---------------------------------------- -- line 996 ---------------------------------------- . ); . } . . false . } . . /// Find the lint level for a lint. . pub fn lint_level_spec(&self, lint: &'static Lint) -> LevelSpec { 480,129 ( 0.03%) self.provider.get_lint_level_spec(lint, self.sess) 167 ( 0.00%) => ???:::get_lint_level_spec (1x) . } . . /// Used to emit a lint-related diagnostic based on the current state of . /// this lint context. . #[track_caller] . pub(crate) fn opt_span_lint( . &self, . lint: &'static Lint, . span: Option, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { . let level_spec = self.lint_level_spec(lint); 1 ( 0.00%) emit_lint_base(self.sess, lint, level_spec, span, decorator) . } . . #[track_caller] . pub fn emit_span_lint( . &self, . lint: &'static Lint, . span: MultiSpan, . decorator: impl for<'a> Diagnostic<'a, ()>, -- line 1025 ---------------------------------------- 120,034 ( 0.01%) -------------------------------------------------------------------------------- -- 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. 200,018 ( 0.01%) if let ItemKind::Use(path, kind @ (UseKind::Single(_) | UseKind::Glob)) = item.kind 80,004 ( 0.01%) && !item.span.in_external_macro(cx.sess().source_map()) . // use `present_items` because it could be in either type_ns or value_ns 260,000 ( 0.02%) && let Some(res) = path.res.present_items().next() 40,000 ( 0.00%) && let Some(def_id) = res.opt_def_id() 100,000 ( 0.01%) && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) 300,000 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (20,000x) . { . let module = if is_integer_module(cx, def_id) { . true 120,000 ( 0.01%) } else if is_numeric_const(cx, def_id) { 1,300,000 ( 0.08%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (20,000x) . false . } else { . return; . }; . . span_lint_and_then( . cx, . LEGACY_NUMERIC_CONSTANTS, -- line 71 ---------------------------------------- -- 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") . ); . } . }, . ); . } 20,005 ( 0.00%) } . 30 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { . // `std::::` check 9 ( 0.00%) let (sugg, msg) = if let ExprKind::Path(qpath) = &expr.kind . && let QPath::Resolved(None, path) = qpath . && 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 6 ( 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, . ); . }); . } 24 ( 0.00%) } . } . . fn is_integer_module(cx: &LateContext<'_>, did: DefId) -> bool { 100,000 ( 0.01%) matches!( 100,000 ( 0.01%) cx.tcx.get_diagnostic_name(did), 1,060,000 ( 0.07%) => ???:::get_diagnostic_name (20,000x) . Some( . sym::isize_legacy_mod . | sym::i128_legacy_mod . | sym::i64_legacy_mod . | sym::i32_legacy_mod . | sym::i16_legacy_mod . | sym::i8_legacy_mod . | sym::usize_legacy_mod -- line 159 ---------------------------------------- -- line 161 ---------------------------------------- . | sym::u64_legacy_mod . | sym::u32_legacy_mod . | sym::u16_legacy_mod . | sym::u8_legacy_mod . ) . ) . } . 20,000 ( 0.00%) fn is_numeric_const(cx: &LateContext<'_>, did: DefId) -> bool { 120,000 ( 0.01%) matches!( 60,000 ( 0.00%) cx.tcx.get_diagnostic_name(did), 1,060,000 ( 0.07%) => ???:::get_diagnostic_name (20,000x) . Some( . sym::isize_legacy_const_max . | sym::isize_legacy_const_min . | sym::i128_legacy_const_max . | sym::i128_legacy_const_min . | sym::i16_legacy_const_max . | sym::i16_legacy_const_min . | sym::i32_legacy_const_max -- line 179 ---------------------------------------- -- line 219 ---------------------------------------- . | sym::f64_legacy_const_min_10_exp . | sym::f64_legacy_const_min_exp . | sym::f64_legacy_const_min_positive . | sym::f64_legacy_const_nan . | sym::f64_legacy_const_neg_infinity . | sym::f64_legacy_const_radix . ) . ) 40,000 ( 0.00%) } . . // Whether path expression looks like `i32::MAX` . fn is_numeric_const_path_canonical(expr_path: &hir::Path<'_>, [mod_name, name]: [Symbol; 2]) -> bool { . let [ . hir::PathSegment { . ident: one, args: None, .. . }, . hir::PathSegment { -- line 235 ---------------------------------------- 400,017 ( 0.03%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/impl_hash_with_borrow_str_and_bytes.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . . declare_lint_pass!(ImplHashWithBorrowStrBytes => [ . IMPL_HASH_BORROW_WITH_STR_AND_BYTES, . ]); . . impl LateLintPass<'_> for ImplHashWithBorrowStrBytes { . /// We are emitting this lint at the Hash impl of a type that implements all . /// three of `Hash`, `Borrow` and `Borrow<[u8]>`. 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(imp) = item.kind . && let Some(of_trait) = imp.of_trait . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && let Some(hash_id) = cx.tcx.get_diagnostic_item(sym::Hash) . && Res::Def(DefKind::Trait, hash_id) == of_trait.trait_ref.path.res . && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) . // since we are in the `Hash` impl, we don't need to check for that. . // we need only to check for `Borrow` and `Borrow<[u8]>` . && implements_trait(cx, ty, borrow_id, &[cx.tcx.types.str_.into()]) -- line 88 ---------------------------------------- -- line 99 ---------------------------------------- . "however, the hash implementations of a string (`str`) and the bytes of a string `[u8]` do not behave the same ..." . ); . diag.note("... as (`hash(\"abc\") != hash(\"abc\".as_bytes())`"); . diag.help("consider either removing one of the `Borrow` implementations (`Borrow` or `Borrow<[u8]>`) ..."); . diag.help("... or not implementing `Hash` for this type"); . }, . ); . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/new_without_default.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . #[clippy::version = "pre 1.29.0"] . pub NEW_WITHOUT_DEFAULT, . style, . "`pub fn new() -> Self` method without `Default` implementation" . } . . impl_lint_pass!(NewWithoutDefault => [NEW_WITHOUT_DEFAULT]); . 1 ( 0.00%) #[derive(Clone, Default)] . pub struct NewWithoutDefault { . impling_types: Option, . } . . impl<'tcx> LateLintPass<'tcx> for NewWithoutDefault { . #[expect(clippy::too_many_lines)] 180,045 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 40,010 ( 0.00%) let hir::ItemKind::Impl(hir::Impl { . of_trait: None, . generics, . self_ty: impl_self_ty, . .. . }) = item.kind . else { . return; . }; -- line 71 ---------------------------------------- -- line 190 ---------------------------------------- . &where_clause_sugg, . ), . app, . ); . }, . ); . } . } 160,040 ( 0.01%) } . } . . fn create_new_without_default_suggest_msg( . attrs_sugg: &str, . self_type_snip: &str, . generics_sugg: &str, . where_clause_sugg: &str, . ) -> String { -- line 206 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 3 ( 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> { 80,152 ( 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])> { 192 ( 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> { 260,141 ( 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> { 6 ( 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]> { 12 ( 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(); 60,037 ( 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()); 18 ( 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,195 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/too_long_first_doc_paragraph.rs -------------------------------------------------------------------------------- Ir -- line 12 ---------------------------------------- . pub(super) fn check( . cx: &LateContext<'_>, . item: &Item<'_>, . attrs: &[Attribute], . first_paragraph_text_len: usize, . mut first_paragraph_md_len: usize, . check_private_items: bool, . ) { 160,040 ( 0.01%) if !check_private_items && !cx.effective_visibilities.is_exported(item.owner_id.def_id) { 320,080 ( 0.02%) => ???:::is_exported (20,005x) . return; . } . if first_paragraph_text_len <= 200 . || !matches!( . item.kind, . // This is the list of items which can be documented AND are displayed on the module . // page. So associated items or impl blocks are not part of this list. . ItemKind::Static(..) -- line 28 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/duplicate_mod.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . impl_lint_pass!(DuplicateMod => [DUPLICATE_MOD]); . . struct Modules { . local_path: PathBuf, . spans: Vec, . lint_level_specs: Vec, . } . 2 ( 0.00%) #[derive(Default)] . pub struct DuplicateMod { . /// map from the canonicalized path to `Modules`, `BTreeMap` to make the . /// order deterministic for tests . modules: BTreeMap, . } . . impl EarlyLintPass for DuplicateMod { 140,035 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 40,010 ( 0.00%) if let ItemKind::Mod(_, _, ModKind::Loaded(_, Inline::No { .. }, mod_spans)) = &item.kind . && let FileName::Real(real) = cx.sess().source_map().span_to_filename(mod_spans.inner_span) . && let Some(local_path) = real.into_local_path() . && let Ok(absolute_path) = local_path.canonicalize() . { . let modules = self.modules.entry(absolute_path).or_insert(Modules { . local_path, . spans: Vec::new(), . lint_level_specs: Vec::new(), . }); . modules.spans.push(item.span_with_attributes()); . modules.lint_level_specs.push(cx.get_lint_level_spec(DUPLICATE_MOD)); . } 160,040 ( 0.01%) } . 7 ( 0.00%) fn check_crate_post(&mut self, cx: &EarlyContext<'_>, _: &Crate) { . for Modules { . local_path, . spans, . lint_level_specs, . } in self.modules.values() . { . if spans.len() < 2 { . continue; -- line 89 ---------------------------------------- -- line 119 ---------------------------------------- . cx, . DUPLICATE_MOD, . multi_span, . format!("file is loaded as a module multiple times: `{}`", local_path.display()), . None, . "replace all but one `mod` item with `use` items", . ); . } 8 ( 0.00%) } . } 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use super::utils::{is_lint_level, is_word, namespace_and_lint}; . use clippy_utils::diagnostics::span_lint_and_then; . use clippy_utils::source::{SpanExt as _, first_line_of_span}; . use clippy_utils::sym; . use rustc_ast::{Attribute, Item, ItemKind}; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, LintContext as _}; . 200,020 ( 0.01%) pub(super) fn check(cx: &EarlyContext<'_>, item: &Item, attrs: &[Attribute]) { . let skip_unused_imports = attrs.iter().any(|attr| attr.has_name(sym::macro_use)); . . for attr in attrs { 5 ( 0.00%) if let Some(lint_list) = &attr.meta_item_list() 7 ( 0.00%) => ???:::meta_item_list (1x) . && attr.name().is_some_and(is_lint_level) . { . for lint in lint_list { . match item.kind { . ItemKind::Use(..) => { . let (namespace @ (Some(sym::clippy) | None), Some(name)) = namespace_and_lint(lint) else { . return; . }; -- line 22 ---------------------------------------- -- line 82 ---------------------------------------- . "if you just forgot a `!`, use", . src.replacen("#[", "#![", 1), . Applicability::MaybeIncorrect, . ); . }); . } . } . } 160,016 ( 0.01%) } -------------------------------------------------------------------------------- -- 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 { 140,042 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[rustc_ast::Attribute]) { . include_in_doc_without_cfg::check(cx, attrs); 160,048 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for Documentation { 200,090 ( 0.01%) fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { 200,090 ( 0.01%) let Some(headers) = check_attrs(cx, self.valid_idents, attrs) else { . return; . }; . 380,159 ( 0.02%) match cx.tcx.hir_node(cx.last_node_with_lint_attrs) { 1,351,949 ( 0.08%) => ???:::hir_node (20,009x) . 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( -- line 764 ---------------------------------------- -- line 766 ---------------------------------------- . UNNECESSARY_SAFETY_DOC, . *span, . "field with `# Safety` documentation is not marked unsafe", . None, . "if the field has safety invariants, mark it `unsafe`", . ), . _ => (), . }, 20,005 ( 0.00%) Node::Item(item) => { . too_long_first_doc_paragraph::check( . cx, . item, . attrs, 40,010 ( 0.00%) headers.first_paragraph_text_len, 20,005 ( 0.00%) headers.first_paragraph_md_len, 20,005 ( 0.00%) self.check_private_items, . ); 100,019 ( 0.01%) match item.kind { 4 ( 0.00%) ItemKind::Fn { sig, body, .. } 18 ( 0.00%) if !(is_entrypoint_fn(cx, item.owner_id.to_def_id()) 204 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn (3x) 12 ( 0.00%) || item.span.in_external_macro(cx.tcx.sess.source_map())) => 234 ( 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:::in_external_macro (2x) . { 14 ( 0.00%) missing_headers::check(cx, item.owner_id, sig, headers, Some(body), self.check_private_items); 88 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (2x) . }, . ItemKind::Trait { safety, .. } => match (headers.safety, safety) { . (false, Safety::Unsafe) => span_lint( . cx, . MISSING_SAFETY_DOC, . cx.tcx.def_span(item.owner_id), . "docs for unsafe trait missing `# Safety` section", . ), -- line 796 ---------------------------------------- -- line 808 ---------------------------------------- . 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); . } . }, . Node::ImplItem(impl_item) => { 2 ( 0.00%) if let ImplItemKind::Fn(sig, body_id) = impl_item.kind . && !impl_item.span.in_external_macro(cx.tcx.sess.source_map()) . && !is_trait_impl_item(cx, impl_item.hir_id()) . { . missing_headers::check( . cx, . impl_item.owner_id, . sig, . headers, . Some(body_id), . self.check_private_items, . ); . } . }, . _ => {}, . } 160,072 ( 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())) . } . 120,054 ( 0.01%) if suspicious_doc_comments::check(cx, attrs) || is_doc_hidden(attrs) { 1,180,585 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check (20,009x) . return None; . } . 40,018 ( 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(); . 20,009 ( 0.00%) if doc.trim().is_empty() { 60,027 ( 0.00%) if let Some(span) = span_of_fragments(&fragments) { 240,108 ( 0.02%) => ???:rustc_resolve::rustdoc::span_of_fragments (20,009x) . span_lint_and_help( . cx, . EMPTY_DOCS, . span, . "empty doc comment", . None, . "consider removing or filling it", . ); . } 60,027 ( 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 ---------------------------------------- 100,037 ( 0.01%) -------------------------------------------------------------------------------- -- 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<'_>) { 40,010 ( 0.00%) check_item(cx, item.hir_id()); 2,923,802 ( 0.18%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (20,005x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { . check_item(cx, item.hir_id()); . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { . check_item(cx, item.hir_id()); -- line 112 ---------------------------------------- -- line 113 ---------------------------------------- . } . . 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)); . }); . } . 27 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 6 ( 0.00%) check_node(cx, expr.hir_id, |v| { . v.expr(&v.bind("expr", expr)); . }); 24 ( 0.00%) } . . 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)); . }); . } . } . 180,045 ( 0.01%) fn check_item(cx: &LateContext<'_>, hir_id: HirId) { 100,025 ( 0.01%) if let Some(body) = cx.tcx.hir_maybe_body_owned_by(hir_id.expect_owner().def_id) { 2,483,494 ( 0.16%) => ???:::hir_maybe_body_owned_by (20,005x) . check_node_with_body( . cx, . hir_id, 3 ( 0.00%) |v| { . v.expr(&v.bind("expr", body.value)); . }, . Some(body), . ); . } 160,040 ( 0.01%) } . . 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<'_>>, . ) { 3 ( 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 { 15 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 177 ( 0.00%) => ???:::hir_attrs (3x) . get_builtin_attr(attrs, sym::author).count() > 0 . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs -------------------------------------------------------------------------------- Ir -- line 455 ---------------------------------------- . /// ); . /// ``` . #[stable(feature = "thread_local_try_with", since = "1.26.0")] . #[inline] . pub fn try_with(&'static self, f: F) -> Result . where . F: FnOnce(&T) -> R, . { 120,058 ( 0.01%) let thread_local = unsafe { (self.inner)(None).as_ref().ok_or(AccessError)? }; 45 ( 0.00%) => ???:>>,)>>::call_once (15x) 60,099 ( 0.00%) Ok(f(thread_local)) . } . . /// Acquires a reference to the value in this TLS key, initializing it with . /// `init` if it wasn't already initialized on this thread. . /// . /// If `init` was used to initialize the thread local variable, `None` is . /// passed as the first argument to `f`. If it was already initialized, . /// `Some(init)` is passed to `f`. -- line 472 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 } . } . . fn check_res_emit(&self, cx: &LateContext<'_>, res: &Res, span: Span) { . 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, . }; -- line 85 ---------------------------------------- -- 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>) { 80,012 ( 0.01%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind 60,000 ( 0.00%) && 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>) { . if let TyKind::Path(path) = &ty.kind { . self.check_res_emit(cx, &cx.qpath_res(path, ty.hir_id), ty.span); -- line 120 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Trait { . ident, . items: trait_items, . .. . } = item.kind . && !item.span.from_expansion() . { . check_trait_items(cx, item, ident, trait_items); . } 160,040 ( 0.01%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { . 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(_)) -- line 65 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs -------------------------------------------------------------------------------- Ir -- line 973 ---------------------------------------- . /// assert!(CAPITAL_DELTA_IS_UPPERCASE); . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")] . #[inline] . pub const fn is_uppercase(self) -> bool { . match self { 446,814 ( 0.03%) 'A'..='Z' => true, 297,876 ( 0.02%) '\0'..='\u{BF}' => false, . _ => unicode::Uppercase(self), . } . } . . /// Returns `true` if this `char` has one of the general categories for numbers. . /// . /// The general categories for numbers (`Nd` for decimal digits, `Nl` for letter-like numeric . /// characters, and `No` for other numeric characters) are [specified] in the Unicode Character -- line 990 ---------------------------------------- -- line 1080 ---------------------------------------- . /// . /// assert!(!'越'.is_whitespace()); . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_char_classify", since = "1.87.0")] . #[inline] . pub const fn is_whitespace(self) -> bool { 220,116 ( 0.01%) match self { . ' ' | '\x09'..='\x0d' => true, 80,042 ( 0.01%) '\0'..='\u{84}' => false, . _ => unicode::White_Space(self), . } . } . . /// Returns `true` if this `char` has the general category for control codes. . /// . /// Control codes (code points with the general category of `Cc`) are [described] in Chapter 23 . /// (Special Areas and Format Characters) of the Unicode Standard, and [specified] in the Unicode Character -- line 1098 ---------------------------------------- -- line 1703 ---------------------------------------- . /// holds across languages. . /// . /// [`to_titlecase()`]: Self::to_titlecase() . #[must_use = "this returns the uppercased character as a new iterator, \ . without modifying the original"] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn to_uppercase(self) -> ToUppercase { 60,036 ( 0.00%) ToUppercase(CaseMappingIter::new(conversions::to_upper(self))) 440,264 ( 0.03%) => ???:core::unicode::unicode_data::conversions::to_upper (20,012x) . } . . /// Returns an iterator that yields the case folding of this `char` as one or more . /// `char`s. . /// . /// Case folding is meant to be used when performing case-insensitive string comparisons. . /// Case-folded strings should not usually be exposed directly to users. For most, . /// but not all, characters, the casefold mapping is identical to the lowercase one. -- line 1719 ---------------------------------------- -- line 2475 ---------------------------------------- . escape_double_quote: true, . }; . } . . #[inline] . #[must_use] . const fn len_utf8(code: u32) -> usize { . match code { 297,870 ( 0.02%) ..MAX_ONE_B => 1, . ..MAX_TWO_B => 2, . ..MAX_THREE_B => 3, . _ => 4, . } . } . . #[inline] . #[must_use] -- line 2491 ---------------------------------------- -- line 2547 ---------------------------------------- . #[doc(hidden)] . #[inline] . pub const unsafe fn encode_utf8_raw_unchecked(code: u32, dst: *mut u8) { . let len = len_utf8(code); . // SAFETY: The caller must guarantee that the buffer pointed to by `dst` . // is at least `len` bytes long. . unsafe { . if len == 1 { 297,870 ( 0.02%) *dst = code as u8; . return; . } . . let last1 = (code >> 0 & 0x3F) as u8 | TAG_CONT; . let last2 = (code >> 6 & 0x3F) as u8 | TAG_CONT; . let last3 = (code >> 12 & 0x3F) as u8 | TAG_CONT; . let last4 = (code >> 18 & 0x3F) as u8 | TAG_FOUR_B; . -- line 2563 ---------------------------------------- 148,938 ( 0.01%) -------------------------------------------------------------------------------- -- 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 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. 160,177 ( 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`. 189 ( 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,032,180 ( 0.06%) 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 ---------------------------------------- 120,124 ( 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/alloc.rs -------------------------------------------------------------------------------- Ir -- line 114 ---------------------------------------- . #[stable(feature = "global_alloc", since = "1.28.0")] . #[must_use = "losing the pointer will leak memory"] . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub unsafe fn alloc(layout: Layout) -> *mut u8 { . unsafe { . // Make sure we don't accidentally allow omitting the allocator shim in . // stable code until it is actually stabilized. 777 ( 0.00%) __rust_no_alloc_shim_is_unstable_v2(); 3 ( 0.00%) => ???:std::exception::~exception() (3x) . 121,933 ( 0.01%) __rust_alloc(layout.size(), layout.alignment()) 105 ( 0.00%) => ???:__rustc::__rust_alloc (3x) . } . } . . /// Deallocates memory with the global allocator. . /// . /// This function forwards calls to the [`GlobalAlloc::dealloc`] method . /// of the allocator registered with the `#[global_allocator]` attribute . /// if there is one, or the `std` crate’s default. -- line 132 ---------------------------------------- -- line 161 ---------------------------------------- . pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) { . unsafe { dealloc_nonnull(NonNull::new_unchecked(ptr), layout) } . } . . /// Same as [`dealloc`] but when you already have a non-null pointer . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . unsafe fn dealloc_nonnull(ptr: NonNull, layout: Layout) { 102,075 ( 0.01%) unsafe { __rust_dealloc(ptr, layout.size(), layout.alignment()) } 114 ( 0.00%) => ???:__rustc::__rdl_dealloc (3x) . } . . /// Reallocates memory with the global allocator. . /// . /// This function forwards calls to the [`GlobalAlloc::realloc`] method . /// of the allocator registered with the `#[global_allocator]` attribute . /// if there is one, or the `std` crate’s default. . /// -- line 177 ---------------------------------------- -- line 214 ---------------------------------------- . pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { . unsafe { realloc_nonnull(NonNull::new_unchecked(ptr), layout, new_size) } . } . . /// Same as [`realloc`] but when you already have a non-null pointer . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . unsafe fn realloc_nonnull(ptr: NonNull, layout: Layout, new_size: usize) -> *mut u8 { 15 ( 0.00%) unsafe { __rust_realloc(ptr, layout.size(), layout.alignment(), new_size) } 5,069 ( 0.00%) => ???:__rustc::__rust_realloc (3x) . } . . /// Allocates zero-initialized memory with the global allocator. . /// . /// This function forwards calls to the [`GlobalAlloc::alloc_zeroed`] method . /// of the allocator registered with the `#[global_allocator]` attribute . /// if there is one, or the `std` crate’s default. . /// -- line 230 ---------------------------------------- -- line 284 ---------------------------------------- . __rust_alloc_zeroed(layout.size(), layout.alignment()) . } . } . . impl Global { . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . fn alloc_impl_runtime(layout: Layout, zeroed: bool) -> Result, AllocError> { 40,044 ( 0.00%) match layout.size() { . 0 => Ok(layout.dangling_ptr().cast_slice(0)), . // SAFETY: `layout` is non-zero in size, . size => unsafe { 20,029 ( 0.00%) let raw_ptr = if zeroed { alloc_zeroed(layout) } else { alloc(layout) }; 4 ( 0.00%) => ???:std::exception::~exception() (4x) . let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; . Ok(ptr.cast_slice(size)) . }, . } . } . . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . fn deallocate_impl_runtime(ptr: NonNull, layout: Layout) { 41 ( 0.00%) if layout.size() != 0 { . // SAFETY: . // * We have checked that `layout` is non-zero in size. . // * The caller is obligated to provide a layout that "fits", and in this case, . // "fit" always means a layout that is equal to the original, because our . // `allocate()`, `grow()`, and `shrink()` implementations never returns a larger . // allocation than requested. . // * Other conditions must be upheld by the caller, as per `Allocator::deallocate()`'s . // safety documentation. -- line 314 ---------------------------------------- 224 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/item_name_repetitions.rs -------------------------------------------------------------------------------- Ir -- line 181 ---------------------------------------- . is_public: bool, . /// How many bodies are between this module and the current lint pass position. . /// . /// Only the most recently seen module is updated when entering/exiting a body. . in_body_count: u32, . } . . impl ItemNameRepetitions { 7 ( 0.00%) pub fn new(conf: &'static Conf) -> Self { 9 ( 0.00%) Self { . modules: Vec::new(), 1 ( 0.00%) enum_threshold: conf.enum_variant_name_threshold, 1 ( 0.00%) struct_threshold: conf.struct_field_name_threshold, 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, 1 ( 0.00%) allow_exact_repetitions: conf.allow_exact_repetitions, 1 ( 0.00%) allow_private_module_inception: conf.allow_private_module_inception, 14 ( 0.00%) allowed_prefixes: conf.allowed_prefixes.iter().map(|s| to_camel_case(s)).collect(), 2,298 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case (6x) . } 9 ( 0.00%) } . . fn is_allowed_prefix(&self, prefix: &str) -> bool { . self.allowed_prefixes.contains(prefix) . } . } . . #[must_use] . fn have_no_extra_prefix(prefixes: &[&str]) -> bool { -- line 207 ---------------------------------------- -- line 465 ---------------------------------------- . .any(|segment| segment.ident.name.as_str() == variant_name), . TyKind::Path(QPath::TypeRelative(_, segment)) => segment.ident.name.as_str() == variant_name, . _ => false, . } . } . . impl LateLintPass<'_> for ItemNameRepetitions { . fn check_item_post(&mut self, _: &LateContext<'_>, item: &Item<'_>) { 40,010 ( 0.00%) if matches!(item.kind, ItemKind::Mod(..)) { . let prev = self.modules.pop(); . debug_assert!(prev.is_some()); . } . } . . fn check_body(&mut self, _: &LateContext<'_>, _: &Body<'_>) { 6 ( 0.00%) if let [.., last] = &mut *self.modules { . last.in_body_count += 1; . } . } . . fn check_body_post(&mut self, _: &LateContext<'_>, _: &Body<'_>) { 6 ( 0.00%) if let [.., last] = &mut *self.modules { . last.in_body_count -= 1; . } . } . 180,045 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 160,028 ( 0.01%) let ident = match item.kind { . ItemKind::Mod(ident, _) => { . if let [.., prev] = &*self.modules . && prev.name == ident.name . && prev.in_body_count == 0 . && (!self.allow_private_module_inception || prev.is_public) . && !item.span.from_expansion() . && !is_from_proc_macro(cx, item) . { -- line 500 ---------------------------------------- -- line 519 ---------------------------------------- . && !ident.span.in_external_macro(cx.tcx.sess.source_map()) . { . self.check_fields(cx, item, fields); . } . ident . }, . . ItemKind::Const(ident, ..) 1 ( 0.00%) | ItemKind::ExternCrate(_, ident) . | ItemKind::Fn { ident, .. } . | ItemKind::Macro(ident, ..) . | ItemKind::Static(_, ident, ..) . | ItemKind::Trait { ident, .. } . | ItemKind::TraitAlias(_, ident, ..) . | ItemKind::TyAlias(ident, ..) . | ItemKind::Union(ident, ..) . | ItemKind::Use(_, UseKind::Single(ident)) => ident, . . ItemKind::ForeignMod { .. } | ItemKind::GlobalAsm { .. } | ItemKind::Impl(_) | ItemKind::Use(..) => return, . }; . . let item_name = ident.name.as_str(); 40,008 ( 0.00%) let item_camel = to_camel_case(item_name); 8,948,338 ( 0.56%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case (20,004x) . 40,008 ( 0.00%) if let [.., prev] = &*self.modules . && prev.is_public . && prev.in_body_count == 0 . && !item.span.from_expansion() . && !matches!(item.kind, ItemKind::Macro(..)) . && cx.tcx.visibility(item.owner_id).is_public() . { . if !self.allow_exact_repetitions && item_camel == prev.name_camel { . if !is_from_proc_macro(cx, item) { -- line 551 ---------------------------------------- -- line 578 ---------------------------------------- . MODULE_NAME_REPETITIONS, . ident.span, . "item name ends with its containing module's name", . ); . } . } . } . 40,008 ( 0.00%) if matches!(item.kind, ItemKind::Mod(..)) { . self.modules.push(ModInfo { . name: ident.name, . name_camel: item_camel, . is_public: cx.tcx.visibility(item.owner_id).is_public(), . in_body_count: 0, . }); . } 160,040 ( 0.01%) } . } 140,030 ( 0.01%) -------------------------------------------------------------------------------- -- 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),* $(,)?)) => { 1,260,462 ( 0.08%) rustc_lint::EarlyLintPass::$name(&mut $self.$field, $($arg),*); 57 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_generics (3x) . }; . } . . /// 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),*);)*]) => ( 640,270 ( 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),*)); 280,102 ( 0.02%) })* . ) . } . . /// 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 ---------------------------------------- 20,005 ( 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 { 200,256 ( 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 { 60,073 ( 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,384 ( 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,099 ( 0.00%) if len == self.buf.capacity() { 260 ( 0.00%) self.buf.grow_one(); 3,215 ( 0.00%) => ???:>::grow_one (19x) . } . unsafe { . let end = self.as_mut_ptr().add(len); . ptr::write(end, value); 43,281 ( 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) { 20,019 ( 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. 6 ( 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 140,267 ( 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 20,017 ( 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 . ); . 148,978 ( 0.01%) 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 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 { 60,037 ( 0.00%) if self.len == 0 { . None . } else { . unsafe { 40,024 ( 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(); 4 ( 0.00%) if count > 0 { . unsafe { . ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) . }; . } 571 ( 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 { 6 ( 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 { 208,993 ( 0.01%) 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 { 40,031 ( 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. 28 ( 0.00%) fn clone(&self) -> Self { . let alloc = self.allocator().clone(); 2 ( 0.00%) <[T]>::to_vec_in(&**self, alloc) 34 ( 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 { 20,005 ( 0.00%) >::from_iter(iter.into_iter()) 960,253 ( 0.06%) => /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 (20,005x) . } . } . . #[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()) 519 ( 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); . // } 258 ( 0.00%) while let Some(element) = iterator.next() { 2,068 ( 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 (27x) . let len = self.len(); 72 ( 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 36 ( 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 . { 27 ( 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 38 ( 0.00%) self.as_mut_ptr().cast_slice(self.len).drop_in_place() . } . // RawVec handles deallocation 32 ( 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 ---------------------------------------- 319,089 ( 0.02%) -------------------------------------------------------------------------------- -- 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 { 140,119 ( 0.01%) 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)] 8 ( 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) } 8 ( 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. 120,447 ( 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. 60,184 ( 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), . }; 40,383 ( 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 2 ( 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); . 40,034 ( 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`. 40,038 ( 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 60,067 ( 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] 160,188 ( 0.01%) 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()) 120,142 ( 0.01%) } . } . . 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 { 210,729 ( 0.01%) self.ptr.cast().as_non_null_ptr() . } . . #[inline] . const fn capacity(&self, elem_size: usize) -> usize { 20,079 ( 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)> { 140,482 ( 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] 80,071 ( 0.01%) 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); . } 80,072 ( 0.01%) } . 168,959 ( 0.01%) if self.needs_to_grow(len, additional, elem_layout) { . unsafe { 100,089 ( 0.01%) do_reserve_and_handle(self, len, additional, elem_layout); 415 ( 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 { 169,497 ( 0.01%) 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::()`. 20,022 ( 0.00%) self.ptr = Unique::from(ptr.cast()); 20,020 ( 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 28 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 152 ( 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 2 ( 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. 4 ( 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 ---------------------------------------- 421,069 ( 0.03%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_non_exhaustive.rs -------------------------------------------------------------------------------- Ir -- line 66 ---------------------------------------- . pub struct ManualNonExhaustive { . msrv: Msrv, . constructed_enum_variants: FxHashSet, . potential_enums: Vec<(LocalDefId, LocalDefId, Span, Span)>, . } . . impl ManualNonExhaustive { . pub fn new(conf: &'static Conf) -> Self { 8 ( 0.00%) Self { . msrv: conf.msrv.into(), . constructed_enum_variants: FxHashSet::default(), . potential_enums: Vec::new(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive { 220,055 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 140,035 ( 0.01%) if !cx.effective_visibilities.is_exported(item.owner_id.def_id) || !self.msrv.meets(cx, msrvs::NON_EXHAUSTIVE) { 320,080 ( 0.02%) => ???:::is_exported (20,005x) . return; . } . . match item.kind { . ItemKind::Enum(_, _, def) if def.variants.len() > 1 => { . let iter = def.variants.iter().filter_map(|v| { . (matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id))) . .then_some((v.def_id, v.span)) -- line 92 ---------------------------------------- -- line 142 ---------------------------------------- . // ``` . diag.span_help(field.span, "remove this field"); . }, . ); . } . }, . _ => {}, . } 160,040 ( 0.01%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 6 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, p)) = &e.kind . && let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Const), ctor_id) = p.res . && let Some(local_ctor) = ctor_id.as_local() . { . let variant_id = cx.tcx.local_parent(local_ctor); . self.constructed_enum_variants.insert(variant_id); . } . } . 8 ( 0.00%) fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { . for (enum_id, _, enum_span, variant_span) in std::mem::take(&mut self.potential_enums) . .into_iter() . .filter(|(_, variant_id, _, _)| !self.constructed_enum_variants.contains(variant_id)) . { . let hir_id = cx.tcx.local_def_id_to_hir_id(enum_id); . span_lint_hir_and_then( . cx, . MANUAL_NON_EXHAUSTIVE, -- line 170 ---------------------------------------- -- line 180 ---------------------------------------- . Applicability::MaybeIncorrect, . ); . // FIXME: Ideally this would be a suggestion, but the span for that is annoying to get. . // See the comment above for examples. . diag.span_help(variant_span, "remove this variant"); . }, . ); . } 8 ( 0.00%) } . } -------------------------------------------------------------------------------- -- 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%) } . 480,144 ( 0.03%) fn check(&mut self, cx: &LateContext<'_>, span: Span, derive_src: Option) { 60,018 ( 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); . } . } . } 480,144 ( 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 { 10 ( 0.00%) self.check(cx, *span, None); 36 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (2x) . } . } 7 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 15 ( 0.00%) self.check(cx, expr.span, None); 54 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (3x) . // `$t + $t` can have the context of $t, check also the span of the binary operator 6 ( 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); . } . -- line 151 ---------------------------------------- -- line 152 ---------------------------------------- . fn check_ty(&mut self, cx: &LateContext<'_>, ty: &Ty<'_, AmbigArg>) { . self.check(cx, ty.span, None); . } . . fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { . self.check(cx, pat.span, None); . } . 200,050 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 80,020 ( 0.01%) self.check(cx, item.span, self.derive_src); 360,090 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (20,005x) 100,025 ( 0.01%) self.check(cx, item.vis_span, None); 360,090 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (20,005x) . 60,015 ( 0.00%) if matches!( 20,005 ( 0.00%) item.kind, . ItemKind::Struct(..) | ItemKind::Enum(..) | ItemKind::Union(..) . ) && macro_backtrace(item.span).all(|m| !matches!(m.kind, MacroKind::Derive)) . { . self.derive_src = Some(item.owner_id); . } 160,040 ( 0.01%) } . . 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<'_>) { . self.check(cx, item.span, None); -- line 179 ---------------------------------------- -- line 182 ---------------------------------------- . } . } . . 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) { 80,012 ( 0.01%) self.check(cx, path.span, None); 360,054 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (20,003x) . } . } -------------------------------------------------------------------------------- -- 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 { 32 ( 0.00%) 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 183 ---------------------------------------- . #[stable(feature = "iterator_flatten", since = "1.29.0")] . pub struct Flatten> { . inner: FlattenCompat::IntoIter>, . } . . #[rustc_const_unstable(feature = "const_iter", issue = "92476")] . const impl> Flatten { . pub(in super::super) fn new(iter: I) -> Flatten { 300,000 ( 0.02%) Flatten { inner: FlattenCompat::new(iter) } . } . } . . #[stable(feature = "iterator_flatten", since = "1.29.0")] . impl fmt::Debug for Flatten . where . I: fmt::Debug + Iterator>, . U: fmt::Debug + Iterator, -- line 199 ---------------------------------------- -- line 242 ---------------------------------------- . self.inner.try_fold(init, fold) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 39 ( 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()) . } . 27 ( 0.00%) if let Some(iter) = self.frontiter { . acc = fold(acc, iter); . } . 15 ( 0.00%) acc = self.iter.fold(acc, flatten(&mut fold)); . 31 ( 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)?; . } 9 ( 0.00%) self.frontiter = None; . . acc = self.iter.try_fold(acc, flatten(&mut self.frontiter, &mut fold))?; 3 ( 0.00%) self.frontiter = None; . 6 ( 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; . } 60,015 ( 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 ---------------------------------------- -- line 847 ---------------------------------------- . // `frontiter` or `backiter` without consuming the item, so we **must** override those. . impl Iterator for FlattenCompat . where . I: Iterator>, . U: Iterator + OneShot, . { . #[inline] . fn next(&mut self) -> Option { 380,000 ( 0.02%) while let Some(inner) = self.iter.next() { 40,000 ( 0.00%) if let item @ Some(_) = inner.into_iter().next() { . return item; . } . } . None . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { -- line 864 ---------------------------------------- 100,017 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/mod.rs -------------------------------------------------------------------------------- Ir -- line 188 ---------------------------------------- . DERIVED_HASH_WITH_MANUAL_EQ, . DERIVE_ORD_XOR_PARTIAL_ORD, . DERIVE_PARTIAL_EQ_WITHOUT_EQ, . EXPL_IMPL_CLONE_ON_COPY, . UNSAFE_DERIVE_DESERIALIZE, . ]); . . impl<'tcx> LateLintPass<'tcx> for Derive { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . self_ty, . .. . }) = item.kind . && let Res::Def(_, def_id) = *self_ty.basic_res() . && let Some(local_def_id) = def_id.as_local() . { . let adt_hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id); -- line 205 ---------------------------------------- -- line 212 ---------------------------------------- . . if is_automatically_derived { . unsafe_derive_deserialize::check(cx, item, trait_ref, ty, adt_hir_id); . derive_partial_eq_without_eq::check(cx, item.span, trait_ref, ty, adt_hir_id); . } else { . expl_impl_clone_on_copy::check(cx, item, trait_ref, ty, adt_hir_id); . } . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs -------------------------------------------------------------------------------- Ir -- line 1613 ---------------------------------------- . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(pmovmskb))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm_movemask_epi8(a: __m128i) -> i32 { . unsafe { . let z = i8x16::ZERO; . let m: i8x16 = simd_lt(a.as_i8x16(), z); 101,717 ( 0.01%) simd_bitmask::<_, u16>(m) as u32 as i32 . } . } . . /// Shuffles 32-bit integers in `a` using the control in `IMM8`. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_shuffle_epi32) . #[inline] . #[target_feature(enable = "sse2")] -- line 1629 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/mod.rs -------------------------------------------------------------------------------- Ir -- line 386 ---------------------------------------- . fn next(&mut self) -> Option { . self.0.next() . } . . fn size_hint(&self) -> (usize, Option) { . self.0.size_hint() . } . 140,084 ( 0.01%) fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { . self.0.fold(init, fold) 160,096 ( 0.01%) } . . fn count(self) -> usize { . self.0.count() . } . . fn last(self) -> Option { . self.0.last() . } -- line 407 ---------------------------------------- -- line 536 ---------------------------------------- . . #[derive(Debug, Clone)] . struct CaseMappingIter(core::array::IntoIter); . . impl CaseMappingIter { . #[inline] . fn new(chars: [char; 3]) -> CaseMappingIter { . let mut iter = chars.into_iter(); 140,084 ( 0.01%) if chars[2] == '\0' { . iter.next_back(); . if chars[1] == '\0' { . iter.next_back(); . . // Deliberately don't check `chars[0]`, . // as '\0' lowercases to itself . } . } 60,036 ( 0.00%) CaseMappingIter(iter) . } . } . . impl Iterator for CaseMappingIter { . type Item = char; . . fn next(&mut self) -> Option { . self.0.next() -- line 561 ---------------------------------------- 20,012 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs -------------------------------------------------------------------------------- Ir -- line 85 ---------------------------------------- . }, . _ => {}, . } . } . } . . impl EarlyLintPass for RedundantStaticLifetimes { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 180,045 ( 0.01%) if !self.msrv.meets(msrvs::STATIC_IN_CONST) { 160,040 ( 0.01%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (20,005x) . return; . } . . if !item.span.from_expansion() { 40,018 ( 0.00%) if let ItemKind::Const(ConstItem { ty: ref var_type, .. }) = item.kind { . Self::visit_type(var_type, cx, "constants have by default a `'static` lifetime"); . // Don't check associated consts because `'static` cannot be elided on those (issue . // #2438) . } . . if let ItemKind::Static(StaticItem { ty: ref var_type, .. }) = item.kind { . Self::visit_type(var_type, cx, "statics have by default a `'static` lifetime"); . } -- line 106 ---------------------------------------- 20,005 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_self_imports.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . pub UNNECESSARY_SELF_IMPORTS, . restriction, . "imports ending in `::{self}`, which can be omitted" . } . . declare_lint_pass!(UnnecessarySelfImports => [UNNECESSARY_SELF_IMPORTS]); . . impl EarlyLintPass for UnnecessarySelfImports { 140,035 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 80,012 ( 0.01%) if let ItemKind::Use(use_tree) = &item.kind . && let UseTreeKind::Nested { items, .. } = &use_tree.kind . && let [(self_tree, _)] = &**items . && let [self_seg] = &*self_tree.prefix.segments . && self_seg.ident.name == kw::SelfLower . && let Some(last_segment) = use_tree.prefix.segments.last() . { . span_lint_and_then( . cx, -- line 46 ---------------------------------------- -- line 61 ---------------------------------------- . }, . ), . Applicability::MaybeIncorrect, . ); . diag.note("this will slightly change semantics; any non-module items at the same path will also be imported"); . }, . ); . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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) { 9 ( 0.00%) duplicate_underscore_argument::check(cx, fn_kind); 78 ( 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 (3x) . } . } . . 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 { 36 ( 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, . ) { 3 ( 0.00%) let hir_id = cx.tcx.local_def_id_to_hir_id(def_id); 30 ( 0.00%) too_many_arguments::check_fn(cx, kind, decl, hir_id, def_id, self.too_many_arguments_threshold); 12 ( 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); 39 ( 0.00%) misnamed_getters::check_fn(cx, kind, decl, body, span); 51 ( 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 (3x) 3 ( 0.00%) impl_trait_in_params::check_fn(cx, &kind, body, hir_id); 39 ( 0.00%) ref_option::check_fn( 3,186 ( 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 (3x) . cx, . kind, . decl, . span, . hir_id, . def_id, . body, 6 ( 0.00%) self.avoid_breaking_exported_api, . ); 21 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 60,015 ( 0.00%) must_use::check_item(cx, item); 3,043,896 ( 0.19%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item (20,005x) 60,015 ( 0.00%) result::check_item( 380,560 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item (20,005x) . cx, . item, 20,005 ( 0.00%) self.large_error_threshold, 20,005 ( 0.00%) &self.large_error_ignored, 20,005 ( 0.00%) self.msrv, . ); . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { . must_use::check_impl_item(cx, item); . result::check_impl_item( . cx, . item, -- line 582 ---------------------------------------- -- 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>) { 15 ( 0.00%) result::check_expr(cx, expr, self.large_error_threshold, &self.large_error_ignored); 51 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr (3x) . } . } 48 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . name: Symbol, . span: Span, . item_id: NodeId, . can_suggest: bool, . } . . impl EarlyLintPass for SingleComponentPathImports { . fn check_crate(&mut self, cx: &EarlyContext<'_>, krate: &Crate) { 1 ( 0.00%) if cx.sess().opts.edition < Edition::Edition2018 { . return; . } . . self.check_mod(&krate.items); . } . 180,045 ( 0.01%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 80,020 ( 0.01%) for SingleUse { span, can_suggest, .. } in self.found.remove(&item.id).into_iter().flatten() { . if can_suggest { . span_lint_and_sugg( . cx, . SINGLE_COMPONENT_PATH_IMPORTS, . span, . "this import is redundant", . "remove it entirely", . String::new(), -- line 73 ---------------------------------------- -- line 79 ---------------------------------------- . SINGLE_COMPONENT_PATH_IMPORTS, . span, . "this import is redundant", . None, . "remove this import", . ); . } . } 160,040 ( 0.01%) } . } . . #[derive(Default)] . struct ImportUsageVisitor { . // keep track of imports reused with `self` keyword, such as `self::std` in the example below. . // Removing the `use std;` would make this a compile error (#10549) . // ``` . // use std; -- line 95 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . }, . ty::Tuple(fields) => fields.iter().any(|f| self.check_impl(cx, f)), . _ => false, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for LargeConstArrays { 140,035 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 40,010 ( 0.00%) if let ItemKind::Const(ident, generics, _, _) = &item.kind . // Since static items may not have generics, skip generic const items. . // FIXME(generic_const_items): I don't think checking `generics.hwcp` suffices as it . // doesn't account for empty where-clauses that only consist of keyword `where` IINM. . && generics.params.is_empty() && !generics.has_where_clause_predicates . && !item.span.from_expansion() . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && self.check_impl(cx, ty) . { -- line 84 ---------------------------------------- -- line 99 ---------------------------------------- . sugg_span, . "make this a static item", . "static", . Applicability::MachineApplicable, . ); . }, . ); . } 160,040 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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 { 180,045 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 60,015 ( 0.00%) if let ItemKind::Fn { . ref sig, 3 ( 0.00%) generics, 9 ( 0.00%) body: id, . .. 40,010 ( 0.00%) } = item.kind . { 18 ( 0.00%) 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 . && !item.span.from_expansion() . && !is_from_proc_macro(cx, item) . { . report_extra_impl_lifetimes(cx, impl_); . } 160,040 ( 0.01%) } . . 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); . } . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { -- line 169 ---------------------------------------- -- 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, . ) { 30 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) || has_where_lifetimes(cx, generics) { 63 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::has_where_lifetimes (3x) . return; . } . 6 ( 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 ---------------------------------------- . } . } . } . } . } . } . } . 39 ( 0.00%) let elidable = could_use_elision(cx, sig.decl, body, trait_sig, generics.params, msrv); 1,068 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::could_use_elision (3x) . 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) 6 ( 0.00%) if (has_elidable_lts || report_extra_lifetimes) && is_from_proc_macro() { . return; . } . 3 ( 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); . } . . if report_extra_lifetimes { 15 ( 0.00%) self::report_extra_lifetimes(cx, sig.decl, generics); 384 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_extra_lifetimes (3x) . } . } . 45 ( 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 3 ( 0.00%) for arg in func.inputs { . input_visitor.visit_ty_unambig(arg); . } . // extract lifetimes in output type 6 ( 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); . } . 12 ( 0.00%) if input_visitor.abort() || output_visitor.abort() { . return None; . } . 12 ( 0.00%) let input_lts = input_visitor.lts; 15 ( 0.00%) let output_lts = output_visitor.lts; . 18 ( 0.00%) if let Some(&[trait_sig]) = trait_sig . && non_elidable_self_type(cx, func, trait_sig, msrv) . { . return None; . } . 6 ( 0.00%) if let Some(body_id) = body { 18 ( 0.00%) let body = cx.tcx.hir_body(body_id); 207 ( 0.00%) => ???:::hir_body (3x) . . let first_ident = body.params.first().and_then(|param| param.pat.simple_ident()); 18 ( 0.00%) if non_elidable_self_type(cx, func, first_ident, msrv) { 36 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type (3x) . return None; . } . . let mut checker = BodyLifetimeChecker::new(cx); 9 ( 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 6 ( 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::>(); . 3 ( 0.00%) if elidable_lts.is_empty() { 3 ( 0.00%) return None; . } . . let usages = itertools::chain(input_lts, output_lts).collect(); . . Some((elidable_lts, usages)) 42 ( 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 12 ( 0.00%) fn non_elidable_self_type<'tcx>(cx: &LateContext<'tcx>, func: &FnDecl<'tcx>, ident: Option, msrv: Msrv) -> bool { 6 ( 0.00%) if let Some(ident) = ident . && 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 . } 15 ( 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 { 51 ( 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 525 ---------------------------------------- . }, . _ => walk_ty(self, ty), . } . } . } . . /// Are any lifetimes mentioned in the `where` clause? If so, we don't try to . /// reason about elision. 24 ( 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 24 ( 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 732 ---------------------------------------- . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the type", . ); . } . } . } . 30 ( 0.00%) fn report_extra_lifetimes<'tcx>(cx: &LateContext<'tcx>, func: &'tcx FnDecl<'_>, generics: &'tcx Generics<'_>) { 6 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, generics.params); . 9 ( 0.00%) walk_generics(&mut checker, generics); 72 ( 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::> (3x) . walk_fn_decl(&mut checker, func); . 12 ( 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", . ); . } . } 24 ( 0.00%) } . . fn report_extra_impl_lifetimes<'tcx>(cx: &LateContext<'tcx>, impl_: &'tcx Impl<'_>) { . let mut checker = LifetimeChecker::::new(cx, impl_.generics.params); . . walk_generics(&mut checker, impl_.generics); . if let Some(of_trait) = impl_.of_trait { . walk_trait_ref(&mut checker, &of_trait.trait_ref); . } -- line 767 ---------------------------------------- -- line 971 ---------------------------------------- . } . . struct BodyLifetimeChecker<'tcx> { . tcx: TyCtxt<'tcx>, . } . . impl<'tcx> BodyLifetimeChecker<'tcx> { . fn new(cx: &LateContext<'tcx>) -> Self { 3 ( 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 ---------------------------------------- 42 ( 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 40,010 ( 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; . } . } . 30 ( 0.00%) 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); . } . } 24 ( 0.00%) } . } . . fn is_debug_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 120,030 ( 0.01%) 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: 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 { 180,045 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 100,025 ( 0.01%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 1,151,640 ( 0.07%) => ???:::hir_attrs (20,005x) 40,019 ( 0.00%) if let ItemKind::Fn { ident, body, .. } = item.kind { 21 ( 0.00%) inline_always::check(cx, item.span, ident.name, attrs, Some(body)); 69 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (3x) . } 20,002 ( 0.00%) repr_attributes::check(cx, item.span, attrs, self.msrv); 140,035 ( 0.01%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { . if let ImplItemKind::Fn(_, body) = item.kind { . inline_always::check( . cx, . item.span, . item.ident.name, . cx.tcx.hir_attrs(item.hir_id()), -- line 528 ---------------------------------------- -- 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 { 6 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 3 ( 0.00%) deprecated_cfg_attr::check(cx, attr, &self.msrv); 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check (1x) 3 ( 0.00%) deprecated_cfg_attr::check_clippy(cx, attr); 28 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy (1x) . non_minimal_cfg::check(cx, attr); 4 ( 0.00%) } . . extract_msrv_attr!(); . } . . 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); . } . 20 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 6 ( 0.00%) check_clippy_attr(cx.sess(), attr); 178 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::check_clippy_attr:: (2x) 10 ( 0.00%) if let Some(items) = &attr.meta_item_list() 323 ( 0.00%) => ???:::meta_item_list (2x) 9 ( 0.00%) && let Some(name) = attr.name() 9 ( 0.00%) => ???:::name (1x) . { 5 ( 0.00%) if matches!(name, sym::allow) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 8 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1x) 3 ( 0.00%) allow_attributes::check(cx, attr); 3 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/allow_attributes.rs:clippy_lints::attrs::allow_attributes::check (1x) . } 5 ( 0.00%) if matches!(name, sym::allow | sym::expect) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 8 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1x) . allow_attributes_without_reason::check(cx, name, items, attr); . } . if is_lint_level(name) { . blanket_clippy_restriction_lints::check(cx, name, items); . } 2 ( 0.00%) if items.is_empty() || !attr.has_name(sym::deprecated) { . return; . } . for item in items { . if let MetaItemInner::MetaItem(mi) = &item . && let MetaItemKind::NameValue(lit) = &mi.kind . && mi.has_name(sym::since) . { . deprecated_semver::check(cx, item.span(), lit); -- line 602 ---------------------------------------- -- 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 `= \"..\"`", . ); . } 16 ( 0.00%) } . . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &'_ ast::Item) { 60,015 ( 0.00%) match item.kind { 60,006 ( 0.00%) ast::ItemKind::ExternCrate(..) | ast::ItemKind::Use(..) => useless_attribute::check(cx, item, &item.attrs), 560,103 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs:clippy_lints::attrs::useless_attribute::check (20,002x) . _ => {}, . } . 100,025 ( 0.01%) mixed_attributes_style::check(cx, item.span, &item.attrs); 2,980,769 ( 0.19%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:clippy_lints::attrs::mixed_attributes_style::check (20,005x) . } . 200,060 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[Attribute]) { 60,018 ( 0.00%) self.msrv.check_attributes(attrs); 60,088 ( 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 (20,006x) . duplicated_attributes::check(cx, attrs); 40,012 ( 0.00%) msrvs::check_attrs(cx.sess(), attrs); 360,164 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:clippy_utils::msrvs::check_attrs:: (20,006x) 160,048 ( 0.01%) } . . fn check_attributes_post(&mut self, _cx: &EarlyContext<'_>, attrs: &[Attribute]) { 80,024 ( 0.01%) self.msrv.check_attributes_post(attrs); 60,088 ( 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 (20,006x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . use clippy_utils::visitors::for_each_expr_without_closures; . use clippy_utils::{is_entrypoint_fn, return_ty, trait_ref_of_method}; . use rustc_span::Symbol; . . use core::ops::ControlFlow; . . use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT}; . 180,045 ( 0.01%) pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 140,034 ( 0.01%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 1,151,640 ( 0.07%) => ???:::hir_attrs (20,005x) 80,029 ( 0.01%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 1,171,646 ( 0.07%) => ???:>::get_attrs (20,005x) 60,012 ( 0.00%) if let hir::ItemKind::Fn { . ref sig, . body: ref body_id, 3 ( 0.00%) ident, . .. . } = item.kind . { 12 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 48 ( 0.00%) => ???:::is_exported (3x) 9 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); 6 ( 0.00%) if let Some((attr_span, reason)) = attr { . check_needless_must_use( . cx, . sig.decl, . item.owner_id, . item.span, . fn_header_span, . *attr_span, . *reason, . attrs, . sig, . ); 9 ( 0.00%) } else if is_public && !is_proc_macro(attrs) && !find_attr!(attrs, NoMangle(..)) { . check_must_use_candidate( . cx, . sig.decl, . cx.tcx.hir_body(*body_id), . item.span, . ident.span, . item.owner_id, . "this function could have a `#[must_use]` attribute", . ); . } . } 160,040 ( 0.01%) } . . pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { . if let hir::ImplItemKind::Fn(ref sig, ref body_id) = item.kind { . let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . let attrs = cx.tcx.hir_attrs(item.hir_id()); . let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); . if let Some((attr_span, reason)) = attr { -- line 67 ---------------------------------------- 20,012 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/four_forward_slashes.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub FOUR_FORWARD_SLASHES, . suspicious, . "comments with 4 forward slashes (`////`) likely intended to be doc comments (`///`)" . } . . declare_lint_pass!(FourForwardSlashes => [FOUR_FORWARD_SLASHES]); . . impl<'tcx> LateLintPass<'tcx> for FourForwardSlashes { 180,045 ( 0.01%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 40,010 ( 0.00%) if item.span.from_expansion() { . return; . } . let sm = cx.sess().source_map(); . let mut span = cx . .tcx 80,012 ( 0.01%) .hir_attrs(item.hir_id()) 1,151,526 ( 0.07%) => ???:::hir_attrs (20,003x) . .iter() . // Only fold in OUTER doc comments. An inner doc (`//!`) inside the item's . // body lowers onto the item with `AttrStyle::Inner`; folding its span drags . // `end_line` down into the body, so the upward `////` scan then flags a . // regular comment there (see #16168). . .filter(|i| { . matches!( . i, . Attribute::Parsed(AttributeKind::DocComment { . style: AttrStyle::Outer, . .. . }) . ) . }) 20,003 ( 0.00%) .fold(item.span.shrink_to_lo(), |span, attr| span.to(attr.span())); 160,024 ( 0.01%) let (Some(file), _, _, end_line, _) = sm.span_to_location_info(span) else { 20,788,556 ( 1.31%) => ???:::span_to_location_info (20,003x) . return; . }; . let mut bad_comments = vec![]; . for line in (0..end_line.saturating_sub(1)).rev() { 60,009 ( 0.00%) let Some(contents) = file.get_line(line).map(|c| c.trim().to_owned()) else { 3,054,609 ( 0.19%) => ???:::get_line (20,003x) . return; . }; . // Keep searching until we find the next item 60,009 ( 0.00%) if !contents.is_empty() && !contents.starts_with("//") && !contents.starts_with("#[") { . break; . } . . if contents.starts_with("////") && !matches!(contents.chars().nth(4), Some('/' | '!')) { . let bounds = file.line_bounds(line); . let line_span = Span::with_root_ctxt(bounds.start, bounds.end); . span = line_span.to(span); . bad_comments.push((line_span, contents)); . } . } . 20,003 ( 0.00%) if !bad_comments.is_empty() { . span_lint_and_then( . cx, . FOUR_FORWARD_SLASHES, . span, . "this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't", . |diag| { . let msg = if bad_comments.len() == 1 { . "make this a doc comment by removing one `/`" -- line 96 ---------------------------------------- -- line 115 ---------------------------------------- . // will need normalization but it should be fine . .map(|(span, c)| (span, c.replacen("////", "///", 1) + "\n")) . .collect(), . Applicability::MachineApplicable, . ); . }, . ); . } 160,040 ( 0.01%) } . } . . /// Checks if `text` contains any CR not followed by a LF . fn contains_bare_cr(text: &str) -> bool { . text.bytes().tuple_windows().any(|(a, b)| a == b'\r' && b != b'\n') . } 100,015 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 20,018 ( 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. 22 ( 0.00%) if index == 0 { . return true; . } . 65 ( 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()] 28 ( 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 1375 ---------------------------------------- . /// let bananas = "bananas"; . /// . /// assert!(bananas.contains("nana")); . /// assert!(!bananas.contains("apples")); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn contains(&self, pat: P) -> bool { 200,000 ( 0.01%) pat.is_contained_in(self) 920,000 ( 0.06%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:<&str as core::str::pattern::Pattern>::is_contained_in (40,000x) . } . . /// Returns `true` if the given pattern matches a prefix of this . /// string slice. . /// . /// Returns `false` if it does not. . /// . /// The [pattern] can be a `&str`, in which case this function will return true if -- line 1391 ---------------------------------------- -- 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 { 80,033 ( 0.01%) self.trim_matches(char::is_whitespace) 320,144 ( 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> (20,009x) . } . . /// 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 { 4 ( 0.00%) self.trim_start_matches(char::is_whitespace) 29 ( 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:::trim_start_matches::<::is_whitespace> (1x) . } . . /// 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")] 120,045 ( 0.01%) 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) } 120,045 ( 0.01%) } . . /// 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")] 2 ( 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()) } 1 ( 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 ---------------------------------------- 40,050 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs -------------------------------------------------------------------------------- Ir -- line 26 ---------------------------------------- . style, . "`unsafe` removed from API names on import" . } . . declare_lint_pass!(UnsafeNameRemoval => [UNSAFE_REMOVED_FROM_NAME]); . . impl EarlyLintPass for UnsafeNameRemoval { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 20,005 ( 0.00%) if let ItemKind::Use(ref use_tree) = item.kind { 60,003 ( 0.00%) check_use_tree(use_tree, cx, item.span); 4,480,022 ( 0.28%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree (20,001x) . } . } . } . 180,009 ( 0.01%) fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) { 120,005 ( 0.01%) match use_tree.kind { 100,000 ( 0.01%) UseTreeKind::Simple(Some(new_name)) => { 20,000 ( 0.00%) if new_name.as_str() == "_" { 640,000 ( 0.04%) => ???:::as_str (20,000x) . return; . } 20,000 ( 0.00%) let old_name = use_tree . .prefix . .segments . .last() . .expect("use paths cannot be empty") . .ident; . unsafe_to_safe_check(old_name, new_name, cx, span); . }, . UseTreeKind::Simple(None) | UseTreeKind::Glob(_) => {}, . UseTreeKind::Nested { ref items, .. } => { . for (use_tree, _) in items { . check_use_tree(use_tree, cx, span); . } . }, . } 160,008 ( 0.01%) } . . fn unsafe_to_safe_check(old_name: Ident, new_name: Ident, cx: &EarlyContext<'_>, span: Span) { . let old_str = old_name.name.as_str(); . let new_str = new_name.name.as_str(); 40,000 ( 0.00%) if contains_unsafe(old_str) && !contains_unsafe(new_str) { . span_lint( . cx, . UNSAFE_REMOVED_FROM_NAME, . span, . format!("removed `unsafe` from the name of `{old_str}` in use as `{new_str}`"), . ); . } . } . . #[must_use] . fn contains_unsafe(name: &str) -> bool { 40,000 ( 0.00%) name.contains("Unsafe") || name.contains("unsafe") . } 60,001 ( 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/set.rs -------------------------------------------------------------------------------- Ir -- line 239 ---------------------------------------- . /// let mut set = HashSet::with_hasher(s); . /// set.insert(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(hasher: S) -> HashSet { 60 ( 0.00%) HashSet { base: base::HashSet::with_hasher(hasher) } . } . . /// Creates an empty `HashSet` with at least the specified capacity, using . /// `hasher` to hash the keys. . /// . /// The hash set 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 set will not allocate. -- line 255 ---------------------------------------- -- line 1182 ---------------------------------------- . impl FromIterator for HashSet . where . T: Eq + Hash, . S: BuildHasher + Default, . { . #[inline] . fn from_iter>(iter: I) -> HashSet { . let mut set = HashSet::with_hasher(Default::default()); 29 ( 0.00%) set.extend(iter); 62 ( 0.00%) set . } . } . . #[stable(feature = "std_collections_from_array", since = "1.56.0")] . // Note: as what is currently the most convenient built-in way to construct . // a HashSet, a simple usage of this function must not *require* the user . // to provide a type annotation in order to infer the third type parameter . // (the hasher parameter, conventionally "S"). -- line 1199 ---------------------------------------- -- line 1278 ---------------------------------------- . #[rustc_const_unstable(feature = "const_default", issue = "143894")] . const impl Default for HashSet . where . S: [const] Default, . { . /// Creates an empty `HashSet` with the `Default` value for the hasher. . #[inline] . fn default() -> HashSet { 120,038 ( 0.01%) HashSet { base: base::HashSet::with_hasher(Default::default()) } . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl BitOr<&HashSet> for &HashSet . where . T: Eq + Hash + Clone, . S: BuildHasher + Default, -- line 1294 ---------------------------------------- 12 ( 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 { 5 ( 0.00%) let len = self.len as u32; . debug_assert!(len <= MAX_LEN); 6 ( 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 133 ---------------------------------------- . (span.lo_or_index, span.len_with_tag_or_marker, span.ctxt_or_parent_or_marker); . InlineCtxt { lo, len, ctxt } . } . } . . impl InlineParent { . #[inline] . fn data(self) -> SpanData { 20,027 ( 0.00%) let len = (self.len_with_tag & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 140,084 ( 0.01%) SpanData { . lo: BytePos(self.lo), . hi: BytePos(self.lo.debug_strict_add(len)), . ctxt: SyntaxContext::root(), . parent: Some(LocalDefId { local_def_index: DefIndex::from_u16(self.parent) }), . } . } . #[inline] . fn span(lo: u32, len: u16, parent: u16) -> Span { . let (lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker) = 3 ( 0.00%) (lo, PARENT_TAG | len, parent); . Span { lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker } . } . #[inline] . fn from_span(span: Span) -> InlineParent { . let (lo, len_with_tag, parent) = . (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 { 7 ( 0.00%) SpanData { . ctxt: SyntaxContext::from_u16(self.ctxt), 4 ( 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, . ) => { 360,574 ( 0.02%) if $span.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { 660,932 ( 0.04%) 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 . } 38 ( 0.00%) } 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 { 8 ( 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()); 40,026 ( 0.00%) if len <= MAX_LEN && ctxt32 <= MAX_CTXT { 20,017 ( 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(); 100,033 ( 0.01%) if ctxt32 == 0 && parent32 <= MAX_CTXT { . return InlineParent::span(lo.0, len as u16, parent32 as u16); . } . } . } . } . . // Otherwise small ctxt may enable the partially inline format. . let index = |ctxt| { -- line 273 ---------------------------------------- -- 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)) . } 160,041 ( 0.01%) } . . #[inline] . pub fn data(self) -> SpanData { . let data = self.data_untracked(); 20 ( 0.00%) if let Some(parent) = data.parent { 30 ( 0.00%) (*SPAN_TRACK)(parent); 126 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (6x) . } . 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(), 4 ( 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 ---------------------------------------- 360,400 ( 0.02%) -------------------------------------------------------------------------------- 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/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/eset.c src/extent.c src/hook.c src/sz.c src/tcache.c -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 55,753,417 ( 3.50%) events annotated