-------------------------------------------------------------------------------- Profile data file 'results/clgout-nightly-2026-08-14-syn-2.0.101-Clippy-IncrUnchanged-Threads1' (creator: callgrind-3.25.1) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 308140072 Trigger: Program termination Profiled target: /home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver --crate-name syn --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg feature="clone-impls" --cfg feature="default" --cfg feature="derive" --cfg feature="parsing" --cfg feature="printing" --cfg feature="proc-macro" --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values("clone-impls", "default", "derive", "extra-traits", "fold", "full", "parsing", "printing", "proc-macro", "test", "visit", "visit-mut")) -C metadata=1a6f1d00c9e689fc -C extra-filename=-f6fffa181b897b1c --out-dir /tmp/.tmpOD12n7/target/debug/deps -L dependency=/tmp/.tmpOD12n7/target/debug/deps --extern proc_macro2=/tmp/.tmpOD12n7/target/debug/deps/libproc_macro2-118a26b171366723.rmeta --extern quote=/tmp/.tmpOD12n7/target/debug/deps/libquote-e3e84a05ceeef45e.rmeta --extern unicode_ident=/tmp/.tmpOD12n7/target/debug/deps/libunicode_ident-1276b5caa63628a4.rmeta -C incremental=/tmp/.tmpOD12n7/incremental-state -Wclippy::all -Zthreads=1 -Adeprecated -Aunknown-lints -Zincremental-verify-ich (PID 723485, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: on -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 1,762,310,986 (100.0%) PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 104,531,434 ( 5.93%) ???:::try_mark_previous_green'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,092,125 ( 1.99%) ???:::fully_expand_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,254,373 ( 1.94%) ???:::try_mark_previous_green [???] 32,854,568 ( 1.86%) ???:::advance_token [???] 28,504,358 ( 1.62%) ???:0x0000000000173dc0 [/usr/lib/libc.so.6] 27,318,225 ( 1.55%) ???:::resolve_ident_in_scope_set_inner [???] 25,864,094 ( 1.47%) ???:::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,601,291 ( 1.34%) ???:::stable_hash_span [???] 23,278,064 ( 1.32%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,080,212 ( 1.25%) ???:::short_write_process_buffer::<8> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,377,399 ( 1.16%) ???:::next_token_from_cursor [???] 16,279,350 ( 0.92%) ???:)>>::call_once [???] 15,968,041 ( 0.91%) ???:::to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,532,966 ( 0.88%) ???:>::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] 14,599,113 ( 0.83%) ???:::lower_qpath [???] 12,609,395 ( 0.72%) ???:::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] 11,781,417 ( 0.67%) ???:::resolve_path [???] 11,583,636 ( 0.66%) include/jemalloc/internal/rtree.h:free 10,601,424 ( 0.60%) ???:::traits_in_scope [???] 10,318,976 ( 0.59%) ???:::parse_token_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,783,174 ( 0.56%) ???:::stable_hash:: [???] 9,760,718 ( 0.55%) ???:::parent_hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,534,771 ( 0.54%) ???: 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] 8,321,493 ( 0.47%) ???:::parse_path_segment [???] 8,167,398 ( 0.46%) ???:md5::compress::soft::compress [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,153,303 ( 0.46%) ???:::create_def [???] 8,141,618 ( 0.46%) ???:::bump_minimal [???] 8,080,033 ( 0.46%) ???:::next [???] 7,923,787 ( 0.45%) ???:::lex_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,594,327 ( 0.43%) ???:::exec_cache_promotions'2 [???] 7,356,665 ( 0.42%) ???:>::decode [???] 7,348,902 ( 0.42%) ???:::is_imported [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,843,720 ( 0.39%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 6,827,498 ( 0.39%) ???:>::decode [???] 6,782,312 ( 0.38%) /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 6,781,941 ( 0.38%) include/jemalloc/internal/jemalloc_internal_inlines_c.h:malloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 6,738,575 ( 0.38%) ???:::get_module_children::{closure#0}, core::result::Result::Ok>, core::result::Result> as core::iter::traits::iterator::Iterator>::next [???] 6,693,148 ( 0.38%) ???:0x00000000001747c0 [/usr/lib/libc.so.6] 6,625,508 ( 0.38%) ???:::smart_resolve_path_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,524,834 ( 0.37%) ???:::hash_owner_nodes::{closure#0} [???] 6,428,231 ( 0.36%) ???:rustc_middle::ty::codec::encode_with_shorthand::::type_shorthands> [???] 6,369,971 ( 0.36%) ???:::stable_hash::'2 [???] 6,287,894 ( 0.36%) ???:::lint_level_spec_at_node'2 [???] 6,005,243 ( 0.34%) ???:::make_owner_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,969,572 ( 0.34%) ???:>::push [???] 5,894,638 ( 0.33%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,875,983 ( 0.33%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 5,865,324 ( 0.33%) ???: as rustc_ast::visit::Visitor>::visit_expr'2 [???] 5,811,669 ( 0.33%) include/jemalloc/internal/rtree.h:tcache_bin_flush_small 5,644,789 ( 0.32%) ???:::lower_expr_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,616,470 ( 0.32%) ???: as rustc_ast::visit::Visitor>::visit_id [???] 5,606,260 ( 0.32%) ???:::render [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,564,912 ( 0.32%) ???:::parse_path_inner [???] 5,483,980 ( 0.31%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}>'2 [???] 5,482,871 ( 0.31%) ???:::lookup_char_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,472,075 ( 0.31%) ???:::take [???] 5,436,364 ( 0.31%) ???:::encode_span [???] 5,304,913 ( 0.30%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 5,287,327 ( 0.30%) ???:::finish128_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,254,860 ( 0.30%) ???: as rustc_serialize::serialize::Decodable>::decode [???] 5,254,227 ( 0.30%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 5,179,869 ( 0.29%) ???:rustc_middle::dep_graph::graph::hash_result:: [???] 5,133,310 ( 0.29%) ???:::hir_attrs [???] 5,036,589 ( 0.29%) ???:::{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] 4,933,428 ( 0.28%) ???:rustc_ast_lowering::lower_to_hir [???] 4,892,410 ( 0.28%) ???:::in_external_macro [???] 4,847,435 ( 0.28%) ???:::decode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,803,438 ( 0.27%) include/jemalloc/internal/cache_bin.h:malloc 4,775,686 ( 0.27%) /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] 4,595,825 ( 0.26%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [???] 4,552,364 ( 0.26%) ???:core::fmt::write [???] 4,511,961 ( 0.26%) ???:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} [???] 4,427,315 ( 0.25%) ???:::alloc_and_color_node [???] 4,305,152 ( 0.24%) ???:::hir_body_const_context [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,261,438 ( 0.24%) ???: 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] 4,196,211 ( 0.24%) ???:::span_data_to_lines_and_cols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,149,986 ( 0.24%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, &rustc_middle::ty::typeck_results::TypeckResults>::{closure#0} [???] 4,061,574 ( 0.23%) include/jemalloc/internal/cache_bin.h:free 4,053,030 ( 0.23%) ???:::desugaring_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,047,346 ( 0.23%) ???:::hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,031,720 ( 0.23%) ???:::short_write_process_buffer::<4> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,985,589 ( 0.23%) ???:<[(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] 3,972,690 ( 0.23%) ???:>::call_once'2 [???] 3,968,794 ( 0.23%) ???:::parse_item_kind'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,838,833 ( 0.22%) ???:::slice_write_process_buffer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,766,858 ( 0.21%) ???:::visit_item::{closure#0}::{closure#0}'2 [???] 3,648,201 ( 0.21%) ???:::decode_span [???] 3,635,029 ( 0.21%) ???:::resolve_ident_in_scope_set_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,522,017 ( 0.20%) ???:core::ptr::drop_glue::> [???] 3,477,161 ( 0.20%) src/arena.c:malloc_default 3,474,155 ( 0.20%) ???:<&mut serde_json::ser::Serializer<&mut alloc::boxed::Box> as serde_core::ser::Serializer>::serialize_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,441,488 ( 0.20%) ???:0x000000000000fb40 [/usr/lib/ld-linux-x86-64.so.2] 3,390,465 ( 0.19%) include/jemalloc/internal/sz.h:malloc 3,345,308 ( 0.19%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}> [???] 3,336,095 ( 0.19%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [???] 3,321,578 ( 0.19%) ???: as rustc_data_structures::stable_hash::StableHash>::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,317,936 ( 0.19%) ???:::decode_span [???] 3,286,078 ( 0.19%) ???:::hir_attrs'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,239,961 ( 0.18%) ???:::intern_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,213,089 ( 0.18%) ???:::parse_item_kind [???] 3,207,374 ( 0.18%) ???:::short_write_process_buffer::<1> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,200,528 ( 0.18%) ???:::hash_expn:: [???] 3,193,055 ( 0.18%) ???:::putc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,191,826 ( 0.18%) ???:::parse_ty_common [???] 3,177,946 ( 0.18%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 3,170,986 ( 0.18%) ???:::candidate_from_obligation_no_cache [???] 3,134,222 ( 0.18%) ???:rustc_resolve::rustdoc::unindent_doc_fragments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,011,398 ( 0.17%) ???:::stable_hash:: [???] 2,884,401 ( 0.16%) ???:::lower_attrs_vec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,846,205 ( 0.16%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [???] 2,827,279 ( 0.16%) ???: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] 2,821,744 ( 0.16%) ???: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] 2,783,407 ( 0.16%) ???: as core::clone::Clone>::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,754,733 ( 0.16%) ???:::check_expr [???] 2,748,457 ( 0.16%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,730,870 ( 0.15%) ???:::parse_block [???] 2,730,351 ( 0.15%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [???] 2,665,996 ( 0.15%) ???:::parse_item_impl [???] 2,665,633 ( 0.15%) ???:thin_vec::drop_non_singleton:: [???] 2,657,016 ( 0.15%) ???:> 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,650,817 ( 0.15%) site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,646,954 ( 0.15%) ???:rustc_data_structures::outline::<::lines::{closure#0}, &[rustc_span::RelativeBytePos]> [???] 2,618,378 ( 0.15%) ???:::new [???] 2,600,308 ( 0.15%) ???:::hir_body_owner_def_id [???] 2,586,384 ( 0.15%) ???: as core::io::write::Write>::write_all [???] 2,554,879 ( 0.14%) ???:::bump [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,550,052 ( 0.14%) ???:>::decode [???] 2,492,985 ( 0.14%) ???:::intern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,440,313 ( 0.14%) ???:::check_for_ambiguity::, rustc_expand::mbe::macro_rules::NoopTracker> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,434,885 ( 0.14%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,426,228 ( 0.14%) ???:>>::walk_ref [???] 2,425,124 ( 0.14%) include/jemalloc/internal/emap.h:tcache_bin_flush_small 2,393,480 ( 0.14%) ???:::collect_tokens_no_attrs::::parse_attribute::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,361,016 ( 0.13%) ???: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,306,944 ( 0.13%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,297,667 ( 0.13%) ???:::resolve_pattern_inner::{closure#0} [???] 2,266,092 ( 0.13%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,264,472 ( 0.13%) ???:::next'2 [???] 2,246,253 ( 0.13%) ???:::evaluate_trait_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,206,884 ( 0.13%) ???:0x0000000000173660 [/usr/lib/libc.so.6] 2,190,809 ( 0.12%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,189,081 ( 0.12%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 2,184,609 ( 0.12%) include/jemalloc/internal/edata.h:tcache_bin_flush_small 2,162,477 ( 0.12%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,160,534 ( 0.12%) ???:::insert [???] 2,142,258 ( 0.12%) ???:annotate_snippets::renderer::render::normalize_whitespace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,138,780 ( 0.12%) /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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,064,669 ( 0.12%) ???:::next'2 [???] 2,062,071 ( 0.12%) ???:::{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 [???] 2,051,890 ( 0.12%) ???: as rustc_hir::intravisit::Visitor>::visit_expr'2 [???] 2,020,640 ( 0.11%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [???] 2,017,464 ( 0.11%) include/jemalloc/internal/thread_event.h:malloc 2,006,221 ( 0.11%) include/jemalloc/internal/sz.h:realloc 1,998,244 ( 0.11%) ???:::candidate_from_obligation [???] 1,963,351 ( 0.11%) ???:::parse_item_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,961,247 ( 0.11%) ???:::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,938,582 ( 0.11%) ???:::collect_tokens::::parse_stmt_without_recovery::{closure#4}> [???] 1,932,973 ( 0.11%) ???:::parse_fn_params [???] 1,926,869 ( 0.11%) ???:::hir_enclosing_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,902,653 ( 0.11%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty [???] 1,902,008 ( 0.11%) ???:::lower_ty [???] 1,884,745 ( 0.11%) ???:>>::walk_ref'2 [???] 1,882,165 ( 0.11%) ???:>::call_once [???] 1,858,733 ( 0.11%) ???:::extract_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,854,931 ( 0.11%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}'2 [???] 1,843,158 ( 0.10%) ???:::get_lint_level_spec [???] 1,841,297 ( 0.10%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,810,672 ( 0.10%) ???:pthread_mutex_unlock [/usr/lib/libc.so.6] 1,801,680 ( 0.10%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 1,789,331 ( 0.10%) ???:>::add_id [???] 1,788,945 ( 0.10%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,786,168 ( 0.10%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::first_node_in_macro:: 1,779,409 ( 0.10%) ???:::get_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,751,163 ( 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,745,647 ( 0.10%) ???:rustc_query_impl::plumbing::promote_from_disk_inner::>> [???] 1,739,530 ( 0.10%) ???:::confirm_auto_impl_candidate::{closure#0} [???] 1,737,537 ( 0.10%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,716,140 ( 0.10%) ???:::parse_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,715,712 ( 0.10%) ???:::lookup_byte_offset [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,714,636 ( 0.10%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,708,315 ( 0.10%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,707,948 ( 0.10%) ???:stacker::remaining_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,704,458 ( 0.10%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,704,318 ( 0.10%) ???:::is_diagnostic_item [???] 1,690,576 ( 0.10%) ???:0x000000000000ba80 [/usr/lib/ld-linux-x86-64.so.2] 1,684,561 ( 0.10%) ???:::write_char [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,647,225 ( 0.09%) ???:::visit_fn [???] 1,639,314 ( 0.09%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,620,433 ( 0.09%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 1,618,743 ( 0.09%) ???:::lower_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,595,049 ( 0.09%) ???:::resolve_macro_invocation [???] 1,569,490 ( 0.09%) ???:pthread_mutex_trylock [/usr/lib/libc.so.6] 1,568,356 ( 0.09%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,557,906 ( 0.09%) ???:::get_diagnostic_name [???] 1,554,992 ( 0.09%) ???:::check_ident [???] 1,545,817 ( 0.09%) ???:::get_lint_level_spec'2 [???] 1,541,474 ( 0.09%) ???:core::slice::memchr::memchr_aligned [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,539,971 ( 0.09%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,534,102 ( 0.09%) include/jemalloc/internal/arena_inlines_b.h:tcache_bin_flush_small 1,533,234 ( 0.09%) src/arena.c:realloc 1,533,024 ( 0.09%) ???:::update_decl_chain [???] 1,532,588 ( 0.09%) ???:<[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] 1,517,859 ( 0.09%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,512,994 ( 0.09%) ???:::resolve_path_with_ribs [???] 1,511,786 ( 0.09%) ???:::qpath_res [???] 1,475,264 ( 0.08%) ???:::get_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,458,978 ( 0.08%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty'2 [???] 1,452,484 ( 0.08%) site/frontend/rust-clippy/clippy_lints/src/misc.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,447,462 ( 0.08%) ???:::resolve_doc_links [???] 1,433,457 ( 0.08%) 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,427,104 ( 0.08%) ???:>::reserve_rehash::>::{closure#0}>'2 [???] 1,416,629 ( 0.08%) ???:::{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] 1,412,209 ( 0.08%) ???:::resolve_imports [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,406,363 ( 0.08%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,404,906 ( 0.08%) ???:>::encode [???] 1,383,972 ( 0.08%) ???:annotate_snippets::renderer::render::draw_line [???] 1,376,067 ( 0.08%) ???:::resolve_crate::{closure#0}'2 [???] 1,373,706 ( 0.08%) ???:::lower_pat_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,372,731 ( 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/jemalloc.c:realloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,366,187 ( 0.08%) ???:::next [???] 1,360,824 ( 0.08%) include/jemalloc/internal/sz.h:free 1,342,640 ( 0.08%) ???:)>>::call_once [???] 1,339,984 ( 0.08%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,329,373 ( 0.08%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,323,102 ( 0.08%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,307,489 ( 0.07%) ???:::{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] 1,303,018 ( 0.07%) ???:::lower_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,293,063 ( 0.07%) ???:::decode_symbol [???] 1,280,807 ( 0.07%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,270,926 ( 0.07%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 1,263,755 ( 0.07%) ???:::visit_ty [???] 1,243,249 ( 0.07%) ???:rustc_ty_utils::ty::param_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,242,078 ( 0.07%) ???:::lookup_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,240,626 ( 0.07%) ???:::is_exported [???] 1,230,166 ( 0.07%) site/frontend/rust-clippy/clippy_lints/src/casts/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,227,980 ( 0.07%) ???:)>>::call_once [???] 1,224,324 ( 0.07%) ???:::parse_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,218,810 ( 0.07%) ???:::lower [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,217,976 ( 0.07%) ???:)>>::call_once [???] 1,208,651 ( 0.07%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [???] 1,195,135 ( 0.07%) ???:::parse_stmt_without_recovery [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,187,224 ( 0.07%) ???:::expect_hir_owner_nodes [???] 1,169,854 ( 0.07%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> 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,169,012 ( 0.07%) include/jemalloc/internal/bitmap.h:tcache_bin_flush_small 1,166,922 ( 0.07%) ???:::parse_outer_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,166,900 ( 0.07%) ???:::expr_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,162,623 ( 0.07%) ???:::parse_pat_with_range_pat [???] 1,158,941 ( 0.07%) ???:::is_diagnostic_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,155,308 ( 0.07%) ???:>::new'2 [???] 1,152,798 ( 0.07%) ???: as rustc_hir::intravisit::Visitor>::visit_path [???] 1,151,461 ( 0.07%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,132,890 ( 0.06%) ???:::opt_associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,127,958 ( 0.06%) ???:::encode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,126,845 ( 0.06%) ???:::desugar_doc_comments::desugar_inner'2 [???] 1,115,209 ( 0.06%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::root_macro_call 1,114,399 ( 0.06%) ???:::{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] 1,114,135 ( 0.06%) ???:::visit_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,105,988 ( 0.06%) ???: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] 1,098,498 ( 0.06%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,097,523 ( 0.06%) ???:core::ptr::drop_glue::<[rustc_expand::mbe::macro_parser::NamedMatch]>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,093,209 ( 0.06%) ???:rustc_privacy::effective_visibilities'2 [???] 1,089,772 ( 0.06%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,087,789 ( 0.06%) ???:0x000000000000aec0 [/usr/lib/ld-linux-x86-64.so.2] 1,087,239 ( 0.06%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,084,304 ( 0.06%) ???:::ensure_lines [???] 1,079,463 ( 0.06%) ???:annotate_snippets::renderer::render::char_width [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,069,787 ( 0.06%) ???:::visit_assoc_item [???] 1,069,032 ( 0.06%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,068,950 ( 0.06%) ???:rustc_resolve::rustdoc::prepare_to_doc_link_resolution [???] 1,066,371 ( 0.06%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,060,848 ( 0.06%) ???:::from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,058,896 ( 0.06%) ???:::stable_hash::'2 [???] 1,042,670 ( 0.06%) ???:::stable_hash:: [???] 1,041,741 ( 0.06%) ???:::lower_method_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,040,745 ( 0.06%) ???: 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] 1,038,707 ( 0.06%) ???:rustc_expand::mbe::transcribe::lockstep_iter_size'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,028,765 ( 0.06%) ???:::record_use [???] 1,008,661 ( 0.06%) include/jemalloc/internal/bit_util.h:malloc_default 1,008,250 ( 0.06%) 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] 1,007,314 ( 0.06%) ???:, 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] 997,086 ( 0.06%) ???:::parse_block_common [???] 996,947 ( 0.06%) ???:<[rustc_ast::tokenstream::TokenTree] as rustc_data_structures::stable_hash::StableHash>::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 989,746 ( 0.06%) ???:::parse_ty_common'2 [???] 986,813 ( 0.06%) ???: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] 985,524 ( 0.06%) ???: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] 981,631 ( 0.06%) ???:::from_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 979,474 ( 0.06%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [???] 979,449 ( 0.06%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item'2 [???] 974,246 ( 0.06%) ???:::intern_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 963,585 ( 0.05%) ???:::expn_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 961,920 ( 0.05%) ???:::is_path_start_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 960,604 ( 0.05%) ???:::lower_expr_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 958,374 ( 0.05%) ???:>::call_once [???] 955,730 ( 0.05%) include/jemalloc/internal/ph.h:pa_alloc 955,708 ( 0.05%) ???:rustc_data_structures::unord::hash_iter_order_independent::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 953,920 ( 0.05%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 944,621 ( 0.05%) ???:>::call_once [???] 943,097 ( 0.05%) ???:::parse_attr_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 941,220 ( 0.05%) ???:::confirm_candidate [???] 937,530 ( 0.05%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 937,330 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 935,929 ( 0.05%) ???:::lower_qpath'2 [???] 934,079 ( 0.05%) ???:::parse_stmt_without_recovery'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 931,290 ( 0.05%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 926,581 ( 0.05%) include/jemalloc/internal/rtree.h:realloc 922,889 ( 0.05%) ???:rustc_span::normalize_src [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 918,945 ( 0.05%) ???:::span_to_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 917,369 ( 0.05%) ???:::range_span [???] 916,162 ( 0.05%) ???: 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] 915,762 ( 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] 914,433 ( 0.05%) ???:::resolve_and_cache_rustdoc_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 911,143 ( 0.05%) include/jemalloc/internal/rtree.h:pa_alloc 904,495 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 903,308 ( 0.05%) ???:::lang_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 899,473 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 894,594 ( 0.05%) ???:rustc_lint::levels::shallow_lint_levels_on [???] 890,616 ( 0.05%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::in_automatically_derived 886,379 ( 0.05%) ???:::next [???] 880,065 ( 0.05%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 878,099 ( 0.05%) ???:::{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 [???] 877,972 ( 0.05%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true>'2 [???] 876,759 ( 0.05%) include/jemalloc/internal/div.h:tcache_bin_flush_small 875,040 ( 0.05%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 871,889 ( 0.05%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 870,504 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 868,956 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs:clippy_lints::unit_types::unit_arg::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 867,955 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 866,860 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 853,826 ( 0.05%) ???:::visit_nested_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 851,994 ( 0.05%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 846,063 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [???] 844,406 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 842,784 ( 0.05%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 842,657 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/operators/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 842,049 ( 0.05%) ???:>::walk_mut'2 [???] 836,357 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 835,667 ( 0.05%) ???:::parse_item_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 832,356 ( 0.05%) ???:::lookup_line [???] 831,770 ( 0.05%) ???:::get_diagnostic_name'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 830,631 ( 0.05%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/mod.rs:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 830,507 ( 0.05%) 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] 821,937 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 819,579 ( 0.05%) ???:::intern_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 814,719 ( 0.05%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 807,824 ( 0.05%) 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] 803,960 ( 0.05%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 796,783 ( 0.05%) ???:rustc_query_impl::query_impl::clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [???] 796,772 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 791,273 ( 0.04%) ???:::add_import::{closure#0} [???] 787,229 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 786,723 ( 0.04%) ???:<(&rustc_span::def_id::DefId, &rustc_span::def_id::DefId) 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] 785,902 ( 0.04%) ???:rustc_resolve::rustdoc::add_doc_fragment [???] 783,465 ( 0.04%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 781,956 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 780,480 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 778,095 ( 0.04%) ???:::call_once_force::<>, rustc_hash::FxBuildHasher>>>::initialize<>, rustc_hash::FxBuildHasher>>>::get_or_init<::resolutions::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [???] 777,504 ( 0.04%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 770,825 ( 0.04%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 770,271 ( 0.04%) ???:::def_id_partial_cmp [???] 769,797 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 764,811 ( 0.04%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 763,728 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/repeat_vec_with_capacity.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 760,908 ( 0.04%) ???:::type_dependent_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 759,540 ( 0.04%) ???:::to_attr_token_stream [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 754,336 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 749,416 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 747,564 ( 0.04%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 746,452 ( 0.04%) ???:rustc_middle::ty::trait_def::trait_impls_of_provider [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 745,428 ( 0.04%) ???: as rustc_ast::visit::Visitor>::visit_expr [???] 740,315 ( 0.04%) ???:::parse_expr_assoc_with'2 [???] 737,801 ( 0.04%) ???:::fallible_with_capacity:: [???] 736,712 ( 0.04%) ???:::lex_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 736,203 ( 0.04%) ???:rustc_data_structures::unord::hash_iter_order_independent::> [???] 733,639 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 731,669 ( 0.04%) ???:> as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 729,211 ( 0.04%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode [???] 727,018 ( 0.04%) 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] 727,018 ( 0.04%) 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] 725,992 ( 0.04%) ???:::lower_ty'2 [???] 722,180 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes 720,054 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 718,635 ( 0.04%) ???:::parse_expr_force_collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 718,508 ( 0.04%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 718,110 ( 0.04%) ???:::parse_expr_paren_seq [???] 718,056 ( 0.04%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [???] 715,986 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 715,748 ( 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:::check_attributes 714,944 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 714,287 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 713,913 ( 0.04%) ???:rustc_middle::hir::map::crate_hash'2 [???] 713,071 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/ranges.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 710,722 ( 0.04%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 710,504 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 702,410 ( 0.04%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 696,027 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 694,748 ( 0.04%) ???:rustc_query_impl::execution::ensure_can_skip_execution::, rustc_middle::dep_graph::graph::DepNodeIndex>> [???] 692,107 ( 0.04%) ???:rustc_ast::mut_visit::walk_fn:: [???] 688,143 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 688,002 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 687,546 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_option_as_slice.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 686,071 ( 0.04%) 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] 686,071 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post 685,610 ( 0.04%) /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] 685,610 ( 0.04%) 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] 683,698 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 682,111 ( 0.04%) ???: as rustc_data_structures::stable_hash::StableHash>::stable_hash::'2 [???] 681,452 ( 0.04%) include/jemalloc/internal/tsd_tls.h:free [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 681,451 ( 0.04%) include/jemalloc/internal/atomic.h:free 679,786 ( 0.04%) include/jemalloc/internal/edata.h:pa_alloc 679,536 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 678,071 ( 0.04%) include/jemalloc/internal/sz.h:pa_alloc 677,557 ( 0.04%) ???:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 [???] 672,656 ( 0.04%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 669,640 ( 0.04%) ???:::visit_ast_fragment_with_placeholders [???] 667,245 ( 0.04%) ???:dladdr [/usr/lib/libc.so.6] 665,958 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 665,176 ( 0.04%) ???:::resolve_ident_in_lexical_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 664,122 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 663,879 ( 0.04%) ???:rustc_span::hygiene::decode_syntax_context::::decode_syntax_context::{closure#0}> [???] 663,776 ( 0.04%) ???:::stable_hash:: [???] 661,959 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 661,959 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 661,959 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 661,278 ( 0.04%) /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 660,678 ( 0.04%) ???:rustc_trait_selection::traits::normalize_param_env_or_error [???] 659,853 ( 0.04%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 654,135 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/format.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 654,106 ( 0.04%) ???:::evaluate_trait_predicate_recursively [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 653,197 ( 0.04%) ???:::brg_visit_item [???] 653,156 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/if_let_mutex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 652,656 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 651,815 ( 0.04%) ???:::hir_maybe_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 651,594 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 651,518 ( 0.04%) ???:::serialize::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 651,419 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 650,757 ( 0.04%) src/base.c:pa_alloc 645,755 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 644,160 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:::trim_start_matches::<::is_whitespace> 642,381 ( 0.04%) ???:::mark_span_with_reason [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 641,089 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 638,895 ( 0.04%) ???:::is_conditionally_const:: [???] 638,295 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 637,270 ( 0.04%) ???:::trait_of_assoc [???] 636,615 ( 0.04%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 635,246 ( 0.04%) ???:::evaluate_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 633,232 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 633,006 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 628,941 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 628,714 ( 0.04%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 621,009 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 619,797 ( 0.04%) ???:::mk_type_list [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 618,803 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/ifs/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 617,913 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/redundant_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 617,793 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/bit_width.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 617,671 ( 0.04%) include/jemalloc/internal/ph.h:tcache_bin_flush_small 616,994 ( 0.04%) ???:::add_annotation_to_file'2 [???] 615,530 ( 0.03%) ???:::write_import_resolutions::{closure#0} [???] 615,304 ( 0.03%) 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] 614,168 ( 0.03%) ???:::finalize_import::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 613,808 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:clippy_lints::doc::check_doc::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 612,448 ( 0.03%) ???:rustc_query_impl::plumbing::promote_from_disk_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 612,234 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 611,468 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 608,171 ( 0.03%) ???:::parse_constness_ [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 606,875 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_main_separator_str.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 606,809 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 604,831 ( 0.03%) ???:::is_desugaring [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 600,606 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/minmax.rs:clippy_lints::minmax::min_max [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 598,885 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/match_result_ok.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 592,752 ( 0.03%) ???:rust_psm_stack_pointer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 587,482 ( 0.03%) ???: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] 584,506 ( 0.03%) include/jemalloc/internal/util.h:tcache_bin_flush_small 582,008 ( 0.03%) ???:::parse_block_common'2 [???] 581,967 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 574,666 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 574,666 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 574,125 ( 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] 573,162 ( 0.03%) ???:::parse_pat_ident [???] 572,565 ( 0.03%) ???:::intern_region [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 571,934 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_mut_passed.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 571,698 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 571,320 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 570,465 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/bool_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 570,342 ( 0.03%) include/jemalloc/internal/thread_event.h:realloc 570,069 ( 0.03%) ???:>::grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 569,671 ( 0.03%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 568,455 ( 0.03%) ???:::lower_param [???] 568,373 ( 0.03%) ???:::parse_param_general::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 567,477 ( 0.03%) ???:rustc_ast::visit::visit_items::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 565,950 ( 0.03%) ???:::parse_expr_prefix'2 [???] 565,289 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 565,048 ( 0.03%) include/jemalloc/internal/cache_bin.h:malloc_default 562,719 ( 0.03%) ???:>, rustc_middle::query::erase::ErasedData<[u8; 2]>> 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] 559,102 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 558,563 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 556,069 ( 0.03%) ???:::eat_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 554,490 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 554,103 ( 0.03%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::attrs_for_def [???] 553,799 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 550,541 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/formatting.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 549,996 ( 0.03%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 547,768 ( 0.03%) include/jemalloc/internal/arena_inlines_b.h:realloc 546,450 ( 0.03%) ???:::visit_item'2 [???] 546,379 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 545,433 ( 0.03%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 544,661 ( 0.03%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::implementations_of_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 543,251 ( 0.03%) ???:rustc_hir::hir::is_range_literal [???] 542,930 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 541,635 ( 0.03%) 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] 541,473 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 541,275 ( 0.03%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 539,927 ( 0.03%) ???:rustc_ast::util::comments::beautify_doc_string [???] 539,694 ( 0.03%) ???:::parse_visibility [???] 539,448 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 535,396 ( 0.03%) ???:::try_plant_decl_into_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 535,249 ( 0.03%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/tcache.c:tcache_bin_flush_stashed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 534,968 ( 0.03%) ???:::brg_visit_item'2 [???] 533,772 ( 0.03%) ???:> 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] 531,927 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 530,617 ( 0.03%) ???:::par_hir_body_owners::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 529,406 ( 0.03%) ???:rustc_middle::ty::codec::encode_with_shorthand::::type_shorthands>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 527,217 ( 0.03%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 525,353 ( 0.03%) ???:::hir_get_parent_item [???] 523,607 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 523,191 ( 0.03%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 521,999 ( 0.03%) ???:::expect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 521,921 ( 0.03%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 521,368 ( 0.03%) ???:annotate_snippets::renderer::render::render [???] 520,409 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 518,480 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 517,284 ( 0.03%) ???:::lower_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 516,510 ( 0.03%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 515,906 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 514,170 ( 0.03%) src/eset.c:pa_alloc 513,735 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_pop_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 513,734 ( 0.03%) ???:rustc_interface::passes::emit_delayed_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 513,473 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 511,470 ( 0.03%) ???:::feed_visibility [???] 511,293 ( 0.03%) ???:core::str::count::do_count_chars [???] 510,252 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 508,084 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 508,028 ( 0.03%) ???:::lifetime_res_to_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 507,122 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 505,823 ( 0.03%) ???:::visit_assoc_item [???] 505,691 ( 0.03%) ???:>>::collect_and_apply::, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, ::mk_args_from_iter, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 504,461 ( 0.03%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 504,414 ( 0.03%) ???:::visit_item [???] 503,618 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 503,265 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 503,079 ( 0.03%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 501,941 ( 0.03%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>> [???] 501,106 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 500,949 ( 0.03%) ???:rustc_ast::visit::walk_item_inner::>'2 [???] 498,380 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/double_parens.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 497,995 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 497,517 ( 0.03%) include/jemalloc/internal/tcache_inlines.h:realloc 496,860 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/blocks_in_conditions.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 496,680 ( 0.03%) ???:<&char as core::fmt::Display>::fmt [???] 496,614 ( 0.03%) ???:::visit_expr::{closure#0} [???] 495,858 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 495,824 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/block_scrutinee.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 495,734 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 493,193 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 492,934 ( 0.03%) ???:<&rustc_middle::ty::list::RawList as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 492,682 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 492,495 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/entry.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 491,743 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 491,681 ( 0.03%) ???:::visit_fn [???] 491,525 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_take.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 490,584 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 490,419 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/zero_repeat_side_effects.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 490,369 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 489,957 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_sub.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 489,747 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/await_holding_invalid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 489,510 ( 0.03%) ???:rustc_query_impl::plumbing::try_load_from_disk:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 486,343 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 486,176 ( 0.03%) ???:>>::walk_ref [???] 485,089 ( 0.03%) ???:::resolve_crate_root [???] 484,053 ( 0.03%) ???:::fmt_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 482,674 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 481,823 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/arc_with_non_send_sync.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 481,809 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/box_default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 481,046 ( 0.03%) ???:::stable_hash:: [???] 481,043 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/from_raw_with_void_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 480,360 ( 0.03%) /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 480,360 ( 0.03%) /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 477,842 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 477,308 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 477,250 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default_constructed_unit_structs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 475,746 ( 0.03%) ???:<[rustc_ast::tokenstream::TokenTree] 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] 474,996 ( 0.03%) ???:rustc_resolve::rustdoc::span_of_fragments [???] 474,659 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default_instead_of_iter_empty.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 474,057 ( 0.03%) ???:::annotated_lines'2 [???] 472,750 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 472,636 ( 0.03%) ???: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] 471,311 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/from_str_radix_10.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 471,069 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 470,952 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/to_digit_is_some.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 470,752 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 470,565 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 470,009 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/precedence.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 469,652 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:>::walk_ref'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 469,417 ( 0.03%) 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] 468,087 ( 0.03%) ???: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] 467,510 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 466,471 ( 0.03%) ???:::make [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 466,183 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/float_literal.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 466,169 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 465,987 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_checked_ops.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 465,646 ( 0.03%) ???:::typeck_body'2 [???] 465,592 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/rc_clone_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 465,457 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/cloned_ref_to_slice_refs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 465,188 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/panicking_overflow_checks.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 465,175 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_add.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 464,755 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 464,536 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/replace_box.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 464,136 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 463,849 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/neg_cmp_op_on_partial_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 463,743 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 463,554 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 463,322 ( 0.03%) ???: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] 463,148 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,728 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,686 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_rem_euclid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,610 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,553 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/async_yields_async.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,298 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/minmax.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 462,183 ( 0.03%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 458,421 ( 0.03%) include/jemalloc/internal/cache_bin.h:realloc 457,773 ( 0.03%) ???:rustc_middle::dep_graph::graph::hash_result::<&[rustc_span::def_id::DefId]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 457,743 ( 0.03%) ???: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] 457,743 ( 0.03%) ???: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] 456,109 ( 0.03%) ???: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] 453,742 ( 0.03%) ???:::new_named_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 452,033 ( 0.03%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::module_children'2 [???] 451,407 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:::next_match 451,116 ( 0.03%) ???:::visit_node:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 450,328 ( 0.03%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 450,023 ( 0.03%) ???:core::ptr::drop_glue::<[rustc_expand::mbe::macro_parser::NamedMatch]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 448,582 ( 0.03%) ???: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] 448,286 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 448,033 ( 0.03%) ???:>::call_once [???] 446,722 ( 0.03%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 445,541 ( 0.03%) ???:::parse_expr_assoc_with [???] 444,876 ( 0.03%) ???:::path_matches [???] 444,704 ( 0.03%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>> [???] 444,592 ( 0.03%) ???:rustc_ast::visit::visit_stmts::> [???] 444,523 ( 0.03%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 443,315 ( 0.03%) ???:::update_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 442,542 ( 0.03%) ???:::visit_ty'2 [???] 442,129 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/init_numbered_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 441,940 ( 0.03%) ???:>::walk_ref [/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] 439,098 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 438,188 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_strip.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 437,816 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 436,628 ( 0.02%) ???:>::decode'2 [???] 436,449 ( 0.02%) ???:::qpath_res [???] 435,975 ( 0.02%) ???:::parse_pat_with_range_pat'2 [???] 435,791 ( 0.02%) ???:::parse_expr_dot_or_call_with::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,758 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_item'2 [???] 431,559 ( 0.02%) ???:>>,)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,252 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/non_octal_unix_permissions.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 430,270 ( 0.02%) /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 429,494 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 429,442 ( 0.02%) ???:, serde_json::ser::CompactFormatter> as serde_core::ser::SerializeStruct>::serialize_field:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 426,257 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/reference.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 425,582 ( 0.02%) ???:::parse_dot_suffix_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 424,765 ( 0.02%) ???:::prepare_to_combine [???] 424,606 ( 0.02%) ???:::from_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 423,855 ( 0.02%) ???:core::str::converts::from_utf8 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 423,828 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 423,756 ( 0.02%) ???:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 423,658 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 421,431 ( 0.02%) ???:core::ptr::drop_glue:: [???] 419,591 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/octal_escapes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 419,165 ( 0.02%) ???:::alloc_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 418,184 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::trim_start_matches::<::is_whitespace> 417,992 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs:clippy_lints::casts::ptr_cast_constness::check_null_ptr_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 417,849 ( 0.02%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 416,916 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 416,265 ( 0.02%) include/jemalloc/internal/rtree.h:ecache_evict 414,490 ( 0.02%) ???:::flat_map_item [???] 413,737 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/borrow_deref_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 412,929 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 410,154 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,680 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,642 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,607 ( 0.02%) ???:::hir_span_with_body [???] 409,577 ( 0.02%) ???:::lower_stmts [???] 408,324 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/zero_div_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 408,061 ( 0.02%) ???:::mk_bound_variable_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 407,489 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,925 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,850 ( 0.02%) ???:::hash_one::<&unicase::UniCase> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,764 ( 0.02%) include/jemalloc/internal/arena_inlines_b.h:malloc_default 405,414 ( 0.02%) ???:::lower_expr_try [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 404,393 ( 0.02%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 404,055 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 403,954 ( 0.02%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_type_ir::binder::EarlyBinder>::{closure#0} [???] 403,921 ( 0.02%) ???:::lower_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 403,905 ( 0.02%) ???:>::walk_mut [???] 403,807 ( 0.02%) ???:::append [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 403,300 ( 0.02%) /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 403,234 ( 0.02%) ???:alloc::fmt::format::format_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 402,676 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unused_rounding.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 402,140 ( 0.02%) ???:::list_from_tokens [???] 401,956 ( 0.02%) /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 401,495 ( 0.02%) ???:::create_def [???] 401,356 ( 0.02%) ???:>>::walk_ref [???] 400,964 ( 0.02%) ???: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] 400,385 ( 0.02%) ???:>>::walk_ref [???] 400,316 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 400,222 ( 0.02%) ???:::lower_fn_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,778 ( 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> 398,753 ( 0.02%) ???:::create_def [???] 398,692 ( 0.02%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 397,648 ( 0.02%) ???:::edition [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 394,778 ( 0.02%) ???:::lower_stmts'2 [???] 393,255 ( 0.02%) ???:rustc_ast::visit::visit_assoc_items::> [???] 392,669 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 391,737 ( 0.02%) ???:rustc_middle::dep_graph::graph::hash_result::<&rustc_data_structures::unord::UnordSet> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 390,468 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_pat [???] 389,668 ( 0.02%) include/jemalloc/internal/fb.h:pa_alloc 389,167 ( 0.02%) ???:rustc_ast_pretty::pprust::path_to_string [???] 388,681 ( 0.02%) ???:::parse_limited_sym [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 388,317 ( 0.02%) ???:)>>::call_once [???] 387,971 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes 387,971 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes_post 387,092 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 387,079 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 386,046 ( 0.02%) ???:core::ptr::drop_glue::> [???] 385,576 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 385,398 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 384,222 ( 0.02%) ???:rustc_query_impl::execution::ensure_can_skip_execution::, rustc_middle::dep_graph::graph::DepNodeIndex>> [???] 383,609 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/format_args_collector.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 380,712 ( 0.02%) include/jemalloc/internal/atomic.h:tcache_bin_flush_small 380,316 ( 0.02%) ???:::match_impl::{closure#0} [???] 380,224 ( 0.02%) ???:::resolve_crate::{closure#0} [???] 379,324 ( 0.02%) ???:::lint_level_spec_at_node [???] 379,299 ( 0.02%) ???:::visit_item'2 [???] 378,540 ( 0.02%) ???:__rustc::__rust_alloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 378,388 ( 0.02%) ???:::imported_source_file::{closure#0} [???] 377,574 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 376,737 ( 0.02%) ???:rustc_query_impl::query_impl::evaluate_obligation::execute_query_incr::__rust_end_short_backtrace [???] 374,740 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 373,479 ( 0.02%) ???:::flat_map_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 372,516 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::meets 372,321 ( 0.02%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 372,126 ( 0.02%) ???:::lower_pat_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 371,342 ( 0.02%) /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] 370,912 ( 0.02%) ???:::node [???] 370,712 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 370,424 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 369,542 ( 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> 368,813 ( 0.02%) ???:::lower_block_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 368,371 ( 0.02%) ???:rustc_ast::visit::visit_stmts::>'2 [???] 368,137 ( 0.02%) ???:rustc_query_impl::plumbing::try_load_from_disk::<&[rustc_span::def_id::DefId]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 367,388 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 366,649 ( 0.02%) ???:0x0000000000029600 [/usr/lib/ld-linux-x86-64.so.2] 366,417 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 365,152 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 365,107 ( 0.02%) ???:rustc_expand::mbe::quoted::parse'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 363,517 ( 0.02%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 363,164 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 362,970 ( 0.02%) 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] 361,348 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 358,090 ( 0.02%) ???:::assemble_candidates_from_auto_impls::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 357,693 ( 0.02%) ???:::set_bindings_effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 356,967 ( 0.02%) ???:rustc_query_impl::query_impl::type_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] 356,556 ( 0.02%) ???:::get_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 356,193 ( 0.02%) ???:::rollback_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 355,824 ( 0.02%) ???:::visit_expr::{closure#0}'2 [???] 355,508 ( 0.02%) ???:::flat_map_item'2 [???] 355,010 ( 0.02%) ???:rustc_query_impl::execution::try_execute_query::>, rustc_middle::query::erase::ErasedData<[u8; 2]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 354,202 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 352,565 ( 0.02%) ???:rustc_ty_utils::assoc::associated_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 352,457 ( 0.02%) ???:::hir_span [???] 351,815 ( 0.02%) ???:::parse_expr_prefix [???] 350,016 ( 0.02%) ???:::pat_lang_item_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 348,552 ( 0.02%) ???:::pad [???] 347,521 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 346,880 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 345,750 ( 0.02%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 344,602 ( 0.02%) ???:::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 340,142 ( 0.02%) ???:::span_to_locations'2 [???] 339,666 ( 0.02%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,590 ( 0.02%) ???:rustc_middle::query::inner::query_feed::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 338,150 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,652 ( 0.02%) ???:::expr_lang_item_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,415 ( 0.02%) ???:rustc_hir::intravisit::walk_qpath::> [???] 336,151 ( 0.02%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 336,072 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs:clippy_utils::macros::first_node_in_macro:: 335,966 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/int_plus_one.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 335,953 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lexer/src/lib.rs:::with_source_text::::{closure#0}> 334,716 ( 0.02%) ???:>::reserve_rehash::, ()>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 334,156 ( 0.02%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 333,634 ( 0.02%) /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::doc::doc_suspicious_footnotes::check 332,646 ( 0.02%) ???: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] 331,204 ( 0.02%) ???:rustc_lint::expect::lint_expectations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,688 ( 0.02%) ???:rustc_query_impl::query_impl::generics_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] 329,491 ( 0.02%) ???:::parse_single:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 327,498 ( 0.02%) ???:>>::walk_ref [???] 326,493 ( 0.02%) ???:rustc_attr_parsing::attributes::cfg::parse_name_value [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 326,328 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 325,656 ( 0.02%) ???:::check_ty [???] 325,370 ( 0.02%) ???:::fill_well_known'2 [???] 323,537 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 320,353 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 320,246 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 319,928 ( 0.02%) ???:rustc_ast::visit::walk_item_inner::'2 [???] 318,705 ( 0.02%) ???:rustc_lint::levels::skippable_lints'2 [???] 317,948 ( 0.02%) ???:::resolve_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 317,397 ( 0.02%) /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> 316,723 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 316,684 ( 0.02%) ???:std::exception::~exception() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 315,135 ( 0.02%) ???:::instantiate_identity_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 314,605 ( 0.02%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 313,998 ( 0.02%) ???:::visit_item [???] 312,480 ( 0.02%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 312,210 ( 0.02%) ???: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] 310,455 ( 0.02%) ???:::build_reduced_graph_for_use_tree [???] 309,407 ( 0.02%) ???:rustc_traits::evaluate_obligation::evaluate_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,121 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unicode.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 308,968 ( 0.02%) src/extent.c:pa_alloc 308,474 ( 0.02%) ???:rustc_hir_analysis::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 308,466 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [???] 308,066 ( 0.02%) ???:::fully_expand_fragment'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 307,538 ( 0.02%) ???:::expect_hir_owner_nodes'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 306,264 ( 0.02%) ???:::resolve_anonymous_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 305,171 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 304,717 ( 0.02%) ???:::parse_pat_tuple_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 303,753 ( 0.02%) include/jemalloc/internal/tcache_inlines.h:malloc_default 303,520 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 303,082 ( 0.02%) ???:::lower_attrs_with_extra [???] 301,542 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 301,491 ( 0.02%) /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] 301,491 ( 0.02%) /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] 300,552 ( 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] 300,226 ( 0.02%) ???:::parse_struct_fields [???] 299,741 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 299,676 ( 0.02%) ???:>::call_once [???] 299,158 ( 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:clippy_lints::operators::eq_op::check_assert 299,043 ( 0.02%) ???:::exec_cache_promotions [???] 298,691 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 296,945 ( 0.02%) ???:::resolve_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 293,697 ( 0.02%) ???:::next'2 [???] 293,100 ( 0.02%) ???:::parse_where_clause_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 292,470 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 291,651 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 291,564 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 291,506 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_stmt::{closure#0} [???] 290,428 ( 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] 289,077 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [???] 288,994 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 287,638 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 287,469 ( 0.02%) ???:::parse_expr_field::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 285,454 ( 0.02%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [???] 284,396 ( 0.02%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_param::{closure#0}>::{closure#0} [???] 284,311 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 284,310 ( 0.02%) ???:rustc_const_eval::const_eval::fn_queries::constness [???] 283,894 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 283,551 ( 0.02%) ???:rustc_query_impl::query_impl::hir_attr_map::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 282,822 ( 0.02%) ???:::try_mark_green [???] 282,284 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 280,492 ( 0.02%) ???:pulldown_cmark::linklabel::scan_link_label_rest [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,478 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 279,326 ( 0.02%) ???:rustc_ast::visit::walk_item_inner::> [???] 278,674 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 276,479 ( 0.02%) ???:::annotated_lines [???] 274,729 ( 0.02%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,447 ( 0.02%) ???:::get_extern_module_with_lock [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,153 ( 0.02%) ???:>::reserve_rehash::, alloc::vec::Vec>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,085 ( 0.02%) ???:::parent_hir_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 273,716 ( 0.02%) ???:::flat_map_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 273,551 ( 0.02%) ???:> as rustc_middle::ty::codec::RefDecodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 272,092 ( 0.02%) ???: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] 271,646 ( 0.02%) ???:rustc_ast::visit::walk_fn::> [???] 271,640 ( 0.02%) ???:::parse_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,921 ( 0.02%) ???:::parse_path_segment'2 [???] 268,419 ( 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_start_matches::<::is_whitespace> 268,072 ( 0.02%) ???:::check_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,800 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,478 ( 0.02%) ???: as rustc_type_ir::fold::TypeFolder>::fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,271 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 264,332 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 263,833 ( 0.01%) ???:rustc_query_impl::plumbing::promote_from_disk_inner::>> [???] 263,091 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,445 ( 0.01%) ???:::hir_span'2 [???] 261,396 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/thread_local/native/mod.rs:clippy_utils::macros::first_node_in_macro:: 261,362 ( 0.01%) ???:annotate_snippets::renderer::render::render'2 [???] 259,838 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::ty::assoc::AssocItem>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,553 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_methods [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 258,440 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 257,171 ( 0.01%) ???:::new [???] 255,898 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 253,765 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/permissions_set_readonly_false.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 250,907 ( 0.01%) ???:::build_reduced_graph_for_use_tree'2 [???] 250,094 ( 0.01%) ???:pulldown_cmark::parse::item_to_event [???] 249,745 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/too_many_lines.rs:::check_fn 249,398 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,925 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 1]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,840 ( 0.01%) ???:::stable_hash:: [???] 248,696 ( 0.01%) ???:rustc_query_impl::query_impl::typeck_root::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] 248,194 ( 0.01%) ???:::lower_maybe_coroutine_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 247,504 ( 0.01%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 247,315 ( 0.01%) ???:::span_to_locations [???] 246,790 ( 0.01%) ???:::span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 246,351 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 246,106 ( 0.01%) ???:::hir_span_with_body'2 [???] 245,819 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 245,579 ( 0.01%) include/jemalloc/internal/tsd.h:realloc 245,414 ( 0.01%) ???:::parse_arm::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 244,582 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [???] 244,205 ( 0.01%) ???:> 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] 243,812 ( 0.01%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:>::make_code_span [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 243,431 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 242,814 ( 0.01%) ???:::end_point [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,798 ( 0.01%) ???:>::initialize::<>::get_or_init<::create_global_ctxt, rustc_interface::passes::create_and_enter_global_ctxt, rustc_driver_impl::run_compiler::{closure#0}::{closure#1}>::{closure#2}>::{closure#1}>::{closure#0}, !> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,036 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 241,237 ( 0.01%) ???:, rustc_middle::query::erase::ErasedData<[u8; 1]>> 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] 241,031 ( 0.01%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,786 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 239,383 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_stmt::{closure#0}'2 [???] 239,181 ( 0.01%) ???:), rustc_middle::traits::cache::WithDepNode, rustc_middle::traits::SelectionError>>)>>::reserve_rehash::), rustc_middle::traits::cache::WithDepNode, rustc_middle::traits::SelectionError>>, rustc_hash::FxBuildHasher>::{closure#0}> [???] 239,022 ( 0.01%) ???:::hir_owner_parent [???] 238,681 ( 0.01%) ???:::stable_hash:: [???] 238,552 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 238,507 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [???] 238,114 ( 0.01%) ???:::break_and_eat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 238,069 ( 0.01%) ???:::parse_safety [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 237,923 ( 0.01%) ???:rustc_hir::intravisit::walk_pat:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 237,791 ( 0.01%) ???:rustc_ast::visit::walk_item_inner::> [???] 237,105 ( 0.01%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 236,711 ( 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 236,531 ( 0.01%) include/jemalloc/internal/edata.h:ecache_evict 236,189 ( 0.01%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 236,183 ( 0.01%) ???:::expr_ident_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 235,883 ( 0.01%) ???:>::walk_mut [/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] 232,526 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 232,526 ( 0.01%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode [???] 232,512 ( 0.01%) ???:rustc_ty_utils::layout::layout_of_uncached'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 231,660 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 230,733 ( 0.01%) ???:>::instantiate_supertrait [???] 230,608 ( 0.01%) ???:::entire [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 230,205 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:clippy_lints::redundant_async_block::desugar_async_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 229,888 ( 0.01%) ???:::look_ahead::::parse_self_param::{closure#2}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,878 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::root_macro_call 227,917 ( 0.01%) ???:>::tys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 227,172 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 227,099 ( 0.01%) ???:::parse_self_param [???] 226,915 ( 0.01%) include/jemalloc/internal/sz.h:malloc_default 226,705 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lexer/src/lib.rs:::eq [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 225,750 ( 0.01%) ???:::desugar_doc_comments::desugar_inner [???] 225,251 ( 0.01%) ???: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] 224,611 ( 0.01%) ???:::parse_ident_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 223,849 ( 0.01%) ???: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] 223,794 ( 0.01%) ???:<[rustc_span::def_id::LocalDefId] 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] 223,525 ( 0.01%) ???:::evaluate_root_obligation [???] 223,129 ( 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 222,458 ( 0.01%) ???:rustc_query_impl::query_impl::coroutine_kind::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 221,885 ( 0.01%) ???:>>::walk_ref [???] 221,518 ( 0.01%) ???:>), rustc_middle::traits::cache::WithDepNode)>>::reserve_rehash::>), rustc_middle::traits::cache::WithDepNode, rustc_hash::FxBuildHasher>::{closure#0}> [???] 220,970 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 220,970 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 220,646 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:::check_expr 220,080 ( 0.01%) ???:::parse_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,342 ( 0.01%) ???:>>::walk_ref [???] 219,286 ( 0.01%) ???:::parse_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 218,290 ( 0.01%) ???:::into_outputs [???] 218,009 ( 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> 217,433 ( 0.01%) ???:::resolve_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 216,146 ( 0.01%) ???:::mut_visit_with:: [???] 215,775 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 215,316 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,610 ( 0.01%) ???:::symbol_path [???] 214,283 ( 0.01%) ???:::register_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,040 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &[rustc_span::def_id::DefId]>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 212,745 ( 0.01%) ???:::serialize::<&mut serde_json::ser::Serializer<&mut alloc::boxed::Box>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 212,376 ( 0.01%) ???:::expr_adjustments [???] 211,825 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,665 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 211,420 ( 0.01%) ???:::in_external_macro'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,120 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,827 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::check_fn 209,790 ( 0.01%) ???:::check_lint_name [???] 209,664 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/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] 209,093 ( 0.01%) ???:::parse_path_inner'2 [???] 208,131 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_block [???] 207,767 ( 0.01%) ???:::hir_item [???] 207,680 ( 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] 207,392 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 207,315 ( 0.01%) ???:::send_new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,787 ( 0.01%) ???:rustc_expand::mbe::transcribe::lockstep_iter_size [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,513 ( 0.01%) ???:::trait_impl_of_assoc'2 [???] 206,182 ( 0.01%) ???:::lower_use_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,131 ( 0.01%) ???:rustc_hir::intravisit::walk_pat::> [???] 205,575 ( 0.01%) ???:rustc_attr_parsing::attributes::cfg::eval_config_entry [???] 205,320 ( 0.01%) ???:::list_from_tokens'2 [???] 205,310 ( 0.01%) ???:::hir_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 205,076 ( 0.01%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 205,075 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_block'2 [???] 203,902 ( 0.01%) ???:::finish_grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 203,728 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/multi_assignments.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 203,624 ( 0.01%) ???:>>::walk_ref [???] 203,567 ( 0.01%) ???:::assemble_candidates_from_impls [???] 203,413 ( 0.01%) ???:> 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] 203,350 ( 0.01%) ???:thin_vec::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 203,328 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_small 202,981 ( 0.01%) ???:core::ptr::drop_glue::> [???] 202,943 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 202,620 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 202,501 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_ty 202,066 ( 0.01%) ???:::flat_map_assoc_item [???] 201,650 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes 201,566 ( 0.01%) ???: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] 201,007 ( 0.01%) src/hook.c:realloc 200,557 ( 0.01%) ???:::type_is_copy_modulo_regions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,866 ( 0.01%) ???:> as rustc_serialize::serialize::Encodable>::encode [???] 199,856 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_pat'2 [???] 199,469 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_variant [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 199,298 ( 0.01%) ???:::imported_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,526 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_item [???] 198,271 ( 0.01%) ???:::hash_one::<&std::path::PathBuf> [???] 198,107 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,037 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_lints::doc::doc_suspicious_footnotes::check 197,890 ( 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:clippy_utils::macros::root_macro_call 197,572 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 197,295 ( 0.01%) ???:memchr::arch::x86_64::memchr::count_raw::find_avx2 [???] 197,197 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_stashed 196,866 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr_post 196,824 ( 0.01%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,820 ( 0.01%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:>::handle_inline_pass1 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 196,680 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 196,595 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,443 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::could_use_elision [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 196,249 ( 0.01%) ???:rustc_hir_analysis::collect::item_bounds::impl_super_outlives [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 195,698 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 194,982 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 194,910 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode [???] 194,853 ( 0.01%) ???:::name [???] 194,376 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 194,250 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 194,234 ( 0.01%) ???:::data_untracked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 193,989 ( 0.01%) ???:::parse_generic_bounds_common [???] 193,607 ( 0.01%) ???:core::str::count::char_count_general_case [???] 192,784 ( 0.01%) include/jemalloc/internal/ph.h:eset_remove 192,268 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_expr 192,208 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::trim_start_matches::<::is_whitespace> 192,150 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 191,942 ( 0.01%) ???:0x000000000000ad20 [/usr/lib/ld-linux-x86-64.so.2] 190,964 ( 0.01%) ???:::parse_pat_no_top_guard_inner [???] 190,647 ( 0.01%) ???:::check_assoc_item [???] 190,358 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr_post 190,100 ( 0.01%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::binder::BoundVariableKind> 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] 189,778 ( 0.01%) ???: as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,595 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 188,351 ( 0.01%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [???] 188,100 ( 0.01%) ???:rustc_query_impl::query_impl::coroutine_kind::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] 187,795 ( 0.01%) ???:, rustc_middle::query::erase::ErasedData<[u8; 16]>> 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] 187,397 ( 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::is_in_test 187,249 ( 0.01%) ???:::generics [???] 186,834 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, &rustc_data_structures::unord::UnordSet>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,781 ( 0.01%) ???:::stable_hash:: [???] 186,720 ( 0.01%) ???:rustc_query_impl::query_impl::implementations_of_trait::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] 186,528 ( 0.01%) ???:>::univariant::> [???] 185,673 ( 0.01%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 185,466 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 183,876 ( 0.01%) ???:::single_pat_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,172 ( 0.01%) ???:::from_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,164 ( 0.01%) ???:::parent_module_from_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 181,709 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 181,310 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs: as core::iter::traits::collect::Extend>::extend::>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 180,574 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 180,014 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 179,898 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,728 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,311 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::unit_types::unit_arg::check 179,248 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::unit_types::unit_cmp::check 178,434 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,372 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_expr 178,130 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,115 ( 0.01%) ???:::walk_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 177,522 ( 0.01%) ???:rustc_hir::intravisit::walk_pat:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 176,370 ( 0.01%) include/jemalloc/internal/mutex.h:pa_alloc 175,968 ( 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: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 175,800 ( 0.01%) ???:rustc_attr_parsing::validate_attr::check_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 175,290 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::meets 175,290 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 175,290 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets 175,274 ( 0.01%) ???:::typeck_root_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 174,884 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 174,867 ( 0.01%) ???:::lookup_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 174,560 ( 0.01%) ???:rustc_ast::visit::visit_generic_params::> [???] 174,514 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:clippy_utils::in_automatically_derived 174,264 ( 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_utils::macros::first_node_in_macro:: 173,461 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,108 ( 0.01%) ???:::lower_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 172,804 ( 0.01%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 172,168 ( 0.01%) include/jemalloc/internal/edata.h:malloc_default 172,041 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 171,324 ( 0.01%) ???:>::reserve::do_reserve_and_handle:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 171,110 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_fn [???] 170,866 ( 0.01%) ???:::visit_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 170,745 ( 0.01%) ???:>>::walk_ref'2 [???] 170,528 ( 0.01%) ???:rustc_errors::annotate_snippet_emitter_writer::collect_annotations [???] 169,697 ( 0.01%) ???:>::fill_item::<::fresh_args_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,492 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/large_include_file.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 168,300 ( 0.01%) ???:rustc_query_impl::query_impl::trivial_const::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] 168,168 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::with_source_text::::{closure#0}> 168,125 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 16]>>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,103 ( 0.01%) ???:::lower_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,897 ( 0.01%) ???:::mk_type_list_from_iter::, as rustc_middle::ty::codec::RefDecodable>::decode::{closure#0}>, rustc_middle::ty::Ty> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,841 ( 0.01%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_local::{closure#0}>::{closure#0} [???] 167,694 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,356 ( 0.01%) ???:::span_to_location_info [???] 167,178 ( 0.01%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 167,033 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:::with_source_text::::{closure#0}> 166,994 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_type_ir::binder::EarlyBinder>>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,506 ( 0.01%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,320 ( 0.01%) ???:::hir_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,319 ( 0.01%) ???:rustc_privacy::effective_visibilities [???] 166,116 ( 0.01%) ???:::type_dependent_def [???] 165,875 ( 0.01%) ???:::encode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,816 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 165,396 ( 0.01%) ???:::parse_field_def::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,203 ( 0.01%) ???:rustc_resolve::rustdoc::parse_links [???] 165,180 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,043 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 164,863 ( 0.01%) src/sz.c:pa_alloc 164,619 ( 0.01%) ???:::trait_def_id [???] 164,232 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::ty::ImplTraitHeader>::{closure#0} [???] 164,157 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 164,144 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 164,133 ( 0.01%) include/jemalloc/internal/bit_util.h:pa_alloc 164,130 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 164,038 ( 0.01%) ???:::parse_expr_paren_seq'2 [???] 163,605 ( 0.01%) include/jemalloc/internal/atomic.h:realloc 163,164 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_expr 162,407 ( 0.01%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each'2 [???] 162,359 ( 0.01%) include/jemalloc/internal/ph.h:ecache_evict 162,163 ( 0.01%) include/jemalloc/internal/sz.h:eset_remove 161,630 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 161,532 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 161,420 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:realloc 161,320 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::filter_map::FilterMap, clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0}>>>::from_iter 161,320 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes_post 161,060 ( 0.01%) ???:rustc_query_impl::query_impl::layout_of::execute_query_incr::__rust_end_short_backtrace'2 [???] 160,465 ( 0.01%) ???:::collect_tokens::, ::collect_tokens_for_expr<::parse_expr_prefix::{closure#8}>::{closure#0}> [???] 160,234 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generics [???] 159,866 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::visit_pat 159,623 ( 0.01%) ???:>::call_once [???] 158,880 ( 0.01%) ???:::pat_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,615 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_attributes 158,454 ( 0.01%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,236 ( 0.01%) ???:::lower_expr_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,477 ( 0.01%) include/jemalloc/internal/edata.h:eset_remove 156,960 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 156,544 ( 0.01%) include/jemalloc/internal/rtree.h:pa_dalloc 156,521 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 155,396 ( 0.01%) ???:::to_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 154,518 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} 154,192 ( 0.01%) ???:pulldown_cmark::firstpass::scan_paragraph_interrupt_no_table [???] 153,963 ( 0.01%) ???: as alloc::vec::spec_extend::SpecExtend>>::spec_extend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,588 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 153,378 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,237 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast 152,952 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys 152,785 ( 0.01%) ???: as core::clone::Clone>::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 152,556 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:malloc_default 152,203 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 152,054 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 151,885 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 151,640 ( 0.01%) ???:::check_item [???] 151,565 ( 0.01%) ???:>::tys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,489 ( 0.01%) ???:::from_attr_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,365 ( 0.01%) ???:rustc_query_impl::query_impl::fn_sig::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] 150,328 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,826 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 149,823 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 149,572 ( 0.01%) ???:::trait_impl_of_assoc [???] 148,994 ( 0.01%) ???:::hash::> [???] 148,930 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 148,887 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode [???] 148,722 ( 0.01%) ???:>>::walk_ref [???] 148,521 ( 0.01%) ???:::visit_node::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,934 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,326 ( 0.01%) ???:::visit_generics [???] 147,198 ( 0.01%) ???:rustc_metadata::foreign_modules::collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,173 ( 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/extent.c:ecache_evict [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 147,120 ( 0.01%) ???:rustc_query_impl::query_impl::constness::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] 147,081 ( 0.01%) include/jemalloc/internal/thread_event.h:malloc_default 147,050 ( 0.01%) ???:rustc_query_impl::query_impl::associated_item::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] 147,005 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 146,490 ( 0.01%) 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] 146,158 ( 0.01%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,080 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [???] 145,805 ( 0.01%) ???:::node_args [???] 145,782 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 145,782 ( 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:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 145,782 ( 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:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 145,578 ( 0.01%) ???:::lower_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,417 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,392 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:::check_expr 144,937 ( 0.01%) ???:pulldown_cmark::firstpass::run_first_pass [???] 144,501 ( 0.01%) ???:::collect_tokens::::parse_stmt_without_recovery::{closure#4}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,436 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:::check_attributes 144,436 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes_post 144,289 ( 0.01%) ???:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> [???] 144,221 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_fn [???] 144,012 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 144,011 ( 0.01%) ???:rustc_hir::intravisit::walk_expr:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,997 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 143,993 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,993 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,774 ( 0.01%) ???:std::path::compare_components [???] 143,680 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/tabs_in_doc_comments.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 143,643 ( 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:::visit_expr'2 143,206 ( 0.01%) ???:::mk_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,206 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::is_doc_hidden [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,187 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 142,737 ( 0.01%) ???:::hir_impl_item [???] 142,614 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,593 ( 0.01%) /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] 142,408 ( 0.01%) ???:>::walk_mut [???] 142,264 ( 0.01%) ???:::decode_span'2 [???] 142,236 ( 0.01%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,114 ( 0.01%) ???:::check_case [???] 142,089 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 141,892 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 141,638 ( 0.01%) ???:::pat_ident_binding_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 141,304 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 140,836 ( 0.01%) include/jemalloc/internal/atomic.h:pa_alloc 140,696 ( 0.01%) ???:::from_self [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,530 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 140,450 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_non_exhaustive.rs:::check_expr 140,436 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,243 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 139,762 ( 0.01%) 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] 139,742 ( 0.01%) ???:>, ())>>::reserve_rehash::>, (), rustc_hash::FxBuildHasher>::{closure#0}> [???] 139,483 ( 0.01%) ???:core::ptr::drop_glue::'2 [???] 139,330 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_expr 139,212 ( 0.01%) ???: as rustc_serialize::serialize::Decodable>::decode [???] 139,147 ( 0.01%) ???:::check_pat [???] 139,104 ( 0.01%) ???:>::reserve_rehash::, rustc_type_ir::sty::Region>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,930 ( 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:::check_fn 138,835 ( 0.01%) ???:::flat_map_stmt [???] 138,765 ( 0.01%) ???:::typing_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,676 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 138,190 ( 0.01%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,178 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::float_cmp::check_assert 137,743 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 137,680 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,289 ( 0.01%) ???:rustc_resolve::rustdoc::preprocess_link [???] 137,131 ( 0.01%) ???:rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 136,881 ( 0.01%) ???:rustc_query_impl::query_impl::shallow_lint_levels_on::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 136,689 ( 0.01%) include/jemalloc/internal/sz.h:tcache_bin_flush_small 136,436 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:::check_expr 135,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 135,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 135,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 135,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 135,970 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 135,970 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_expr 135,568 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 135,443 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,334 ( 0.01%) ???:::mk_layout [???] 135,006 ( 0.01%) ???:::check_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,866 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::macros::matching_root_macro_call 134,753 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,748 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,748 ( 0.01%) ???:::hir_expect_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,308 ( 0.01%) ???:::parse_borrowed_pointee [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,139 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,918 ( 0.01%) ???:::from_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,781 ( 0.01%) ???:::filter_map_expr'2 [???] 133,646 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 133,616 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,433 ( 0.01%) ???:::visit_generic_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,404 ( 0.01%) /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::method_chain_args 133,136 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 133,032 ( 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: 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 132,955 ( 0.01%) ???:::guess_print_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,954 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_path::> 132,681 ( 0.01%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,578 ( 0.01%) ???:thin_vec::drop_non_singleton::>> [???] 132,516 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 132,149 ( 0.01%) ???:::check_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 131,957 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::emit_lint_if_under_msrv 131,914 ( 0.01%) ???:rustc_ast::visit::visit_arms::> [???] 131,786 ( 0.01%) ???:::without_first_quote [???] 131,532 ( 0.01%) ???:::alloc_ctxt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 131,478 ( 0.01%) 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] 131,002 ( 0.01%) ???:::typeck_body [???] 131,002 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 130,421 ( 0.01%) include/jemalloc/internal/mutex.h:malloc_default 130,369 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 130,080 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 130,080 ( 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:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 130,080 ( 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:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 129,777 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,659 ( 0.01%) src/tcache.c:malloc_default 129,524 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/doc/doc_suspicious_footnotes.rs:clippy_lints::doc::doc_suspicious_footnotes::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 129,479 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,384 ( 0.01%) include/jemalloc/internal/ph.h:malloc_default 129,040 ( 0.01%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 128,191 ( 0.01%) ???:>::call_once'2 [???] 127,219 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 127,087 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 127,008 ( 0.01%) ???:::clone [???] 126,980 ( 0.01%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 126,974 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 126,940 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 126,889 ( 0.01%) ???:>>::make_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 126,514 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 126,407 ( 0.01%) ???:::resolve_arm [???] 126,394 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 126,394 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 126,394 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 126,394 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 125,560 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 125,474 ( 0.01%) ???:__cxa_atexit [/usr/lib/libc.so.6] 125,312 ( 0.01%) ???:::as_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,121 ( 0.01%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,001 ( 0.01%) ???:rustc_ast::visit::walk_fn:: [???] 125,001 ( 0.01%) ???:rustc_ast::visit::walk_fn:: [???] 124,936 ( 0.01%) ???:)>>::call_once [???] 124,830 ( 0.01%) ???:pulldown_cmark::scanners::unescape::<&str> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,792 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unneeded_struct_pattern.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 124,740 ( 0.01%) ???:::parse_coroutine_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,740 ( 0.01%) include/jemalloc/internal/edata.h:pa_dalloc 124,172 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::meets 124,172 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::meets 124,172 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::meets 123,897 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 123,578 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 123,535 ( 0.01%) 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] 123,527 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,447 ( 0.01%) ???:pulldown_cmark::scanners::scan_link_dest [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,417 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 123,367 ( 0.01%) ???:>::get_pattern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,773 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,157 ( 0.01%) ???:::collect_bang [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,120 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_block_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 121,995 ( 0.01%) ???:::expr_ty_opt [???] 121,897 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 121,752 ( 0.01%) /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 121,600 ( 0.01%) ???:rustc_expand::mbe::macro_check::check_nested_occurrences'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,423 ( 0.01%) ???:::parse_footnote [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,357 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::check_clippy_attr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 121,083 ( 0.01%) include/jemalloc/internal/tsd_tls.h:realloc 120,990 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_attributes 120,990 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 120,990 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::doc::suspicious_doc_comments::check 120,941 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::check_attributes 120,891 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/matches/rest_pat_in_fully_bound_struct.rs:clippy_lints::matches::rest_pat_in_fully_bound_struct::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 120,756 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::trim_matches::<::is_whitespace> 120,646 ( 0.01%) ???:>::visit_clauses [???] 120,572 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:clippy_utils::macros::first_node_in_macro:: 120,416 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_range_patterns.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 120,393 ( 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:::check_attributes 120,032 ( 0.01%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 119,768 ( 0.01%) ???:::record_lifetime_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,326 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,199 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,177 ( 0.01%) ???:::check_stmt [???] 118,869 ( 0.01%) ???:>::encode [???] 118,845 ( 0.01%) ???:rustc_ty_utils::common_traits::is_copy_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,798 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 118,738 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,494 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,424 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,335 ( 0.01%) ???:>>::walk_ref [???] 117,903 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,671 ( 0.01%) ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl [???] 117,610 ( 0.01%) ???:::source_callee [???] 117,187 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,130 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 117,072 ( 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:clippy_utils::in_automatically_derived 117,000 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 116,976 ( 0.01%) ???:rustc_errors::formatting::format_fluent_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 116,916 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 116,878 ( 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/eset.c:eset_remove [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 116,763 ( 0.01%) ???:::evaluate_predicate_recursively [???] 115,905 ( 0.01%) ???:::typing_env [???] 115,444 ( 0.01%) ???:::imported_source_file::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 115,299 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_expr 115,229 ( 0.01%) ???:::ensure_source_file_source_present [???] 114,994 ( 0.01%) ???:::to_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,949 ( 0.01%) ???:::filter_map_expr [???] 114,935 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 114,872 ( 0.01%) include/jemalloc/internal/ticker.h:malloc_default 114,840 ( 0.01%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,530 ( 0.01%) ???:realpath [/usr/lib/libc.so.6] 114,234 ( 0.01%) include/jemalloc/internal/rtree.h:extent_try_coalesce_impl.llvm.9305427869391012685 114,013 ( 0.01%) ???:::walk::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,996 ( 0.01%) ???:rustc_type_ir::relate::structurally_relate_tys::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,771 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 113,341 ( 0.01%) ???:::check_expr_post [???] 113,305 ( 0.01%) ???:::expect_one_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,101 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_borrowed_ref.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 112,590 ( 0.01%) ???:::handle_missing_lit::::mk_meta_item_lit_char>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,480 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,378 ( 0.01%) ???:>::get_identifier [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,201 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [???] 111,988 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_ty 111,652 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,535 ( 0.01%) ???:::ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,535 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs:::check_expr 111,494 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,237 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:::check_generics 111,057 ( 0.01%) ???:rustc_query_impl::query_impl::is_copy_raw::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] 111,037 ( 0.01%) 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] 110,952 ( 0.01%) ???:::fmt [???] 110,830 ( 0.01%) ???:, rustc_hash::FxBuildHasher>>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,782 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,756 ( 0.01%) ???:::update [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,643 ( 0.01%) src/tcache.c:free_default 110,544 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::is_in_const_context 110,535 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 110,418 ( 0.01%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, core::option::Option>> [???] 110,370 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::hir 110,359 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [???] 110,250 ( 0.01%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,042 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,558 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::is_expn_of 109,543 ( 0.01%) ???:::is_const_fn:: [???] 109,389 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:clippy_utils::macros::root_macro_call 109,329 ( 0.01%) 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] 109,312 ( 0.01%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [???] 109,155 ( 0.01%) ???:::{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] 109,022 ( 0.01%) ???:::record_use'2 [???] 109,012 ( 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::doc::missing_headers::check 108,816 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::doc::missing_headers::check 108,777 ( 0.01%) ???:::walk::<::resolve_pattern_inner::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,377 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0} [???] 108,318 ( 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] 108,256 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 108,150 ( 0.01%) ???:rustc_query_impl::query_impl::associated_item_def_ids::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] 108,150 ( 0.01%) ???:rustc_query_impl::query_impl::associated_items::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] 108,020 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/swap.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 107,650 ( 0.01%) ???:::parse_inner_attributes [???] 107,345 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 107,316 ( 0.01%) ???:::insert'2 [???] 107,030 ( 0.01%) ???:rustc_query_impl::query_impl::impl_trait_header::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] 106,917 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 106,838 ( 0.01%) ???:::new_import_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,757 ( 0.01%) ???:::visit_invoc_in_module [???] 106,352 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::hir::ModuleItems>::{closure#0} [???] 106,257 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,162 ( 0.01%) ???:>::walk_ref [???] 105,934 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 105,808 ( 0.01%) ???: 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] 105,482 ( 0.01%) ???:::collect_invocations [???] 105,330 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 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] 105,262 ( 0.01%) ???:thin_vec::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,225 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,779 ( 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_start_matches::<::is_whitespace> 104,720 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,624 ( 0.01%) ???:::span_to_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,595 ( 0.01%) ???:::lower_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,574 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_pattern.rs:clippy_lints::misc_early::redundant_pattern::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 104,572 ( 0.01%) ???:::visit_poly_trait_ref [???] 104,466 ( 0.01%) ???: as rustc_type_ir::fold::TypeFolder>::fold_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,368 ( 0.01%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,246 ( 0.01%) 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] 104,102 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 103,768 ( 0.01%) ???:>>::walk_ref'2 [???] 103,514 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 103,490 ( 0.01%) src/emap.c:pa_alloc 103,398 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 103,398 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 102,840 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,699 ( 0.01%) ???:rustc_ast_lowering::index_ast [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,642 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,542 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 102,495 ( 0.01%) include/jemalloc/internal/rtree.h:free_default 102,463 ( 0.01%) 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] 102,243 ( 0.01%) ???:::walk::<::could_be_never_pattern::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,068 ( 0.01%) include/jemalloc/internal/mutex.h:tcache_bin_flush_small 101,956 ( 0.01%) ???:rustc_query_impl::query_impl::is_doc_hidden::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] 101,862 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,497 ( 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:::visit_pat 101,318 ( 0.01%) ???:::new_imported_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,166 ( 0.01%) ???:::visit_item [???] 101,079 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:clippy_utils::macros::first_node_in_macro:: 100,973 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::new 100,960 ( 0.01%) include/jemalloc/internal/ph.h:pa_dalloc 100,954 ( 0.01%) ???:::check_crate'2 [???] 100,923 ( 0.01%) 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] 100,899 ( 0.01%) 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] 100,886 ( 0.01%) ???:::body_id [???] 100,374 ( 0.01%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,252 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::FieldDef; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,902 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,831 ( 0.01%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,314 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,271 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 99,230 ( 0.01%) ???:0x0000000000067b30 [/usr/lib/libc.so.6] 99,220 ( 0.01%) ???:::walk::<::check_consistent_bindings::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,940 ( 0.01%) ???:::hir_get_parent_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,580 ( 0.01%) ???:>>::walk_ref [???] 97,919 ( 0.01%) src/emap.c:ecache_evict 97,774 ( 0.01%) ???:rustc_data_structures::unord::hash_iter_order_independent::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,593 ( 0.01%) ???:>>::walk_ref'2 [???] 97,546 ( 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_attributes 97,491 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,491 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,491 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,480 ( 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:clippy_utils::is_in_test 97,474 ( 0.01%) ???:0x0000000000040520 [/usr/lib/libc.so.6] 97,472 ( 0.01%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,195 ( 0.01%) ???:thin_vec::drop_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,151 ( 0.01%) ???:<[rustc_span::def_id::DefId] 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] 97,085 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,075 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 96,976 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,886 ( 0.01%) ???:::visit_item_id_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,750 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 96,671 ( 0.01%) ???:<::find_lifetime_for_self::FindReferenceVisitor as rustc_ast::visit::Visitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,532 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 96,461 ( 0.01%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::reserve_rehash::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 96,062 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_attributes 95,943 ( 0.01%) 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] 95,549 ( 0.01%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,468 ( 0.01%) ???:::insert_field_idents [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,278 ( 0.01%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,143 ( 0.01%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,043 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,584 ( 0.01%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,440 ( 0.01%) ???: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] 94,374 ( 0.01%) ???:::flat_map_arm [???] 94,087 ( 0.01%) ???:::walk:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,038 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,690 ( 0.01%) ???:::clone [???] 93,672 ( 0.01%) /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 93,606 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 93,398 ( 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] 93,168 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::diagnostic_items [???] 92,957 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 92,674 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 92,542 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 92,310 ( 0.01%) ???:::visit_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 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] 92,222 ( 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:>::walk_ref'2 92,089 ( 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:clippy_utils::msrvs::check_attrs:: 92,007 ( 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: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 91,976 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr_post 91,860 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_path 91,690 ( 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/extent.c:extent_try_coalesce_impl.llvm.9305427869391012685 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 91,510 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 91,506 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_arm::{closure#0} [???] 91,353 ( 0.01%) ???:::parse_next_component_back [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,305 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 91,158 ( 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_expr_post 90,422 ( 0.01%) ???:::deref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,305 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Arm; 1]>> [???] 90,283 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 90,250 ( 0.01%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 89,868 ( 0.01%) ???:>::decode [???] 89,828 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:clippy_utils::macros::first_node_in_macro:: 89,756 ( 0.01%) ???:<[rustc_hir::hir::FieldDef] 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] 89,152 ( 0.01%) ???:::source_callsite [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,932 ( 0.01%) ???:::check_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,864 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 88,845 ( 0.01%) ???:::parse_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,714 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:rustc_hir::intravisit::walk_expr::>'2 88,463 ( 0.01%) ???: as rustc_serialize::serialize::Encodable>::encode [???] 88,293 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 88,217 ( 0.01%) ???:::from_def_id [???] 87,875 ( 0.00%) ???:>::fold_predicate [???] 87,768 ( 0.00%) ???:::parse_attr_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,738 ( 0.00%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,645 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::meets 87,556 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_qpath 87,522 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,391 ( 0.00%) ???:::decode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,343 ( 0.00%) ???:core::ptr::drop_glue::>'2 [???] 87,303 ( 0.00%) ???:::parse_seq_to_before_end::::parse_meta_item::{closure#3}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,188 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::>'2 87,132 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cell.rs:clippy_utils::macros::first_node_in_macro:: 87,053 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,927 ( 0.00%) 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] 86,530 ( 0.00%) ???:::leak_check [???] 86,500 ( 0.00%) ???:::visit_ty_common [???] 86,434 ( 0.00%) ???:::evaluate_obligation [???] 86,421 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 86,143 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs: as core::iter::traits::iterator::Iterator>::next 85,825 ( 0.00%) ???:rustc_resolve::rustdoc::parse_links'2 [???] 85,614 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_field_pattern.rs:clippy_lints::misc_early::unneeded_field_pattern::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 85,598 ( 0.00%) src/arena.c:tcache_bin_flush_small 85,292 ( 0.00%) include/jemalloc/internal/bit_util.h:realloc 85,274 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,008 ( 0.00%) ???:rustc_query_impl::query_impl::lower_to_hir::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,778 ( 0.00%) src/extent.c:tcache_bin_flush_small 84,681 ( 0.00%) ???:::parse_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,420 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_field_names.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 84,321 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check 84,010 ( 0.00%) ???:pulldown_cmark::scanners::scan_entity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,000 ( 0.00%) ???:::find_ancestor_inside [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,877 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 83,776 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,760 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 83,751 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 83,666 ( 0.00%) ???:::expr_ty_adjusted [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,558 ( 0.00%) ???:::parse_match_block [???] 83,448 ( 0.00%) ???:::lower_field_def [???] 83,420 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,411 ( 0.00%) ???:::parse_use_tree_glob_or_nested [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,199 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 83,155 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,148 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 83,148 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,998 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 82,976 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,833 ( 0.00%) 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] 82,082 ( 0.00%) ???:::instantiate_identity_into'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,065 ( 0.00%) ???:::{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] 81,984 ( 0.00%) ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl'2 [???] 81,620 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,616 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,582 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 81,582 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:clippy_lints::operators::eq_op::check_assert 81,538 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,476 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::has_non_exhaustive_attr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,464 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:>::walk_ref [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,439 ( 0.00%) 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] 81,429 ( 0.00%) 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] 81,378 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/structural_impls.rs:>::super_fold_with::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,351 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,335 ( 0.00%) ???:rustc_expand::mbe::macro_rules::compile_declarative_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,285 ( 0.00%) ???:::walk [???] 81,045 ( 0.00%) ???:rustc_query_impl::query_impl::check_liveness::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] 81,041 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> 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] 80,940 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 80,922 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 80,879 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [???] 80,660 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_attributes_post 80,353 ( 0.00%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,188 ( 0.00%) ???:thin_vec::drop_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,885 ( 0.00%) ???:::insert [???] 79,398 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert::, rustc_type_ir::sty::Region>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 79,276 ( 0.00%) 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] 79,249 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::extract_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 79,025 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs:::check_fn 78,949 ( 0.00%) ???:::find_library_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,840 ( 0.00%) 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] 78,814 ( 0.00%) ???:llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 78,761 ( 0.00%) ???:::flat_map_expr_field [???] 78,672 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 78,665 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,587 ( 0.00%) ???:llvm::cl::ParseCommandLineOptions(int, char const* const*, llvm::StringRef, llvm::raw_ostream*, llvm::vfs::FileSystem*, char const*, bool) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 78,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::doc::doc_suspicious_footnotes::check 78,530 ( 0.00%) ???:::apply_mark [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,507 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 78,337 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 78,192 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 78,117 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/default.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 78,064 ( 0.00%) include/jemalloc/internal/tsd.h:malloc_default 78,004 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 77,948 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,824 ( 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.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] 77,784 ( 0.00%) ???:thin_vec::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,627 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/escape.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 77,442 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 77,249 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::finish_grow 77,196 ( 0.00%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,986 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,860 ( 0.00%) include/jemalloc/internal/rtree.h:emap_merge_prepare 76,560 ( 0.00%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,505 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_attributes 76,427 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::>'2 [???] 76,274 ( 0.00%) ???:core::ptr::drop_glue::)>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,183 ( 0.00%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,113 ( 0.00%) include/jemalloc/internal/atomic.h:ecache_evict 76,080 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 75,908 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,800 ( 0.00%) ???:rustc_query_impl::query_impl::check_unsafety::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] 75,712 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,708 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 75,605 ( 0.00%) ???:thin_vec::drop_non_singleton::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,424 ( 0.00%) ???:::visit_stmt [???] 75,334 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,012 ( 0.00%) ???:::name_value_from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,816 ( 0.00%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,589 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 74,583 ( 0.00%) ???:::with_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,221 ( 0.00%) ???:::parse_meta_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,184 ( 0.00%) ???:::expr_call_lang_item_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,039 ( 0.00%) src/emap.c:extent_try_coalesce_impl.llvm.9305427869391012685 74,027 ( 0.00%) ???:::is_multiline [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,947 ( 0.00%) ???:>::call_once [???] 73,904 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,841 ( 0.00%) ???:rustc_query_impl::query_impl::has_ffi_unwind_calls::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] 73,794 ( 0.00%) 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] 73,772 ( 0.00%) ???:thin_vec::drop_non_singleton::'2 [???] 73,706 ( 0.00%) ???:::mk_canonical_var_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,416 ( 0.00%) 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] 73,290 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> 73,217 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,079 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,079 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,079 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,076 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,910 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sharded.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 72,765 ( 0.00%) ???:rustc_passes::diagnostic_items::all_diagnostic_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,666 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true> [???] 72,418 ( 0.00%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,407 ( 0.00%) ???:::lower_variant_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,218 ( 0.00%) /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_attributes 72,192 ( 0.00%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,145 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_mac_def::check_ts'2 72,142 ( 0.00%) 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] 72,096 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,072 ( 0.00%) ???:rustc_query_impl::query_impl::mir_borrowck::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] 72,066 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,843 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_else.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 71,836 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,812 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 71,661 ( 0.00%) ???:::new'2 [???] 71,633 ( 0.00%) ???:::is_conditionally_const::'2 [???] 71,513 ( 0.00%) ???:::try_mark_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,439 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 71,409 ( 0.00%) ???:> as rustc_type_ir::interner::CollectAndApply>>::collect_and_apply::>, core::iter::adapters::copied::Copied>>, rustc_type_ir::relate::relate_args_invariantly::{closure#0}>, ::mk_args_from_iter>, core::iter::adapters::copied::Copied>>, rustc_type_ir::relate::relate_args_invariantly::{closure#0}>, core::result::Result>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,295 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 71,230 ( 0.00%) ???:::decode_syntax_context [???] 71,118 ( 0.00%) ???:>::walk_ref [???] 70,970 ( 0.00%) ???:::parse_record_struct_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,953 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,854 ( 0.00%) ???: as core::ops::drop::Drop>::drop::drop_non_singleton::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,604 ( 0.00%) 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] 70,480 ( 0.00%) ???:rustc_builtin_macros::concat::expand_concat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,392 ( 0.00%) ???: as core::cmp::PartialEq>::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,380 ( 0.00%) ???:::recover_vcs_conflict_marker [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,375 ( 0.00%) ???:rustc_attr_parsing::context::ATTRIBUTE_PARSERS::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,347 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 70,291 ( 0.00%) ???:::add_early_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,014 ( 0.00%) ???: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 [???] 69,890 ( 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:clippy_utils::attrs::has_non_exhaustive_attr 69,532 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,204 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item 68,963 ( 0.00%) ???: 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] 68,959 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:clippy_lints::doc::doc_suspicious_footnotes::check 68,932 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/passes.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 68,838 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 68,418 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_ops_is_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,282 ( 0.00%) ???:core::ptr::drop_glue:: [???] 68,210 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_generic_param::{closure#0} [???] 68,042 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,925 ( 0.00%) ???:rustc_lint::builtin::warn_if_doc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,876 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::functions::must_use::check_impl_item 67,844 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,731 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 67,711 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes 67,657 ( 0.00%) include/jemalloc/internal/edata.h:pac_decay_to_limit.llvm.9344053299937794623 67,640 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,625 ( 0.00%) 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] 67,549 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,544 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::attrs::mixed_attributes_style::check 67,433 ( 0.00%) 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] 67,390 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,344 ( 0.00%) ???:::encode_query_value::<&rustc_data_structures::unord::UnordSet> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,248 ( 0.00%) ???:::visit_fn'2 [???] 67,183 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,082 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,984 ( 0.00%) ???:::visit_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,712 ( 0.00%) ???:<&mut core::iter::adapters::map::map_fold<&(&str, rustc_target::target_features::Stability, &[&str]), (&str, rustc_target::target_features::Stability, &[&str]), (), <(&str, rustc_target::target_features::Stability, &[&str]) as core::clone::Clone>::clone, core::iter::adapters::map::map_fold<(&str, rustc_target::target_features::Stability, &[&str]), (&str, rustc_target::target_features::Stability), (), rustc_target::target_features::all_rust_features::{closure#0}, core::iter::adapters::filter::filter_fold<(&str, rustc_target::target_features::Stability), (), ::fill_well_known::{closure#3}, core::iter::adapters::map::map_fold<(&str, rustc_target::target_features::Stability), &str, (), ::fill_well_known::{closure#4}, &mut core::iter::adapters::map::map_fold<&str, rustc_span::symbol::Symbol, (), ::intern, core::iter::adapters::map::map_fold, (), core::option::Option::Some, core::iter::adapters::map::map_fold, (core::option::Option, ()), (), , rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend>>::extend, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>>, rustc_target::target_features::all_rust_features::{closure#0}>, ::fill_well_known::{closure#3}>, ::fill_well_known::{closure#4}>, core::iter::adapters::cloned::Cloned>>, ::intern>, core::option::Option::Some>>::{closure#0}, core::iter::traits::iterator::Iterator::for_each::call<(core::option::Option, ()), , (), rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<(core::option::Option, ())>>::extend, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>>, rustc_target::target_features::all_rust_features::{closure#0}>, ::fill_well_known::{closure#3}>, ::fill_well_known::{closure#4}>, core::iter::adapters::cloned::Cloned>>, ::intern>, core::option::Option::Some>, , rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend>>::extend, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>, core::slice::iter::Iter<(&str, rustc_target::target_features::Stability, &[&str])>>>, rustc_target::target_features::all_rust_features::{closure#0}>, ::fill_well_known::{closure#3}>, ::fill_well_known::{closure#4}>, core::iter::adapters::cloned::Cloned>>, ::intern>, core::option::Option::Some>>::{closure#0}>>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0} as core::ops::function::FnMut<((), &(&str, rustc_target::target_features::Stability, &[&str]))>>::call_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,632 ( 0.00%) ???:::scan_refdef_space [???] 66,562 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,528 ( 0.00%) ???:::build_with_typing_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,521 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_args [???] 66,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::finish_grow 66,281 ( 0.00%) ???: 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] 66,216 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 65,908 ( 0.00%) ???:::flat_map_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,902 ( 0.00%) src/thread_event.c:free_default 65,812 ( 0.00%) ???:::node_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,800 ( 0.00%) ???:::span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,694 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 65,417 ( 0.00%) ???:::is_automatically_derived [???] 65,392 ( 0.00%) ???:::flat_map_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,295 ( 0.00%) ???:rustc_target::spec::add_link_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,229 ( 0.00%) 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] 65,208 ( 0.00%) ???:rustc_query_impl::query_impl::check_transmutes::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] 64,963 ( 0.00%) ???:rustc_ast::visit::visit_field_defs::> [???] 64,959 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::result_err_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,884 ( 0.00%) ???:annotate_snippets::renderer::render::render_title [???] 64,881 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,736 ( 0.00%) 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] 64,690 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_function [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,686 ( 0.00%) ???:; 1]>>::reserve_one_unchecked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,585 ( 0.00%) ???:::{closure#0}> as core::iter::traits::iterator::Iterator>::next [???] 64,534 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,416 ( 0.00%) ???:::compute_and_check_or_pat_binding_map [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,386 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,342 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,274 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,106 ( 0.00%) ???:>::tys::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,056 ( 0.00%) ???:::parse_literal_maybe_minus [???] 64,027 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes 63,864 ( 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<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,808 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,762 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,633 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,545 ( 0.00%) include/jemalloc/internal/tsd.h:pa_alloc 63,526 ( 0.00%) ???:::is_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,525 ( 0.00%) include/jemalloc/internal/ph.h:edata_cache_put 63,350 ( 0.00%) ???:::parse_single_args::, rustc_attr_parsing::parser::MetaItemOrLitParser> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,310 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::as_str::{closure#0}, &str> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,297 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,238 ( 0.00%) ???:::ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,210 ( 0.00%) ???:, ::get_lint_groups::{closure#0}>, ::get_lint_groups::{closure#1}>, ::lint_groups_iter::{closure#0}> as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,129 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_names.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,109 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,076 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,061 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,012 ( 0.00%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,923 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_expr 62,918 ( 0.00%) 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] 62,908 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,803 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_variant_data [???] 62,649 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs:clippy_lints::doc::check_doc::> 62,490 ( 0.00%) ???:::choose_generics_over_qpath [???] 62,211 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 61,928 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_param [???] 61,764 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,734 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_fn_decl [???] 61,657 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,632 ( 0.00%) ???:::meta [???] 61,614 ( 0.00%) src/thread_event.c:malloc_default 61,576 ( 0.00%) include/jemalloc/internal/edata.h:extent_try_coalesce_impl.llvm.9305427869391012685 61,386 ( 0.00%) ???:::local_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,272 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:>::walk_ref'2 61,177 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,916 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 60,855 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_use_tree [???] 60,768 ( 0.00%) ???:, rustc_hash::FxBuildHasher> as core::iter::traits::collect::Extend<(rustc_span::symbol::Ident, rustc_hir::def::Res)>>::extend::, rustc_hash::FxBuildHasher>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,748 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/option_env_unwrap.rs:::check_expr 60,674 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/peekable.rs:clippy_lints::doc::check_doc::> 60,507 ( 0.00%) ???:::freeze_and_get_read_spans [???] 60,501 ( 0.00%) ???:::meta_kind [???] 60,236 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,096 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_attributes 60,028 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 59,986 ( 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:>::walk_ref'2 59,958 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::FieldDef; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,937 ( 0.00%) ???:::as_path [???] 59,923 ( 0.00%) ???:::expr_ty_adjusted_opt [???] 59,834 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:clippy_lints::non_expressive_names::do_check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 59,441 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::handle_inline_pass1 59,393 ( 0.00%) ???:::is_path_start [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,367 ( 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:clippy_utils::macros::root_macro_call 59,339 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 59,308 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 59,040 ( 0.00%) ???: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] 59,037 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,761 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_path'2 [???] 58,698 ( 0.00%) ???:> as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,656 ( 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: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 58,629 ( 0.00%) include/jemalloc/internal/tsd_tls.h:malloc_default 58,616 ( 0.00%) ???:rustc_arena::outline::<::alloc_from_iter, ::lower_angle_bracketed_parameter_data::{closure#2}>>::{closure#0}, &mut [rustc_hir::hir::AssocItemConstraint]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,615 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,466 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::expr_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,430 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::meets 58,393 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 58,318 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::visit_pat 58,274 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 58,127 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 57,973 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,886 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_expr 57,882 ( 0.00%) include/jemalloc/internal/thread_event.h:free_default 57,771 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::fn_def_id_with_node_args 57,706 ( 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:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 57,664 ( 0.00%) ???:::adjust [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,652 ( 0.00%) ???:::kind [???] 57,545 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/generic/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 57,528 ( 0.00%) include/jemalloc/internal/tcache_inlines.h:free_default 57,473 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 57,141 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 57,099 ( 0.00%) src/decay.c:tcache_bin_flush_small 57,075 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_span::def_id::LocalDefId> 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] 57,070 ( 0.00%) 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] 56,952 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::doc::missing_headers::check 56,820 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:::check_attributes 56,733 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 56,541 ( 0.00%) ???:::maybe_resolve_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,476 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/temporary_assignment.rs:::check_expr 56,419 ( 0.00%) ???:>::walk_mut [???] 56,393 ( 0.00%) ???:::walk::<::could_be_never_pattern::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,210 ( 0.00%) ???:>, &mut rustc_infer::infer::snapshot::undo_log::InferCtxtUndoLogs>>>::uninlined_get_root_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,187 ( 0.00%) ???:::symbol_path'2 [???] 56,120 ( 0.00%) ???:> as rustc_serialize::serialize::Decodable>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,106 ( 0.00%) ???:pulldown_cmark::firstpass::delim_run_can_open [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,070 ( 0.00%) ???:::{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] 56,023 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs:clippy_lints::functions::duplicate_underscore_argument::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 55,988 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,901 ( 0.00%) ???:::lower_expr_if [???] 55,845 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq 55,737 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,733 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::finish_grow 55,673 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::with_source_text::::{closure#0}> 55,637 ( 0.00%) ???:::lower_generic_bound_predicate [???] 55,611 ( 0.00%) ???: 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] 55,554 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>>'2 [???] 55,533 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_attributes 55,404 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,361 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::check_expr 55,223 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 55,104 ( 0.00%) ???:::visit_generic_args [???] 55,074 ( 0.00%) ???:rustc_expand::mbe::quoted::parse [???] 55,062 ( 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:<&str as core::str::pattern::Pattern>::is_contained_in [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 55,030 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::attrs::has_non_exhaustive_attr 54,975 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::check_proc_macro::span_matches_pat 54,947 ( 0.00%) ???:>, (rustc_middle::query::erase::ErasedData<[u8; 2]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<>, (rustc_middle::query::erase::ErasedData<[u8; 2]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [???] 54,916 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:clippy_utils::macros::first_node_in_macro:: 54,861 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/let_and_return.rs:clippy_lints::returns::let_and_return::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,821 ( 0.00%) ???:rustc_span::hygiene::decode_syntax_context::::decode_syntax_context::{closure#0}>'2 [???] 54,813 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_expr_post 54,784 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 54,665 ( 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:::check_item 54,606 ( 0.00%) 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] 54,587 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,545 ( 0.00%) include/jemalloc/internal/edata.h:extent_record 54,445 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_field_def::{closure#0} [???] 54,437 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:rustc_ast::visit::walk_stmt:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,412 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/fuse.rs:clippy_lints::operators::float_cmp::check_assert 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_lints::operators::float_cmp::check_assert 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_expr_post 54,388 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/pointers_in_nomem_asm_block.rs:::check_expr 54,388 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::eq_op::check_assert 54,388 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::float_cmp::check_assert 54,370 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 54,315 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::generics_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,295 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty'2 [???] 54,271 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,264 ( 0.00%) 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] 54,264 ( 0.00%) 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] 54,242 ( 0.00%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,242 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::result::Result<&rustc_middle::traits::specialization_graph::Graph, rustc_span::ErrorGuaranteed>>::{closure#0} [???] 54,220 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,209 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,196 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner/entry.rs:, rustc_type_ir::sty::Region>>::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,171 ( 0.00%) ???:::check_arm [???] 54,010 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,970 ( 0.00%) 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] 53,970 ( 0.00%) 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] 53,970 ( 0.00%) 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] 53,694 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,520 ( 0.00%) ???:, ())>>::reserve_rehash::, (), rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,452 ( 0.00%) 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] 53,423 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/extent.c:extent_record [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,360 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,322 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/derive_ord_xor_partial_ord.rs:clippy_lints::derive::derive_ord_xor_partial_ord::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,270 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:::visit_pat 53,248 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/inline_trait_bounds.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,172 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, ())>>::from_iter::, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>>::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,129 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 53,086 ( 0.00%) ???:::parse_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,081 ( 0.00%) ???:>::walk_mut [???] 53,081 ( 0.00%) ???:>::walk_ref [???] 53,081 ( 0.00%) ???:>::walk_ref [???] 53,033 ( 0.00%) ???:::with_rib::<(), ::with_constant_rib<::resolve_anon_const_manual<::resolve_anon_const::{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] 52,987 ( 0.00%) ???:>::walk_ref [???] 52,985 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs:clippy_lints::functions::misnamed_getters::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 52,900 ( 0.00%) ???:>::walk_mut [???] 52,836 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:clippy_utils::macros::first_node_in_macro:: 52,716 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,674 ( 0.00%) ???:>::append_text [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,669 ( 0.00%) ???:::parse_pat_tuple_or_parens [???] 52,568 ( 0.00%) ???:::maybe_report_lifetime_uses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,406 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,350 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 52,281 ( 0.00%) ???:core::ptr::drop_glue:: [???] 52,235 ( 0.00%) ???:::smart_resolve_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,232 ( 0.00%) ???:core::ptr::drop_glue:: [???] 52,211 ( 0.00%) ???:::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,165 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes 52,165 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes_post 52,128 ( 0.00%) ???:rustc_ty_utils::layout::layout_of_uncached [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,989 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,917 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,884 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,864 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,779 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_binders'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,770 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:, rustc_type_ir::sty::Region>>::insert_unique [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,744 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,743 ( 0.00%) ???:::features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,634 ( 0.00%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,603 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,582 ( 0.00%) ???:::meta_item_list [???] 51,576 ( 0.00%) ???:rustc_target::spec::crt_objects::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,534 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item [???] 51,496 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,439 ( 0.00%) ???:::lower_poly_trait_ref [???] 51,354 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,166 ( 0.00%) ???:thin_vec::drop_non_singleton::<(rustc_ast::attr::data_structures::CfgEntry, rustc_span::span_encoding::Span)> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,148 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::check_block_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,048 ( 0.00%) ???:__tls_get_addr [/usr/lib/ld-linux-x86-64.so.2] 50,935 ( 0.00%) ???: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] 50,874 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_use_tree'2 [???] 50,845 ( 0.00%) 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] 50,825 ( 0.00%) src/emap.c:tcache_bin_flush_small 50,802 ( 0.00%) ???:>::walk_ref [???] 50,774 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,763 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,755 ( 0.00%) ???:::stable_hash::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,748 ( 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:rustc_hir::intravisit::walk_qpath:: 50,664 ( 0.00%) ???:::clone [???] 50,658 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,580 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 50,577 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as core::iter::traits::collect::Extend>::extend::>> 50,569 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 50,509 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 50,496 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 50,453 ( 0.00%) ???:::define_local [???] 50,413 ( 0.00%) ???:::schedule_expn_data_for_encoding [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,210 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::option::Option>::{closure#0} [???] 50,208 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::minmax::min_max 50,112 ( 0.00%) ???:::hir_owner_parent'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,101 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::get_def_id_availability [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 50,096 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,092 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::trim_matches::<::is_whitespace> 50,092 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::trim_matches::<::is_whitespace> 50,092 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::trim_matches::<::is_whitespace> 50,018 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check_function [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 49,931 ( 0.00%) ???:rustc_query_impl::query_impl::constness::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] 49,856 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, rustc_span::span_encoding::Span>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,760 ( 0.00%) ???:::visit_attribute [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,736 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,715 ( 0.00%) ???:, serde_json::ser::CompactFormatter> as serde_core::ser::SerializeStruct>::serialize_field:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,641 ( 0.00%) ???:::visit_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,542 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 49,498 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/formatting.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 49,495 ( 0.00%) ???:pulldown_cmark::firstpass::delim_run_can_close [???] 49,476 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::check_fn 49,444 ( 0.00%) ???:::try_new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,419 ( 0.00%) include/jemalloc/internal/sz.h:pa_dalloc 49,400 ( 0.00%) ???:::lower_spans::<::lower_attrs_vec::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,367 ( 0.00%) ???:::parse_mod'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,312 ( 0.00%) ???:__strtoul_internal [/usr/lib/libc.so.6] 49,293 ( 0.00%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,170 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 49,167 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_fn 49,053 ( 0.00%) ???:rustc_query_impl::query_impl::associated_items::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] 49,018 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs: as 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 49,018 ( 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:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 48,923 ( 0.00%) ???:rustc_type_ir::relate::structurally_relate_tys::::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,904 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,736 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,736 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,736 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,734 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,704 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/avx2/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 48,697 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 48,591 ( 0.00%) src/pac.c:pa_alloc 48,568 ( 0.00%) ???:>::reserve_rehash::::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,505 ( 0.00%) src/pac.c:tcache_bin_flush_small 48,464 ( 0.00%) ???:createX86MCAsmInfo(llvm::MCRegisterInfo const&, llvm::Triple const&, llvm::MCTargetOptions const&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 48,366 ( 0.00%) ???:>::swap_remove:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,288 ( 0.00%) ???:getopts::find_opt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,224 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::as_str 48,128 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 48,123 ( 0.00%) include/jemalloc/internal/cache_bin.h:free_default 48,023 ( 0.00%) ???:)>>::call_once'2 [???] 48,021 ( 0.00%) ???:rustc_resolve::rustdoc::prepare_to_doc_link_resolution'2 [???] 47,979 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,784 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,747 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 47,736 ( 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:::check_item 47,732 ( 0.00%) ???:rustc_ast::visit::walk_fn:: [???] 47,679 ( 0.00%) include/jemalloc/internal/ph.h:extent_record 47,655 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,574 ( 0.00%) ???:::until [???] 47,475 ( 0.00%) ???:::emit_messages_default'2 [???] 47,413 ( 0.00%) include/jemalloc/internal/arena_inlines_b.h:free_default 47,324 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,103 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_utils::trait_ref_of_method 47,041 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> 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] 46,894 ( 0.00%) ???:rustc_ast_lowering::lower_to_hir'2 [???] 46,598 ( 0.00%) ???:::visit_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,556 ( 0.00%) 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] 46,548 ( 0.00%) ???:::meta [???] 46,526 ( 0.00%) ???:::eat_path_sep [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,508 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/map_unit_fn.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 46,429 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/else_if_without_else.rs:::check_expr 46,399 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/self_named_constructors.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 46,359 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_wildcard_pattern.rs:::check_pat 46,110 ( 0.00%) ???:::assemble_candidates_from_impls::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,104 ( 0.00%) include/jemalloc/internal/bit_util.h:eset_remove 46,092 ( 0.00%) ???:__rustc::__rdl_dealloc [???] 46,038 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,870 ( 0.00%) ???:rustc_session::config::dep_tracking::stable_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,853 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::WherePredicate; 1]>> [???] 45,840 ( 0.00%) ???:>::push'2 [???] 45,814 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::search_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,778 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,766 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 45,729 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,590 ( 0.00%) ???:core::slice::sort::unstable::quicksort::quicksort::::sort_unstable_by<::new::{closure#2}>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,543 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 45,447 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::iter::traits::iterator::Iterator>::next 45,427 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/missing_const_for_thread_local.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,351 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,318 ( 0.00%) 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] 45,277 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::lifetimes::could_use_elision 45,112 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 45,080 ( 0.00%) include/jemalloc/internal/sz.h:ecache_evict 45,071 ( 0.00%) ???:::start_point [???] 45,066 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:clippy_lints::functions::renamed_function_params::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,035 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 44,987 ( 0.00%) ???:0x0000000000040c70 [/usr/lib/libc.so.6] 44,959 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 44,932 ( 0.00%) 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] 44,856 ( 0.00%) ???: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] 44,842 ( 0.00%) ???:::trait_ref_and_own_args_for_alias [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,836 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 44,812 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 44,724 ( 0.00%) ???:::parse_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,639 ( 0.00%) ???:rustc_middle::dep_graph::graph::hash_result::<&rustc_hir::diagnostic_items::DiagnosticItems> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,513 ( 0.00%) ???:::insert_field_visibilities_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,488 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_utils::method_chain_args 44,448 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_utils::method_chain_args 44,424 ( 0.00%) ???:::build_reduced_graph_for_external_crate_res::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,406 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_fn 44,372 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,322 ( 0.00%) ???:::visit_generic_params'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,269 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 44,089 ( 0.00%) ???:rustc_trait_selection::traits::project::normalize_projection_term [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,049 ( 0.00%) ???:>::with_lint_attrs::::{closure#0}>::{closure#0} [???] 43,684 ( 0.00%) ???: as core::iter::traits::collect::FromIterator>::from_iter::, ::lower_generic_params_mut::{closure#0}>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,677 ( 0.00%) ???:::parse_arm::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,671 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/expl_impl_clone_on_copy.rs:clippy_lints::derive::expl_impl_clone_on_copy::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,621 ( 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 43,621 ( 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 43,572 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,550 ( 0.00%) ???:annotate_snippets::renderer::render::style_substitution_highlights [???] 43,525 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,513 ( 0.00%) ???:::prepend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,490 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,452 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,395 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,376 ( 0.00%) ???:::check_block [???] 43,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/edition.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 43,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 43,358 ( 0.00%) ???:::collect_invocations'2 [???] 43,277 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,265 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,248 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,233 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,200 ( 0.00%) ???:::break_two_token_op [???] 43,186 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 43,166 ( 0.00%) ???: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] 43,115 ( 0.00%) include/jemalloc/internal/bit_util.h:tcache_bin_flush_small 43,010 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,975 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 42,964 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 42,947 ( 0.00%) ???:::lower_pat_tuple [???] 42,882 ( 0.00%) ???:, (rustc_middle::query::erase::ErasedData<[u8; 1]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, (rustc_middle::query::erase::ErasedData<[u8; 1]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [???] 42,873 ( 0.00%) ???: 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] 42,825 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_item_kind 42,780 ( 0.00%) ???:::type_is_copy_modulo_regions [???] 42,713 ( 0.00%) ???:::string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,710 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,687 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_expr 42,637 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,637 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,622 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,600 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:::check_block_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 42,531 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::qpath 42,458 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,235 ( 0.00%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,180 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_pat 42,180 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::matches::rest_pat_in_fully_bound_struct::check 41,880 ( 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:::visit_qpath 41,876 ( 0.00%) ???:<[rustc_hir::hir::AssocItemConstraint] 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] 41,821 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 41,781 ( 0.00%) ???:__rustc::__rust_realloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,747 ( 0.00%) ???:::intern_const [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,643 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::lifetimes::could_use_elision 41,575 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,513 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::lifetimes::could_use_elision 41,490 ( 0.00%) ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results [???] 41,420 ( 0.00%) include/jemalloc/internal/rtree.h:extent_record 41,377 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/toplevel_ref_arg.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,362 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::into_range 41,318 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:clippy_lints::methods::swap_with_temporary::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,292 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_expr 41,141 ( 0.00%) ???:::collect_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,140 ( 0.00%) src/sz.c:eset_remove 41,123 ( 0.00%) ???:rustc_builtin_macros::util::get_exprs_from_tts [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,120 ( 0.00%) /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] 41,108 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:, rustc_hash::FxBuildHasher> as core::iter::traits::collect::FromIterator<(rustc_span::def_id::LocalDefId, alloc::vec::Vec)>>::from_iter::, >::new::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,092 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/toplevel_ref_arg.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,086 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_type_ir::sty::Region>>::new 41,067 ( 0.00%) /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 41,054 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,044 ( 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:clippy_utils::is_expn_of 41,031 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,007 ( 0.00%) ???:::parse_enum_variant::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,917 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 40,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:clippy_utils::macros::first_node_in_macro:: 40,867 ( 0.00%) ???:::splice_lines::push_trailing [???] 40,859 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 40,692 ( 0.00%) ???:0x0000000000176b40 [/usr/lib/libc.so.6] 40,679 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::check_attributes 40,510 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,497 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::eq [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 40,484 ( 0.00%) include/jemalloc/internal/edata.h:realloc 40,478 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_item 40,408 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_fn:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 40,398 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/search.rs:::visit_expr'2 40,394 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_item 40,344 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 40,336 ( 0.00%) src/emap.c:pa_dalloc 40,330 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 40,330 ( 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.rs:clippy_lints::doc::suspicious_doc_comments::check 40,330 ( 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:clippy_lints::doc::suspicious_doc_comments::check 40,222 ( 0.00%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,164 ( 0.00%) ???:rustc_query_impl::plumbing::try_load_from_disk::, rustc_middle::ty::util::AlwaysRequiresDrop>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,137 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 40,130 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 40,050 ( 0.00%) ???:rustc_query_impl::plumbing::try_load_from_disk::<&rustc_middle::mir::Body> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,954 ( 0.00%) ???:::serialize::<&mut serde_json::ser::Serializer<&mut alloc::boxed::Box>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,951 ( 0.00%) include/jemalloc/internal/extent.h:ecache_evict 39,918 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,896 ( 0.00%) ???:::parse_if_after_cond [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,880 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 39,824 ( 0.00%) ???:::implicit_self [???] 39,788 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,746 ( 0.00%) ???:, pulldown_cmark::parse::LinkDef)>>::reserve_rehash::, pulldown_cmark::parse::LinkDef, std::hash::random::RandomState>::{closure#0}> [???] 39,732 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,693 ( 0.00%) ???:::check_target [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,652 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:clippy_lints::crate_in_macro_def::contains_unhygienic_crate_reference'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,596 ( 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:clippy_utils::in_automatically_derived 39,588 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 39,530 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_fn 39,497 ( 0.00%) ???:rustc_ast::util::literal::escape_string_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,334 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,262 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,258 ( 0.00%) ???:>, rustc_hash::FxBuildHasher> 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] 39,207 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,176 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/asm_syntax.rs:::check_expr 39,066 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::insert 39,048 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:>::insert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,962 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 38,854 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::result::Result<&rustc_middle::traits::specialization_graph::Graph, rustc_span::ErrorGuaranteed>>::{closure#0}'2 [???] 38,843 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:clippy_utils::trait_ref_of_method 38,836 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 38,779 ( 0.00%) src/extent.c:pa_dalloc 38,719 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 38,719 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 38,710 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,659 ( 0.00%) ???:::parse_item_enum [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,657 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:clippy_lints::lifetimes::could_use_elision 38,653 ( 0.00%) src/bitmap.c:malloc_default 38,592 ( 0.00%) ???:rustc_ty_utils::common_traits::is_trait_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,550 ( 0.00%) /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 38,550 ( 0.00%) /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 38,516 ( 0.00%) ???:rustc_ast::visit::visit_field_defs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,496 ( 0.00%) ???:rustc_ast::attr::mk_doc_comment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,395 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:clippy_utils::macros::first_node_in_macro:: 38,392 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,387 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,319 ( 0.00%) ???:::define_macro [???] 38,315 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_expr 38,313 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_impl_item 38,220 ( 0.00%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,219 ( 0.00%) ???:core::slice::sort::shared::smallsort::insert_tail::::sort_by_key<(core::cmp::Reverse, u128, u64), >::univariant_biased>::{closure#5}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,208 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,136 ( 0.00%) ???:::parse_meta_item_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,135 ( 0.00%) ???:>::rustc_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,100 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 38,013 ( 0.00%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,005 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,997 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,986 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:>::with::<::as_str::{closure#0}, &str> 37,986 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::as_str::{closure#0}, &str> 37,986 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::as_str::{closure#0}, &str> 37,950 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,913 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/from_over_into.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,884 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:::finish_grow 37,870 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::qpath 37,760 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,736 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_ty 37,705 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_async_fn.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,674 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:rustc_ast::visit::walk_stmt::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,595 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,533 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_crate [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_attribute 37,515 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,503 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 37,443 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,438 ( 0.00%) ???:::flat_map_variant [???] 37,392 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,275 ( 0.00%) ???:rustc_ty_utils::layout::layout_of'2 [???] 37,229 ( 0.00%) include/jemalloc/internal/sz.h:extent_record 37,213 ( 0.00%) ???:::between [???] 37,183 ( 0.00%) src/eset.c:tcache_bin_flush_small 37,173 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,126 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,107 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 37,096 ( 0.00%) ???:::has_name [???] 37,085 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_utils::method_chain_args 37,082 ( 0.00%) ???:::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,993 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 36,974 ( 0.00%) ???:)>>::reserve_rehash::, core::hash::BuildHasherDefault>::{closure#0}> [???] 36,893 ( 0.00%) ???:::walk::<::resolve_pattern_inner::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,852 ( 0.00%) ???:rustc_expand::mbe::quoted::parse_one_tt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,846 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,806 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [???] 36,694 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,664 ( 0.00%) ???:::resolve_visibility [???] 36,594 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 36,582 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_utils::last_path_segment 36,530 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,486 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_impl_item 36,360 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::visit_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 36,356 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::check_fn 36,327 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,326 ( 0.00%) ???:::lower_format_args'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,274 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item 36,261 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,239 ( 0.00%) ???:rustc_query_impl::query_impl::explicit_clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,222 ( 0.00%) ???:, rustc_resolve::Used)>>::reserve_rehash::, rustc_resolve::Used, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,160 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/inherent_to_string.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 36,123 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}>'2 [???] 36,109 ( 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:clippy_utils::msrvs::check_attrs:: 35,968 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item 35,893 ( 0.00%) ???:::parse_expr_array_or_repeat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,889 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,886 ( 0.00%) ???:, serde_json::ser::CompactFormatter> as serde_core::ser::SerializeStruct>::serialize_field::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,873 ( 0.00%) ???:::contains [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,797 ( 0.00%) ???:rustc_query_impl::query_impl::def_kind::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,794 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::opt_item_name:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,728 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased:: 35,720 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,709 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,686 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_ifs.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,652 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_lints::loops::while_let_on_iterator::check 35,645 ( 0.00%) ???:>::destroy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,615 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_nested_occurrences [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,565 ( 0.00%) ???:::{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] 35,480 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::get_all_attrs:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,459 ( 0.00%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,454 ( 0.00%) ???:>::tys::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,433 ( 0.00%) ???:>::reserve_rehash::, rustc_middle::middle::privacy::EffectiveVisibility>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,415 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,398 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,361 ( 0.00%) ???:::check_attributes [???] 35,343 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,334 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:>::insert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,321 ( 0.00%) ???: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] 35,286 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,262 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::fn_def_id 35,253 ( 0.00%) ???:::check_ident [???] 35,236 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 35,236 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_expr 35,236 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_expr 35,217 ( 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, clippy_lints::lifetimes::could_use_elision::{closure#2}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,194 ( 0.00%) ???:rustc_lint::levels::shallow_lint_levels_on'2 [???] 35,166 ( 0.00%) ???:rustc_type_ir::elaborate::elaborate:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,160 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::non_expressive_names::do_check 35,126 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_utils::attrs::get_unique_builtin_attr:: 35,058 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,016 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,004 ( 0.00%) ???:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,001 ( 0.00%) src/sz.c:tcache_bin_flush_small 34,995 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/freeze.rs:::def_key:: 34,964 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,919 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,881 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,872 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,740 ( 0.00%) ???:>>::collect_and_apply::, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, ::mk_args_from_iter, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,738 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,719 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,710 ( 0.00%) ???:::with_def_site_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,652 ( 0.00%) ???:::visit_item [???] 34,583 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_entry'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,532 ( 0.00%) ???:::lower_expr_if'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,426 ( 0.00%) ???:::parse_expr_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,319 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 34,316 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,282 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/multiple_bound_locations.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,281 ( 0.00%) ???:::parse_expr_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,270 ( 0.00%) ???:::expect_lifetime [???] 34,146 ( 0.00%) include/jemalloc/internal/mutex.h:ecache_evict 34,125 ( 0.00%) ???:rustc_query_impl::query_impl::module_children::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] 34,019 ( 0.00%) ???:::decode_alloc_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,888 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,859 ( 0.00%) ???:::parse_unspanned_seq::, ::parse_ty_tuple_or_parens::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,844 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::expr 33,807 ( 0.00%) ???:::add_import::{closure#0}'2 [???] 33,780 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::check_fn 33,769 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_path_segment:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,708 ( 0.00%) src/tcache.c:realloc 33,706 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_fn 33,692 ( 0.00%) ???:::visit_expr [???] 33,686 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 33,670 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,660 ( 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<(rustc_hir_id::HirId, clippy_lints::casts::needless_type_cast::BindingInfo), std::collections::hash::map::IntoIter>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,656 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,640 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_body 33,625 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,613 ( 0.00%) /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::check_proc_macro::span_matches_pat 33,588 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,556 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,480 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 33,465 ( 0.00%) ???:::typeck_root_def_id_local [???] 33,465 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,420 ( 0.00%) ???:::{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] 33,408 ( 0.00%) ???:::opt_span_lint:: [???] 33,397 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,391 ( 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_expr 33,337 ( 0.00%) ???:::grow_amortized [???] 33,332 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 33,329 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,300 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,198 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,179 ( 0.00%) ???:rustc_ast::visit::walk_item_inner::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,177 ( 0.00%) ???:)>>::call_once [???] 33,160 ( 0.00%) ???:)>>::call_once'2 [???] 33,099 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,988 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::eval_config_entry'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,937 ( 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_impl_item::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,911 ( 0.00%) ???:0x00000000000162d0 [/usr/lib/ld-linux-x86-64.so.2] 32,876 ( 0.00%) ???:::cancel [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,860 ( 0.00%) ???:::emit_diagnostic::{closure#3} [???] 32,755 ( 0.00%) ???: as core::iter::traits::collect::Extend>::extend::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,697 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 32,696 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs:clippy_lints::methods::manual_c_str_literals::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,589 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [???] 32,513 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,363 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::combine_branches [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,349 ( 0.00%) ???:>::add_id'2 [???] 32,335 ( 0.00%) ???:>::types_may_unify_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,331 ( 0.00%) ???:::is_trivially_pure_clone_copy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,330 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,320 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,304 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_assert_arg [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,220 ( 0.00%) ???:::{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] 32,186 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,158 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/ty_kind.rs: as core::cmp::PartialEq>::eq 32,156 ( 0.00%) ???: as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 32,151 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,144 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,121 ( 0.00%) ???: as core::iter::traits::collect::Extend>::extend::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,100 ( 0.00%) ???:rustc_hir::intravisit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,070 ( 0.00%) ???:::opt_field_index [???] 32,046 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs:clippy_lints::methods::ip_constant::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,045 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,991 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_fn::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,978 ( 0.00%) ???:::new_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,913 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,892 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,888 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::check_item 31,790 ( 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_expr 31,770 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::>'2 31,762 ( 0.00%) ???:::has_trivial_sizedness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,745 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,707 ( 0.00%) ???:>>::or_default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,680 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::reserve_rehash::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,675 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,670 ( 0.00%) ???:>>::walk_ref [???] 31,651 ( 0.00%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,646 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,490 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,470 ( 0.00%) ???:::{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] 31,403 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_block 31,383 ( 0.00%) ???:::span_labels [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,382 ( 0.00%) ???:>::get_placeable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,222 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_fn 31,219 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,184 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:>::make_code_span 31,162 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,083 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/table.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,031 ( 0.00%) ???:thin_vec::drop_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,945 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::has_where_lifetimes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,825 ( 0.00%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,787 ( 0.00%) ???:::recover_after_dot [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,680 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,664 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,661 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 30,624 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,573 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,567 ( 0.00%) ???:::opt_item_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,546 ( 0.00%) ???: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] 30,537 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,487 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:::check_fn 30,486 ( 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<&rustc_ast::ast::GenericParam, core::iter::adapters::filter::Filter, clippy_lints::inline_trait_bounds::lint_fn::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,456 ( 0.00%) ???:>>>::get::<&rustc_metadata::rmeta::decoder::CrateMetadata> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,408 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::attrs::mixed_attributes_style::check 30,391 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,372 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::unit_types::unit_cmp::check 30,346 ( 0.00%) ???:annotate_snippets::renderer::render::draw_line'2 [???] 30,346 ( 0.00%) src/thread_event.c:realloc 30,296 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_pat 30,270 ( 0.00%) include/jemalloc/internal/extent.h:extent_try_coalesce_impl.llvm.9305427869391012685 30,269 ( 0.00%) ???:::implied_target_features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,215 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::visit_pat 30,208 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,178 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,121 ( 0.00%) ???:::decode_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,118 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,118 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,118 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,106 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_matcher_core [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,079 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:clippy_utils::check_proc_macro::span_matches_pat 30,038 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 30,032 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,019 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_attribute 30,016 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,987 ( 0.00%) ???:::parse_struct_fields'2 [???] 29,960 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::FieldDef; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,940 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_param [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,888 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 29,856 ( 0.00%) ???:::visit_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,784 ( 0.00%) ???:::scan_paragraph_interrupt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,778 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,759 ( 0.00%) ???:::has_typeck_results [???] 29,753 ( 0.00%) ???:::lower_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,724 ( 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::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 29,700 ( 0.00%) ???:::{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] 29,700 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,700 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_body_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,671 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_pat 29,666 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::write_str [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,665 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,632 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:clippy_utils::method_chain_args 29,601 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,502 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 29,502 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 29,502 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 29,463 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/emap.c:emap_merge_prepare [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,393 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,345 ( 0.00%) ???:getenv [/usr/lib/libc.so.6] 29,343 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_path::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,338 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,299 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,297 ( 0.00%) ???:::parse_if_after_cond'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,245 ( 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:::check_item_kind 29,215 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::meets 29,210 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 29,205 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:>::insert 29,196 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:::check_attribute 29,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_attribute 29,171 ( 0.00%) ???:::poly_select::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,127 ( 0.00%) ???:::maybe_recover_trailing_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,052 ( 0.00%) ???:llvm::cl::opt >::~opt() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 29,043 ( 0.00%) ???:::walk_::<::is_never_pattern::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,004 ( 0.00%) ???:annotate_snippets::renderer::render::maybe_anonymized [???] 28,974 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 1]>>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,937 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:>::super_fold_with::> 28,867 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs:clippy_lints::methods::useless_nonzero_new_unchecked::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,864 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,834 ( 0.00%) ???:::descent_to_ambiguity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,750 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:::check_mac_def::check_ts'2 28,737 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:clippy_lints::crate_in_macro_def::is_token [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,735 ( 0.00%) ???:::lower_expr_mut::{closure#0} [???] 28,728 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_item 28,708 ( 0.00%) ???:rustc_interface::callbacks::track_diagnostic::> [???] 28,706 ( 0.00%) ???:::default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,672 ( 0.00%) /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 28,603 ( 0.00%) ???:::parse_tuple_struct_body::{closure#0}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,581 ( 0.00%) ???:::from_bytes_with_nul [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,520 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 28,517 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,500 ( 0.00%) ???:::{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] 28,499 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::functions::duplicate_underscore_argument::check 28,483 ( 0.00%) ???:::hir_body_param_idents [???] 28,456 ( 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:clippy_lints::functions::must_use::check_impl_item 28,425 ( 0.00%) ???:::{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] 28,400 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_block_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,398 ( 0.00%) include/jemalloc/internal/atomic.h:pa_dalloc 28,367 ( 0.00%) ???:::expect_any_with_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,306 ( 0.00%) ???:::is_keyword_ahead [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,285 ( 0.00%) ???:rustc_query_impl::query_impl::def_span::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,270 ( 0.00%) 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] 28,261 ( 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: as core::iter::traits::iterator::Iterator>::next 28,089 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body 28,055 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_item 27,999 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_item 27,954 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_locals.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,919 ( 0.00%) ???:>::super_fold_with::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,912 ( 0.00%) ???:::resolve_pattern_inner::{closure#0}'2 [???] 27,899 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::get_def_id_availability 27,868 ( 0.00%) ???:::new::build_recur [???] 27,868 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,811 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::adt_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,792 ( 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:>::grow_one [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,773 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,745 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:clippy_utils::trait_ref_of_method 27,720 ( 0.00%) ???:::is_valid_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,701 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_expr_post 27,680 ( 0.00%) ???:::recursion_limit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,661 ( 0.00%) ???:::qpath_lang_item [???] 27,634 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,624 ( 0.00%) ???:>>::walk_ref [???] 27,617 ( 0.00%) ???:::collect_fn_info [???] 27,612 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_arbitrary_self_type.rs:::check_param [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,594 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/neg_multiply.rs:::check_expr 27,577 ( 0.00%) ???:::emit_diagnostic [???] 27,478 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,429 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,400 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:::check_attributes 27,343 ( 0.00%) ???:::visit_item [???] 27,315 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty:: 27,292 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 27,258 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/fuse.rs:clippy_lints::operators::eq_op::check_assert 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 27,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,194 ( 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_expr 27,194 ( 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_expr 27,194 ( 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_expr 27,194 ( 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_expr 27,194 ( 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_expr 27,194 ( 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_expr 27,194 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_expr 27,158 ( 0.00%) ???:rustc_trait_selection::traits::project::confirm_candidate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,100 ( 0.00%) ???:rustc_hir::intravisit::walk_qpath::>'2 [???] 27,073 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, llvm::MCRegister, int, 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] 27,072 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,068 ( 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:rustc_hir::intravisit::walk_expr::'2 27,056 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:::check_expr 27,030 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,020 ( 0.00%) ???:::parse_match_block'2 [???] 26,992 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 26,983 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,954 ( 0.00%) ???:::lower_anon_const_to_const_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,949 ( 0.00%) ???:rustc_builtin_macros::util::parse_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,844 ( 0.00%) ???:::expand_cfg_attr [???] 26,842 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_ty 26,836 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/should_implement_trait.rs:clippy_lints::methods::should_implement_trait::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,824 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/include_in_doc_without_cfg.rs:::check_attributes 26,799 ( 0.00%) ???:::visit_fn [???] 26,777 ( 0.00%) ???:::check_item_post [???] 26,774 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,750 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,743 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::visit_pat'2 26,612 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_pat 26,610 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_fn 26,607 ( 0.00%) ???:0x00000000000947c0 [/usr/lib/libc.so.6] 26,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:clippy_utils::check_proc_macro::span_matches_pat 26,447 ( 0.00%) ???:::parse_tuple_struct_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,446 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lexer/src/lib.rs:::check_expr::{closure#0} 26,432 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,432 ( 0.00%) ???:::parse_item_struct [???] 26,427 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,418 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::check_item 26,416 ( 0.00%) ???:::parse_item_enum::{closure#1} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,404 ( 0.00%) ???:rustc_ast::visit::walk_fn:: [???] 26,357 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::visit_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,322 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::emit_lint_if_under_msrv 26,283 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/impl_trait_in_params.rs:::check_impl_item 26,278 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,258 ( 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> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,242 ( 0.00%) ???:::visit_nested_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,241 ( 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:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 26,237 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,181 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,172 ( 0.00%) ???:::get_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,169 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:clippy_lints::needless_question_mark::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,142 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [???] 26,100 ( 0.00%) ???:pulldown_cmark::parse::scan_link_label [???] 26,085 ( 0.00%) ???:::{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] 26,070 ( 0.00%) ???: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] 26,054 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_try_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,053 ( 0.00%) ???:core::ptr::drop_glue::, rustc_hash::FxBuildHasher>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,016 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_impl_item 26,005 ( 0.00%) ???:::from_span_full::::macro_backtrace::{closure#0}>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,994 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 25,938 ( 0.00%) ???:rustc_ast::visit::visit_arms::>'2 [???] 25,864 ( 0.00%) ???:>>::walk_ref'2 [???] 25,827 ( 0.00%) ???:::encode_alloc_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,821 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs:::check_attribute 25,779 ( 0.00%) ???:::ty_is_opaque_future [???] 25,750 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::emit_lint_if_under_msrv 25,747 ( 0.00%) ???:rustc_ty_utils::needs_drop::drop_tys_helper::::{closure#0}::{closure#0} [???] 25,740 ( 0.00%) ???:<::find_lifetime_for_self::SelfVisitor as rustc_ast::visit::Visitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,717 ( 0.00%) ???:::parse_meta_seq_top [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,656 ( 0.00%) ???:<[rustc_hir::hir::GenericBound] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 25,651 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_item 25,634 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,631 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,589 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::hir_body_owner_kind:: 25,582 ( 0.00%) ???:rustc_builtin_macros::format::make_format_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,532 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 25,513 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::ty::adt::AdtDef>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,499 ( 0.00%) ???:rustc_hir::intravisit::walk_expr::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,479 ( 0.00%) ???:> 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] 25,439 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_methods 25,392 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,365 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,357 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,342 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sharded.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,340 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty::> 25,335 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_fn 25,332 ( 0.00%) ???:::replace_region [???] 25,325 ( 0.00%) ???:rustc_query_impl::plumbing::verify_query_key_hashes_inner::>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,324 ( 0.00%) ???: as rustc_serialize::serialize::Decodable>::decode [???] 25,306 ( 0.00%) ???:, (rustc_middle::query::erase::ErasedData<[u8; 16]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, (rustc_middle::query::erase::ErasedData<[u8; 16]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [???] 25,278 ( 0.00%) ???:std::sys::fs::metadata [???] 25,269 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_item_kind 25,251 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 25,242 ( 0.00%) ???:::hash_owner_nodes::{closure#0}'2 [???] 25,239 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,210 ( 0.00%) ???:::parse_expr_dot_or_call_with::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,125 ( 0.00%) ???:rustc_query_impl::query_impl::adt_def::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] 25,124 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_item 25,079 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 16]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,069 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::clone [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,045 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_fn 25,003 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::check_proc_macro::span_matches_pat 24,938 ( 0.00%) ???:::convert_normal_to_synthetic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,910 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_pat'2 24,849 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::next 24,841 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,836 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:clippy_lints::unit_types::unit_arg::check 24,769 ( 0.00%) ???:::macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,751 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,731 ( 0.00%) ???:llvm::SubtargetFeatureKV const* Find(llvm::StringRef, llvm::ArrayRef) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 24,719 ( 0.00%) ???:rustc_hir::intravisit::walk_generics:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,695 ( 0.00%) ???: 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] 24,591 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return_with_question_mark.rs:clippy_lints::returns::needless_return_with_question_mark::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,576 ( 0.00%) /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 24,559 ( 0.00%) 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] 24,529 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,521 ( 0.00%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,518 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:core::ptr::drop_glue::> 24,495 ( 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:rustc_hir::intravisit::walk_expr::'2 24,484 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,466 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,464 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::interior_mut_ty_chain_inner'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,431 ( 0.00%) ???:::parent_module [???] 24,406 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,395 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,366 ( 0.00%) ???:::walk::<::check_consistent_bindings::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,350 ( 0.00%) ???:llvm::X86_MC::initLLVMToSEHAndCVRegMapping(llvm::MCRegisterInfo*) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 24,349 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::has_no_effect [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,262 ( 0.00%) ???:rustc_query_impl::query_impl::visibility::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] 24,234 ( 0.00%) ???: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] 24,215 ( 0.00%) ???:rustc_expand::mbe::macro_parser::compute_locs::inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,213 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_lints::lifetimes::could_use_elision 24,193 ( 0.00%) ???:>::try_fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,192 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::attrs::mixed_attributes_style::check 24,147 ( 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_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,138 ( 0.00%) ???:>::insert_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,110 ( 0.00%) ???:0x0000000000016d80 [/usr/lib/ld-linux-x86-64.so.2] 24,099 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/to_string_trait_impl.rs:::check_item 24,087 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> as rustc_serialize::serialize::Decodable>::decode::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,040 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/too_long_first_doc_paragraph.rs:::check_attributes 24,036 ( 0.00%) ???:>::visit_clauses'2 [???] 24,018 ( 0.00%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,000 ( 0.00%) ???:::from_span_full::::macro_backtrace::{closure#0}>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,984 ( 0.00%) ???:>::relate:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,956 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,920 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:>::insert_full [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,828 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,805 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::mir::query::ConstQualifs>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,786 ( 0.00%) ???:::from_errors_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,760 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::casts::needless_type_cast::check 23,698 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,688 ( 0.00%) ???:rustc_passes::lang_items::get_lang_items'2 [???] 23,680 ( 0.00%) ???:<(&rustc_hir_id::ItemLocalId, &alloc::vec::Vec) 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] 23,670 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,670 ( 0.00%) ???:::allocate_cow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,667 ( 0.00%) ???:::get_locales [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,630 ( 0.00%) ???: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>>::from_iter [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,625 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:clippy_lints::needless_nonzero_get::nonzero_get [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,584 ( 0.00%) ???: as core::clone::Clone>::clone::clone_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,533 ( 0.00%) ???:rustc_query_impl::query_impl::defaultness::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] 23,478 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,467 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_lhs [???] 23,432 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,407 ( 0.00%) ???: as fluent_bundle::entry::GetEntry>::get_entry_message [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,391 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,363 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,272 ( 0.00%) ???:::with_lifetime_rib::<(), ::visit_where_predicate::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,256 ( 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<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,245 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 23,237 ( 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:::write_str 23,197 ( 0.00%) ???:>::reserve_one_unchecked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,186 ( 0.00%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,118 ( 0.00%) ???:::intern_valtree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,098 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_utils::test_item_names 23,097 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,046 ( 0.00%) ???:::future_proof_import [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,000 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 22,972 ( 0.00%) ???:rustc_query_impl::query_impl::evaluate_obligation::execute_query_incr::__rust_end_short_backtrace'2 [???] 22,960 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,939 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 22,939 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 22,906 ( 0.00%) include/jemalloc/internal/extent.h:pa_dalloc 22,896 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 22,885 ( 0.00%) ???:::pop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,884 ( 0.00%) ???:::ty [???] 22,870 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_utils::str_utils::to_camel_case 22,863 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::search_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,858 ( 0.00%) ???:rustc_expand::config::pre_configure_attrs [???] 22,832 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/non_minimal_cfg.rs:clippy_lints::attrs::non_minimal_cfg::check_nested_cfg [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,824 ( 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:clippy_utils::is_expn_of 22,799 ( 0.00%) ???:>::next [???] 22,795 ( 0.00%) ???:::flat_map_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,791 ( 0.00%) ???:::_join [???] 22,752 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,703 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::non_expressive_names::do_check 22,698 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/pa.c:pa_dalloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,620 ( 0.00%) /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] 22,618 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,614 ( 0.00%) ???:rustc_span::hygiene::register_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,594 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::make_code_span 22,560 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,550 ( 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:clippy_utils::check_proc_macro::span_matches_pat 22,545 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, void const*, llvm::PassInfo const*, 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] 22,482 ( 0.00%) ???:::visit_param_bound [???] 22,464 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,425 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,421 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,398 ( 0.00%) ???:::visit_fn'2 [???] 22,369 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,337 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq_expr 22,335 ( 0.00%) ???:::collect_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,289 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::method_chain_args 22,282 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat:: 22,268 ( 0.00%) ???:::check_expr_post [???] 22,258 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,241 ( 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:clippy_lints::attrs::mixed_attributes_style::check 22,239 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:clippy_utils::method_chain_args 22,229 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,220 ( 0.00%) ???:::visit_field_def [???] 22,218 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,154 ( 0.00%) ???:::parse_pat_no_top_guard_inner'2 [???] 22,148 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/derived_hash_with_manual_eq.rs:::check_item 22,131 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 22,119 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,118 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,100 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winnow-1.0.3/src/stream/mod.rs:::next 22,070 ( 0.00%) ???:::cook_quoted [???] 22,064 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs [???] 22,026 ( 0.00%) ???:::span_until_char [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,000 ( 0.00%) ???:>>::walk_ref'2 [???] 21,998 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 21,958 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_item 21,937 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:clippy_utils::macros::root_macro_call 21,900 ( 0.00%) ???:::pop_all [???] 21,888 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::hash_expr'2 21,876 ( 0.00%) ???:>::walk_ref [???] 21,784 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,746 ( 0.00%) ???:::parse_pat_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,744 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:clippy_lints::lifetimes::could_use_elision 21,721 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,697 ( 0.00%) ???:::visit_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,692 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::impl_trait_ref:: 21,658 ( 0.00%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,637 ( 0.00%) ???:::get [???] 21,600 ( 0.00%) ???:>>::upcast_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,550 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,530 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,520 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::check_attribute 21,513 ( 0.00%) ???:rustc_query_impl::query_impl::def_kind::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] 21,503 ( 0.00%) ???:::visit_item::{closure#0}::{closure#0} [???] 21,491 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::loops::never_loop::never_loop_expr'2 21,490 ( 0.00%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,456 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item 21,416 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 21,385 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::module_children [???] 21,380 ( 0.00%) ???:::parent_module'2 [???] 21,373 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,355 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,355 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,355 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,355 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,355 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,355 ( 0.00%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,349 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,268 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_lints::unwrap::extract_local 21,246 ( 0.00%) ???: as fluent_bundle::resolver::WriteValue>::write:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,230 ( 0.00%) ???:>::process_mod'2 [???] 21,216 ( 0.00%) ???:>::dying_next [???] 21,204 ( 0.00%) ???:std::sys::fs::unix::try_statx'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,200 ( 0.00%) ???:::flat_map_arm'2 [???] 21,126 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::check_fn 21,126 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,112 ( 0.00%) include/jemalloc/internal/pai.h:pa_alloc 21,096 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,085 ( 0.00%) ???:::visit_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,072 ( 0.00%) ???:::ident [???] 21,060 ( 0.00%) ???:::visit_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,056 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,037 ( 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:clippy_lints::functions::must_use::check_item 21,015 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 21,013 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_fn 20,992 ( 0.00%) ???:>>::walk_ref [???] 20,959 ( 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:::check_item_kind 20,950 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_ref [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,940 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_generics 20,924 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::get::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,916 ( 0.00%) /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 20,910 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,908 ( 0.00%) ???:::alias_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,907 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 20,900 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseSetPair >, llvm::CachedHashStringRef, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo, llvm::detail::DenseSetPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseSetPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 20,880 ( 0.00%) ???:::advance_token'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,865 ( 0.00%) ???:memchr::arch::x86_64::memchr::memchr3_raw::find_avx2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_item 20,788 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_stmt 20,784 ( 0.00%) ???:::construct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,778 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_item 20,767 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::attrs::get_unique_builtin_attr:: 20,741 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::visit_pat 20,728 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::check_item 20,661 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,604 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,583 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 20,583 ( 0.00%) include/jemalloc/internal/atomic.h:extent_try_coalesce_impl.llvm.9305427869391012685 20,574 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::visit_pat 20,566 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,560 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs:::check_item_post 20,539 ( 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_stmt::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,528 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_impl_item 20,505 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs:::check_expr 20,480 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item_kind 20,436 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_item 20,429 ( 0.00%) /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 20,422 ( 0.00%) ???:rustc_ast::visit::walk_item_inner:: [???] 20,396 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 20,386 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::check_attributes 20,377 ( 0.00%) ???: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] 20,354 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:>::insert 20,349 ( 0.00%) ???:::clear [???] 20,333 ( 0.00%) ???:::get_extern_module_with_lock'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,332 ( 0.00%) ???:0x000000000009d5b0 [/usr/lib/libc.so.6] 20,330 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/binder.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 20,268 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_fn 20,264 ( 0.00%) /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 20,250 ( 0.00%) ???:::{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] 20,246 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,244 ( 0.00%) ???:>::from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,231 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,230 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,229 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body'2 [???] 20,212 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block 20,212 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block_post 20,200 ( 0.00%) ???:::parse_pat_ident_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,178 ( 0.00%) ???:>>::walk_ref'2 [???] 20,157 ( 0.00%) ???:rustc_query_impl::query_impl::inferred_outlives_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,133 ( 0.00%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode'2 [???] 20,123 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 20,123 ( 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:clippy_utils::check_proc_macro::span_matches_pat 20,120 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::expr_sig [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,114 ( 0.00%) ???:::lower_where_predicate [???] 20,090 ( 0.00%) ???:::parse_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,048 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_impl_item 20,013 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 20,008 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 20,004 ( 0.00%) include/jemalloc/internal/tsd_tls.h:free_default 19,973 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_arm 19,959 ( 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:clippy_lints::lifetimes::could_use_elision 19,959 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_pat 19,947 ( 0.00%) ???:::advance_left [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,920 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,918 ( 0.00%) src/bitmap.c:realloc 19,912 ( 0.00%) ???:::has_typeck_results'2 [???] 19,906 ( 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:::visit_expr'2 19,865 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::with_source_text::::check_expr::{closure#2}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,837 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_arm::> 19,835 ( 0.00%) ???:::mk_place_elems [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,820 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::result::Result<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty>, rustc_middle::ty::util::AlwaysRequiresDrop>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,810 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_lints::doc::check_doc::> 19,774 ( 0.00%) ???:::resolve_arm'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,772 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,759 ( 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_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,754 ( 0.00%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,752 ( 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:>::reserve_rehash::::{closure#0}> 19,730 ( 0.00%) ???:::annotated_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,687 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 8]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,679 ( 0.00%) ???:::puts [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,668 ( 0.00%) ???:::name [???] 19,663 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::lifetimes::could_use_elision 19,581 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,525 ( 0.00%) ???:::new [???] 19,514 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 19,514 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::check_fn 19,441 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,435 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 19,429 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,422 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_block::> 19,416 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::unit_types::unit_cmp::check 19,407 ( 0.00%) ???:::ty_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,396 ( 0.00%) ???:pulldown_cmark::parse::scan_containers [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,377 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_item 19,367 ( 0.00%) ???:::is_descendant_of [???] 19,352 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,320 ( 0.00%) src/extent_dss.c:ecache_evict 19,314 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,282 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,258 ( 0.00%) ???:rustc_ast::visit::visit_field_defs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,258 ( 0.00%) ???:rustc_ast::visit::visit_field_defs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,254 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item_post 19,252 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::collect_unwrap_info::inner [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,234 ( 0.00%) ???:core::ptr::drop_glue::, rustc_span::span_encoding::Span)>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,194 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::is_cow_into_owned [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,182 ( 0.00%) ???:::make_lang_item_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,179 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body_post 19,128 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,059 ( 0.00%) include/jemalloc/internal/atomic.h:malloc_default 19,038 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,013 ( 0.00%) ???:pulldown_cmark::parse::body_to_tag_end [???] 19,012 ( 0.00%) ???:::check_pat_post [???] 19,010 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_expr 18,999 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_methods 18,943 ( 0.00%) include/jemalloc/internal/tsd.h:free_default 18,924 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,914 ( 0.00%) ???:core::ptr::drop_glue::]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,911 ( 0.00%) ???:::record_partial_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,904 ( 0.00%) ???:::visit_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,897 ( 0.00%) ???:<[rustc_hir::attrs::data_structures::StrippedCfgItem] 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] 18,886 ( 0.00%) ???:<[(rustc_middle::ty::predicate::Clause, rustc_span::span_encoding::Span)] 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] 18,885 ( 0.00%) ???:::fill_well_known [???] 18,877 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:clippy_lints::functions::duplicate_underscore_argument::check 18,873 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs:::check_ty 18,858 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,813 ( 0.00%) ???:rustc_ast::visit::visit_field_defs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,812 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:>::walk_ref 18,798 ( 0.00%) include/jemalloc/internal/mutex.h:realloc 18,777 ( 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_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 18,744 ( 0.00%) ???:::new [???] 18,727 ( 0.00%) ???:>::walk_mut [???] 18,718 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,693 ( 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:rustc_hir::intravisit::walk_qpath:: 18,693 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,673 ( 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:::visit_pat 18,655 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_methods 18,617 ( 0.00%) ???:::next_back [???] 18,602 ( 0.00%) ???:>::encode [???] 18,590 ( 0.00%) ???:::lower_body::<::lower_const_body::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,566 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::functions::must_use::check_impl_item 18,562 ( 0.00%) ???:, rustc_middle::query::erase::ErasedData<[u8; 8]>> 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] 18,559 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,559 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,550 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,547 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:clippy_lints::doc::check_doc::> 18,527 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 18,511 ( 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:::new 18,501 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/sip.rs: as core::hash::Hasher>::write [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,500 ( 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:clippy_utils::source::get_source_range 18,473 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/unicode/unicode_data.rs:::trim_matches::<::is_whitespace> 18,465 ( 0.00%) include/jemalloc/internal/ehooks.h:pa_alloc 18,456 ( 0.00%) ???: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] 18,450 ( 0.00%) ???:, 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] 18,448 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_lhs_no_empty_seq'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,446 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,406 ( 0.00%) ???:::clone::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,406 ( 0.00%) ???:rustc_expand::module::parse_external_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,382 ( 0.00%) ???:::clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,354 ( 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:clippy_lints::lifetimes::could_use_elision 18,314 ( 0.00%) ???:::asyncness [???] 18,288 ( 0.00%) ???:::maybe_resolve_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,273 ( 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_arm::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,232 ( 0.00%) include/jemalloc/internal/mutex.h:pa_dalloc 18,210 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs:clippy_lints::cfg_not_test::contains_not_test [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,201 ( 0.00%) ???:::lower_expr_assign [???] 18,196 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::methods::unnecessary_to_owned::check 18,189 ( 0.00%) ???:rustc_ast::mut_visit::walk_fn::'2 [???] 18,188 ( 0.00%) ???: as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,177 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,166 ( 0.00%) ???:rustc_errors::annotate_snippet_emitter_writer::shrink_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,142 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:::check_attributes 18,134 ( 0.00%) ???:::parse_dot_suffix_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,114 ( 0.00%) ???:0x000000000000aa70 [/usr/lib/ld-linux-x86-64.so.2] 18,094 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 18,084 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::as_str 18,060 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 18,042 ( 0.00%) ???:rustc_query_impl::query_impl::lower_to_hir::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] 18,022 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,000 ( 0.00%) ???:pthread_rwlock_unlock [/usr/lib/libc.so.6] 17,994 ( 0.00%) ???:::resolve_anon_const_manual::<::resolve_anon_const::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,990 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item 17,974 ( 0.00%) ???:::load [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,964 ( 0.00%) ???:::check_param [???] 17,955 ( 0.00%) ???:rustc_ast::mut_visit::walk_flat_map_stmt:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,952 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,920 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,912 ( 0.00%) /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::check_proc_macro::span_matches_pat 17,904 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 17,858 ( 0.00%) ???:rustc_query_impl::query_impl::lookup_stability::invoke_provider_fn::__rust_begin_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,848 ( 0.00%) ???: as fluent_bundle::resolver::WriteValue>::write:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,845 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,839 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/try_err.rs:clippy_lints::matches::try_err::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,835 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,831 ( 0.00%) ???:::walk_::<::is_never_pattern::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,830 ( 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:clippy_utils::attrs::get_unique_builtin_attr:: 17,804 ( 0.00%) ???:::print_def_path'2 [???] 17,794 ( 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:clippy_lints::non_expressive_names::do_check 17,766 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,765 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 17,758 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::check_expr 17,758 ( 0.00%) ???:::check_pat'2 [???] 17,751 ( 0.00%) ???:::map_ctxt::<::with_ctxt::{closure#0}> [???] 17,747 ( 0.00%) ???:::visit_item [???] 17,744 ( 0.00%) ???:::parse_local'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,727 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,689 ( 0.00%) include/jemalloc/internal/edata.h:edata_cache_put 17,660 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cell.rs:::qpath 17,645 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::check_body 17,631 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:clippy_utils::fn_def_id_with_node_args 17,618 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::check_expr 17,618 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_expr 17,612 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::first_node_in_macro:: 17,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::attrs::check_clippy_attr:: 17,563 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_utils::attrs::get_unique_builtin_attr:: 17,557 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::check_attributes 17,555 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::next_match 17,550 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:clippy_lints::functions::duplicate_underscore_argument::check 17,530 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_hash_one.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,529 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/structural_impls.rs:>::super_fold_with::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,521 ( 0.00%) ???:core::slice::sort::unstable::quicksort::quicksort::::sort_unstable_by<::new::{closure#2}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,514 ( 0.00%) ???:rustc_query_impl::query_impl::is_freeze_raw::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] 17,483 ( 0.00%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,472 ( 0.00%) ???:rustc_query_impl::plumbing::promote_from_disk_inner::>>'2 [???] 17,448 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::current [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,447 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 17,423 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_fn 17,399 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::mir::Body>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,396 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 17,316 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert_full 17,312 ( 0.00%) include/jemalloc/internal/pai.h:tcache_bin_flush_small 17,312 ( 0.00%) src/pa.c:tcache_bin_flush_small 17,277 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 17,268 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:::check_pat 17,264 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_or_copy [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,263 ( 0.00%) ???:::parse_expr_dot_or_call_with [???] 17,260 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_block 17,251 ( 0.00%) ???:::trim_matches::<::is_whitespace> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,249 ( 0.00%) ???:::parse_expr_field::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,216 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:::check_attribute 17,216 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_attribute 17,205 ( 0.00%) ???:<(&rustc_span::def_id::DefId, &rustc_middle::traits::specialization_graph::Children) as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 17,160 ( 0.00%) ???:::impl_or_trait_obligations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,124 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 17,111 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:::check_fn 17,104 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::new 17,097 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_arm::::check::{closure#0}>> 17,092 ( 0.00%) ???:llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool) [clone .warm]'2 [???] 17,086 ( 0.00%) ???:::visit_item [???] 17,073 ( 0.00%) ???:::fresh_args_for_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,072 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,064 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,062 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath::> 17,053 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_arm::{closure#0}'2 [???] 17,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_block_post 17,040 ( 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:::check_block 17,020 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 17,010 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, usize)>>::from_iter::>, clippy_lints::ptr::ptr_arg::check_ptr_arg_usage::{closure#1}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,983 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,982 ( 0.00%) ???:::doc_str [???] 16,935 ( 0.00%) ???:::mk_const_alloc [???] 16,924 ( 0.00%) include/jemalloc/internal/ticker.h:tcache_bin_flush_small 16,922 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::swap_remove:: 16,920 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::has_enclosing_paren:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,893 ( 0.00%) ???:_GLOBAL__sub_I_TargetLibraryInfo.cpp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 16,890 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_fn 16,884 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/unicode/unicode_data.rs:::trim_start_matches::<::is_whitespace> 16,864 ( 0.00%) ???:::visit_attribute [???] 16,861 ( 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_mac_def::check_ts'2 16,847 ( 0.00%) include/jemalloc/internal/extent.h:tcache_bin_flush_small 16,828 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,810 ( 0.00%) ???:::parse_unsuffixed_meta_item_lit [???] 16,794 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,794 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,794 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,794 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,794 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,794 ( 0.00%) ???:::visit_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,761 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,742 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:::check_body 16,737 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,732 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,731 ( 0.00%) ???:::clone'2 [???] 16,704 ( 0.00%) ???:)>>::call_once [???] 16,663 ( 0.00%) ???:::filter_by_name_unhygienic [???] 16,656 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item 16,647 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs:clippy_utils::trait_ref_of_method 16,647 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/erase.rs:clippy_utils::trait_ref_of_method 16,640 ( 0.00%) ???:::missing_semi_from_binop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,608 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,599 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/range.rs:toml_parser::decoder::string::decode_basic_string 16,594 ( 0.00%) ???:rustc_query_impl::query_impl::layout_of::execute_query_incr::__rust_end_short_backtrace [???] 16,589 ( 0.00%) include/jemalloc/internal/sz.h:calloc 16,570 ( 0.00%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:tcache_bin_flush_small 16,564 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::visit_pat 16,559 ( 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_local::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,541 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_non_owning_mutable_access::has_non_owning_mutable_access_inner'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,540 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,523 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,514 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 16,512 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:>::insert_from_slice [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,501 ( 0.00%) ???:thin_vec::drop_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:::check_fn 16,485 ( 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_item 16,484 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,473 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 16,400 ( 0.00%) ???:::lower_expr_within_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,396 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,395 ( 0.00%) ???: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] 16,383 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,366 ( 0.00%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,365 ( 0.00%) ???:::check_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,360 ( 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_expr 16,354 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,325 ( 0.00%) /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:: 16,285 ( 0.00%) /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:::check_pat 16,271 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_lints::functions::result::result_err_ty 16,266 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::def_key:: 16,241 ( 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:::check_attribute 16,230 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,198 ( 0.00%) ???:rustc_query_impl::query_impl::type_of::invoke_provider_fn::__rust_begin_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,187 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/infallible_destructuring_match.rs:clippy_lints::matches::infallible_destructuring_match::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,162 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item 16,154 ( 0.00%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,147 ( 0.00%) ???:rustc_query_impl::query_impl::defaultness::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] 16,146 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,134 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_binders [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,131 ( 0.00%) ???:> as rustc_middle::ty::codec::RefDecodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,128 ( 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_generic_arg::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,106 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs:::check_expr 16,101 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,100 ( 0.00%) src/sz.c:ecache_evict 16,097 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,085 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output [???] 16,079 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::functions::duplicate_underscore_argument::check 16,075 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 16,042 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_block 16,023 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_fn 16,008 ( 0.00%) ???:rustc_attr_parsing::validate_attr::parse_meta [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,995 ( 0.00%) src/sz.c:pa_dalloc 15,960 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_item 15,920 ( 0.00%) ???: as core::clone::Clone>::clone::clone_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,918 ( 0.00%) ???:::parse_limited_should_emit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,912 ( 0.00%) ???:::pad_integral [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,908 ( 0.00%) ???:::mk_adt_def [???] 15,901 ( 0.00%) ???:, 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] 15,891 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,853 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Arm; 1]>>'2 [???] 15,851 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Param; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,845 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_body 15,845 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,821 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::WherePredicate; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,818 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased::> 15,790 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_expr 15,790 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::doc::check_doc::> 15,691 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_block 15,690 ( 0.00%) include/jemalloc/internal/tsd.h:pa_dalloc 15,654 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::input_with_hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,642 ( 0.00%) ???:::visit_invoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,629 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:, rustc_hash::FxBuildHasher>>::get_mut:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,606 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,594 ( 0.00%) ???:::find_by_ident_and_kind [???] 15,568 ( 0.00%) ???:::lower_arm'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,541 ( 0.00%) ???:::parse_pat_fields::{closure#3} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,540 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_item 15,540 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_item 15,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,527 ( 0.00%) include/jemalloc/internal/ph.h:realloc 15,504 ( 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:::check_expr 15,487 ( 0.00%) ???:::prepare_to_combine'2 [???] 15,486 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,480 ( 0.00%) ???:::call [???] 15,477 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::check_proc_macro::span_matches_pat 15,476 ( 0.00%) ???:>::walk_ref [???] 15,469 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/tree.rs: as core::iter::traits::iterator::Iterator>::next 15,467 ( 0.00%) ???:::confirm_builtin_candidate::{closure#0} [???] 15,462 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,444 ( 0.00%) /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 15,439 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::eq_expr 15,430 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_index::vec::IndexVec>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,425 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/let_underscore.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,420 ( 0.00%) /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 15,406 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,402 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/token.rs:::check_attributes 15,372 ( 0.00%) include/jemalloc/internal/mutex.h:edata_cache_put 15,371 ( 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:clippy_lints::doc::check_doc::> 15,371 ( 0.00%) ???:::lower_fn_header [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,365 ( 0.00%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,360 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:aligned_alloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,358 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::macros::first_node_in_macro:: 15,324 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:::check_item 15,315 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,299 ( 0.00%) ???:rustc_traits::normalize_projection_ty::normalize_canonicalized_projection [???] 15,264 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 15,264 ( 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: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 15,249 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,232 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,229 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:calloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,229 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [???] 15,223 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,213 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/items_after_test_module.rs:::check_mod [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,194 ( 0.00%) ???:rustc_expand::placeholders::placeholder::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,193 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_ctxt 15,185 ( 0.00%) ???:rustc_query_impl::query_impl::make_query_vtables [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,174 ( 0.00%) ???:::next_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,172 ( 0.00%) ???:::trait_of_assoc'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,166 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,156 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::visit_pat'2 15,144 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/table.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,131 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:, rustc_type_ir::sty::Region>>::insert_unique 15,111 ( 0.00%) ???:<::from_errors_diagnostic::BufWriter as core::io::write::Write>::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,100 ( 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:::check_body 15,047 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs:clippy_lints::ifs::branches_sharing_code::check_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,027 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,022 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/wild_in_or_pats.rs:clippy_lints::matches::wild_in_or_pats::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 15,014 ( 0.00%) ???:, rustc_error_messages::DiagArgValue, rustc_hash::FxBuildHasher>>::insert_full [???] 15,012 ( 0.00%) ???: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] 15,011 ( 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_crate 15,005 ( 0.00%) ???:::build_reduced_graph_for_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,000 ( 0.00%) ???:::lower_pat_mut::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,996 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,995 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_lints::lifetimes::could_use_elision 14,991 ( 0.00%) ???:>::decode'2 [???] 14,973 ( 0.00%) ???:::from_span_full::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,970 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:rustc_hir::intravisit::walk_expr::>'2 14,950 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,937 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:toml::de::parser::document::document [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,924 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,919 ( 0.00%) include/jemalloc/internal/tsd.h:ecache_evict 14,915 ( 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:rustc_hir::intravisit::walk_expr::'2 14,913 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::visit_pat 14,903 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_stmt 14,894 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::get_all_attrs:: 14,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:>::reserve_rehash::::{closure#0}> 14,881 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_path_segment:: 14,863 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,856 ( 0.00%) ???:operator new(unsigned long, std::align_val_t) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 14,830 ( 0.00%) ???:rustc_ast::visit::visit_items:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,823 ( 0.00%) ???:rustc_hir_analysis::collect::anon_const_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,806 ( 0.00%) ???:core::unicode::unicode_data::conversions::to_upper [???] 14,805 ( 0.00%) ???:::confirm_auto_impl_candidate::{closure#0}'2 [???] 14,789 ( 0.00%) ???: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] 14,743 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::should_ignore [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,735 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,720 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 14,720 ( 0.00%) ???:::apply_pattern_bindings [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,688 ( 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:>::grow_one [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,675 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,652 ( 0.00%) ???:::extract_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,622 ( 0.00%) ???:)>>::call_once'2 [???] 14,618 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,615 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::check_attributes 14,608 ( 0.00%) ???:::parse_fn'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,570 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_attributes 14,559 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/caches.rs:::check_expr 14,545 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:::check_stmt 14,535 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,530 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_item 14,519 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_extra_lifetimes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,507 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,506 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty:: 14,476 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,472 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,418 ( 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:clippy_utils::is_lint_allowed 14,404 ( 0.00%) ???:, usize)>>::reserve_rehash::, usize, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,388 ( 0.00%) ???:::effective_visibility_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,383 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:>::insert_full [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,380 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_block 14,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 14,352 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,352 ( 0.00%) ???:::is_from_async_await [???] 14,326 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/implicit_clone.rs:clippy_lints::methods::implicit_clone::is_clone_like [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,322 ( 0.00%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,320 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::check_impl_item 14,317 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,316 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_body 14,310 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/binder.rs:::check_expr 14,305 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,292 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/node.rs:, alloc::collections::btree::node::marker::Edge>>::insert_recursing::>::insert_entry::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,276 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_fn 14,273 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,272 ( 0.00%) ???:llvm::StringMapImpl::hash(llvm::StringRef) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 14,269 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,259 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs:clippy_lints::misc_early::redundant_at_rest_pattern::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,256 ( 0.00%) ???:::visit_macro_invoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,245 ( 0.00%) ???:::stable_hash:: [???] 14,231 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 14,230 ( 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_stmt::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,217 ( 0.00%) include/jemalloc/internal/bit_util.h:ecache_evict 14,208 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 14,208 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::ty::get_field_def_id_by_name 14,208 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,204 ( 0.00%) ???:::into_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,202 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_block 14,200 ( 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:::check_block_post 14,192 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_fn 14,182 ( 0.00%) ???:::decode_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,180 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_pat 14,167 ( 0.00%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,164 ( 0.00%) ???:rustc_query_impl::query_impl::try_normalize_generic_arg_after_erasing_regions::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] 14,160 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_lints::unwrap::extract_local 14,120 ( 0.00%) ???:core::ptr::drop_glue:: [???] 14,098 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::visit_pat 14,071 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_expr 14,067 ( 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:, rustc_type_ir::sty::Region>>::insert_unique 14,054 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 14,052 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs: as rustc_hir::intravisit::Visitor>::visit_expr 14,041 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_ty 14,031 ( 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_item 14,014 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::insert_full 13,995 ( 0.00%) ???:::descent_to_ambiguity'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,991 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::>'2 13,981 ( 0.00%) src/pages.c:pac_decay_to_limit.llvm.9344053299937794623 13,972 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_param 13,927 ( 0.00%) ???:::typeck_root_def_id_local'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,905 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_err_arm.rs:clippy_lints::matches::match_wild_err_arm::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,840 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_lints::needless_question_mark::check 13,835 ( 0.00%) ???:::visit_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,813 ( 0.00%) ???:rustc_trait_selection::traits::normalize::normalize_with_depth_to::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,810 ( 0.00%) ???:::trim_start [???] 13,807 ( 0.00%) ???:::target_config [???] 13,804 ( 0.00%) ???:::variant_with_id [???] 13,799 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_expr 13,774 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,754 ( 0.00%) ???:::drop [???] 13,748 ( 0.00%) 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] 13,725 ( 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:rustc_hir::intravisit::walk_expr::>'2 13,712 ( 0.00%) ???:::build_reduced_graph_for_struct_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,706 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased::> 13,697 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,680 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_item 13,670 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/thread_local/native/mod.rs:::check_expr 13,662 ( 0.00%) ???:::get_or_insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,661 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,653 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:>, clippy_lints::lifetimes::report_elidable_impl_lifetimes::{closure#0}> as core::iter::traits::iterator::Iterator>::unzip::<&rustc_span::def_id::LocalDefId, &rustc_hir::hir::Lifetime, alloc::vec::Vec, alloc::vec::Vec> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,642 ( 0.00%) include/jemalloc/internal/bit_util.h:pa_dalloc 13,632 ( 0.00%) ???:::parse_fn_params'2 [???] 13,629 ( 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:>::insert 13,628 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,623 ( 0.00%) src/decay.c:arena_decay 13,622 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::get_expr_use_site 13,622 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_item_kind 13,606 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::lit_to_mir_constant [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,604 ( 0.00%) ???: as core::iter::traits::iterator::Iterator>::find_map::::lower_angle_bracketed_parameter_data::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,597 ( 0.00%) include/jemalloc/internal/san.h:malloc_default 13,592 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::str_utils::to_camel_case 13,592 ( 0.00%) ???:::parse_refdef_label [???] 13,575 ( 0.00%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,572 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp_with_unwrap.rs:clippy_lints::methods::chars_cmp_with_unwrap::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,556 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_body 13,555 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,534 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_utils::str_utils::to_camel_case 13,528 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::swap_remove:: 13,482 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/set.rs:clippy_lints::attrs::mixed_attributes_style::check 13,478 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_lints::functions::duplicate_underscore_argument::check 13,463 ( 0.00%) ???:rustc_ast::visit::visit_field_defs:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,442 ( 0.00%) ???: as core::clone::Clone>::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,433 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:::check_mac 13,431 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_stmt 13,423 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_expr 13,419 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_lints::non_expressive_names::do_check 13,414 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,397 ( 0.00%) src/eset.c:ecache_evict 13,396 ( 0.00%) ???:core::ptr::drop_glue::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,387 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> 13,386 ( 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_block 13,379 ( 0.00%) ???:::check_arm [???] 13,366 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_lints::attrs::deprecated_cfg_attr::check 13,337 ( 0.00%) include/jemalloc/internal/sz.h:free_default 13,335 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 13,309 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_attributes 13,300 ( 0.00%) ???:::make_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,298 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 13,260 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,250 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_body 13,240 ( 0.00%) ???:, alloc::vec::Vec, rustc_hash::FxBuildHasher>>::get::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,221 ( 0.00%) ???:rustc_lint::unused::must_use::is_ty_must_use'2 [???] 13,190 ( 0.00%) ???:thin_vec::drop_non_singleton::<(rustc_ast::ast::UseTree, rustc_ast::node_id::NodeId)> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,180 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/bitmask.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 13,174 ( 0.00%) ???:, core::iter::adapters::map::Map, ::fix_multispans_in_extern_macros_and_render_macro_backtrace::{closure#0}>>, &[rustc_span::span_encoding::Span], ::fix_multispans_in_extern_macros_and_render_macro_backtrace::{closure#1}>, core::iter::sources::from_fn::FromFn<::macro_backtrace::{closure#0}>, ::fix_multispans_in_extern_macros_and_render_macro_backtrace::{closure#2}>, ::fix_multispans_in_extern_macros_and_render_macro_backtrace::{closure#3}> 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] 13,152 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:clippy_utils::test_item_names 13,140 ( 0.00%) ???:::source_callsite'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,132 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,118 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:clippy_lints::minmax::min_max 13,091 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 13,071 ( 0.00%) ???:pthread_rwlock_wrlock [/usr/lib/libc.so.6] 13,044 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_expr 13,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 13,038 ( 0.00%) ???:::shallow_resolve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,034 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/data_structures/delayed_map.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty 13,032 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::check_item 13,020 ( 0.00%) ???:pulldown_cmark::puncttable::is_punctuation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,002 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_item_post 12,991 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,990 ( 0.00%) ???:rustc_hir::intravisit::walk_const_arg:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,975 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,948 ( 0.00%) ???:rustc_query_impl::dep_kind_vtables::make_dep_kind_vtables [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,944 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 12,940 ( 0.00%) ???:rustc_resolve::rustdoc::collect_link_data::<&mut rustc_resolve::rustdoc::parse_links::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,928 ( 0.00%) ???: as core::clone::Clone>::clone::clone_non_singleton::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,924 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/overlapping_arms.rs:core::slice::sort::shared::smallsort::insertion_sort_shift_left::, as core::cmp::PartialOrd>::lt> 12,912 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:::check_attribute 12,912 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::check_attribute 12,910 ( 0.00%) ???:std::sys::fs::unix::try_statx [???] 12,894 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_body 12,894 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,872 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::check_block 12,871 ( 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:<&str as core::str::pattern::Pattern>::is_contained_in 12,856 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/count.rs:clippy_lints::doc::check_doc::> 12,851 ( 0.00%) ???:rustc_query_impl::query_impl::anon_const_kind::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] 12,850 ( 0.00%) /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}> 12,850 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_item 12,848 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_item 12,837 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,836 ( 0.00%) /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 12,808 ( 0.00%) ???:llvm::cl::AddLiteralOption(llvm::cl::Option&, llvm::StringRef) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 12,793 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::into_vec 12,785 ( 0.00%) ???:::resolve_doc_links'2 [???] 12,755 ( 0.00%) ???:::next_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,747 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,745 ( 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_mod 12,728 ( 0.00%) ???:::node_type_opt [???] 12,726 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,714 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::write_str 12,710 ( 0.00%) ???:::parse_expr_else [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,695 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_expr::{closure#0} 12,679 ( 0.00%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,660 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs: as core::iter::traits::collect::Extend>::extend::>> 12,642 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs: as core::iter::traits::collect::Extend>::extend::>> 12,640 ( 0.00%) ???:::from_tcx [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,636 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 12,636 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp.rs:clippy_lints::methods::chars_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,629 ( 0.00%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:realloc 12,628 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,598 ( 0.00%) ???:::check_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,584 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:::check_item 12,561 ( 0.00%) include/jemalloc/internal/sz.h:aligned_alloc 12,558 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,551 ( 0.00%) src/eset.c:pa_dalloc 12,541 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,540 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::fn_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,540 ( 0.00%) src/extent_dss.c:extent_try_coalesce_impl.llvm.9305427869391012685 12,539 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_expr'2 12,527 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/op_ref.rs:clippy_lints::operators::op_ref::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,520 ( 0.00%) ???:::register_renamed [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,510 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 12,480 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::check_expr 12,478 ( 0.00%) ???:rustc_builtin_macros::format::expand_format_args_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,478 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::cmp [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,474 ( 0.00%) ???:rustc_query_impl::query_impl::lookup_stability::execute_query_incr::__rust_end_short_backtrace [???] 12,457 ( 0.00%) ???:llvm::PassRegistry::~PassRegistry() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 12,454 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 12,404 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::parse [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,399 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, ())>>::from_iter::, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>>::{closure#0}>> 12,393 ( 0.00%) ???:rustc_errors::formatting::format_diag_messages [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,377 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_expr 12,371 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,369 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 12,369 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 12,369 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 12,369 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 12,361 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,360 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,359 ( 0.00%) ???:::complain_if_pub_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,325 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/pac.c:pac_decay_to_limit.llvm.9344053299937794623 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,322 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat::> 12,312 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/unnecessary_clippy_cfg.rs:clippy_lints::attrs::unnecessary_clippy_cfg::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,297 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_assoc_fn_without_type_instance [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,296 ( 0.00%) ???:rustc_interface::passes::analysis [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,294 ( 0.00%) ???:::accept_single_doc_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,289 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/token.rs:clippy_lints::crate_in_macro_def::is_token 12,264 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,263 ( 0.00%) ???:::get_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,260 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,254 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,250 ( 0.00%) ???:::extend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,247 ( 0.00%) ???:::parse_block'2 [???] 12,242 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,237 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::handle_inline_pass1 12,218 ( 0.00%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,208 ( 0.00%) ???:::assoc_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,191 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,190 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_fn 12,188 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 12,166 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,165 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,157 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_field_def [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,150 ( 0.00%) ???:rustc_query_impl::query_impl::impl_super_outlives::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] 12,148 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_matcher_core'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,140 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:clippy_lints::methods::unnecessary_to_owned::check 12,131 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::check_expr 12,107 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy 12,081 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,075 ( 0.00%) ???:rustc_query_impl::query_impl::visibility::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] 12,058 ( 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:>::handle_inline_pass1 12,032 ( 0.00%) ???:std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet const*) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,020 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 12,012 ( 0.00%) /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 11,991 ( 0.00%) ???:::source_equal [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,979 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 11,971 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs:::check_expr 11,971 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/visibility.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,970 ( 0.00%) ???:0x00000000000a07c0 [/usr/lib/libc.so.6] 11,969 ( 0.00%) ???:rustc_query_impl::plumbing::verify_query_key_hashes_inner::>>>, rustc_middle::query::erase::ErasedData<[u8; 8]>>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,968 ( 0.00%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,964 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:, core::slice::iter::Iter>>, clippy_lints::ptr::ptr_arg::check_fn_args::{closure#0}>, clippy_lints::ptr::ptr_arg::check_body::{closure#0}> as core::iter::traits::iterator::Iterator>::next 11,963 ( 0.00%) ???:::parse_array_or_slice_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,960 ( 0.00%) ???:rustc_builtin_macros::edition_panic::expand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,942 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,919 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,918 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,914 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,897 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/enumerate.rs:::check_mac_def::check_ts'2 11,890 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter.rs:::check_block 11,885 ( 0.00%) ???:rustc_lint::early::check_ast_node'2 [???] 11,883 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,880 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_hir_id::HirId, clippy_lints::casts::needless_type_cast::BindingInfo), std::collections::hash::map::IntoIter>>::from_iter 11,874 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,874 ( 0.00%) ???:rustc_middle::verify_ich::incremental_verify_ich::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,866 ( 0.00%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:tcache_bin_flush_small 11,866 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/let_with_type_underscore.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,864 ( 0.00%) ???:rustc_span::hygiene::walk_chain [???] 11,853 ( 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:::check_body 11,845 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty::'2 11,826 ( 0.00%) ???:::from_filename_and_stable_crate_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,814 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:>::next_back [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,810 ( 0.00%) ???:core::ptr::drop_glue::, rustc_middle::dep_graph::graph::DepNodeIndex>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,809 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,804 ( 0.00%) ???:::eq_trace::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,792 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::methods::clone_on_copy::check_function 11,786 ( 0.00%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_local::{closure#0}>::{closure#0}'2 [???] 11,782 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::collect_binding_from_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,774 ( 0.00%) ???:>, ())>>>::intern::, ::new::{closure#0}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,774 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::if_sequence [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,761 ( 0.00%) ???:>::complete::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,748 ( 0.00%) ???:::parent_callsite [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,747 ( 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:>::walk_ref 11,742 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 11,741 ( 0.00%) ???:>>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,736 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_item 11,715 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:::visit_pat'2 11,715 ( 0.00%) ???:::collect_tokens::::parse_tuple_struct_body::{closure#0}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,713 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::fn_kind_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,712 ( 0.00%) ???:0x0000000000173d80 [/usr/lib/libc.so.6] 11,695 ( 0.00%) ???:::write_all_cold_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,693 ( 0.00%) ???:rustc_hir::intravisit::walk_pat_expr::> [???] 11,688 ( 0.00%) ???:>)>>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,682 ( 0.00%) /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:>::insert 11,682 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:clippy_utils::tokenize_with_text::{closure#0} 11,672 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,650 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_block 11,648 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_impl_item 11,610 ( 0.00%) /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] 11,609 ( 0.00%) ???:>::walk_mut [???] 11,601 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_fn:: 11,600 ( 0.00%) ???:::inhabited_predicate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,592 ( 0.00%) ???:>::contains_key:: [???] 11,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 11,556 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr 11,550 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,542 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map/entry.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 11,523 ( 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:rustc_hir::intravisit::walk_path::> 11,514 ( 0.00%) ???:core::slice::memchr::memrchr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,513 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::with_source_text::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,507 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,505 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::expr'2 11,497 ( 0.00%) ???:::push_dependencies_in_postorder'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,487 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:toml_parser::decoder::string::decode_unquoted_key 11,480 ( 0.00%) ???:::parse_expr_else'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,474 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq_expr'2 11,468 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_fn 11,455 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::hir::ModuleItems>::{closure#0}'2 [???] 11,448 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::check_item_kind 11,448 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,447 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,439 ( 0.00%) src/extent.c:pac_decay_to_limit.llvm.9344053299937794623 11,424 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,423 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:::new::>>, core::iter::adapters::map::Map, ::hir_body_param_idents::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,408 ( 0.00%) ???:::lower_expr_field'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,385 ( 0.00%) ???:::from_utf8_lossy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,375 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::interior_mut_ty_chain_inner'2 11,352 ( 0.00%) ???:::eat_identifier [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,346 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_fn 11,346 ( 0.00%) ???:rustc_middle::ty::util::reveal_opaque_types_in_bounds [???] 11,341 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_fn 11,336 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:, pulldown_cmark::parse::LinkDef)> as core::ops::drop::Drop>::drop [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,334 ( 0.00%) src/arena.c:calloc 11,328 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,314 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:::check_attribute 11,314 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_attribute 11,314 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::attrs::deprecated_cfg_attr::check 11,314 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy 11,299 ( 0.00%) include/jemalloc/internal/bit_util.h:extent_record 11,298 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,290 ( 0.00%) ???:>::call_once'2 [???] 11,290 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,282 ( 0.00%) ???:)>>::call_once [???] 11,278 ( 0.00%) ???:::write:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,271 ( 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:>::insert_full 11,267 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::hash_expr'2 11,266 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 11,257 ( 0.00%) ???: 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] 11,255 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::functions::must_use::check_item 11,254 ( 0.00%) ???:::normalize_to_macros_2_0 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,236 ( 0.00%) ???:rustc_query_impl::query_impl::erase_and_anonymize_regions_ty::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] 11,228 ( 0.00%) ???:::with_ctxt_from_mark [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,197 ( 0.00%) ???:>::scalar_pair:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,178 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::functions::must_use::check_item 11,178 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::check_stmt 11,176 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::hash_expr'2 11,172 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_utils::return_ty 11,154 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/util.rs:::check_ty_ 11,149 ( 0.00%) include/jemalloc/internal/ticker.h:realloc 11,130 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,129 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_expr 11,128 ( 0.00%) ???:::visit_param_bound [???] 11,128 ( 0.00%) ???:::visit_param_bound [???] 11,128 ( 0.00%) ???:::visit_param_bound [???] 11,124 ( 0.00%) ???:>>::walk_ref [???] 11,118 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::visit_expr 11,116 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::deref 11,113 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_item 11,110 ( 0.00%) ???: as core::clone::Clone>::clone::clone_non_singleton::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,098 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:clippy_utils::trait_ref_of_method 11,098 ( 0.00%) /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_utils::trait_ref_of_method 11,098 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:clippy_utils::trait_ref_of_method 11,098 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/thread_local/native/mod.rs:clippy_utils::trait_ref_of_method 11,092 ( 0.00%) ???: 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] 11,091 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/let_unit_value.rs:::check_local 11,082 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 11,082 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_impl_item 11,081 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,074 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:::instantiate_bound_regions_with_erased::> 11,061 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:::check::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 11,058 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_expr 11,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 11,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::functions::must_use::check_impl_item 11,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 11,040 ( 0.00%) ???:rustc_query_impl::plumbing::try_load_from_disk::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,030 ( 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_item 11,007 ( 0.00%) ???:pulldown_cmark::parse::scan_reference [???] 11,001 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_utils::check_proc_macro::span_matches_pat 10,995 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_item 10,980 ( 0.00%) ???:::find_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,974 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:>::walk_ref 10,963 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,960 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:clippy_utils::test_item_names 10,957 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq_expr 10,955 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:clippy_utils::check_proc_macro::span_matches_pat 10,937 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 10,929 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:::visit_pat 10,905 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::emit_lint_if_under_msrv 10,901 ( 0.00%) ???:::parse_seq_to_before_end::::parse_meta_item::{closure#3}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,899 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 10,898 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,881 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_range_bounds [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,875 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,846 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,839 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/repr_attributes.rs:::check_item 10,836 ( 0.00%) ???:::map_ctxt::<::normalize_to_macros_2_0_and_adjust::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,827 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat:: 10,824 ( 0.00%) src/eset.c:extent_record 10,822 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::defined_lang_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,814 ( 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:, rustc_type_ir::sty::Region>>::insert_unique 10,805 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::hir_body_owner_kind:: 10,800 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 10,794 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::check_expr 10,774 ( 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:rustc_hir::intravisit::walk_expr::>'2 10,764 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:), rustc_middle::traits::cache::WithDepNode, rustc_middle::traits::SelectionError>>)> as core::ops::drop::Drop>::drop [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,762 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_pat 10,752 ( 0.00%) ???:__popcountdi2 [/usr/lib/libgcc_s.so.1] 10,739 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_block 10,712 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 10,707 ( 0.00%) ???:::allocate_link [???] 10,703 ( 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:::visit_pat 10,690 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter.rs:::check_block 10,689 ( 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:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 10,678 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 10,670 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,667 ( 0.00%) ???:>::call_once'2 [???] 10,665 ( 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:clippy_utils::check_proc_macro::span_matches_pat 10,662 ( 0.00%) ???:::new::build_recur'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,659 ( 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: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 10,658 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_ty 10,653 ( 0.00%) ???:::get_library_candidates [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs:::check_fn 10,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:::get_all_attrs:: 10,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::unit_types::unit_arg::check 10,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 10,644 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_fn 10,640 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,635 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,629 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_binary [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,628 ( 0.00%) ???:::check_args_compatible_inner [???] 10,616 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,604 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::insert 10,593 ( 0.00%) ???:::try_fold_free_or_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,590 ( 0.00%) ???:::serialize::<&mut serde_json::ser::Serializer<&mut alloc::boxed::Box>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,574 ( 0.00%) ???:::visit_item_id_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,574 ( 0.00%) ???:::check_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,564 ( 0.00%) /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:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 10,556 ( 0.00%) include/jemalloc/internal/pac.h:pa_alloc 10,538 ( 0.00%) ???:::const_eval_resolve_for_typeck [???] 10,531 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,527 ( 0.00%) include/jemalloc/internal/sz.h:large_ralloc 10,512 ( 0.00%) ???:rustc_ty_utils::ty::adt_sizedness_constraint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,505 ( 0.00%) ???:::check_fn [???] 10,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_fn 10,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_impl_item 10,488 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:::next_match 10,479 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_single_char_names 10,470 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/fuse.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> 10,469 ( 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:rustc_hir::intravisit::walk_expr::'2 10,448 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,424 ( 0.00%) include/jemalloc/internal/mutex.h:extent_record 10,407 ( 0.00%) ???:::hash_one::<&std::path::PathBuf>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,382 ( 0.00%) ???:::{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'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,374 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::get:: 10,364 ( 0.00%) ???:0x0000000000177c20 [/usr/lib/libc.so.6] 10,360 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_poly_trait_ref [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,350 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_body 10,350 ( 0.00%) ???:::visit_method_receiver_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,340 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::impl_trait_ref:: 10,328 ( 0.00%) ???:::flat_map_expr_field'2 [???] 10,316 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,314 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_fn 10,305 ( 0.00%) ???:::open_c [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,300 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:::check_item_kind 10,285 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,283 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 10,280 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:::check_item 10,268 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::check_attributes 10,268 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs:::check_attributes 10,249 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:rustc_hir::intravisit::walk_ty:: 10,248 ( 0.00%) include/jemalloc/internal/edata.h:emap_merge_prepare 10,241 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,228 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/zip.rs:, core::slice::iter::Iter>>, clippy_lints::ptr::ptr_arg::check_fn_args::{closure#0}>, clippy_lints::ptr::ptr_arg::check_body::{closure#0}> as core::iter::traits::iterator::Iterator>::next 10,208 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,206 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,196 ( 0.00%) ???:::add_annotation_to_file [???] 10,192 ( 0.00%) ???:::walk_flat_map [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,178 ( 0.00%) ???:::qpath_is_lang_item [???] 10,171 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,165 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 10,157 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/pat_util.rs:clippy_lints::lifetimes::could_use_elision 10,150 ( 0.00%) ???:::name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,145 ( 0.00%) include/jemalloc/internal/atomic.h:extent_record 10,142 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::hir 10,138 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 10,134 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs:::check_fn 10,134 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_fn 10,129 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,124 ( 0.00%) ???:<[rustc_hir::hir::GenericParam] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 10,122 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::test_item_names [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,120 ( 0.00%) ???:::to_real_filename::<&std::path::Path> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,118 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,117 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,116 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/interner.rs:>>::collect_and_apply::, alloc::vec::into_iter::IntoIter>, >::into>, ::mk_args_from_iter, alloc::vec::into_iter::IntoIter>, >::into>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,108 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/plumbing.rs:::typeck:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,080 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 10,080 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 10,080 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 10,080 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,063 ( 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:::check_fn 10,059 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_impl_item 10,055 ( 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_expr 10,051 ( 0.00%) ???:llvm::cl::opt >::~opt() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 10,034 ( 0.00%) ???:rustc_query_impl::query_impl::is_doc_hidden::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] 10,032 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,029 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/extent.c:ecache_alloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,018 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,010 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,004 ( 0.00%) ???:::try_resolve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,000 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/mut_visit.rs:>::walk_mut 9,990 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_lhs_no_empty_seq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,976 ( 0.00%) ???: as core::iter::traits::collect::Extend<(rustc_span::symbol::Ident, rustc_resolve::late::BindingInfo)>>::extend::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,960 ( 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_arm::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,958 ( 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_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,954 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,950 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:::check_pat 9,938 ( 0.00%) ???:::walk::<::compute_and_check_binding_map::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,932 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::attrs::inline_always::check 9,932 ( 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:::qpath 9,932 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::reserve_rehash::>>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,904 ( 0.00%) ???:rustc_ast::visit::walk_fn::>'2 [???] 9,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_body 9,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::hash_expr'2 9,900 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_body_post 9,900 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_lints::casts::needless_type_cast::check 9,896 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::functions::must_use::check_item 9,889 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,886 ( 0.00%) /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:, rustc_type_ir::sty::Region>>::new 9,885 ( 0.00%) ???: as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [???] 9,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:clippy_utils::source::reindent_multiline_inner 9,875 ( 0.00%) ???:::expn_that_defined_untracked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,866 ( 0.00%) src/sz.c:extent_record 9,864 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:, pulldown_cmark::parse::FootnoteDef)> as core::ops::drop::Drop>::drop [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,861 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,854 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::instantiate_bound_regions_with_erased::> 9,844 ( 0.00%) ???:::append_stripped_cfg_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,841 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 9,841 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_ref_ptr.rs:clippy_lints::methods::clone_on_ref_ptr::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,840 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/sc.c:sc_data_init [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,835 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,834 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/edition.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 9,834 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 9,834 ( 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:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 9,834 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 9,820 ( 0.00%) ???:0x0000000000094850 [/usr/lib/libc.so.6] 9,812 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:>::insert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,809 ( 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:rustc_hir::intravisit::walk_qpath:: 9,798 ( 0.00%) ???:::make_canonicalized_query_response:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,795 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:>::reserve::do_reserve_and_handle:: 9,780 ( 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:::check_expr 9,779 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 9,779 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 9,771 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:::check_pat 9,768 ( 0.00%) ???:readdir [/usr/lib/libc.so.6] 9,765 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,760 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/thread_event.c:te_event_trigger [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,758 ( 0.00%) ???: 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] 9,750 ( 0.00%) ???:::find_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,747 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,746 ( 0.00%) ???:::def_span_untracked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,745 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::eq_expr'2 9,743 ( 0.00%) ???:::lower_attrs_with_extra'2 [???] 9,741 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>>>, rustc_middle::query::erase::ErasedData<[u8; 8]>>, true> [???] 9,736 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> 9,731 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/count.rs:::visit_pat 9,726 ( 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:::next 9,721 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,720 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,706 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::is_descendant_of::{closure#0}>::{closure#0}, bool> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,705 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat:: 9,705 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:clippy_lints::doc::check_doc::> 9,704 ( 0.00%) ???:::render_multispans_macro_backtrace [???] 9,702 ( 0.00%) ???:rustc_expand::placeholders::placeholder::mac_placeholder [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,702 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::tokenize_with_text::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,662 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,660 ( 0.00%) src/ehooks.c:ecache_evict 9,658 ( 0.00%) ???:::walk_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,639 ( 0.00%) ???:::span_until_non_whitespace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,624 ( 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_expr 9,620 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:core::ptr::drop_glue:: 9,618 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:clippy_lints::functions::result::result_err_ty 9,612 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 9,611 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/tcache.c:tcache_bin_flush_large [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,607 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,606 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,585 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, ())>>::from_iter::, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, clippy_utils::iter_input_pats::{closure#0}>, clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr::{closure#0}>>::{closure#0}>> 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_expr 9,561 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::utils::author::check_item 9,555 ( 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_local::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,542 ( 0.00%) ???: as core::clone::Clone>::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,542 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,539 ( 0.00%) ???:0x000000000000cc90 [/usr/lib/ld-linux-x86-64.so.2] 9,528 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::new 9,520 ( 0.00%) ???:::parse_expr_cond [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,519 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 9,512 ( 0.00%) ???:::type_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,503 ( 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:clippy_lints::doc::check_doc::> 9,493 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,487 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,480 ( 0.00%) ???:::visit_method_receiver_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,450 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_item 9,440 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:clippy_lints::ptr::ptr_arg::check_body 9,414 ( 0.00%) ???:, serde_json::ser::CompactFormatter> as serde_core::ser::SerializeStruct>::serialize_field::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,412 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 9,412 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 9,412 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 9,393 ( 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:clippy_lints::functions::must_use::check_impl_item 9,389 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,386 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map/entry.rs:>::insert_entry [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,385 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,378 ( 0.00%) ???:0x000000000001f8c0 [/usr/lib/ld-linux-x86-64.so.2] 9,377 ( 0.00%) src/arena.c:aligned_alloc 9,374 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_pat::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,365 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 9,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::hir_body_owner_kind:: 9,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::new::>>, core::iter::adapters::map::Map, ::hir_body_param_idents::{closure#0}>> 9,360 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,354 ( 0.00%) ???:::hygienic_eq [???] 9,348 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 9,338 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_item_kind 9,328 ( 0.00%) ???:::lower_expr_range [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,324 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/manual_midpoint.rs:clippy_lints::operators::manual_midpoint::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,317 ( 0.00%) ???:>>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,308 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/manual_is_multiple_of.rs:clippy_lints::operators::manual_is_multiple_of::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 9,294 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_local -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use core::cmp::Ordering; . use core::convert::identity; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty; . . use super::{BAD_BIT_MASK, INEFFECTIVE_BIT_MASK}; . 3,438 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . cmp_op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 264 ( 0.00%) let Some(cmp_op) = CmpOp::from_bin_op(cmp_op) else { . return; . }; . . // Check for a bitwise op compared to a constant. . let typeck = cx.typeck_results(); 396 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 7,392 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (132x) 132 ( 0.00%) let ctxt = e.span.ctxt(); . let Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) = try_maybe_swap( . lhs, . rhs, 2,640 ( 0.00%) |lhs, rhs| { 534 ( 0.00%) if let ExprKind::Binary(bit_op, bit_lhs, bit_rhs) = lhs.kind . && let bit_sp = bit_op.span . && let Some(bit_op) = BitOp::from_bin_op(bit_op.node) . && matches!(typeck.expr_ty(rhs).peel_refs().kind(), ty::Uint(_) | ty::Int(_)) . && bit_sp.ctxt() == ctxt . && let Some(Constant::Int(cmp_val)) = ecx.eval(rhs) . && walk_span_to_context(rhs.span, ctxt).is_some() . { . Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) . } else { 264 ( 0.00%) None . } 2,112 ( 0.00%) }, . |r| (r.0.swap_operands(), r.1, r.2, r.3, r.4), . ) else { . return; . }; . . if !ctxt.in_external_macro(cx.tcx.sess.source_map()) . && let ty = typeck.expr_ty(bit_lhs).peel_refs() . && matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) -- line 52 ---------------------------------------- -- line 110 ---------------------------------------- . . if !is_from_proc_macro(cx, e) { . #[expect(clippy::collapsible_span_lint_calls)] . span_lint_and_then(cx, lint, e.span, msg.to_str(), |diag| { . diag.note(note.to_string(op_val, cmp_val)); . }); . } . } 3,056 ( 0.00%) } . . fn try_maybe_swap( . lhs: &T, . rhs: &T, . mut f: impl FnMut(&T, &T) -> Option, . inv: impl FnOnce(R) -> R, . ) -> Option { 792 ( 0.00%) if let Some(x) = f(lhs, rhs) { 2,380 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (132x) . Some(x) . } else { 396 ( 0.00%) f(rhs, lhs).map(inv) 2,396 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (132x) . } . } . . #[derive(Clone, Copy)] . struct CmpOp { . pub kind: CmpOpKind, . pub negate: bool, . } . impl CmpOp { . fn from_bin_op(op: BinOpKind) -> Option { 1,806 ( 0.00%) match op { . BinOpKind::Eq => Some(Self { . kind: CmpOpKind::Eq, . negate: false, . }), . BinOpKind::Lt => Some(Self { . kind: CmpOpKind::Lt, . negate: false, . }), -- line 148 ---------------------------------------- -- line 201 ---------------------------------------- . #[derive(Clone, Copy)] . enum BitOp { . Xor, . And, . Or, . } . impl BitOp { . fn from_bin_op(op: BinOpKind) -> Option { 18 ( 0.00%) match op { . BinOpKind::BitXor => Some(Self::Xor), . BinOpKind::BitAnd => Some(Self::And), . BinOpKind::BitOr => Some(Self::Or), . _ => None, . } . } . } . -- line 217 ---------------------------------------- 1,188 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/if_let_mutex.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . correctness, . "locking a `Mutex` in an `if let` block can cause deadlocks" . } . . declare_lint_pass!(IfLetMutex => [IF_LET_MUTEX]); . . impl<'tcx> LateLintPass<'tcx> for IfLetMutex { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 81,582 ( 0.00%) if cx.tcx.sess.edition() >= Edition2024 { . return; . } . 27,264 ( 0.00%) if let Some(higher::IfLet { 29 ( 0.00%) let_expr, 29 ( 0.00%) if_then, . if_else: Some(if_else), . .. 54,528 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 154,209 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (27,194x) 58 ( 0.00%) && let ctxt = expr.span.ctxt() 58 ( 0.00%) && let Some(op_mutex) = for_each_expr_without_closures(let_expr, |e| mutex_lock_call(cx, ctxt, e, None)) . && let Some(arm_mutex) = . for_each_expr_without_closures((if_then, if_else), |e| mutex_lock_call(cx, ctxt, e, Some(op_mutex))) . { . let diag = |diag: &mut Diag<'_, ()>| { . diag.span_label( . op_mutex.span, . "this Mutex will remain locked for the entire `if let`-block...", . ); -- line 74 ---------------------------------------- -- line 81 ---------------------------------------- . span_lint_and_then( . cx, . IF_LET_MUTEX, . expr.span, . "calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock", . diag, . ); . } 27,194 ( 0.00%) } . } . . fn mutex_lock_call<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . op_mutex: Option<&'tcx Expr<'_>>, . ) -> ControlFlow<&'tcx Expr<'tcx>> { 316 ( 0.00%) if let ExprKind::MethodCall(path, self_arg, [], _) = &expr.kind 36 ( 0.00%) && path.ident.name == sym::lock . && let ty = cx.typeck_results().expr_ty(self_arg).peel_refs() . && ty.is_diag_item(cx, sym::Mutex) . && op_mutex.is_none_or(|op| eq_expr_value(cx, ctxt, self_arg, op)) . { . ControlFlow::Break(self_arg) . } else { . ControlFlow::Continue(()) . } -- line 107 ---------------------------------------- 462,414 ( 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 { 35,112 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 33,012 ( 0.00%) if !cx.effective_visibilities.is_exported(item.owner_id.def_id) || !self.msrv.meets(cx, msrvs::NON_EXHAUSTIVE) { 173,514 ( 0.01%) => ???:::is_exported (3,192x) 48,006 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,778x) . return; . } . 8,846 ( 0.00%) match item.kind { 87 ( 0.00%) ItemKind::Enum(_, _, def) if def.variants.len() > 1 => { . let iter = def.variants.iter().filter_map(|v| { 308 ( 0.00%) (matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id))) 623 ( 0.00%) => ???:::hir_attrs (7x) . .then_some((v.def_id, v.span)) . }); 63 ( 0.00%) if let Ok((id, span)) = iter.exactly_one() 2,321 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs:, ::check_item::{closure#0}> as itertools::Itertools>::exactly_one (21x) . && !find_attr!(cx.tcx, item.hir_id(), NonExhaustive(..)) . { . self.potential_enums.push((item.owner_id.def_id, id, item.span, span)); . } . }, 219 ( 0.00%) ItemKind::Struct(_, _, variant_data) => { . let fields = variant_data.fields(); . let private_fields = fields . .iter() 717 ( 0.00%) .filter(|field| !cx.effective_visibilities.is_exported(field.def_id)); 13,383 ( 0.00%) => ???:::is_exported (239x) 438 ( 0.00%) if fields.len() > 1 . && let Ok(field) = private_fields.exactly_one() . && let TyKind::Tup([]) = field.ty.kind . { . span_lint_and_then( . cx, . MANUAL_NON_EXHAUSTIVE, . item.span, . "this seems like a manual implementation of the non-exhaustive pattern", -- line 113 ---------------------------------------- -- line 142 ---------------------------------------- . // ``` . diag.span_help(field.span, "remove this field"); . }, . ); . } . }, . _ => {}, . } 25,536 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 96,794 ( 0.01%) if let ExprKind::Path(QPath::Resolved(None, p)) = &e.kind 43,281 ( 0.00%) && let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Const), ctor_id) = p.res . && let Some(local_ctor) = ctor_id.as_local() . { 375 ( 0.00%) let variant_id = cx.tcx.local_parent(local_ctor); 5,750 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::local_parent:: (125x) . 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%) } . } 216 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs -------------------------------------------------------------------------------- Ir -- line 93 ---------------------------------------- . . impl ManualFloatMethods { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . fn is_not_const(tcx: TyCtxt<'_>, def_id: DefId) -> bool { 33 ( 0.00%) match tcx.def_kind(def_id) { . DefKind::Mod . | DefKind::Struct . | DefKind::Union . | DefKind::Enum . | DefKind::Variant . | DefKind::Trait . | DefKind::TyAlias . | DefKind::ForeignTy -- line 109 ---------------------------------------- -- line 128 ---------------------------------------- . | DefKind::Ctor(..) . | DefKind::AssocConst { .. } => false, . . DefKind::Fn | DefKind::AssocFn | DefKind::Closure => tcx.constness(def_id) == Constness::NotConst, . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,881 ( 0.00%) if let ExprKind::Binary(kind, lhs, rhs) = expr.kind 782 ( 0.00%) && let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind 258 ( 0.00%) && let ExprKind::Binary(rhs_kind, rhs_lhs, rhs_rhs) = rhs.kind . // Checking all possible scenarios using a function would be a hopeless task, as we have . // 16 possible alignments of constants/operands. For now, let's use `partition`. 54 ( 0.00%) && let mut exprs = [lhs_lhs, lhs_rhs, rhs_lhs, rhs_rhs] 38 ( 0.00%) && exprs.iter_mut().partition_in_place(|i| i.res_local_id().is_some()) == 2 12 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . && ( 18 ( 0.00%) is_not_const(cx.tcx, cx.tcx.hir_enclosing_body_owner(expr.hir_id).into()) 1,823 ( 0.00%) => ???:::hir_enclosing_body_owner (3x) . || self.msrv.meets(cx, msrvs::CONST_FLOAT_CLASSIFY) . ) 12 ( 0.00%) && let [first, second, const_1, const_2] = exprs 21 ( 0.00%) && let ecx = ConstEvalCtxt::new(cx) 168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (3x) . && let ctxt = expr.span.ctxt() 20 ( 0.00%) && let Some(const_1) = ecx.eval_local(const_1, ctxt) 697 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (3x) 8 ( 0.00%) && let Some(const_2) = ecx.eval_local(const_2, ctxt) 409 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (1x) 1 ( 0.00%) && first.res_local_id().is_some_and(|f| second.res_local_id().is_some_and(|s| f == s)) . // The actual infinity check, we also allow `NEG_INFINITY` before` INFINITY` just in . // case somebody does that for some reason . && (const_1.is_pos_infinity() && const_2.is_neg_infinity() . || const_1.is_neg_infinity() && const_2.is_pos_infinity()) . && let Some(local_snippet) = first.span.get_text(cx) . { . let variant = match (kind.node, lhs_kind.node, rhs_kind.node) { . (BinOpKind::Or, BinOpKind::Eq, BinOpKind::Eq) => Variant::ManualIsInfinite, -- line 162 ---------------------------------------- -- line 196 ---------------------------------------- . expr.span, . "or, for conciseness", . format!("!{local_snippet}.is_infinite()"), . Applicability::MaybeIncorrect, . ); . }, . } . }); 2 ( 0.00%) } 138 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (2x) 217,552 ( 0.01%) } . } 86 ( 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/collections/btree/map/entry.rs -------------------------------------------------------------------------------- Ir -- line 136 ---------------------------------------- . /// use std::collections::BTreeMap; . /// . /// let mut map: BTreeMap<&str, usize> = BTreeMap::new(); . /// map.entry("poneyland").or_insert(12); . /// . /// assert_eq!(map["poneyland"], 12); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] 252 ( 0.00%) pub fn or_insert(self, default: V) -> &'a mut V { 84 ( 0.00%) match self { . Occupied(entry) => entry.into_mut(), 336 ( 0.00%) Vacant(entry) => entry.insert(default), . } 210 ( 0.00%) } . . /// Ensures a value is in the entry by inserting the result of the default function if empty, . /// and returns a mutable reference to the value in the entry. . /// . /// # Examples . /// . /// ``` . /// use std::collections::BTreeMap; -- line 157 ---------------------------------------- -- line 418 ---------------------------------------- . /// if let Entry::Vacant(o) = map.entry("poneyland") { . /// o.insert(37); . /// } . /// assert_eq!(map["poneyland"], 37); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("push", "put")] . pub fn insert(self, value: V) -> &'a mut V { 260 ( 0.00%) self.insert_entry(value).into_mut() 36,178 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map/entry.rs:>::insert_entry (254x) . } . . /// Sets the value of the entry with the `VacantEntry`'s key, . /// and returns an `OccupiedEntry`. . /// . /// # Examples . /// . /// ``` -- line 434 ---------------------------------------- -- line 439 ---------------------------------------- . /// . /// if let Entry::Vacant(o) = map.entry("poneyland") { . /// let entry = o.insert_entry(37); . /// assert_eq!(entry.get(), &37); . /// } . /// assert_eq!(map["poneyland"], 37); . /// ``` . #[stable(feature = "btree_entry_insert", since = "1.92.0")] 2,080 ( 0.00%) pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A> { 604 ( 0.00%) let handle = match self.handle { . None => { . // SAFETY: There is no tree yet so no reference to it exists. . let map = unsafe { self.dormant_map.reborrow() }; . let root = map.root.insert(NodeRef::new_leaf(self.alloc.clone()).forget_type()); . // SAFETY: We *just* created the root as a leaf, and we're . // stacking the new handle on the original borrow lifetime. . unsafe { . let mut leaf = root.borrow_mut().cast_to_leaf_unchecked(); 11 ( 0.00%) leaf.push_with_handle(self.key, value) . } . } 3,207 ( 0.00%) Some(handle) => handle.insert_recursing(self.key, value, self.alloc.clone(), |ins| { 26,488 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/node.rs:, alloc::collections::btree::node::marker::Edge>>::insert_recursing::>::insert_entry::{closure#0}> (253x) . drop(ins.left); . // SAFETY: Pushing a new root node doesn't invalidate . // handles to existing nodes. . let map = unsafe { self.dormant_map.reborrow() }; . let root = map.root.as_mut().unwrap(); // same as ins.left . root.push_internal_level(self.alloc.clone()).push(ins.kv.0, ins.kv.1, ins.right) 299 ( 0.00%) }), . }; . . // SAFETY: modifying the length doesn't invalidate handles to existing nodes. 302 ( 0.00%) unsafe { self.dormant_map.reborrow().length += 1 }; . 780 ( 0.00%) OccupiedEntry { 598 ( 0.00%) handle: handle.forget_node_type(), 260 ( 0.00%) dormant_map: self.dormant_map, . alloc: self.alloc, . _marker: PhantomData, . } 1,820 ( 0.00%) } . } . . impl<'a, K: Ord, V, A: Allocator + Clone> OccupiedEntry<'a, K, V, A> { . /// Gets a reference to the key in the entry. . /// . /// # Examples . /// . /// ``` -- line 487 ---------------------------------------- 299 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/inline_trait_bounds.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . #[derive(Default)] . pub struct InlineTraitBounds { . /// The top-level item onto which `#[automatically_derived]` has been encountered . automatically_derived_at: Option, . } . . impl EarlyLintPass for InlineTraitBounds { . fn check_item(&mut self, _: &EarlyContext<'_>, item: &rustc_ast::Item) { 2,570 ( 0.00%) if self.automatically_derived_at.is_none() . && item . .attrs() . .iter() . .any(|attr| attr.has_name(sym::automatically_derived)) . { . self.automatically_derived_at = Some(item.id); . } . } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &rustc_ast::Item) { . self.automatically_derived_at.take_if(|id| *id == item.id); . } . 12,523 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 3,578 ( 0.00%) let FnKind::Fn(ctxt, _vis, f) = kind else { . return; . }; . . // Skip foreign functions (extern "C" etc.) 6,816 ( 0.00%) if !matches!(ctxt, FnCtxt::Free | FnCtxt::Assoc(..)) { . return; . } . . // Skip automatically derived functions . if self.automatically_derived_at.is_some() { . return; . } . 6,816 ( 0.00%) if f.sig.span.in_external_macro(cx.sess().source_map()) { . return; . } . . lint_fn(cx, f); 14,312 ( 0.00%) } . } . . fn lint_fn(cx: &EarlyContext<'_>, f: &Fn) { . let generics = &f.generics; . let offenders: Vec<&GenericParam> = generics . .params . .iter() . .filter(|param| { 449 ( 0.00%) !param.bounds.is_empty() && matches!(param.kind, GenericParamKind::Lifetime | GenericParamKind::Type { .. }) . }) . .collect(); 1,704 ( 0.00%) if offenders.is_empty() { . return; . } . . let predicates = offenders . .iter() 417 ( 0.00%) .map(|param| build_predicate_text(cx, param)) 257,254 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/inline_trait_bounds.rs:clippy_lints::inline_trait_bounds::build_predicate_text (139x) . .collect::>(); . . let mut edits = Vec::new(); . 138 ( 0.00%) for param in offenders { 417 ( 0.00%) if let Some(colon) = param.colon_span { 139 ( 0.00%) let remove_span = colon.to(param.bounds.last().unwrap().span()); 12,927 ( 0.00%) => ???:::to (139x) . . edits.push((remove_span, String::new())); . } . } . . let predicate_text = predicates.join(", "); . . let where_clause = &generics.where_clause; 414 ( 0.00%) if where_clause.has_where_token { . let (insert_at, suffix) = if let Some(last_pred) = where_clause.predicates.last() { . // existing `where` with predicates: append after last predicate . (last_pred.span.shrink_to_hi(), format!(", {predicate_text}")) . } else { . // `where` token present but empty predicate list . (where_clause.span.shrink_to_hi(), format!(" {predicate_text}")) . }; . . edits.push((insert_at, suffix)); . } else { 414 ( 0.00%) let insert_at = match &f.sig.decl.output { 6 ( 0.00%) FnRetTy::Default(span) => span.shrink_to_lo(), 792 ( 0.00%) FnRetTy::Ty(ty) => ty.span.shrink_to_hi(), . }; 966 ( 0.00%) edits.push((insert_at, format!(" where {predicate_text}"))); . } . 1,104 ( 0.00%) span_lint_and_then( 116,638 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (138x) . cx, . INLINE_TRAIT_BOUNDS, 138 ( 0.00%) generics.span, . "inline trait bounds used", 552 ( 0.00%) |diag| { . diag.multipart_suggestion( . "move bounds to a `where` clause", . edits, . Applicability::MachineApplicable, . ); . }, . ); 276 ( 0.00%) } 5,244 ( 0.00%) => ???:__rustc::__rdl_dealloc (138x) . 695 ( 0.00%) fn build_predicate_text(cx: &EarlyContext<'_>, param: &GenericParam) -> String { . // bounds is guaranteed non-empty by the filter in `lint_fn` . let first = param.bounds.first().unwrap(); . let last = param.bounds.last().unwrap(); . 278 ( 0.00%) let bounds_span = first.span().to(last.span()); 12,927 ( 0.00%) => ???:::to (139x) . 139 ( 0.00%) let lhs = snippet(cx, param.ident.span, ".."); . . let rhs = snippet(cx, bounds_span, ".."); . 834 ( 0.00%) format!("{lhs}: {rhs}") 973 ( 0.00%) } 2,282 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs -------------------------------------------------------------------------------- Ir . use super::{Attribute, DEPRECATED_CFG_ATTR, DEPRECATED_CLIPPY_CFG_ATTR, unnecessary_clippy_cfg}; . use clippy_utils::diagnostics::span_lint_and_sugg; . use clippy_utils::msrvs::{self, MsrvStack}; . use clippy_utils::sym; . use rustc_ast::AttrStyle; . use rustc_errors::Applicability; . use rustc_lint::EarlyContext; . 45,256 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, attr: &Attribute, msrv: &MsrvStack) { . // check cfg_attr . if attr.has_name(sym::cfg_attr) 3,078 ( 0.00%) && let Some(items) = attr.meta_item_list() 897,860 ( 0.05%) => ???:::meta_item_list (513x) 1,026 ( 0.00%) && items.len() == 2 . && let Some(feature_item) = items[0].meta_item() . { . // check for `rustfmt` 2,565 ( 0.00%) if feature_item.has_name(sym::rustfmt) 4,104 ( 0.00%) => ???:::has_name (513x) . && msrv.meets(msrvs::TOOL_ATTRIBUTES) . // check for `rustfmt_skip` and `rustfmt::skip` . && let Some(skip_item) = &items[1].meta_item() . && (skip_item.has_name(sym::rustfmt_skip) . || skip_item . .path . .segments . .last() -- line 25 ---------------------------------------- -- line 36 ---------------------------------------- . DEPRECATED_CFG_ATTR, . attr.span, . "`cfg_attr` is deprecated for rustfmt and got replaced by tool attributes", . "use", . "#[rustfmt::skip]".to_string(), . Applicability::MachineApplicable, . ); . } else { 1,539 ( 0.00%) check_deprecated_cfg_recursively(cx, feature_item); 21,830 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively (513x) 1,539 ( 0.00%) if let Some(behind_cfg_attr) = items[1].meta_item() { 2,052 ( 0.00%) unnecessary_clippy_cfg::check(cx, feature_item, behind_cfg_attr, attr); 16,416 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/unnecessary_clippy_cfg.rs:clippy_lints::attrs::unnecessary_clippy_cfg::check (513x) . } . } . } 33,942 ( 0.00%) } . 45,256 ( 0.00%) pub(super) fn check_clippy(cx: &EarlyContext<'_>, attr: &Attribute) { . if attr.has_name(sym::cfg) 4,758 ( 0.00%) && let Some(list) = attr.meta_item_list() 619,506 ( 0.04%) => ???:::meta_item_list (793x) . { 3,172 ( 0.00%) for item in list.iter().filter_map(|item| item.meta_item()) { 2,379 ( 0.00%) check_deprecated_cfg_recursively(cx, item); 59,123 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively (793x) . } . } 39,599 ( 0.00%) } . 11,802 ( 0.00%) fn check_deprecated_cfg_recursively(cx: &EarlyContext<'_>, attr: &rustc_ast::MetaItem) { 13,418 ( 0.00%) if let Some(ident) = attr.ident() { 11,754 ( 0.00%) => ???:::ident (1,306x) . if matches!(ident.name, sym::any | sym::all | sym::not) { 828 ( 0.00%) let Some(list) = attr.meta_item_list() else { return }; 1,134 ( 0.00%) => ???:::meta_item_list (189x) 1,001 ( 0.00%) for item in list.iter().filter_map(|item| item.meta_item()) { 1,140 ( 0.00%) check_deprecated_cfg_recursively(cx, item); 18,504 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively'2 (346x) . } . } else { . check_cargo_clippy_attr(cx, attr); . } . } 8,430 ( 0.00%) } . . fn check_cargo_clippy_attr(cx: &EarlyContext<'_>, item: &rustc_ast::MetaItem) { 7,395 ( 0.00%) if item.has_name(sym::feature) && item.value_str() == Some(sym::cargo_clippy) { 8,936 ( 0.00%) => ???:::has_name (1,117x) . span_lint_and_sugg( . cx, . DEPRECATED_CLIPPY_CFG_ATTR, . item.span, . "`feature = \"cargo-clippy\"` was replaced by `clippy`", . "replace with", . "clippy".to_string(), . Applicability::MachineApplicable, -- line 84 ---------------------------------------- 2,686 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_ast::Mutability; . use rustc_hir::{Expr, ExprKind, Node}; . use rustc_lint::LateContext; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_middle::ty::{self, Ty, TypeAndMut}; . . use super::CAST_SLICE_DIFFERENT_SIZES; . 299,134 ( 0.02%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>, msrv: Msrv) { . // if this cast is the child of another cast expression then don't emit something for it, the full . // chain will be analyzed 101,947 ( 0.01%) if is_child_of_cast(cx, expr) { . return; . } . 27,137 ( 0.00%) if let Some(CastChainInfo { . left_cast, . start_ty, . end_ty, 135,685 ( 0.01%) }) = expr_cast_chain_tys(cx, expr) 671,537 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys (27,137x) . && let (Ok(from_layout), Ok(to_layout)) = (cx.layout_of(start_ty.ty), cx.layout_of(end_ty.ty)) . { . let from_size = from_layout.size.bytes(); . let to_size = to_layout.size.bytes(); . if from_size != to_size . && from_size != 0 . && to_size != 0 . && msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) -- line 31 ---------------------------------------- -- line 58 ---------------------------------------- . format!("replace with `ptr::slice_from_raw_parts{mutbl_fn_str}`"), . sugg, . rustc_errors::Applicability::HasPlaceholders, . ); . }, . ); . } . } 217,552 ( 0.01%) } . . fn is_child_of_cast(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 54,388 ( 0.00%) let parent = cx.tcx.parent_hir_node(expr.hir_id); 3,000,176 ( 0.17%) => ???:::parent_hir_node (27,194x) 131,692 ( 0.01%) let expr = match parent { 2,139 ( 0.00%) Node::Block(block) => { 6,417 ( 0.00%) if let Some(parent_expr) = block.expr { . parent_expr . } else { . return false; . } . }, 36,452 ( 0.00%) Node::Expr(expr) => expr, . _ => return false, . }; . 20,365 ( 0.00%) matches!(expr.kind, ExprKind::Cast(..)) . } . . /// Returns the type T of the pointed to *const [T] or *mut [T] and the mutability of the slice if . /// the type is one of those slices . fn get_raw_slice_ty_mut(ty: Ty<'_>) -> Option> { 114 ( 0.00%) match ty.kind() { 132 ( 0.00%) ty::RawPtr(slice_ty, mutbl) => match slice_ty.kind() { . ty::Slice(ty) => Some(TypeAndMut { ty: *ty, mutbl: *mutbl }), . _ => None, . }, . _ => None, . } . } . . struct CastChainInfo<'tcx> { -- line 97 ---------------------------------------- -- line 102 ---------------------------------------- . start_ty: TypeAndMut<'tcx>, . /// The final type of the cast chain . end_ty: TypeAndMut<'tcx>, . } . . /// Returns a `CastChainInfo` with the left-most cast in the chain and the original ptr T and final . /// ptr U if the expression is composed of casts. . /// Returns None if the expr is not a Cast 217,096 ( 0.01%) fn expr_cast_chain_tys<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option> { 27,080 ( 0.00%) if let ExprKind::Cast(cast_expr, _cast_to_hir_ty) = expr.peel_blocks().kind { 171 ( 0.00%) let cast_to = cx.typeck_results().expr_ty(expr); 2,280 ( 0.00%) => ???:::expr_ty (57x) . let to_slice_ty = get_raw_slice_ty_mut(cast_to)?; . . // If the expression that makes up the source of this cast is itself a cast, recursively . // call `expr_cast_chain_tys` and update the end type with the final target type. . // Otherwise, this cast is not immediately nested, just construct the info for this cast . if let Some(prev_info) = expr_cast_chain_tys(cx, cast_expr) { . Some(CastChainInfo { . end_ty: to_slice_ty, -- line 120 ---------------------------------------- -- line 125 ---------------------------------------- . let from_slice_ty = get_raw_slice_ty_mut(cast_from)?; . Some(CastChainInfo { . left_cast: cast_expr, . start_ty: from_slice_ty, . end_ty: to_slice_ty, . }) . } . } else { 27,080 ( 0.00%) None . } 217,096 ( 0.01%) } 81,468 ( 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/visit.rs -------------------------------------------------------------------------------- Ir -- line 81 ---------------------------------------- . } . . impl<'a, V: Visitor<'a>, T: ?Sized> Visitable<'a, V> for Box . where . T: Visitable<'a, V>, . { . type Extra = T::Extra; . fn visit(&'a self, visitor: &mut V, extra: Self::Extra) -> V::Result { 13,808 ( 0.00%) (**self).visit(visitor, extra) . } . } . . impl<'a, V: Visitor<'a>, T> Visitable<'a, V> for Option . where . T: Visitable<'a, V>, . { . type Extra = T::Extra; . fn visit(&'a self, visitor: &mut V, extra: Self::Extra) -> V::Result { 82,426 ( 0.00%) if let Some(this) = self { . try_visit!(this.visit(visitor, extra)); . } . V::Result::output() . } . } . . impl<'a, V: Visitor<'a>, T> Visitable<'a, V> for Spanned . where -- line 107 ---------------------------------------- -- line 197 ---------------------------------------- . . pub(crate) trait Walkable<'a, V: Visitor<'a>> { . #[must_use] . fn walk_ref(&'a self, visitor: &mut V) -> V::Result; . } . . macro_rules! visit_visitable { . ($visitor:expr, $($expr:expr),* $(,)?) => {{ 489 ( 0.00%) $(try_visit!(Visitable::visit($expr, $visitor, ()));)* 190 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_ref (5x) . }}; . } . . macro_rules! visit_visitable_with { . ($visitor:expr, $expr:expr, $extra:expr $(,)?) => { . try_visit!(Visitable::visit($expr, $visitor, $extra)) . }; . } . . macro_rules! walk_walkable { . ($visitor:expr, $expr:expr, ) => { 64,166 ( 0.00%) Walkable::walk_ref($expr, $visitor) 285,141 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_ref (838x) . }; . } . . macro_rules! impl_visitable { . (|&$lt:lifetime $self:ident: $self_ty:ty, . $vis:ident: &mut $vis_ty:ident, . $extra:ident: $extra_ty:ty| $block:block) => { . #[allow(unused_parens, non_local_definitions)] -- line 225 ---------------------------------------- -- line 232 ---------------------------------------- . }; . } . . macro_rules! impl_walkable { . ($(<$K:ident: $Kb:ident>)? |&$lt:lifetime $self:ident: $self_ty:ty, . $vis:ident: &mut $vis_ty:ident| $block:block) => { . #[allow(unused_parens, non_local_definitions)] . impl<$($K: $Kb,)? $lt, $vis_ty: Visitor<$lt>> Walkable<$lt, $vis_ty> for $self_ty { 149,989 ( 0.01%) fn walk_ref(&$lt $self, $vis: &mut $vis_ty) -> V::Result { . $block 127,888 ( 0.01%) } . } . }; . } . . macro_rules! impl_visitable_noop { . (<$lt:lifetime> $($ty:ty,)*) => { . $( . impl_visitable!(|&$lt self: $ty, _vis: &mut V, _extra: ()| { -- line 250 ---------------------------------------- -- line 273 ---------------------------------------- . })* . }; . } . . macro_rules! impl_visitable_direct { . (<$lt:lifetime> $($ty:ty,)*) => { . $(impl_visitable!( . |&$lt self: $ty, visitor: &mut V, _extra: ()| { 18 ( 0.00%) Walkable::walk_ref(self, visitor) . } . );)* . }; . } . . macro_rules! impl_visitable_calling_walkable { . (<$lt:lifetime> . $( fn $method:ident($ty:ty $(, $extra_name:ident: $extra_ty:ty)?); )* . ) => { . $(fn $method(&mut self, node: &$lt $ty $(, $extra_name:$extra_ty)?) -> Self::Result { . impl_visitable!(|&$lt self: $ty, visitor: &mut V, extra: ($($extra_ty)?)| { . let ($($extra_name)?) = extra; 6,459 ( 0.00%) visitor.$method(self $(, $extra_name)?) 672,289 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block (420x) . }); . walk_walkable!(self, node, ) . })* . }; . } . . macro_rules! define_named_walk { . ($Visitor:ident<$lt:lifetime> -- line 302 ---------------------------------------- -- line 655 ---------------------------------------- . // for `MutVisitor`: `Span` and `NodeId` are mutated at the caller site. . fn visit_fn( . &mut self, . fk: FnKind<$($lt)? $(${ignore($mut)} '_)?>, . _: &AttrVec, . _: Span, . _: NodeId, . ) -> Self::Result { 85 ( 0.00%) walk_fn(self, fk) 12,812 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:rustc_ast::visit::walk_fn:: (4x) . } . . // (non-mut) `Visitor`-only methods . $( . fn visit_stmt(&mut self, s: &$lt Stmt) -> Self::Result { 10,383 ( 0.00%) walk_stmt(self, s) 757,143 ( 0.04%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:rustc_ast::visit::walk_stmt::'2 (896x) . } . . fn visit_nested_use_tree(&mut self, use_tree: &$lt UseTree, id: NodeId) -> Self::Result { . try_visit!(self.visit_id(id)); . self.visit_use_tree(use_tree) . } . )? . -- line 677 ---------------------------------------- -- line 738 ---------------------------------------- . fn flat_map_where_predicate( . &mut self, . where_predicate: WherePredicate, . ) -> SmallVec<[WherePredicate; 1]> { . walk_flat_map_where_predicate(self, where_predicate) . } . . fn flat_map_pat_field(&mut self, fp: PatField) -> SmallVec<[PatField; 1]> { 24 ( 0.00%) walk_flat_map_pat_field(self, fp) 492 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/mut_visit.rs:rustc_ast::mut_visit::walk_flat_map_pat_field:: (6x) . } . )? . } . . pub trait WalkItemKind { . type Ctxt; . fn walk<$($lt,)? V: $Visitor$(<$lt>)?>( . &$($lt)? $($mut)? self, -- line 754 ---------------------------------------- -- line 922 ---------------------------------------- . visit_visitable!($($mut)? vis, alias), . ForeignItemKind::MacCall(mac) => . visit_visitable!($($mut)? vis, mac), . } . V::Result::output() . } . } . 680 ( 0.00%) pub fn walk_fn<$($lt,)? V: $Visitor$(<$lt>)?>(vis: &mut V, kind: FnKind<$($lt)? $(${ignore($mut)} '_)?>) -> V::Result { 255 ( 0.00%) match kind { . FnKind::Fn( . _ctxt, . // Visibility is visited as a part of the item. . _vis, . Fn { defaultness, ident, sig, generics, contract, body, define_opaque, eii_impl }, . ) => { . let FnSig { header, decl, span } = sig; . visit_visitable!($($mut)? vis, . defaultness, ident, header, generics, decl, . contract, body, span, define_opaque, eii_impl . ); . } 85 ( 0.00%) FnKind::Closure(binder, coroutine_kind, decl, body) => . visit_visitable!($($mut)? vis, binder, coroutine_kind, decl, body), . } . V::Result::output() . } . . impl_walkable!(|&$($mut)? $($lt)? self: Impl, vis: &mut V| { . let Impl { generics, of_trait, self_ty, items, constness: _ } = self; . try_visit!(vis.visit_generics(generics)); -- line 952 ---------------------------------------- -- line 957 ---------------------------------------- . try_visit!(vis.visit_ty(self_ty)); . visit_visitable_with!($($mut)? vis, items, AssocCtxt::Impl { of_trait: of_trait.is_some() }); . V::Result::output() . }); . . // Special case to call `visit_method_receiver_expr`. . impl_walkable!(|&$($mut)? $($lt)? self: MethodCall, vis: &mut V| { . let MethodCall { seg, receiver, args, span } = self; 2,674 ( 0.00%) try_visit!(vis.visit_method_receiver_expr(receiver)); . visit_visitable!($($mut)? vis, seg, args, span); . V::Result::output() . }); . . impl_walkable!(|&$($mut)? $($lt)? self: Expr, vis: &mut V| { . let Expr { id, kind, span, attrs, tokens: _ } = self; . visit_visitable!($($mut)? vis, id, attrs); 102,955 ( 0.01%) match kind { . ExprKind::Array(exprs) => . visit_visitable!($($mut)? vis, exprs), . ExprKind::ConstBlock(anon_const) => . visit_visitable!($($mut)? vis, anon_const), . ExprKind::Repeat(element, count) => . visit_visitable!($($mut)? vis, element, count), . ExprKind::Struct(se) => . visit_visitable!($($mut)? vis, se), -- line 981 ---------------------------------------- -- line 994 ---------------------------------------- . ExprKind::Cast(subexpression, typ) | ExprKind::Type(subexpression, typ) => . visit_visitable!($($mut)? vis, subexpression, typ), . ExprKind::Let(pat, expr, span, _recovered) => . visit_visitable!($($mut)? vis, pat, expr, span), . ExprKind::If(head_expression, if_block, optional_else) => . visit_visitable!($($mut)? vis, head_expression, if_block, optional_else), . ExprKind::While(subexpression, block, opt_label) => . visit_visitable!($($mut)? vis, subexpression, block, opt_label), 30 ( 0.00%) ExprKind::ForLoop(ForLoop { pat, iter, body, label, kind }) => . visit_visitable!($($mut)? vis, pat, iter, body, label, kind), . ExprKind::Loop(block, opt_label, span) => . visit_visitable!($($mut)? vis, block, opt_label, span), . ExprKind::Match(subexpression, arms, kind) => . visit_visitable!($($mut)? vis, subexpression, arms, kind), . ExprKind::Closure(Closure { 85 ( 0.00%) binder, . capture_clause, 85 ( 0.00%) coroutine_kind, . constness, . movability, 85 ( 0.00%) fn_decl, 85 ( 0.00%) body, . fn_decl_span, . fn_arg_span, . }) => { . visit_visitable!($($mut)? vis, constness, movability, capture_clause); 340 ( 0.00%) let kind = FnKind::Closure(binder, coroutine_kind, fn_decl, body); . try_visit!(vis.visit_fn(kind, attrs, *span, *id)); . visit_visitable!($($mut)? vis, fn_decl_span, fn_arg_span); 85 ( 0.00%) } . ExprKind::Block(block, opt_label) => . visit_visitable!($($mut)? vis, block, opt_label), . ExprKind::Gen(capt, body, kind, decl_span) => . visit_visitable!($($mut)? vis, capt, body, kind, decl_span), . ExprKind::Await(expr, span) . | ExprKind::Move(expr, span) . | ExprKind::Use(expr, span) => . visit_visitable!($($mut)? vis, expr, span), . ExprKind::Assign(lhs, rhs, span) => . visit_visitable!($($mut)? vis, lhs, rhs, span), . ExprKind::AssignOp(op, lhs, rhs) => . visit_visitable!($($mut)? vis, op, lhs, rhs), 3 ( 0.00%) ExprKind::Field(subexpression, ident) => 3 ( 0.00%) visit_visitable!($($mut)? vis, subexpression, ident), . ExprKind::Index(main_expression, index_expression, span) => . visit_visitable!($($mut)? vis, main_expression, index_expression, span), . ExprKind::Range(start, end, limit) => . visit_visitable!($($mut)? vis, start, end, limit), . ExprKind::Underscore => {} . ExprKind::Path(maybe_qself, path) => . visit_visitable!($($mut)? vis, maybe_qself, path), . ExprKind::Break(opt_label, opt_expr) => -- line 1045 ---------------------------------------- -- line 1161 ---------------------------------------- . . fn $name<'a, V: Visitor<'a>>( . vis: &mut V, . values: &'a ThinVec<$Ty>, . $( . $param: $ParamTy, . )* . ) -> V::Result { 6,135 ( 0.00%) walk_list!(vis, $visit_fn, values$(,$param)*); 358,793 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_arm (481x) . V::Result::output() . } . )+ . } . } . . generate_list_visit_fns! { . visit_items, Box, visit_item; -- line 1177 ---------------------------------------- -- line 1184 ---------------------------------------- . visit_variants, Variant, visit_variant; . visit_assoc_items, Box, visit_assoc_item, ctxt: AssocCtxt; . visit_where_predicates, WherePredicate, visit_where_predicate; . visit_params, Param, visit_param; . visit_field_defs, FieldDef, visit_field_def; . visit_arms, Arm, visit_arm; . } . 32,056 ( 0.00%) pub fn walk_stmt<'a, V: Visitor<'a>>(visitor: &mut V, statement: &'a Stmt) -> V::Result { . let Stmt { id, kind, span: _ } = statement; . try_visit!(visitor.visit_id(*id)); 20,035 ( 0.00%) match kind { 6,500 ( 0.00%) StmtKind::Let(local) => try_visit!(visitor.visit_local(local)), 426,039 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_local (357x) . StmtKind::Item(item) => try_visit!(visitor.visit_item(item)), 3,332 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => try_visit!(visitor.visit_expr(expr)), . StmtKind::Empty => {} . StmtKind::MacCall(mac) => { . let MacCallStmt { mac, attrs, style: _, tokens: _ } = &**mac; . walk_list!(visitor, visit_attribute, attrs); . try_visit!(visitor.visit_mac_call(mac)); . } . } . V::Result::output() 200 ( 0.00%) } 60,981 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . . /// This field is used for assigning DepNodeIndices when running in . /// non-incremental mode. Even in non-incremental mode we make sure that . /// each task has a `DepNodeIndex` that uniquely identifies it. This unique . /// ID is used for self-profiling. . virtual_dep_node_index: Arc, . } . 93,055 ( 0.01%) rustc_index::newtype_index! { . pub struct DepNodeIndex {} . } . . // We store a large collection of these in `prev_index_to_index` during . // non-full incremental builds, and want to ensure that the element size . // doesn't inadvertently increase. . rustc_data_structures::static_assert_size!(Option, 4); . -- line 76 ---------------------------------------- -- line 500 ---------------------------------------- . hashing_timer.finish_with_query_invocation_id(dep_node_index.into()); . dep_node_index . } . } . . impl DepGraph { . #[inline] . pub fn read_index(&self, dep_node_index: DepNodeIndex) { 155,132 ( 0.01%) if let Some(ref data) = self.data { . read_deps(|task_deps| { 154,518 ( 0.01%) let mut task_deps = match task_deps { . TaskDepsRef::Allow(deps) => deps.lock(), . TaskDepsRef::EvalAlways => { . // We don't need to record dependencies of eval_always . // queries. They are re-evaluated unconditionally anyway. . return; . } . TaskDepsRef::Ignore => return, . TaskDepsRef::Forbid => { -- line 518 ---------------------------------------- 41,963 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . }; . use rustc_lint::LateContext; . use rustc_span::hygiene::walk_chain; . use rustc_span::source_map::SourceMap; . use rustc_span::{Span, Symbol, SyntaxContext}; . . use super::BRANCHES_SHARING_CODE; . 999 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . conds: &[&'tcx Expr<'_>], . blocks: &[&'tcx Block<'_>], . expr: &'tcx Expr<'_>, . ) { . // We only lint ifs with multiple blocks 222 ( 0.00%) let &[first_block, ref blocks @ ..] = blocks else { . return; . }; 333 ( 0.00%) let &[.., last_block] = blocks else { . return; . }; . . let res = scan_block_for_eq(cx, conds, first_block, blocks); . let sm = cx.tcx.sess.source_map(); . let start_suggestion = res.start_span(first_block, sm).map(|span| { . let first_line_span = first_line_of_span(cx, expr.span); . let replace_span = first_line_span.with_hi(span.hi()); -- line 41 ---------------------------------------- -- line 59 ---------------------------------------- . .map_range(cx, |_, src, range| { . (range.start > 4 && src.get(range.start - 4..range.start)? == " ") . .then_some(range.start - 4..range.end) . }) . .map_or(span, |range| range.with_ctxt(span.ctxt())); . (span, suggestion.clone()) . }); . 444 ( 0.00%) let (span, msg, end_span) = match (&start_suggestion, &end_suggestion) { . (&Some((span, _)), &Some((end_span, _))) => ( . span, . "all if blocks contain the same code at both the start and the end", . Some(end_span), . ), . (&Some((span, _)), None) => (span, "all if blocks contain the same code at the start", None), . (None, &Some((span, _))) => (span, "all if blocks contain the same code at the end", None), . (None, None) => return, -- line 75 ---------------------------------------- -- line 96 ---------------------------------------- . if is_expr_parent_assignment(cx, expr) || !cx.typeck_results().expr_ty(expr).is_unit() { . diag.note("the end suggestion probably needs some adjustments to use the expression result correctly"); . } . } . if check_for_warn_of_moved_symbol(cx, &res.moved_locals, expr) { . diag.warn("some moved values might need to be renamed to avoid wrong references"); . } . }); 888 ( 0.00%) } . . /// Detects `match` expressions where every arm's body is a block ending in the same trailing . /// expression, so that expression can be hoisted out below the `match`. . /// . /// ```ignore . /// match mode { . /// Mode::A => { a(); Ok(()) } . /// Mode::B => { b(); Ok(()) } -- line 112 ---------------------------------------- -- line 115 ---------------------------------------- . /// can become . /// ```ignore . /// match mode { . /// Mode::A => a(), . /// Mode::B => b(), . /// } . /// Ok(()) . /// ``` 4,240 ( 0.00%) pub(super) fn check_match<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, arms: &'tcx [Arm<'tcx>]) { 1,060 ( 0.00%) if arms.len() < 2 { . return; . } . . // We only move the shared expression after the `match`, so the `match` must be in tail position . // of its block. Cheapest, most selective check, so do it first. 2,084 ( 0.00%) if !is_expr_final_block_expr(cx.tcx, expr) { 62,209 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_final_block_expr (521x) . return; . } . . // Each arm body must be a block with a trailing expression. . let mut blocks = Vec::with_capacity(arms.len()); . for arm in arms { 513 ( 0.00%) let ExprKind::Block(block, None) = arm.body.kind else { . return; . }; 96 ( 0.00%) let Some(tail) = block.expr else { . return; . }; 68 ( 0.00%) if block.span.from_expansion() || tail.span.from_expansion() { . return; . } . // Same drop-order concern for arm-locals dropped at the end of the arm. 17 ( 0.00%) let arm_local_needs_ordered_drop = block.stmts.iter().any(|stmt| { 132 ( 0.00%) matches!(stmt.kind, StmtKind::Let(l) if needs_ordered_drop(cx, cx.typeck_results().node_type(l.hir_id))) 414,339 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::needs_ordered_drop (14x) 574 ( 0.00%) => ???:::node_type (14x) . }); . if arm_local_needs_ordered_drop { . return; . } . blocks.push((block, tail)); . } . . // All tails must be equal. This also rules out tails referencing an arm-local: those have a . // distinct `HirId` per arm and so never compare equal. 1 ( 0.00%) let first = blocks[0].1; . let mut eq = SpanlessEq::new(cx); . if !blocks[1..] . .iter() 4 ( 0.00%) .all(|&(_, t)| eq.eq_expr(SyntaxContext::root(), first, t)) 520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1x) . { . return; . } . . // Don't bother for a `()` tail: nothing worth moving. . if matches!(first.kind, ExprKind::Tup([])) { . return; . } -- line 170 ---------------------------------------- -- line 201 ---------------------------------------- . suggestions, . Applicability::Unspecified, . ); . diag.note( . "the suggestion may need adjustments to preserve drop order or to use the expression result correctly", . ); . }, . ); 4,487 ( 0.00%) } . . struct BlockEq { . /// The end of the range of equal stmts at the start. . start_end_eq: usize, . /// The start of the range of equal stmts at the end. . end_begin_eq: Option, . /// The name and id of every local which can be moved at the beginning and the end. . moved_locals: Vec<(HirId, Symbol)>, . } . . impl BlockEq { . fn start_span(&self, b: &Block<'_>, sm: &SourceMap) -> Option { 111 ( 0.00%) match &b.stmts[..self.start_end_eq] { 222 ( 0.00%) [first, .., last] => Some(sm.stmt_span(first.span, b.span).to(sm.stmt_span(last.span, b.span))), 111 ( 0.00%) [s] => Some(sm.stmt_span(s.span, b.span)), . [] => None, . } . } . . fn end_span(&self, b: &Block<'_>, sm: &SourceMap) -> Option { 102 ( 0.00%) match (&b.stmts[b.stmts.len() - self.end_begin_eq?..], b.expr) { 51 ( 0.00%) ([first, .., last], None) => Some(sm.stmt_span(first.span, b.span).to(sm.stmt_span(last.span, b.span))), 34 ( 0.00%) ([first, ..], Some(last)) => Some(sm.stmt_span(first.span, b.span).to(sm.stmt_span(last.span, b.span))), . ([s], None) => Some(sm.stmt_span(s.span, b.span)), . ([], Some(e)) => Some(walk_chain(e.span, b.span.ctxt())), . ([], None) => None, . } . } . } . . /// If the statement is a local, checks if the bound names match the expected list of names. . fn eq_binding_names(cx: &LateContext<'_>, s: &Stmt<'_>, names: &[(HirId, Symbol)]) -> bool { 30 ( 0.00%) match s.kind { 5 ( 0.00%) StmtKind::Let(l) => { 5 ( 0.00%) let mut i = 0usize; 5 ( 0.00%) let mut res = true; 35 ( 0.00%) l.pat.each_binding_or_first(&mut |_, _, _, name| { 20 ( 0.00%) if names.get(i).is_some_and(|&(_, n)| n == name.name) { . i += 1; . } else { 10 ( 0.00%) res = false; . } . }); . res && i == names.len() . }, . StmtKind::Item(item_id) . if let [(_, name)] = names . && let item = cx.tcx.hir_item(item_id) . && let ItemKind::Static(_, ident, ..) -- line 258 ---------------------------------------- -- line 266 ---------------------------------------- . }, . _ => false, . } . } . . /// Checks if the statement modifies or moves any of the given locals. . fn modifies_any_local<'tcx>(cx: &LateContext<'tcx>, s: &'tcx Stmt<'_>, locals: &HirIdSet) -> bool { . for_each_expr_without_closures(s, |e| { 86 ( 0.00%) if let Some(id) = e.res_local_id() 86 ( 0.00%) && locals.contains(&id) 148 ( 0.00%) && !capture_local_usage(cx, e).is_imm_ref() 1,369 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::capture_local_usage (5x) . { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } -- line 284 ---------------------------------------- -- line 288 ---------------------------------------- . fn eq_stmts( . cx: &LateContext<'_>, . stmt: &Stmt<'_>, . blocks: &[&Block<'_>], . get_stmt: impl for<'a> Fn(&'a Block<'a>) -> Option<&'a Stmt<'a>>, . eq: &mut HirEqInterExpr<'_, '_, '_>, . moved_bindings: &mut Vec<(HirId, Symbol)>, . ) -> bool { 19 ( 0.00%) (if let StmtKind::Let(l) = stmt.kind { . let old_count = moved_bindings.len(); 57 ( 0.00%) l.pat.each_binding_or_first(&mut |_, id, _, name| { . moved_bindings.push((id, name.name)); . }); . let new_bindings = &moved_bindings[old_count..]; . blocks . .iter() 16 ( 0.00%) .all(|b| get_stmt(b).is_some_and(|s| eq_binding_names(cx, s, new_bindings))) . } else { . true . }) && blocks.iter().all(|b| { 16 ( 0.00%) get_stmt(b).is_some_and(|s| { . eq.set_eval_ctxt(SyntaxContext::root()); 80 ( 0.00%) eq.eq_stmt(s, stmt) 12,886 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_stmt (16x) . }) . }) . } . . #[expect(clippy::too_many_lines)] . fn scan_block_for_eq<'tcx>( . cx: &LateContext<'tcx>, . conds: &[&'tcx Expr<'_>], . block: &'tcx Block<'_>, . blocks: &[&'tcx Block<'_>], . ) -> BlockEq { . let mut eq = SpanlessEq::new(cx); 222 ( 0.00%) let mut eq = eq.inter_expr(SyntaxContext::root()); 1,998 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::inter_expr (111x) . let mut moved_locals = Vec::new(); . . let mut cond_locals = HirIdSet::default(); 185 ( 0.00%) for &cond in conds { . let _: Option = for_each_expr_without_closures(cond, |e| { . if let Some(id) = e.res_local_id() { . cond_locals.insert(id); . } . ControlFlow::Continue(()) . }); . } . . let mut local_needs_ordered_drop = false; 222 ( 0.00%) let start_end_eq = block . .stmts . .iter() . .enumerate() . .find(|&(i, stmt)| { 191 ( 0.00%) if let StmtKind::Let(l) = stmt.kind 161 ( 0.00%) && needs_ordered_drop(cx, cx.typeck_results().node_type(l.hir_id)) 1,563,414 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::needs_ordered_drop (23x) 943 ( 0.00%) => ???:::node_type (23x) . { . local_needs_ordered_drop = true; . return true; . } 76 ( 0.00%) modifies_any_local(cx, stmt, &cond_locals) . || !eq_stmts(cx, stmt, blocks, |b| b.stmts.get(i), &mut eq, &mut moved_locals) . }) . .map_or(block.stmts.len(), |(i, stmt)| { . adjust_by_closest_callsite(i, stmt, block.stmts[..i].iter().enumerate().rev()) . }); . 84 ( 0.00%) if local_needs_ordered_drop { . return BlockEq { . start_end_eq, . end_begin_eq: None, . moved_locals, . }; . } . . // Walk backwards through the final expression/statements so long as their hashes are equal. Note . // `SpanlessHash` treats all local references as equal allowing locals declared earlier in the block . // to match those in other blocks. e.g. If each block ends with the following the hash value will be . // the same even though each `x` binding will have a different `HirId`: . // let x = foo(); . // x + 50 445 ( 0.00%) let expr_hash_eq = if let Some(e) = block.expr { 90 ( 0.00%) let hash = hash_expr(cx, e); 221,529 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::hash_expr (90x) 261 ( 0.00%) blocks.iter().all(|b| b.expr.is_some_and(|e| hash_expr(cx, e) == hash)) 134,579 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::hash_expr (85x) . } else { . blocks.iter().all(|b| b.expr.is_none()) . }; . if !expr_hash_eq { . return BlockEq { . start_end_eq, . end_begin_eq: None, . moved_locals, . }; . } . let end_search_start = block.stmts[start_end_eq..] . .iter() . .rev() . .enumerate() . .find(|&(offset, stmt)| { 51 ( 0.00%) let hash = hash_stmt(cx, stmt); 28,108 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::hash_stmt (17x) . blocks.iter().any(|b| { . b.stmts . // the bounds check will catch the underflow . .get(b.stmts.len().wrapping_sub(offset + 1)) 34 ( 0.00%) .is_none_or(|s| hash != hash_stmt(cx, s)) 29,473 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::hash_stmt (17x) . }) . }) . .map_or(block.stmts.len() - start_end_eq, |(i, stmt)| { 17 ( 0.00%) adjust_by_closest_callsite(i, stmt, (0..i).rev().zip(block.stmts[(block.stmts.len() - i)..].iter())) . }); . . let moved_locals_at_start = moved_locals.len(); . let mut i = end_search_start; . let end_begin_eq = block.stmts[block.stmts.len() - end_search_start..] . .iter() . .zip(iter::repeat_with(move || { . let x = i; -- line 404 ---------------------------------------- -- line 440 ---------------------------------------- . }, . _ => {}, . } . } . moved_locals.truncate(moved_locals_at_start); . offset - 1 . } . }); 17 ( 0.00%) if let Some(e) = block.expr { . for block in blocks { . eq.set_eval_ctxt(SyntaxContext::root()); . if block.expr.is_some_and(|expr| !eq.eq_expr(expr, e)) { . moved_locals.truncate(moved_locals_at_start); . return BlockEq { . start_end_eq, . end_begin_eq: None, . moved_locals, . }; . } . } . } . 51 ( 0.00%) BlockEq { . start_end_eq, . end_begin_eq: Some(end_begin_eq), 85 ( 0.00%) moved_locals, . } 239 ( 0.00%) } 1,776 ( 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:: (111x) . . /// Adjusts the index for which the statements begin to differ to the closest macro callsite. . /// This avoids giving suggestions that requires splitting a macro call in half, when only a . /// part of the macro expansion is equal. . /// . /// For example, for the following macro: . /// ```rust,ignore . /// macro_rules! foo { -- line 475 ---------------------------------------- 4,034 ( 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) { 2,955 ( 0.00%) if let ItemKind::Use(ref use_tree) = item.kind { 1,389 ( 0.00%) check_use_tree(use_tree, cx, item.span); 32,022 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree (463x) . } . } . } . 9,765 ( 0.00%) fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) { 6,349 ( 0.00%) match use_tree.kind { 75 ( 0.00%) UseTreeKind::Simple(Some(new_name)) => { 26 ( 0.00%) if new_name.as_str() == "_" { 448 ( 0.00%) => ???:::as_str (14x) . return; . } 4 ( 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, .. } => { 474 ( 0.00%) for (use_tree, _) in items { 1,866 ( 0.00%) check_use_tree(use_tree, cx, span); 14,505 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree'2 (622x) . } . }, . } 8,680 ( 0.00%) } . . 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(); 8 ( 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 { 8 ( 0.00%) name.contains("Unsafe") || name.contains("unsafe") . } 1,273 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . pub MAYBE_INFINITE_ITER, . pedantic, . "possible infinite iteration" . } . . declare_lint_pass!(InfiniteIter => [INFINITE_ITER, MAYBE_INFINITE_ITER]); . . impl<'tcx> LateLintPass<'tcx> for InfiniteIter { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 48 ( 0.00%) let (lint, msg) = match complete_infinite_iter(cx, expr) { . Infinite => (INFINITE_ITER, "infinite iteration detected"), . MaybeInfinite => (MAYBE_INFINITE_ITER, "possible infinite iteration detected"), . Finite => { . return; . }, . }; . span_lint(cx, lint, expr.span, msg); 163,164 ( 0.01%) } . } . . #[derive(Copy, Clone, Debug, PartialEq, Eq)] . enum Finiteness { . Infinite, . MaybeInfinite, . Finite, . } . . use self::Finiteness::{Finite, Infinite, MaybeInfinite}; . . impl Finiteness { . #[must_use] . fn and(self, b: Self) -> Self { 267 ( 0.00%) match (self, b) { . (Finite, _) | (_, Finite) => Finite, . (MaybeInfinite, _) | (_, MaybeInfinite) => MaybeInfinite, . _ => Infinite, . } . } . . #[must_use] . fn or(self, b: Self) -> Self { -- line 88 ---------------------------------------- -- line 91 ---------------------------------------- . (MaybeInfinite, _) | (_, MaybeInfinite) => MaybeInfinite, . _ => Finite, . } . } . } . . impl From for Finiteness { . fn from(b: bool) -> Self { 21 ( 0.00%) if b { Infinite } else { Finite } . } . } . . /// This tells us what to look for to know if the iterator returned by . /// this method is infinite . #[derive(Copy, Clone)] . enum Heuristic { . /// infinite no matter what -- line 107 ---------------------------------------- -- line 138 ---------------------------------------- . (sym::filter, 1, First, Infinite), . (sym::filter_map, 1, First, Infinite), . (sym::flat_map, 1, First, Infinite), . (sym::unzip, 0, First, Infinite), . (sym::take_while, 1, First, MaybeInfinite), . (sym::scan, 2, First, MaybeInfinite), . ]; . 2,750 ( 0.00%) fn is_infinite(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness { 2,200 ( 0.00%) match expr.kind { 140 ( 0.00%) ExprKind::MethodCall(method, receiver, args, _) => { . for &(name, len, heuristic, cap) in &HEURISTICS { 1,330 ( 0.00%) if method.ident.name == name && args.len() == len { . return (match heuristic { . Always => Infinite, . First => is_infinite(cx, receiver), . Any => is_infinite(cx, receiver).or(is_infinite(cx, &args[0])), . All => is_infinite(cx, receiver).and(is_infinite(cx, &args[0])), . }) . .and(cap); . } -- line 158 ---------------------------------------- -- line 163 ---------------------------------------- . { . let body = cx.tcx.hir_body(body); . return is_infinite(cx, body.value); . } . Finite . }, . ExprKind::Block(block, _) => block.expr.as_ref().map_or(Finite, |e| is_infinite(cx, e)), . ExprKind::AddrOf(BorrowKind::Ref, _, e) => is_infinite(cx, e), 7 ( 0.00%) ExprKind::Call(path, _) => { 21 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind { 42 ( 0.00%) cx.qpath_res(qpath, path.hir_id) 216 ( 0.00%) => ???:::qpath_res (7x) . .opt_def_id() 21 ( 0.00%) .is_some_and(|id| cx.tcx.is_diagnostic_item(sym::iter_repeat, id)) 378 ( 0.00%) => ???:::is_diagnostic_item (7x) . .into() . } else { . Finite . } . }, . ExprKind::Struct(..) => higher::Range::hir(cx, expr).is_some_and(|r| r.end.is_none()).into(), . _ => Finite, . } 1,925 ( 0.00%) } . . /// the names and argument lengths of methods that *may* exhaust their . /// iterators . const POSSIBLY_COMPLETING_METHODS: [(Symbol, usize); 6] = [ . (sym::find, 1), . (sym::rfind, 1), . (sym::position, 1), . (sym::rposition, 1), -- line 192 ---------------------------------------- -- line 207 ---------------------------------------- . (sym::min, 0), . (sym::min_by, 1), . (sym::min_by_key, 1), . (sym::sum, 0), . (sym::product, 0), . ]; . . fn complete_infinite_iter(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness { 135,206 ( 0.01%) match expr.kind { 8,040 ( 0.00%) ExprKind::MethodCall(method, receiver, args, _) => { 2,680 ( 0.00%) let method_str = method.ident.name; . for &(name, len) in &COMPLETING_METHODS { 58,960 ( 0.00%) if method_str == name && args.len() == len { . return is_infinite(cx, receiver); . } . } . for &(name, len) in &POSSIBLY_COMPLETING_METHODS { 19,347 ( 0.00%) if method_str == name && args.len() == len { 6 ( 0.00%) return MaybeInfinite.and(is_infinite(cx, receiver)); 319 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite (3x) . } . } 5,354 ( 0.00%) if method.ident.name == sym::last && args.is_empty() { 16 ( 0.00%) let not_double_ended = cx . .tcx 16 ( 0.00%) .get_diagnostic_item(sym::DoubleEndedIterator) 848 ( 0.00%) => ???:::get_diagnostic_item (8x) 80 ( 0.00%) .is_some_and(|id| !implements_trait(cx, cx.typeck_results().expr_ty(receiver), id, &[])); 181,148 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (8x) 320 ( 0.00%) => ???:::expr_ty (8x) 16 ( 0.00%) if not_double_ended { . return is_infinite(cx, receiver); . } 2,669 ( 0.00%) } else if method.ident.name == sym::collect { 6 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 120 ( 0.00%) => ???:::expr_ty (3x) 15 ( 0.00%) if matches!( . ty.opt_diag_name(cx), . Some( . sym::BinaryHeap . | sym::BTreeMap . | sym::BTreeSet . | sym::HashMap . | sym::HashSet . | sym::LinkedList -- line 246 ---------------------------------------- -- line 247 ---------------------------------------- . | sym::Vec . | sym::VecDeque, . ) . ) { . return is_infinite(cx, receiver); . } . } . }, 264 ( 0.00%) ExprKind::Binary(op, l, r) if op.node.is_comparison() => { 792 ( 0.00%) return is_infinite(cx, l).and(is_infinite(cx, r)).and(MaybeInfinite); 11,360 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite (264x) . }, // TODO: ExprKind::Loop + Match . _ => (), . } . Finite . } 25,249 ( 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, . { 535,313 ( 0.03%) SESSION_GLOBALS.with(f) 17,916 ( 0.00%) => /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> (123x) 11,132 ( 0.00%) => /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> (242x) . } . . /// 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)) . } . 85 ( 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> { 43 ( 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 404 ---------------------------------------- . /// 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 into_local_path(self) -> Option { 42 ( 0.00%) if self.was_not_remapped() { 84 ( 0.00%) Some(self.maybe_remapped.name) . } else if let Some(local) = self.local { . Some(local.name) . } else { . None . } 168 ( 0.00%) } . . /// Returns whenever the filename was remapped. . #[inline] . pub(crate) fn was_remapped(&self) -> bool { . !self.scopes.is_empty() . } . . /// Returns whenever the filename was fully remapped. -- line 427 ---------------------------------------- -- line 698 ---------------------------------------- . . impl SpanData { . #[inline] . pub fn span(&self) -> Span { . Span::new(self.lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_lo(&self, lo: BytePos) -> Span { 32 ( 0.00%) Span::new(lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_hi(&self, hi: BytePos) -> Span { 8,999 ( 0.00%) Span::new(self.lo, hi, self.ctxt, self.parent) 504 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::new (14x) . } . /// Avoid if possible, `Span::map_ctxt` should be preferred. . #[inline] . fn with_ctxt(&self, ctxt: SyntaxContext) -> Span { 294 ( 0.00%) Span::new(self.lo, self.hi, ctxt, self.parent) . } . /// Avoid if possible, `Span::with_parent` should be preferred. . #[inline] . fn with_parent(&self, parent: Option) -> Span { 840 ( 0.00%) Span::new(self.lo, self.hi, self.ctxt, parent) . } . /// Returns `true` if this is a dummy span with any hygienic context. . #[inline] . pub fn is_dummy(self) -> bool { . self.lo.0 == 0 && self.hi.0 == 0 . } . /// Returns `true` if `self` fully encloses `other`. . pub fn contains(self, other: Self) -> bool { -- line 728 ---------------------------------------- -- line 745 ---------------------------------------- . fn cmp(&self, rhs: &Self) -> Ordering { . Ord::cmp(&self.data(), &rhs.data()) . } . } . . impl Span { . #[inline] . pub fn lo(self) -> BytePos { 7,464 ( 0.00%) self.data().lo 736 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data (16x) . } . #[inline] . pub fn with_lo(self, lo: BytePos) -> Span { . self.data().with_lo(lo) . } . #[inline] . pub fn hi(self) -> BytePos { 7,338 ( 0.00%) self.data().hi 4,074 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data (194x) . } . #[inline] . pub fn with_hi(self, hi: BytePos) -> Span { 310 ( 0.00%) self.data().with_hi(hi) 5,566 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data (121x) . } . #[inline] . pub fn with_ctxt(self, ctxt: SyntaxContext) -> Span { 832 ( 0.00%) self.map_ctxt(|_| ctxt) . } . . #[inline] . pub fn is_visible(self, sm: &SourceMap) -> bool { . !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] 2,436 ( 0.00%) pub fn in_external_macro(self, sm: &SourceMap) -> bool { 232,673 ( 0.01%) self.ctxt().in_external_macro(sm) 318,254 ( 0.02%) => ???:::in_external_macro (1,704x) . } . . /// 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 809 ---------------------------------------- . #[inline] . pub fn with_root_ctxt(lo: BytePos, hi: BytePos) -> Span { . Span::new(lo, hi, SyntaxContext::root(), None) . } . . /// Returns a new span representing an empty span at the beginning of this span. . #[inline] . pub fn shrink_to_lo(self) -> Span { 28 ( 0.00%) let span = self.data_untracked(); 210 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data_untracked (14x) 14 ( 0.00%) span.with_hi(span.lo) . } . /// Returns a new span representing an empty span at the end of this span. . #[inline] . pub fn shrink_to_hi(self) -> Span { . let span = self.data_untracked(); . span.with_lo(span.hi) . } . -- line 826 ---------------------------------------- -- line 1693 ---------------------------------------- . /// No attempt has been made to load the external source. . AbsentOk, . /// A failed attempt has been made to load the external source. . AbsentErr, . } . . impl ExternalSource { . pub fn get_source(&self) -> Option<&str> { 10 ( 0.00%) match self { . ExternalSource::Foreign { kind: ExternalSourceKind::Present(src), .. } => Some(src), . _ => None, . } . } . } . . #[derive(Debug)] . pub struct OffsetOverflowError; -- line 1709 ---------------------------------------- -- line 2364 ---------------------------------------- . } . . pub fn count_lines(&self) -> usize { . self.lines().len() . } . . #[inline] . pub fn absolute_position(&self, pos: RelativeBytePos) -> BytePos { 8 ( 0.00%) BytePos::from_u32(pos.to_u32() + self.start_pos.to_u32()) . } . . #[inline] . pub fn relative_position(&self, pos: BytePos) -> RelativeBytePos { 7,632 ( 0.00%) RelativeBytePos::from_u32(pos.to_u32() - self.start_pos.to_u32()) . } . . #[inline] . pub fn end_position(&self) -> BytePos { . self.absolute_position(self.normalized_source_len) . } . . /// Finds the line containing the given position. The return value is the -- line 2385 ---------------------------------------- -- 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 { 9,250 ( 0.00%) self.0 as usize . } . . #[inline(always)] . fn from_u32(n: u32) -> $ident { . $ident(n as $inner_ty) . } . . #[inline(always)] . fn to_u32(&self) -> u32 { 8 ( 0.00%) self.0 as u32 . } . } . . impl Add for $ident { . type Output = $ident; . . #[inline(always)] . fn add(self, rhs: $ident) -> $ident { 15 ( 0.00%) $ident(self.0 + rhs.0) . } . } . . impl Sub for $ident { . type Output = $ident; . . #[inline(always)] . fn sub(self, rhs: $ident) -> $ident { 2,816 ( 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. 2,117 ( 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 ---------------------------------------- 141,836 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/plumbing.rs -------------------------------------------------------------------------------- Ir -- line 203 ---------------------------------------- . pub fn typeck(self, def_id: impl IntoQueryKey) { . self.typeck_root( . self.tcx.typeck_root_def_id(def_id.into_query_key().to_def_id()).expect_local(), . ) . } . } . . impl<'tcx> TyCtxt<'tcx> { 3,610 ( 0.00%) pub fn typeck(self, def_id: impl IntoQueryKey) -> &'tcx ty::TypeckResults<'tcx> { . self.typeck_root( 2,888 ( 0.00%) self.typeck_root_def_id(def_id.into_query_key().to_def_id()).expect_local(), 51,020 ( 0.00%) => ???:::typeck_root_def_id (722x) . ) 3,610 ( 0.00%) } . . /// Returns a transparent wrapper for `TyCtxt` which uses . /// `span` as the location of queries performed through it. . #[inline(always)] . pub fn at(self, span: Span) -> TyCtxtAt<'tcx> { . TyCtxtAt { tcx: self, span } . } . -- line 223 ---------------------------------------- -- line 556 ---------------------------------------- . . impl<'tcx> $crate::query::TyCtxtAt<'tcx> { . $( . $(#[$attr])* . #[inline(always)] . pub fn $name(self, key: maybe_into_query_key!($($K)*)) -> $V { . use $crate::query::{erase, inner}; . 6,742 ( 0.00%) erase::restore_val::<$V>(inner::query_get_at( . self.tcx, . self.span, . &self.tcx.query_system.query_vtables.$name, . $crate::query::IntoQueryKey::into_query_key(key), . )) . } . )* . } -- line 572 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/visitors.rs -------------------------------------------------------------------------------- Ir -- line 87 ---------------------------------------- . } . V::Result::output() . } . } . macro_rules! visitable_ref { . ($t:ident, $f:ident) => { . impl<'tcx> Visitable<'tcx> for &'tcx $t<'tcx> { . fn visit>(self, visitor: &mut V) -> V::Result { 3,038 ( 0.00%) visitor.$f(self) 640 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr (1x) . } . } . }; . } . visitable_ref!(Arm, visit_arm); . visitable_ref!(Block, visit_block); . visitable_ref!(Body, visit_body); . visitable_ref!(Expr, visit_expr); . visitable_ref!(Stmt, visit_stmt); . . /// Calls the given function once for each expression contained. This does not enter any bodies or . /// nested items. 456 ( 0.00%) pub fn for_each_expr_without_closures<'tcx, B, C: Continue>( . node: impl Visitable<'tcx>, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V { . f: F, . } . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V { . type Result = ControlFlow; . 55,516 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 53,713 ( 0.00%) match (self.f)(e) { 206,348 ( 0.01%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 493 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> (3x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), 2 ( 0.00%) } 20,832 ( 0.00%) } . . // Avoid unnecessary `walk_*` calls. . fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, AmbigArg>) -> Self::Result { . ControlFlow::Continue(()) . } . fn visit_pat(&mut self, _: &'tcx Pat<'tcx>) -> Self::Result { . ControlFlow::Continue(()) . } -- line 132 ---------------------------------------- -- line 133 ---------------------------------------- . fn visit_qpath(&mut self, _: &'tcx QPath<'tcx>, _: HirId, _: Span) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid monomorphising all `visit_*` functions. . fn visit_nested_item(&mut self, _: ItemId) -> Self::Result { . ControlFlow::Continue(()) . } . } 11,520 ( 0.00%) let mut v = V { f }; . node.visit(&mut v).break_value() 456 ( 0.00%) } . . /// Calls the given function once for each expression contained. This will enter bodies, but not . /// nested items. 6 ( 0.00%) pub fn for_each_expr<'tcx, B, C: Continue>( . tcx: TyCtxt<'tcx>, . node: impl Visitable<'tcx>, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V<'tcx, F> { . tcx: TyCtxt<'tcx>, . f: F, . } -- line 155 ---------------------------------------- -- line 156 ---------------------------------------- . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V<'tcx, F> { . type NestedFilter = nested_filter::OnlyBodies; . type Result = ControlFlow; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.tcx . } . 25,755 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 330 ( 0.00%) match (self.f)(e) { 25 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 (1x) 10,405 ( 0.00%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 2,464 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::new::{closure#0}>> (4x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 22,865 ( 0.00%) } . . // Only walk closures . fn visit_anon_const(&mut self, _: &'tcx AnonConst) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid unnecessary `walk_*` calls. . fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, AmbigArg>) -> Self::Result { . ControlFlow::Continue(()) -- line 178 ---------------------------------------- -- line 183 ---------------------------------------- . fn visit_qpath(&mut self, _: &'tcx QPath<'tcx>, _: HirId, _: Span) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid monomorphising all `visit_*` functions. . fn visit_nested_item(&mut self, _: ItemId) -> Self::Result { . ControlFlow::Continue(()) . } . } 1,475 ( 0.00%) let mut v = V { tcx, f }; . node.visit(&mut v).break_value() 9 ( 0.00%) } . . /// returns `true` if expr contains match expr desugared from try . fn contains_try(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { . if matches!(e.kind, ExprKind::Match(_, _, hir::MatchSource::TryDesugar(_))) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) -- line 201 ---------------------------------------- -- line 319 ---------------------------------------- . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Returns whether the given expression can be evaluated as a constant assuming that all its sub . /// expressions can be evaluated as constants. 147 ( 0.00%) fn is_const_evaluatable_helper<'tcx>(tcx: TyCtxt<'tcx>, typeck: &'tcx TypeckResults<'tcx>, e: &'tcx Expr<'_>) -> bool { 352 ( 0.00%) match e.kind { . ExprKind::Call( . &Expr { 3 ( 0.00%) kind: ExprKind::Path(ref p), . hir_id, . .. . }, . _, 9 ( 0.00%) ) if typeck 12 ( 0.00%) .qpath_res(p, hir_id) 45 ( 0.00%) => ???:::qpath_res (3x) . .opt_def_id() 15 ( 0.00%) .is_some_and(|id| is_stable_const_fn_at(tcx, CRATE_HIR_ID, id, Msrv::default())) => 528 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/qualify_min_const_fn.rs:clippy_utils::qualify_min_const_fn::is_stable_const_fn_at (3x) . { . true . }, . ExprKind::MethodCall(..) . if typeck 150 ( 0.00%) .type_dependent_def_id(e.hir_id) 1,530 ( 0.00%) => ???:::type_dependent_def_id (30x) 270 ( 0.00%) .is_some_and(|id| is_stable_const_fn_at(tcx, CRATE_HIR_ID, id, Msrv::default())) => 28,719 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/qualify_min_const_fn.rs:clippy_utils::qualify_min_const_fn::is_stable_const_fn_at (30x) . { . true . }, . ExprKind::Binary(_, lhs, rhs) 40 ( 0.00%) if typeck.expr_ty(lhs).peel_refs().is_primitive_ty() 332 ( 0.00%) => ???:::expr_ty (8x) 14 ( 0.00%) && typeck.expr_ty(rhs).peel_refs().is_primitive_ty() => 280 ( 0.00%) => ???:::expr_ty (7x) . { . true . }, . ExprKind::Unary(UnOp::Deref, e) if typeck.expr_ty(e).is_raw_ptr() => true, . ExprKind::Unary(_, e) if typeck.expr_ty(e).peel_refs().is_primitive_ty() => true, . ExprKind::Index(base, _, _) . if matches!(typeck.expr_ty(base).peel_refs().kind(), ty::Slice(_) | ty::Array(..)) => . { . true . }, 7 ( 0.00%) ExprKind::Path(ref p) 28 ( 0.00%) if matches!( 49 ( 0.00%) typeck.qpath_res(p, e.hir_id), 105 ( 0.00%) => ???:::qpath_res (7x) . Res::Def( . DefKind::Const { .. } . | DefKind::AssocConst { .. } . | DefKind::AnonConst . | DefKind::ConstParam . | DefKind::Ctor(..) . | DefKind::Fn . | DefKind::AssocFn, -- line 373 ---------------------------------------- -- line 392 ---------------------------------------- . | ExprKind::Repeat(..) . | ExprKind::Struct(..) . | ExprKind::Tup(_) . | ExprKind::Type(..) . | ExprKind::UnsafeBinderCast(..) => true, . . _ => false, . } 95 ( 0.00%) } . . /// Checks if the given expression can be evaluated as a constant at the specified node 114 ( 0.00%) pub fn is_const_evaluatable<'tcx>(tcx: TyCtxt<'tcx>, typeck: &'tcx TypeckResults<'tcx>, e: &'tcx Expr<'_>) -> bool { . for_each_expr(tcx, e, move |e| { 361 ( 0.00%) if !is_const_evaluatable_helper(tcx, typeck, e) { 1,029 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::is_const_evaluatable_helper (10x) . ControlFlow::Break(()) . } else if matches!(e.kind, ExprKind::ConstBlock(_)) { . ControlFlow::Continue(Descend::No) . } else { . ControlFlow::Continue(Descend::Yes) . } . }) . .is_none() 114 ( 0.00%) } . . /// Checks if the given expression can be used as a const parameter. . /// . /// This is more strict than `is_const_evaluatable` as it requires that the expression does not . /// contain any type parameters or any operations on const parameters. . pub fn is_const_param_evaluatable<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, -- line 422 ---------------------------------------- -- line 668 ---------------------------------------- . // for other types. . #[expect(clippy::too_many_lines)] . pub fn for_each_unconsumed_temporary<'tcx, B>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'tcx>, . mut f: impl FnMut(Ty<'tcx>) -> ControlFlow, . ) -> ControlFlow { . // Todo: Handle partially consumed values. 252 ( 0.00%) fn helper<'tcx, B>( . typeck: &'tcx TypeckResults<'tcx>, . consume: bool, . e: &'tcx Expr<'tcx>, . f: &mut impl FnMut(Ty<'tcx>) -> ControlFlow, . ) -> ControlFlow { 42 ( 0.00%) if !consume . || matches!( 60 ( 0.00%) typeck.expr_adjustments(e), 49 ( 0.00%) => ???:::expr_adjustments (1x) 64 ( 0.00%) [adjust, ..] if matches!(adjust.kind, Adjust::Borrow(_) | Adjust::Deref(_)) . ) . { 40 ( 0.00%) match e.kind { . ExprKind::Path(QPath::Resolved(None, p)) 9 ( 0.00%) if matches!(p.res, Res::Def(DefKind::Ctor(_, CtorKind::Const), _)) => . { . f(typeck.expr_ty(e))?; . }, . ExprKind::Path(_) . | ExprKind::Unary(UnOp::Deref, _) . | ExprKind::Index(..) . | ExprKind::Field(..) . | ExprKind::AddrOf(..) => (), . _ => f(typeck.expr_ty(e))?, . } . } 93 ( 0.00%) match e.kind { . ExprKind::AddrOf(_, _, e) . | ExprKind::Field(e, _) . | ExprKind::Unary(UnOp::Deref, e) . | ExprKind::Match(e, ..) . | ExprKind::Let(&LetExpr { init: e, .. }) => { 1 ( 0.00%) helper(typeck, false, e, f)?; . }, . ExprKind::Block(&Block { expr: Some(e), .. }, _) | ExprKind::Cast(e, _) | ExprKind::Unary(_, e) => { . helper(typeck, true, e, f)?; . }, 15 ( 0.00%) ExprKind::Call(callee, args) => { 25 ( 0.00%) helper(typeck, true, callee, f)?; 70 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) . for arg in args { 30 ( 0.00%) helper(typeck, true, arg, f)?; 1,579 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) . } . }, 3 ( 0.00%) ExprKind::MethodCall(_, receiver, args, _) => { 5 ( 0.00%) helper(typeck, true, receiver, f)?; 99 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) . for arg in args { . helper(typeck, true, arg, f)?; . } . }, . ExprKind::Tup(args) | ExprKind::Array(args) => { . for arg in args { . helper(typeck, true, arg, f)?; . } -- line 728 ---------------------------------------- -- line 735 ---------------------------------------- . | ExprKind::AssignOp(_, borrowed, consumed) => { . helper(typeck, false, borrowed, f)?; . helper(typeck, true, consumed, f)?; . }, . ExprKind::Binary(_, lhs, rhs) => { . helper(typeck, true, lhs, f)?; . helper(typeck, true, rhs, f)?; . }, 3 ( 0.00%) ExprKind::Struct(_, fields, default) => { . for field in fields { 10 ( 0.00%) helper(typeck, true, field.expr, f)?; 320 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (2x) . } 4 ( 0.00%) if let StructTailExpr::Base(default) = default { . helper(typeck, false, default, f)?; . } . }, 3 ( 0.00%) ExprKind::If(cond, then, else_expr) => { 4 ( 0.00%) helper(typeck, true, cond, f)?; 182 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) 5 ( 0.00%) helper(typeck, true, then, f)?; 627 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) 2 ( 0.00%) if let Some(else_expr) = else_expr { 5 ( 0.00%) helper(typeck, true, else_expr, f)?; 662 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) . } . }, . ExprKind::Type(e, _) | ExprKind::UnsafeBinderCast(_, e, _) => { . helper(typeck, consume, e, f)?; . }, . . // Either drops temporaries, jumps out of the current expression, or has no sub expression. . ExprKind::DropTemps(_) -- line 763 ---------------------------------------- -- line 773 ---------------------------------------- . | ExprKind::Closure { .. } . | ExprKind::Path(_) . | ExprKind::Continue(_) . | ExprKind::InlineAsm(_) . | ExprKind::OffsetOf(..) . | ExprKind::Err(_) => (), . } . ControlFlow::Continue(()) 144 ( 0.00%) } 2 ( 0.00%) helper(cx.typeck_results(), true, e, &mut f) 1,759 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}> (1x) . } . . pub fn any_temporaries_need_ordered_drop<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) -> bool { . for_each_unconsumed_temporary(cx, e, |ty| { . if needs_ordered_drop(cx, ty) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) -- line 790 ---------------------------------------- 27,756 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub LEN_WITHOUT_IS_EMPTY, . style, . "traits or impls with a public `len` method but no corresponding `is_empty` method" . } . . declare_lint_pass!(LenWithoutIsEmpty => [LEN_WITHOUT_IS_EMPTY]); . . impl<'tcx> LateLintPass<'tcx> for LenWithoutIsEmpty { 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 6,384 ( 0.00%) if let ItemKind::Trait { 76 ( 0.00%) ident, 38 ( 0.00%) items: trait_items, . .. . } = item.kind 38 ( 0.00%) && !item.span.from_expansion() . { 57 ( 0.00%) check_trait_items(cx, item, ident, trait_items); . } 25,536 ( 0.00%) } . 10,528 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 1,504 ( 0.00%) if item.ident.name == sym::len 20 ( 0.00%) && let ImplItemKind::Fn(sig, _) = &item.kind 40 ( 0.00%) && sig.decl.implicit_self().has_implicit_self() 80 ( 0.00%) => ???:::implicit_self (10x) 20 ( 0.00%) && sig.decl.inputs.len() == 1 60 ( 0.00%) && cx.effective_visibilities.is_exported(item.owner_id.def_id) 570 ( 0.00%) => ???:::is_exported (10x) 16 ( 0.00%) && matches!(sig.decl.output, FnRetTy::Return(_)) 56 ( 0.00%) && let Some(imp) = get_parent_as_impl(cx.tcx, item.hir_id()) 1,216 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_as_impl (8x) 8 ( 0.00%) && imp.of_trait.is_none() 8 ( 0.00%) && let TyKind::Path(ty_path) = &imp.self_ty.kind 8 ( 0.00%) && let Some(ty_id) = cx.qpath_res(ty_path, imp.self_ty.hir_id).opt_def_id() 46 ( 0.00%) => ???:::qpath_res (2x) . && let Some(local_id) = ty_id.as_local() . && let ty_hir_id = cx.tcx.local_def_id_to_hir_id(local_id) 8 ( 0.00%) && let Some(output) = LenOutput::new( 90 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:::new (2x) . cx, . cx.tcx . .fn_sig(item.owner_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(), . ) . { 14 ( 0.00%) let (name, kind) = match cx.tcx.hir_node(ty_hir_id) { 131 ( 0.00%) => ???:::hir_node (2x) . Node::ForeignItem(x) => (x.ident.name, "extern type"), 10 ( 0.00%) Node::Item(x) => match x.kind { 5 ( 0.00%) ItemKind::Struct(ident, ..) => (ident.name, "struct"), 5 ( 0.00%) ItemKind::Enum(ident, ..) => (ident.name, "enum"), . ItemKind::Union(ident, ..) => (ident.name, "union"), . _ => (x.kind.ident().unwrap().name, "type"), . }, . _ => return, . }; 30 ( 0.00%) check_for_is_empty( 8,590 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:clippy_lints::len_without_is_empty::check_for_is_empty (2x) . cx, 2 ( 0.00%) sig.span, 4 ( 0.00%) sig.decl.implicit_self(), 16 ( 0.00%) => ???:::implicit_self (2x) . output, . ty_id, . name, . kind, . item.hir_id(), . ty_hir_id, . ); . } 12,032 ( 0.00%) } . } . . fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, ident: Ident, trait_items: &[TraitItemId]) { . fn is_named_self(cx: &LateContext<'_>, item: TraitItemId, name: Symbol) -> bool { . cx.tcx.item_name(item.owner_id) == name . && matches!( . cx.tcx.fn_arg_idents(item.owner_id), . [Some(Ident { -- line 111 ---------------------------------------- -- line 119 ---------------------------------------- . fn fill_trait_set(traitt: DefId, set: &mut DefIdSet, cx: &LateContext<'_>) { . if set.insert(traitt) { . for supertrait in supertrait_def_ids(cx.tcx, traitt) { . fill_trait_set(supertrait, set, cx); . } . } . } . 95 ( 0.00%) if cx.effective_visibilities.is_exported(visited_trait.owner_id.def_id) 1,053 ( 0.00%) => ???:::is_exported (19x) . && trait_items.iter().any(|&i| is_named_self(cx, i, sym::len)) . { . let mut current_and_super_traits = DefIdSet::default(); . fill_trait_set(visited_trait.owner_id.to_def_id(), &mut current_and_super_traits, cx); . let is_empty_method_found = current_and_super_traits . .items() . .flat_map(|&i| UnordItems::new(cx.tcx.associated_items(i).filter_by_name_unhygienic(sym::is_empty))) . .any(|i| i.is_method() && cx.tcx.fn_sig(i.def_id).skip_binder().inputs().skip_binder().len() == 1); -- line 135 ---------------------------------------- -- line 143 ---------------------------------------- . "trait `{}` has a `len` method but no (possibly inherited) `is_empty` method", . ident.name . ), . ); . } . } . } . 4 ( 0.00%) fn extract_future_output<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<&'tcx PathSegment<'tcx>> { 8 ( 0.00%) if let ty::Alias( . _, . ty::AliasTy { . kind: ty::Opaque { def_id }, . .. . }, . ) = *ty.kind() . && let Some(Node::OpaqueTy(opaque)) = cx.tcx.hir_get_if_local(def_id) . && let OpaqueTyOrigin::AsyncFn { .. } = opaque.origin -- line 160 ---------------------------------------- -- line 165 ---------------------------------------- . && let Some(ty) = constraint.ty() . && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . && let [segment] = path.segments . { . return Some(segment); . } . . None 4 ( 0.00%) } . . fn is_first_generic_integral<'tcx>(segment: &'tcx PathSegment<'tcx>) -> bool { . if let Some(generic_args) = segment.args . && let [GenericArg::Type(ty), ..] = &generic_args.args . && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . && let [segment, ..] = &path.segments . && matches!(segment.res, Res::PrimTy(PrimTy::Uint(_) | PrimTy::Int(_))) . { -- line 181 ---------------------------------------- -- line 188 ---------------------------------------- . #[derive(Debug, Clone, Copy)] . enum LenOutput { . Integral, . Option(DefId), . Result(DefId), . } . . impl LenOutput { 18 ( 0.00%) fn new<'tcx>(cx: &LateContext<'tcx>, sig: FnSig<'tcx>) -> Option { 10 ( 0.00%) if let Some(segment) = extract_future_output(cx, sig.output()) { 8 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:clippy_lints::len_without_is_empty::extract_future_output (2x) . let res = segment.res; . . if matches!(res, Res::PrimTy(PrimTy::Uint(_) | PrimTy::Int(_))) { . return Some(Self::Integral); . } . . if let Res::Def(_, def_id) = res . && let Some(res) = match cx.tcx.get_diagnostic_name(def_id) { -- line 205 ---------------------------------------- -- line 210 ---------------------------------------- . && is_first_generic_integral(segment) . { . return Some(res); . } . . return None; . } . 8 ( 0.00%) match *sig.output().kind() { 2 ( 0.00%) ty::Int(_) | ty::Uint(_) => Some(Self::Integral), . ty::Adt(adt, subs) => match cx.tcx.get_diagnostic_name(adt.did()) { . Some(sym::Option) => subs.type_at(0).is_integral().then(|| Self::Option(adt.did())), . Some(sym::Result) => subs.type_at(0).is_integral().then(|| Self::Result(adt.did())), . _ => None, . }, . _ => None, . } 14 ( 0.00%) } . . fn matches_is_empty_output<'tcx>(self, cx: &LateContext<'tcx>, is_empty_output: Ty<'tcx>) -> bool { 10 ( 0.00%) if let Some(segment) = extract_future_output(cx, is_empty_output) { 8 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:clippy_lints::len_without_is_empty::extract_future_output (2x) . return match (self, segment.res) { . (_, Res::PrimTy(PrimTy::Bool)) => true, . (Self::Option(_), Res::Def(_, def_id)) if cx.tcx.is_diagnostic_item(sym::Option, def_id) => true, . (Self::Result(_), Res::Def(_, def_id)) if cx.tcx.is_diagnostic_item(sym::Result, def_id) => true, . _ => false, . }; . } . 6 ( 0.00%) match (self, is_empty_output.kind()) { . (_, &ty::Bool) => true, . (Self::Option(id), &ty::Adt(adt, subs)) if id == adt.did() => subs.type_at(0).is_bool(), . (Self::Result(id), &ty::Adt(adt, subs)) if id == adt.did() => subs.type_at(0).is_bool(), . _ => false, . } . } . } . -- line 247 ---------------------------------------- -- line 265 ---------------------------------------- . . /// Checks if the given signature matches the expectations for `is_empty` . fn check_is_empty_sig<'tcx>( . cx: &LateContext<'tcx>, . is_empty_sig: FnSig<'tcx>, . len_self_kind: ImplicitSelfKind, . len_output: LenOutput, . ) -> bool { 4 ( 0.00%) if let [is_empty_self_arg, is_empty_output] = &**is_empty_sig.inputs_and_output 2 ( 0.00%) && len_output.matches_is_empty_output(cx, *is_empty_output) . { 14 ( 0.00%) match (is_empty_self_arg.kind(), len_self_kind) { . // if `len` takes `&self`, `is_empty` should do so as well . (ty::Ref(_, _, Mutability::Not), ImplicitSelfKind::RefImm) . // if `len` takes `&mut self`, `is_empty` may take that _or_ `&self` (#16190) . | (ty::Ref(_, _, Mutability::Mut | Mutability::Not), ImplicitSelfKind::RefMut) => true, . // if len takes `self`, `is_empty` should do so as well . // XXX: we might want to relax this to allow `&self` and `&mut self` . (_, ImplicitSelfKind::Imm | ImplicitSelfKind::Mut) if !is_empty_self_arg.is_ref() => true, . _ => false, -- line 284 ---------------------------------------- -- line 285 ---------------------------------------- . } . } else { . false . } . } . . /// Checks if the given type has an `is_empty` method with the appropriate signature. . #[expect(clippy::too_many_arguments)] 24 ( 0.00%) fn check_for_is_empty( . cx: &LateContext<'_>, . len_span: Span, . len_self_kind: ImplicitSelfKind, . len_output: LenOutput, . impl_ty: DefId, . item_name: Symbol, . item_kind: &str, . len_method_hir_id: HirId, . ty_decl_hir_id: HirId, . ) { . // Implementor may be a type alias, in which case we need to get the `DefId` of the aliased type to . // find the correct inherent impls. 2 ( 0.00%) let impl_ty = if let Some(adt) = cx.tcx.type_of(impl_ty).skip_binder().ty_adt_def() { . adt.did() . } else { . return; . }; . . let is_empty = cx . .tcx . .inherent_impls(impl_ty) . .iter() 8 ( 0.00%) .flat_map(|&id| cx.tcx.associated_items(id).filter_by_name_unhygienic(sym::is_empty)) 200 ( 0.00%) => ???:::filter_by_name_unhygienic (2x) . .find(|item| item.is_fn()); . . let (msg, is_empty_span, is_empty_expected_sig) = match is_empty { . None => ( . format!("{item_kind} `{item_name}` has a public `len` method, but no `is_empty` method"), . None, . None, . ), 16 ( 0.00%) Some(is_empty) if !cx.effective_visibilities.is_exported(is_empty.def_id.expect_local()) => ( 114 ( 0.00%) => ???:::is_exported (2x) . format!("{item_kind} `{item_name}` has a public `len` method, but a private `is_empty` method"), . Some(cx.tcx.def_span(is_empty.def_id)), . None, . ), . Some(is_empty) 4 ( 0.00%) if !(is_empty.is_method() 6 ( 0.00%) && check_is_empty_sig( . cx, . cx.tcx 4 ( 0.00%) .fn_sig(is_empty.def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(), . len_self_kind, . len_output, . )) => . { . ( -- line 343 ---------------------------------------- -- line 356 ---------------------------------------- . if let Some(span) = is_empty_span { . db.span_note(span, "`is_empty` defined here"); . } . if let Some(expected_sig) = is_empty_expected_sig { . db.note(expected_sig); . } . }); . } 16 ( 0.00%) } 82 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/regex.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . #[derive(Copy, Clone)] . enum RegexKind { . Unicode, . UnicodeSet, . Bytes, . BytesSet, . } . 7 ( 0.00%) #[derive(Default)] . pub struct Regex { . definitions: DefIdMap, . loop_stack: Vec<(OwnerId, Span)>, . } . . impl<'tcx> LateLintPass<'tcx> for Regex { 7 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'tcx>) { . let mut resolve = |path: &PathLookup, kind: RegexKind| { . for &id in path.get(cx) { . self.definitions.insert(id, kind); . } . }; . . resolve(&paths::REGEX_NEW, RegexKind::Unicode); . resolve(&paths::REGEX_BUILDER_NEW, RegexKind::Unicode); . resolve(&paths::REGEX_SET_NEW, RegexKind::UnicodeSet); . resolve(&paths::REGEX_BYTES_NEW, RegexKind::Bytes); . resolve(&paths::REGEX_BYTES_BUILDER_NEW, RegexKind::Bytes); . resolve(&paths::REGEX_BYTES_SET_NEW, RegexKind::BytesSet); 6 ( 0.00%) } . 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 219,913 ( 0.01%) if let ExprKind::Call(fun, [arg]) = expr.kind 2,361 ( 0.00%) && let Some(def_id) = fun.res(cx).opt_def_id() . && let Some(regex_kind) = self.definitions.get(&def_id) . { . if let Some(&(loop_item_id, loop_span)) = self.loop_stack.last() . && loop_item_id == fun.hir_id.owner . && (matches!(arg.kind, ExprKind::Lit(_)) || const_str(cx, arg).is_some()) . { . span_lint_and_help( . cx, -- line 150 ---------------------------------------- -- line 157 ---------------------------------------- . } . . match regex_kind { . RegexKind::Unicode => check_regex(cx, arg, true), . RegexKind::UnicodeSet => check_set(cx, arg, true), . RegexKind::Bytes => check_regex(cx, arg, false), . RegexKind::BytesSet => check_set(cx, arg, false), . } 54,468 ( 0.00%) } else if let ExprKind::Loop(block, _, _, span) = expr.kind { 80 ( 0.00%) self.loop_stack.push((block.hir_id.owner, span)); . } 217,552 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 190,358 ( 0.01%) if matches!(expr.kind, ExprKind::Loop(..)) { . self.loop_stack.pop(); . } . } . } . . fn lint_syntax_error(cx: &LateContext<'_>, error: ®ex_syntax::Error, unescaped: &str, base: Span, offset: u8) { . let parts: Option<(_, _, &dyn Display)> = match &error { . regex_syntax::Error::Parse(e) => Some((e.span(), e.auxiliary_span(), e.kind())), -- line 179 ---------------------------------------- 2,362 ( 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/sys/thread_local/native/mod.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . = $crate::thread::local_impl::EagerStorage::new(__RUST_STD_INTERNAL_INIT); . __RUST_STD_INTERNAL_VAL.get() . } . } else { . |_| { . #[thread_local] . $(#[$align_attr])* . static __RUST_STD_INTERNAL_VAL: $t = __RUST_STD_INTERNAL_INIT; 357,387 ( 0.02%) &__RUST_STD_INTERNAL_VAL . } . } . }) . } . }}, . . // used to generate the `LocalKey` value for `thread_local!` . (@key $t:ty, $(#[$align_attr:meta])*, $init:expr) => {{ -- line 83 ---------------------------------------- -- line 97 ---------------------------------------- . __RUST_STD_INTERNAL_VAL.get_or_init(__rust_std_internal_init, __rust_std_internal_init_fn) . } . } else { . |__rust_std_internal_init| { . #[thread_local] . $(#[$align_attr])* . static __RUST_STD_INTERNAL_VAL: $crate::thread::local_impl::LazyStorage<$t, !> . = $crate::thread::local_impl::LazyStorage::new(); 162 ( 0.00%) __RUST_STD_INTERNAL_VAL.get_or_init(__rust_std_internal_init, __rust_std_internal_init_fn) . } . } . }) . } . }}, . } . . #[rustc_macro_transparency = "semiopaque"] -- line 113 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . declare_lint_pass!(NeedlessParensOnRangeLiterals => [ . NEEDLESS_PARENS_ON_RANGE_LITERALS, . ]); . . fn snippet_enclosed_in_parenthesis(snippet: &str) -> bool { . snippet.starts_with('(') && snippet.ends_with(')') . } . 648 ( 0.00%) fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) { 108 ( 0.00%) if is_start . && let ExprKind::Lit(literal) = e.kind 76 ( 0.00%) && let ast::LitKind::Float(_sym, ast::LitFloatType::Unsuffixed) = literal.node . { . // don't check floating point literals on the start expression of a range . return; . } 168 ( 0.00%) if let ExprKind::Lit(literal) = e.kind . // the indicator that parenthesis surround the literal is that the span of the expression and the literal differ 342 ( 0.00%) && (literal.span.data().hi - literal.span.data().lo) != (e.span.data().hi - e.span.data().lo) . // inspect the source code of the expression for parenthesis . && snippet_enclosed_in_parenthesis(&snippet(cx, e.span, "")) . { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_then( . cx, . NEEDLESS_PARENS_ON_RANGE_LITERALS, . e.span, . "needless parenthesis on range literals can be removed", . |diag| { . let suggestion = snippet_with_applicability(cx, literal.span, "_", &mut applicability); . diag.span_suggestion(e.span, "try", suggestion, applicability); . }, . ); . } 432 ( 0.00%) } . . impl<'tcx> LateLintPass<'tcx> for NeedlessParensOnRangeLiterals { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 136,070 ( 0.01%) if let Some(higher::Range { start, end, .. }) = higher::Range::hir(cx, expr) { 1,294,420 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (27,194x) 100 ( 0.00%) if let Some(start) = start { 150 ( 0.00%) check_for_parens(cx, start, true); 6,748 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:clippy_lints::needless_parens_on_range_literals::check_for_parens (50x) . } 100 ( 0.00%) if let Some(end) = end { 16 ( 0.00%) check_for_parens(cx, end, false); 96 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:clippy_lints::needless_parens_on_range_literals::check_for_parens (4x) . } . } . } . } 320 ( 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 { . prefixes.iter().all(|p| p == &"" || p == &"_") . } . . impl ItemNameRepetitions { . /// Lint the names of enum variants against the name of the enum. . fn check_variants(&self, cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { 429 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(item.owner_id.def_id) { 1,608 ( 0.00%) => ???:::is_exported (29x) . return; . } . . if (def.variants.len() as u64) < self.enum_threshold { . return; . } . 18 ( 0.00%) let Some(ident) = item.kind.ident() else { . return; . }; . let item_name = ident.name.as_str(); 24 ( 0.00%) for var in def.variants { . check_enum_start(cx, item_name, var); . check_enum_end(cx, item_name, var); . } . 6 ( 0.00%) Self::check_enum_common_affix(cx, item, def); . } . . /// Lint the names of struct fields against the name of the struct. 2,106 ( 0.00%) fn check_fields(&self, cx: &LateContext<'_>, item: &Item<'_>, fields: &[FieldDef<'_>]) { 468 ( 0.00%) if (fields.len() as u64) < self.struct_threshold { . return; . } . 200 ( 0.00%) self.check_struct_name_repetition(cx, item, fields); . self.check_struct_common_affix(cx, item, fields); 1,872 ( 0.00%) } . . fn check_enum_common_affix(cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { . let first = match def.variants.first() { 6 ( 0.00%) Some(variant) => variant.ident.name.as_str(), . None => return, . }; 18 ( 0.00%) let mut pre = camel_case_split(first); 5,514 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_split (6x) 12 ( 0.00%) let mut post = pre.clone(); 559 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone (6x) 1 ( 0.00%) post.reverse(); . for var in def.variants { . let name = var.ident.name.as_str(); . 27 ( 0.00%) let variant_split = camel_case_split(name); 8,940 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_split (9x) 18 ( 0.00%) if variant_split.len() == 1 { . return; . } . 12 ( 0.00%) pre = pre . .iter() . .zip(variant_split.iter()) . .take_while(|(a, b)| a == b) . .map(|e| *e.0) . .collect(); 12 ( 0.00%) post = post . .iter() . .zip(variant_split.iter().rev()) . .take_while(|(a, b)| a == b) . .map(|e| *e.0) . .collect(); . } . let (what, value) = match (have_no_extra_prefix(&pre), post.is_empty()) { . (true, true) => return, -- line 274 ---------------------------------------- -- line 296 ---------------------------------------- . // this prevents linting in macros in which the location of the field identifier names differ . if !fields . .iter() . .all(|field| item.kind.ident().is_some_and(|i| i.span.eq_ctxt(field.ident.span))) . { . return; . } . 300 ( 0.00%) if self.avoid_breaking_exported_api . && fields . .iter() 63 ( 0.00%) .any(|field| cx.effective_visibilities.is_exported(field.def_id)) 3,306 ( 0.00%) => ???:::is_exported (63x) . { . return; . } . . let mut pre: Vec<&str> = match fields.first() { . Some(first_field) => first_field.ident.name.as_str().split('_').collect(), . None => return, . }; . let mut post = pre.clone(); . post.reverse(); . for field in fields { . let field_split: Vec<&str> = field.ident.name.as_str().split('_').collect(); 12 ( 0.00%) if field_split.len() == 1 { . return; . } . . pre = pre . .into_iter() . .zip(field_split.iter()) . .take_while(|(a, b)| &a == b) . .map(|e| e.0) -- line 328 ---------------------------------------- -- line 360 ---------------------------------------- . format!("all fields have the same {what}fix: `{value}`"), . None, . format!("remove the {what}fixes"), . ); . } . } . . fn check_struct_name_repetition(&self, cx: &LateContext<'_>, item: &Item<'_>, fields: &[FieldDef<'_>]) { 200 ( 0.00%) let Some(ident) = item.kind.ident() else { return }; 100 ( 0.00%) let snake_name = to_snake_case(ident.name.as_str()); 42,878 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_snake_case (50x) . let item_name_words: Vec<&str> = snake_name.split('_').collect(); . for field in fields { 1,414 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(field.def_id) { 11,229 ( 0.00%) => ???:::is_exported (202x) . continue; . } . 19 ( 0.00%) if !field.ident.span.eq_ctxt(ident.span) { . // consider linting only if the field identifier has the same SyntaxContext as the item(struct) . continue; . } . . let field_words: Vec<&str> = field.ident.name.as_str().split('_').collect(); 38 ( 0.00%) if field_words.len() >= item_name_words.len() { . // if the field name is shorter than the struct name it cannot contain it 6 ( 0.00%) if field_words.iter().zip(item_name_words.iter()).all(|(a, b)| a == b) { . span_lint_hir( . cx, . STRUCT_FIELD_NAMES, . field.hir_id, . field.span, . "field name starts with the struct's name", . ); . } 12 ( 0.00%) if field_words.len() > item_name_words.len() . // lint only if the end is not covered by the start . && field_words . .iter() . .rev() . .zip(item_name_words.iter().rev()) . .all(|(a, b)| a == b) . { . span_lint_hir( -- line 401 ---------------------------------------- -- line 410 ---------------------------------------- . } . } . } . . fn check_enum_start(cx: &LateContext<'_>, item_name: &str, variant: &Variant<'_>) { . let name = variant.ident.name.as_str(); . let item_name_chars = item_name.chars().count(); . 329 ( 0.00%) if count_match_start(item_name, name).char_count == item_name_chars 5,420 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::count_match_start (47x) . && name.chars().nth(item_name_chars).is_some_and(|c| !c.is_lowercase()) . && name.chars().nth(item_name_chars + 1).is_some_and(|c| !c.is_numeric()) . && !check_enum_tuple_path_match(name, variant.data) . { . span_lint_hir( . cx, . ENUM_VARIANT_NAMES, . variant.hir_id, -- line 426 ---------------------------------------- -- line 429 ---------------------------------------- . ); . } . } . . fn check_enum_end(cx: &LateContext<'_>, item_name: &str, variant: &Variant<'_>) { . let name = variant.ident.name.as_str(); . let item_name_chars = item_name.chars().count(); . 376 ( 0.00%) if count_match_end(item_name, name).char_count == item_name_chars 5,748 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::count_match_end (47x) . && !check_enum_tuple_path_match(name, variant.data) . { . span_lint_hir( . cx, . ENUM_VARIANT_NAMES, . variant.hir_id, . variant.span, . "variant name ends with the enum's name", -- line 445 ---------------------------------------- -- 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<'_>) { 6,384 ( 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<'_>) { 3,960 ( 0.00%) if let [.., last] = &mut *self.modules { 3,954 ( 0.00%) last.in_body_count += 1; . } . } . . fn check_body_post(&mut self, _: &LateContext<'_>, _: &Body<'_>) { 3,960 ( 0.00%) if let [.., last] = &mut *self.modules { 3,954 ( 0.00%) last.in_body_count -= 1; . } . } . 28,728 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 19,057 ( 0.00%) let ident = match item.kind { 152 ( 0.00%) ItemKind::Mod(ident, _) => { 228 ( 0.00%) 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) . { . span_lint( . cx, -- line 502 ---------------------------------------- -- line 503 ---------------------------------------- . MODULE_INCEPTION, . item.span, . "module has the same name as its containing module", . ); . } . ident . }, . 203 ( 0.00%) ItemKind::Enum(ident, _, def) => { 145 ( 0.00%) if !ident.span.in_external_macro(cx.tcx.sess.source_map()) { 29 ( 0.00%) self.check_variants(cx, item, &def); . } . ident . }, 508 ( 0.00%) ItemKind::Struct(ident, _, data) => { 996 ( 0.00%) if let VariantData::Struct { fields, .. } = data 936 ( 0.00%) && !ident.span.in_external_macro(cx.tcx.sess.source_map()) . { 1,638 ( 0.00%) self.check_fields(cx, item, fields); 107,924 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/item_name_repetitions.rs:::check_fields (234x) . } . ident . }, . . ItemKind::Const(ident, ..) 3 ( 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(); 3,252 ( 0.00%) let item_camel = to_camel_case(item_name); 413,792 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case (1,626x) . 3,252 ( 0.00%) if let [.., prev] = &*self.modules 4,365 ( 0.00%) && prev.is_public 828 ( 0.00%) && prev.in_body_count == 0 1,232 ( 0.00%) && !item.span.from_expansion() 408 ( 0.00%) && !matches!(item.kind, ItemKind::Macro(..)) 788 ( 0.00%) && cx.tcx.visibility(item.owner_id).is_public() . { 130 ( 0.00%) if !self.allow_exact_repetitions && item_camel == prev.name_camel { . if !is_from_proc_macro(cx, item) { . span_lint( . cx, . MODULE_NAME_REPETITIONS, . ident.span, . "item name is the same as its containing module's name", . ); . } 130 ( 0.00%) } else if item_camel.len() > prev.name_camel.len() { . if let Some(s) = item_camel.strip_prefix(&prev.name_camel) . && let Some(c) = s.chars().next() 21 ( 0.00%) && (c == '_' || c.is_uppercase() || c.is_numeric()) . { 6 ( 0.00%) if !is_from_proc_macro(cx, item) { 1,009 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (2x) . span_lint( . cx, . MODULE_NAME_REPETITIONS, . ident.span, . "item name starts with its containing module's name", . ); . } . } else if let Some(s) = item_camel.strip_suffix(&prev.name_camel) 6 ( 0.00%) && !self.is_allowed_prefix(s) 9 ( 0.00%) && !is_from_proc_macro(cx, item) 1,502 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (3x) . { . span_lint( . cx, . MODULE_NAME_REPETITIONS, . ident.span, . "item name ends with its containing module's name", . ); . } . } . } . 3,238 ( 0.00%) if matches!(item.kind, ItemKind::Mod(..)) { . self.modules.push(ModInfo { . name: ident.name, . name_camel: item_camel, 228 ( 0.00%) is_public: cx.tcx.visibility(item.owner_id).is_public(), . in_body_count: 0, . }); . } 25,536 ( 0.00%) } . } 14,182 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs -------------------------------------------------------------------------------- Ir -- line 91 ---------------------------------------- . . pub struct NonExpressiveNames { . pub single_char_binding_names_threshold: u64, . } . . impl NonExpressiveNames { . pub fn new(conf: &'static Conf) -> Self { . Self { 3 ( 0.00%) single_char_binding_names_threshold: conf.single_char_binding_names_threshold, . } . } . } . . struct ExistingName { . interned: Symbol, . span: Span, . len: usize, -- line 107 ---------------------------------------- -- line 113 ---------------------------------------- . cx: &'a EarlyContext<'tcx>, . threshold: u64, . . /// A stack of scopes containing the single-character bindings in each scope. . single_char_names: Vec>, . } . . impl SimilarNamesLocalVisitor<'_, '_> { 6,986 ( 0.00%) fn check_single_char_names(&self) { 3,493 ( 0.00%) if self.single_char_names.last().map(Vec::len) == Some(0) { . return; . } . . let num_single_char_names = self.single_char_names.iter().flatten().count(); 300 ( 0.00%) if num_single_char_names as u64 > self.threshold { . let span = self . .single_char_names . .iter() . .flatten() . .map(|ident| ident.span) . .collect::>(); . span_lint( . self.cx, . MANY_SINGLE_CHAR_NAMES, . span, . format!("{num_single_char_names} bindings with single-character names in scope"), . ); . } 10,479 ( 0.00%) } . } . . // this list contains lists of names that are allowed to be similar . // the assumption is that no name is ever contained in multiple lists. . const ALLOWED_TO_BE_SIMILAR: &[&[&str]] = &[ . &["parsed", "parser"], . &["lhs", "rhs"], . &["tx", "rx"], -- line 149 ---------------------------------------- -- line 155 ---------------------------------------- . &["iter", "item"], . ]; . . /// Characters that look visually similar . const SIMILAR_CHARS: &[(char, char)] = &[('l', 'i'), ('l', '1'), ('i', '1'), ('u', 'v')]; . . /// Return true if two characters are visually similar . fn chars_are_similar(a: char, b: char) -> bool { 5,356 ( 0.00%) a == b || SIMILAR_CHARS.contains(&(a, b)) || SIMILAR_CHARS.contains(&(b, a)) . } . . struct SimilarNamesNameVisitor<'a, 'tcx, 'b>(&'b mut SimilarNamesLocalVisitor<'a, 'tcx>); . . impl<'tcx> Visitor<'tcx> for SimilarNamesNameVisitor<'_, 'tcx, '_> { 36,684 ( 0.00%) fn visit_pat(&mut self, pat: &'tcx Pat) { 30,613 ( 0.00%) match pat.kind { 12,512 ( 0.00%) PatKind::Ident(_, ident, _) => { 6,256 ( 0.00%) if !pat.span.from_expansion() { 2,122 ( 0.00%) self.check_ident(ident); . } . }, . PatKind::Struct(_, _, ref fields, _) => { . for field in fields { 12 ( 0.00%) if !field.is_shorthand { 8 ( 0.00%) self.visit_pat(&field.pat); 200 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat'2 (2x) . } . } . }, . // just go through the first pattern, as either all patterns . // bind the same bindings or rustc would have errored much earlier 74 ( 0.00%) PatKind::Or(ref pats) => self.visit_pat(&pats[0]), . _ => walk_pat(self, pat), . } 25,048 ( 0.00%) } . } . . #[must_use] . fn get_exemptions(interned_name: &str) -> Option<&'static [&'static str]> { . ALLOWED_TO_BE_SIMILAR . .iter() . .find(|&&list| allowed_to_be_similar(interned_name, list)) . .copied() . } . . #[must_use] . fn allowed_to_be_similar(interned_name: &str, list: &[&str]) -> bool { . list.iter() 22,422 ( 0.00%) .any(|&name| interned_name.starts_with(name) || interned_name.ends_with(name)) . } . . impl SimilarNamesNameVisitor<'_, '_, '_> { 537 ( 0.00%) fn check_short_ident(&mut self, ident: Ident) { . // Ignore shadowing . if self . .0 . .single_char_names . .iter() . .flatten() . .any(|id| id.name == ident.name) . { . return; . } . . if let Some(scope) = &mut self.0.single_char_names.last_mut() { . scope.push(ident); . } 716 ( 0.00%) } . . fn check_ident(&mut self, ident: Ident) { . let interned_name = ident.name.as_str(); . // name can be empty if it comes from recovery . if interned_name.chars().any(char::is_uppercase) || interned_name.is_empty() { . return; . } . if interned_name.chars().all(|c| c.is_ascii_digit() || c == '_') { -- line 229 ---------------------------------------- -- line 230 ---------------------------------------- . span_lint( . self.0.cx, . JUST_UNDERSCORES_AND_DIGITS, . ident.span, . "consider choosing a more descriptive name", . ); . return; . } 2,092 ( 0.00%) if interned_name.starts_with('_') { . // these bindings are typically unused or represent an ignored portion of a destructuring pattern . return; . } . let count = interned_name.chars().count(); 4,156 ( 0.00%) if count < 3 { 568 ( 0.00%) if count == 1 { 716 ( 0.00%) self.check_short_ident(ident); 6,149 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_short_ident (72x) . } . return; . } . for existing_name in &self.0.names { 2,682 ( 0.00%) if allowed_to_be_similar(interned_name, existing_name.exemptions) { . continue; . } . . let existing_str = existing_name.interned.as_str(); . . // The first char being different is usually enough to set identifiers apart, as long . // as the characters aren't too similar. . if !chars_are_similar( . interned_name.chars().next().expect("len >= 1"), . existing_str.chars().next().expect("len >= 1"), . ) { . continue; . } . . // Skip similarity check if both names are exactly 3 characters 336 ( 0.00%) if count == 3 && existing_name.len == 3 { . continue; . } . 979 ( 0.00%) let dissimilar = match existing_name.len.cmp(&count) { 212 ( 0.00%) Ordering::Greater => existing_name.len - count != 1 || levenstein_not_1(interned_name, existing_str), 746 ( 0.00%) Ordering::Less => count - existing_name.len != 1 || levenstein_not_1(existing_str, interned_name), . Ordering::Equal => Self::equal_length_strs_not_similar(interned_name, existing_str), . }; . 108 ( 0.00%) if dissimilar { . continue; . } . . span_lint_and_then( . self.0.cx, . SIMILAR_NAMES, . ident.span, . "binding's name is too similar to existing binding", -- line 284 ---------------------------------------- -- line 285 ---------------------------------------- . |diag| { . diag.span_note(existing_name.span, "existing binding defined here"); . }, . ); . return; . } . self.0.names.push(ExistingName { . interned: ident.name, 1,794 ( 0.00%) span: ident.span, . len: count, . exemptions: get_exemptions(interned_name).unwrap_or(&[]), . }); . } . . fn equal_length_strs_not_similar(interned_name: &str, existing_name: &str) -> bool { . let mut interned_chars = interned_name.chars(); . let mut existing_chars = existing_name.chars(); . let first_i = interned_chars.next().expect("we know we have at least one char"); . let first_e = existing_chars.next().expect("we know we have at least one char"); 580 ( 0.00%) let eq_or_numeric = |(a, b): (char, char)| a == b || a.is_numeric() && b.is_numeric(); . . if eq_or_numeric((first_i, first_e)) { . let last_i = interned_chars.next_back().expect("we know we have at least two chars"); . let last_e = existing_chars.next_back().expect("we know we have at least two chars"); . if eq_or_numeric((last_i, last_e)) { 64 ( 0.00%) if interned_chars . .zip(existing_chars) . .filter(|&ie| !eq_or_numeric(ie)) . .count() . != 1 . { . return true; . } . } else { -- line 318 ---------------------------------------- -- line 355 ---------------------------------------- . let single_char_count = self.single_char_names.len(); . f(self); . self.names.truncate(n); . self.single_char_names.truncate(single_char_count); . } . } . . impl<'tcx> Visitor<'tcx> for SimilarNamesLocalVisitor<'_, 'tcx> { 5,850 ( 0.00%) fn visit_local(&mut self, local: &'tcx Local) { . if let Some((init, els)) = &local.kind.init_else_opt() { . self.apply(|this| walk_expr(this, init)); . if let Some(els) = els { . self.apply(|this| walk_block(this, els)); . } . } . // add the pattern after the expression because the bindings aren't available . // yet in the init . // expression 2,600 ( 0.00%) SimilarNamesNameVisitor(self).visit_pat(&local.pat); 487,050 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (606x) 5,200 ( 0.00%) } 9,198 ( 0.00%) fn visit_block(&mut self, blk: &'tcx Block) { 272 ( 0.00%) self.single_char_names.push(vec![]); . . self.apply(|this| walk_block(this, blk)); . 2,044 ( 0.00%) self.check_single_char_names(); 7,141 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (584x) . self.single_char_names.pop(); 8,112 ( 0.00%) } 7,065 ( 0.00%) fn visit_arm(&mut self, arm: &'tcx Arm) { 131 ( 0.00%) self.single_char_names.push(vec![]); . . self.apply(|this| { 3,140 ( 0.00%) SimilarNamesNameVisitor(this).visit_pat(&arm.pat); 199,864 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (681x) 2,355 ( 0.00%) if let Some(body) = &arm.body { . this.apply(|this| walk_expr(this, body)); . } . }); . 1,570 ( 0.00%) self.check_single_char_names(); 10,595 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (681x) . self.single_char_names.pop(); 6,280 ( 0.00%) } . fn visit_item(&mut self, _: &Item) { . // do not recurse into inner items . } . } . . impl EarlyLintPass for NonExpressiveNames { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 3,066 ( 0.00%) if item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 496 ( 0.00%) if let ItemKind::Fn(ast::Fn { . ref sig, . body: Some(ref blk), . .. 992 ( 0.00%) }) = item.kind . { 1,240 ( 0.00%) do_check(self, cx, &item.attrs, &sig.decl, blk); 908,838 ( 0.05%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:clippy_lints::non_expressive_names::do_check (248x) . } . } . . fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &AssocItem) { 7,520 ( 0.00%) if item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 1,438 ( 0.00%) if let AssocItemKind::Fn(ast::Fn { . ref sig, . body: Some(ref blk), . .. 4,314 ( 0.00%) }) = item.kind . { 5,752 ( 0.00%) do_check(self, cx, &item.attrs, &sig.decl, blk); 2,004,544 ( 0.11%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:clippy_lints::non_expressive_names::do_check (1,438x) . } . } . } . 18,546 ( 0.00%) fn do_check(lint: &NonExpressiveNames, cx: &EarlyContext<'_>, attrs: &[Attribute], decl: &FnDecl, blk: &Block) { . if !attrs.iter().any(|attr| attr.has_name(sym::test)) { 13,488 ( 0.00%) let mut visitor = SimilarNamesLocalVisitor { . names: Vec::new(), . cx, . threshold: lint.single_char_binding_names_threshold, 5,058 ( 0.00%) single_char_names: vec![vec![]], . }; . . // initialize with function arguments . for arg in &decl.inputs { 7,568 ( 0.00%) SimilarNamesNameVisitor(&mut visitor).visit_pat(&arg.pat); 558,290 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (1,892x) . } . // walk all other bindings . walk_block(&mut visitor, blk); . 1,686 ( 0.00%) visitor.check_single_char_names(); 21,219 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (1,686x) . } 13,488 ( 0.00%) } . . /// Precondition: `a_name.chars().count() < b_name.chars().count()`. . #[must_use] 54 ( 0.00%) fn levenstein_not_1(a_name: &str, b_name: &str) -> bool { . debug_assert!(a_name.chars().count() < b_name.chars().count()); . let mut a_chars = a_name.chars(); . let mut b_chars = b_name.chars(); 406 ( 0.00%) while let (Some(a), Some(b)) = (a_chars.next(), b_chars.next()) { 382 ( 0.00%) if a == b { . continue; . } . if let Some(b2) = b_chars.next() { . // check if there's just one character inserted 138 ( 0.00%) return a != b2 || a_chars.ne(b_chars); . } . // tuple . // ntuple . return true; . } . // for item in items . true 108 ( 0.00%) } 24,174 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . #[clippy::version = "1.74.0"] . pub RESERVE_AFTER_INITIALIZATION, . complexity, . "`reserve` called immediately after `Vec` creation" . } . . impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]); . 1 ( 0.00%) #[derive(Default)] . pub struct ReserveAfterInitialization { . searcher: Option, . } . . struct VecReserveSearcher { . local_id: HirId, . err_span: Span, . init_part: String, . space_hint: String, . } . impl VecReserveSearcher { . fn display_err(&self, cx: &LateContext<'_>) { 7 ( 0.00%) if self.space_hint.is_empty() { . return; . } . . let s = format!("{}Vec::with_capacity({});", self.init_part, self.space_hint); . . span_lint_and_sugg( . cx, . RESERVE_AFTER_INITIALIZATION, -- line 58 ---------------------------------------- -- line 62 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 2,840 ( 0.00%) self.searcher = None; . } . 4,236 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 2,118 ( 0.00%) if let Some(init_expr) = local.init 4,887 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, _, None) = local.pat.kind 402 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 804 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, init_expr) 10,695 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (134x) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { 63 ( 0.00%) self.searcher = Some(VecReserveSearcher { . local_id: id, . err_span: local.span, . init_part: snippet( . cx, . local . .span . .shrink_to_lo() 35 ( 0.00%) .to(init_expr.span.source_callsite().shrink_to_lo()), 966 ( 0.00%) => ???:::to (7x) 168 ( 0.00%) => ???:::source_callsite (7x) . "..", . ) . .into_owned(), . space_hint: String::new(), . }); . } 4,942 ( 0.00%) } . 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,554 ( 0.00%) if self.searcher.is_none() 163 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 1,001 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 405 ( 0.00%) && let Res::Local(id) = path.res 405 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 810 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, right) 4,404 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (135x) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { . self.searcher = Some(VecReserveSearcher { . local_id: id, . err_span: expr.span, -- line 114 ---------------------------------------- -- line 116 ---------------------------------------- . cx, . left.span.shrink_to_lo().to(right.span.source_callsite().shrink_to_lo()), . "..", . ) . .into_owned(), // see `assign_expression` test . space_hint: String::new(), . }); . } 217,552 ( 0.01%) } . 14,385 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 4,173 ( 0.00%) if let Some(searcher) = self.searcher.take() { 20 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind 12 ( 0.00%) && let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::reserve . && !is_from_proc_macro(cx, expr) . { . self.searcher = Some(VecReserveSearcher { . err_span: searcher.err_span.to(stmt.span), . space_hint: snippet(cx, space_hint.span, "..").into_owned(), . ..searcher . }); . } else { . searcher.display_err(cx); . } . } 16,440 ( 0.00%) } . 11,360 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 5,680 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } 11,360 ( 0.00%) } . } 1,925 ( 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 { 20,560 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { . // Handle module items: push state for their children. 8,014 ( 0.00%) match &item.kind { . ItemKind::Mod(.., ModKind::Loaded(_, Inline::No { .. }, mod_spans, ..)) => { 210 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); 5,838 ( 0.00%) => ???:::lookup_source_file (42x) . 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); 34 ( 0.00%) return; . }, . _ => {}, . } . . // Skip items from macro expansion. 4,988 ( 0.00%) if item.span.from_expansion() { . return; . } . . // Only lint inside mod.rs files (not at crate root depth). 2,452 ( 0.00%) if !self.module_stack.last().copied().unwrap_or(false) { . return; . } . . let Some(kind) = definition_kind(item) else { . return; . }; . . let help = if let Some(ident) = item.kind.ident() { -- line 95 ---------------------------------------- -- line 101 ---------------------------------------- . span_lint_and_help( . cx, . DEFINITION_IN_MODULE_ROOT, . item.span, . "definition in module root file", . None, . help, . ); 20,560 ( 0.00%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &ast::Item) { 20,560 ( 0.00%) 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 ---------------------------------------- -- line 146 ---------------------------------------- . . /// Check if an item has `#[macro_export]`. . fn has_macro_export(item: &ast::Item) -> bool { . item.attrs.iter().any(|attr| attr.has_name(sym::macro_export)) . } . . /// Check if a source file is `mod.rs`. . fn is_mod_rs(file: &SourceFile) -> bool { 84 ( 0.00%) if let FileName::Real(name) = &file.name { . name.local_path() 42 ( 0.00%) .and_then(|p| p.file_name()) 9,132 ( 0.00%) => ???:::file_name (42x) . .is_some_and(|n| n == "mod.rs") . } else { . false . } . } 126 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/neg_multiply.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . } . } . . false . } . . impl<'tcx> LateLintPass<'tcx> for NegMultiply { . fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 27,194 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = e.kind 382 ( 0.00%) && BinOpKind::Mul == op.node . { 14 ( 0.00%) match (&left.kind, &right.kind) { . (&ExprKind::Unary(..), &ExprKind::Unary(..)) => {}, . (&ExprKind::Unary(UnOp::Neg, lit), _) => check_mul(cx, e, lit, right), . (_, &ExprKind::Unary(UnOp::Neg, lit)) => check_mul(cx, e, lit, left), . _ => {}, . } . } . } . } -- line 62 ---------------------------------------- 4 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/caches.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . K: QueryKey, . V: Copy, . { . type Key = K; . type Value = V; . . #[inline(always)] . fn lookup(&self, key: &K) -> Option<(V, DepNodeIndex)> { 24,701 ( 0.00%) self.cache.get(key) 8,105 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sharded.rs:, (rustc_middle::query::erase::ErasedData<[u8; 16]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get::> (94x) . } . . #[inline] . fn complete(&self, key: K, value: V, index: DepNodeIndex) { . self.cache.insert_unique(key, (value, index)); . } . . fn for_each(&self, f: &mut dyn FnMut(&Self::Key, &Self::Value, DepNodeIndex)) { -- line 71 ---------------------------------------- -- line 142 ---------------------------------------- . where . V: Copy, . { . type Key = DefId; . type Value = V; . . #[inline(always)] . fn lookup(&self, key: &DefId) -> Option<(V, DepNodeIndex)> { 12,968 ( 0.00%) if key.krate == LOCAL_CRATE { . self.local.lookup(&key.index) . } else { . self.foreign.lookup(key) . } . } . . #[inline] . fn complete(&self, key: DefId, value: V, index: DepNodeIndex) { -- line 158 ---------------------------------------- 668 ( 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/function.rs -------------------------------------------------------------------------------- Ir -- line 158 ---------------------------------------- . label = "expected an `{This:resolved}` closure, found `{Self}`" . )] . #[fundamental] // so that regex can rely that `&str: !FnMut` . #[must_use = "closures are lazy and do nothing unless called"] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . pub const trait FnMut: FnOnce { . /// Performs the call operation. . #[unstable(feature = "fn_traits", issue = "29625")] 272 ( 0.00%) extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; 63 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::from_full_name (1x) . } . . /// The version of the call operator that takes a by-value receiver. . /// . /// Instances of `FnOnce` can be called, but might not be callable multiple . /// times. Because of this, if the only thing known about a type is that it . /// implements `FnOnce`, it can only be called once. . /// -- line 174 ---------------------------------------- -- line 242 ---------------------------------------- . pub const trait FnOnce { . /// The returned type after the call operator is used. . #[lang = "fn_once_output"] . #[stable(feature = "fn_once_output", since = "1.12.0")] . type Output; . . /// Performs the call operation. . #[unstable(feature = "fn_traits", issue = "29625")] 910 ( 0.00%) extern "rust-call" fn call_once(self, args: Args) -> Self::Output; 10,864 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::new (388x) . } . . mod impls { . use crate::marker::Tuple; . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl Fn for &F -- line 258 ---------------------------------------- -- line 266 ---------------------------------------- . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnMut for &F . where . F: [const] Fn, . { . extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { 68 ( 0.00%) (**self).call(args) 30,065 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/same_functions_in_if_cond.rs:clippy_lints::ifs::same_functions_in_if_cond::check::{closure#0} (17x) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnOnce for &F . where . F: [const] Fn, -- line 282 ---------------------------------------- -- line 289 ---------------------------------------- . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnMut for &mut F . where . F: [const] FnMut, . { 41,168 ( 0.00%) extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { 5,891 ( 0.00%) (*self).call_mut(args) 48,364 ( 0.00%) } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnOnce for &mut F . where . F: [const] FnMut, . { . type Output = F::Output; . extern "rust-call" fn call_once(self, args: A) -> F::Output { 5,871 ( 0.00%) (*self).call_mut(args) 22,671 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::tokenize_with_text::{closure#0} (693x) . } . } . } 131 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . } . impl AssertionsOnConstants { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants { 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 2,562 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, e) 2,892 ( 0.00%) && let is_debug = match cx.tcx.get_diagnostic_name(macro_call.def_id) { 22,845 ( 0.00%) => ???:::get_diagnostic_name (366x) . Some(sym::debug_assert_macro) => true, . Some(sym::assert_macro) => false, . _ => return, . } 84 ( 0.00%) && let Some((condition, _)) = find_assert_args(cx, e, macro_call.expn) 13,639 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_args (12x) . // Check if the whole expression can be moved into a const context. . // Note that const eval can evaluate things which cannot be moved (e.g. `false && x`). 60 ( 0.00%) && is_const_evaluatable(cx.tcx, cx.typeck_results(), condition) 7,959 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::is_const_evaluatable (12x) . && let Some((Constant::Bool(assert_val), const_src)) = . ConstEvalCtxt::new(cx).eval_with_source(condition, macro_call.span.ctxt()) . && let in_const_context = is_inside_always_const_context(cx.tcx, e.hir_id) . && (const_src.is_local() || !in_const_context) . && !(is_debug && as_bool_lit(condition) == Some(false)) . { . let (msg, help) = if !const_src.is_local() { . let help = if self.msrv.meets(cx, msrvs::CONST_BLOCKS) { -- line 65 ---------------------------------------- -- line 76 ---------------------------------------- . ( . "this assertion is always `false`", . "replace this with `panic!()` or `unreachable!()`", . ) . }; . . span_lint_and_help(cx, ASSERTIONS_ON_CONSTANTS, macro_call.span, msg, None, help); . } 217,552 ( 0.01%) } . } . . fn as_bool_lit(e: &Expr<'_>) -> Option { . if let ExprKind::Lit(l) = e.kind . && let LitKind::Bool(b) = l.node . { . Some(b) . } else { -- line 92 ---------------------------------------- 768 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{self as hir, AmbigArg, GenericParamKind, TyKind}; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::TYPE_COMPLEXITY; . . pub(super) fn check(cx: &LateContext<'_>, ty: &hir::Ty<'_>, type_complexity_threshold: u64) -> bool { . let score = { 2,792 ( 0.00%) let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 }; . visitor.visit_ty_unambig(ty); 1,328 ( 0.00%) visitor.score . }; . 2,792 ( 0.00%) if score > type_complexity_threshold { . span_lint( . cx, . TYPE_COMPLEXITY, . ty.span, . "very complex type used. Consider factoring parts into `type` definitions", . ); . true . } else { -- line 25 ---------------------------------------- -- line 36 ---------------------------------------- . } . . impl<'tcx> Visitor<'tcx> for TypeComplexityVisitor { . fn visit_infer(&mut self, inf_id: hir::HirId, _inf_span: Span, _kind: InferKind<'tcx>) -> Self::Result { . self.score += 1; . self.visit_id(inf_id); . } . 9,088 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx hir::Ty<'_, AmbigArg>) { 20,475 ( 0.00%) let (add_score, sub_nest) = match ty.kind { . // &x and *x have only small overhead; don't mess with nesting level . TyKind::Ptr(..) | TyKind::Ref(..) => (1, 0), . . // the "normal" components of a type: named types, arrays/tuples 5,832 ( 0.00%) TyKind::Path(..) | TyKind::Slice(..) | TyKind::Tup(..) | TyKind::Array(..) => (10 * self.nest, 1), . . // function types bring a lot of overhead 100 ( 0.00%) TyKind::FnPtr(fn_ptr) if fn_ptr.abi == ExternAbi::Rust => (50 * self.nest, 1), 423 ( 0.00%) => ???:::eq (9x) . 3 ( 0.00%) TyKind::TraitObject(param_bounds, _) => { . let has_lifetime_parameters = param_bounds.iter().any(|bound| { . bound . .bound_generic_params . .iter() . .any(|param| matches!(param.kind, GenericParamKind::Lifetime { .. })) . }); . if has_lifetime_parameters { . // complex trait bounds like A<'a, 'b> . (50 * self.nest, 1) . } else { . // simple trait bounds like A + B 12 ( 0.00%) (20 * self.nest, 0) . } . }, . . _ => (0, 0), . }; 2,275 ( 0.00%) self.score += add_score; 2,275 ( 0.00%) self.nest += sub_nest; 4,550 ( 0.00%) walk_ty(self, ty); 192 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::'2 (3x) 2,278 ( 0.00%) self.nest -= sub_nest; 9,088 ( 0.00%) } . } 6,810 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/option_env_unwrap.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . correctness, . "using `option_env!(...).unwrap()` to get environment variable" . } . . declare_lint_pass!(OptionEnvUnwrap => [OPTION_ENV_UNWRAP]); . . impl EarlyLintPass for OptionEnvUnwrap { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 47,216 ( 0.00%) if let ExprKind::MethodCall(MethodCall { seg, receiver, .. }) = &expr.kind 13,334 ( 0.00%) && matches!(seg.ident.name, sym::expect | sym::unwrap) 198 ( 0.00%) && is_direct_expn_of(receiver.span, sym::option_env).is_some() 759 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of (33x) . { . span_lint_and_help( . cx, . OPTION_ENV_UNWRAP, . expr.span, . "this will panic at run-time if the environment variable doesn't exist at compile-time", . None, . "consider using the `env!` macro instead", -- line 48 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/binder.rs -------------------------------------------------------------------------------- Ir -- line 18 ---------------------------------------- . use crate::{self as ty, DebruijnIndex, Interner, Region, UniverseIndex, Unnormalized}; . . /// `Binder` is a binder for higher-ranked lifetimes or types. It is part of the . /// compiler's representation for things like `for<'a> Fn(&'a isize)` . /// (which would be represented by the type `PolyTraitRef == Binder`). . /// . /// See . /// for more details. 4 ( 0.00%) #[derive_where(Clone, Copy, Hash, PartialEq, Debug; I: Interner, T)] . #[derive(GenericTypeVisitable, Lift_Generic)] . #[cfg_attr(feature = "nightly", derive(StableHash_NoContext))] . pub struct Binder { . value: T, . bound_vars: I::BoundVarKinds, . } . . impl Eq for Binder {} -- line 34 ---------------------------------------- -- line 37 ---------------------------------------- . where . T: TypeVisitable, . { . /// Wraps `value` in a binder, asserting that `value` does not . /// contain any bound vars that would be bound by the . /// binder. This is commonly used to 'inject' a value T into a . /// different binding level. . #[track_caller] 8 ( 0.00%) pub fn dummy(value: T) -> Binder { . assert!( 4 ( 0.00%) !value.has_escaping_bound_vars(), . "`{value:?}` has escaping bound vars, so it cannot be wrapped in a dummy binder." . ); . Binder { value, bound_vars: Default::default() } 16 ( 0.00%) } . . pub fn bind_with_vars(value: T, bound_vars: I::BoundVarKinds) -> Binder { . if cfg!(debug_assertions) { . let mut validator = ValidateBoundVars::new(bound_vars); . let _ = value.visit_with(&mut validator); . } 6,237 ( 0.00%) Binder { value, bound_vars } . } . } . . impl> TypeFoldable for Binder { . fn try_fold_with>(self, folder: &mut F) -> Result { . folder.try_fold_binder(self) . } . -- line 66 ---------------------------------------- -- line 79 ---------------------------------------- . fn try_super_fold_with>( . self, . folder: &mut F, . ) -> Result { . self.try_map_bound(|t| t.try_fold_with(folder)) . } . . fn super_fold_with>(self, folder: &mut F) -> Self { 8 ( 0.00%) self.map_bound(|t| t.fold_with(folder)) 118 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/predicate.rs: as rustc_type_ir::fold::TypeFoldable>::fold_with::> (2x) . } . } . . impl> TypeSuperVisitable for Binder { . fn super_visit_with>(&self, visitor: &mut V) -> V::Result { . self.as_ref().skip_binder().visit_with(visitor) . } . } -- line 95 ---------------------------------------- -- line 104 ---------------------------------------- . /// . /// `skip_binder` is only valid when you are either extracting data that does not reference . /// any generic arguments, e.g. a `DefId`, or when you're making sure you only pass the . /// value to things which can handle escaping bound vars. . /// . /// See existing uses of `.skip_binder()` in `rustc_trait_selection::traits::select` . /// or `rustc_next_trait_solver` for examples. . pub fn skip_binder(self) -> T { 5,849 ( 0.00%) self.value . } . . pub fn bound_vars(&self) -> I::BoundVarKinds { . self.bound_vars . } . . pub fn as_ref(&self) -> Binder { . Binder { value: &self.value, bound_vars: self.bound_vars } -- line 120 ---------------------------------------- -- line 139 ---------------------------------------- . F: FnOnce(T) -> U, . { . let Binder { value, bound_vars } = self; . let value = f(value); . if cfg!(debug_assertions) { . let mut validator = ValidateBoundVars::new(bound_vars); . let _ = value.visit_with(&mut validator); . } 324 ( 0.00%) Binder { value, bound_vars } . } . . pub fn try_map_bound, E>(self, f: F) -> Result, E> . where . F: FnOnce(T) -> Result, . { . let Binder { value, bound_vars } = self; 28 ( 0.00%) let value = f(value)?; . if cfg!(debug_assertions) { . let mut validator = ValidateBoundVars::new(bound_vars); . let _ = value.visit_with(&mut validator); . } . Ok(Binder { value, bound_vars }) . } . . /// Wraps a `value` in a binder, using the same bound variables as the -- line 163 ---------------------------------------- -- line 168 ---------------------------------------- . /// This currently doesn't do anything different than `bind`, because we . /// don't actually track bound vars. However, semantically, it is different . /// because bound vars aren't allowed to change here, whereas they are . /// in `bind`. This may be (debug) asserted in the future. . pub fn rebind(&self, value: U) -> Binder . where . U: TypeVisitable, . { 2,511 ( 0.00%) Binder::bind_with_vars(value, self.bound_vars) . } . . /// Unwraps and returns the value within, but only if it contains . /// no bound vars at all. (In other words, if this binder -- . /// and indeed any enclosing binder -- doesn't bind anything at . /// all.) Otherwise, returns `None`. . /// . /// (One could imagine having a method that just unwraps a single -- line 184 ---------------------------------------- -- line 327 ---------------------------------------- . /// For early binders, you should first call `instantiate` before using any visitors. . impl !TypeVisitable for ty::EarlyBinder {} . ); . . impl> EarlyBinder { . pub fn bind(cx: I, value: T) -> EarlyBinder { . // Instantiation will require normalization. . let value = ty::set_aliases_to_non_rigid(cx, value).skip_normalization(); 40 ( 0.00%) EarlyBinder { value, _tcx: PhantomData } . } . } . . impl> + Clone> EarlyBinder { . pub fn bind_iter(value: T) -> EarlyBinder { . #[cfg(debug_assertions)] . { . value.clone().into_iter().for_each(|v| assert!(!v.has_rigid_aliases())); -- line 343 ---------------------------------------- -- line 406 ---------------------------------------- . /// set up to handle these uninstantiated generic parameters. . /// . /// To skip the binder on `x: &EarlyBinder` to obtain `&T`, leverage . /// [`EarlyBinder::as_ref`](EarlyBinder::as_ref): `x.as_ref().skip_binder()`. . /// . /// See also [`Binder::skip_binder`](Binder::skip_binder), which is . /// the analogous operation on [`Binder`]. . pub fn skip_binder(self) -> T { 3,445 ( 0.00%) self.value . } . } . . impl EarlyBinder> { . pub fn def_id(&self) -> I::TraitId { . self.value.def_id . } . } -- line 422 ---------------------------------------- -- line 636 ---------------------------------------- . impl> ty::EarlyBinder { . pub fn instantiate(self, cx: I, args: A) -> Unnormalized . where . A: SliceLike, . { . // Nothing to fold, so let's avoid visiting things and possibly re-hashing/equating . // them when interning. Perf testing found this to be a modest improvement. . // See: 5 ( 0.00%) if args.is_empty() { . assert!( 1 ( 0.00%) !self.value.has_param(), . "{:?} has parameters, but no args were provided in instantiate", . self.value, . ); . return Unnormalized::new(self.value); . } 16 ( 0.00%) let mut folder = ArgFolder { cx, args: args.as_slice(), binders_passed: 0 }; . Unnormalized::new(self.value.fold_with(&mut folder)) 4 ( 0.00%) } . . /// Makes the identity replacement `T0 => T0, ..., TN => TN`. . /// Conceptually, this converts universally bound variables into placeholders . /// when inside of a given item. . /// . /// For example, consider `for fn foo(){ .. }`: . /// - Outside of `foo`, `T` is bound (represented by the presence of `EarlyBinder`). . /// - Inside of the body of `foo`, we treat `T` as a placeholder by calling -- line 662 ---------------------------------------- -- line 665 ---------------------------------------- . // FIXME(#155345): In case the bound value was already normalized, this . // is unnecessary. We may want to track explicitly whether `EarlyBinder` . // contains something that has been normalized already. . // Also do that for other types who have `instantiate_identity` method, . // e.g., `GenericClauses` and `ConstConditions`. . // . // This is annoying, as e.g. `type_of` for opaque types is normalized, . // while `type_of` for free type aliases is not. 749 ( 0.00%) Unnormalized::new(self.value) . } . . /// Returns the inner value, but only if it contains no bound vars. . pub fn no_bound_vars(self) -> Option { . if !self.value.has_param() { Some(self.value) } else { None } . } . } . -- line 681 ---------------------------------------- -- line 723 ---------------------------------------- . | ty::ReStatic . | ty::RePlaceholder(_) . | ty::ReErased . | ty::ReError(_) => r, . ty::ReVar(_) => panic!("unexpected region: {r:?}"), . } . } . 20 ( 0.00%) fn fold_ty(&mut self, t: I::Ty) -> I::Ty { 4 ( 0.00%) if !t.has_param() { . return t; . } . 8 ( 0.00%) match t.kind() { . ty::Param(p) => self.ty_for_param(p, t), . _ => t.super_fold_with(self), . } 28 ( 0.00%) } . . fn fold_const(&mut self, c: I::Const) -> I::Const { . if let ty::ConstKind::Param(p) = c.kind() { . self.const_for_param(p, c) . } else { . c.super_fold_with(self) . } . } -- line 748 ---------------------------------------- -- line 754 ---------------------------------------- . fn fold_clauses(&mut self, c: I::Clauses) -> I::Clauses { . if c.has_param() { c.super_fold_with(self) } else { c } . } . } . . impl<'a, I: Interner> ArgFolder<'a, I> { . fn ty_for_param(&self, p: I::ParamTy, source_ty: I::Ty) -> I::Ty { . // Look up the type in the args. It really should be in there. 16 ( 0.00%) let opt_ty = self.args.get(p.index() as usize).map(|arg| arg.kind()); 24 ( 0.00%) => ???:::kind (4x) 8 ( 0.00%) let ty = match opt_ty { . Some(ty::GenericArgKind::Type(ty)) => ty, . Some(kind) => self.type_param_expected(p, source_ty, kind), . None => self.type_param_out_of_range(p, source_ty), . }; . 4 ( 0.00%) self.shift_vars_through_binders(ty) . } . . #[cold] . #[inline(never)] . fn type_param_expected(&self, p: I::ParamTy, ty: I::Ty, kind: ty::GenericArgKind) -> ! { . panic!( . "expected type for `{:?}` ({:?}/{}) but found {:?} when instantiating, args={:?}", . p, -- line 777 ---------------------------------------- -- line 905 ---------------------------------------- . /// // DebruijnIndex of 1 | . /// // DebruijnIndex of 2 . /// ``` . /// As indicated in the diagram, here the same type `&'a i32` is instantiated once, but in the . /// first case we do not increase the De Bruijn index and in the second case we do. The reason . /// is that only in the second case have we passed through a fn binder. . #[instrument(level = "trace", skip(self), fields(binders_passed = self.binders_passed), ret)] . fn shift_vars_through_binders>(&self, val: T) -> T { 12 ( 0.00%) if self.binders_passed == 0 || !val.has_escaping_bound_vars() { . val . } else { . ty::shift_vars(self.cx, val, self.binders_passed) . } . } . . fn shift_region_through_binders(&self, region: Region) -> Region { . if self.binders_passed == 0 || !region.has_escaping_bound_vars() { -- line 921 ---------------------------------------- -- line 976 ---------------------------------------- . if self.universe == ty::UniverseIndex::ROOT { . write!(f, "!{:?}", self.bound) . } else { . write!(f, "!{}_{:?}", self.universe.index(), self.bound) . } . } . } . 22,096 ( 0.00%) #[derive_where(Clone, Copy, PartialEq, Eq, Hash; I: Interner)] . #[derive(Lift_Generic, GenericTypeVisitable)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] . pub enum BoundRegionKind { . /// An anonymous region parameter for a given fn (&T) . Anon, -- line 992 ---------------------------------------- -- line 1084 ---------------------------------------- . pub fn expect_const(self) { . match self { . BoundVariableKind::Const => (), . _ => panic!("expected a const, but found another kind"), . } . } . } . 996 ( 0.00%) #[derive_where(Clone, Copy, PartialEq, Eq, Hash; I: Interner)] . #[derive(GenericTypeVisitable, Lift_Generic)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, StableHash_NoContext, Decodable_NoContext) . )] . pub struct BoundRegion { . #[lift(identity)] . pub var: ty::BoundVar, -- line 1100 ---------------------------------------- 909 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . . #[derive(Clone, Copy, Debug, PartialEq, Eq)] . enum ParentIsSuffixExpr { . Yes, . No, . Return, . } . 900 ( 0.00%) fn check_parent_is_suffix_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> ParentIsSuffixExpr { 1,170 ( 0.00%) match cx.tcx.parent_hir_node(expr.hir_id) { 10,980 ( 0.00%) => ???:::parent_hir_node (90x) 40 ( 0.00%) Node::Expr(parent) => match parent.kind { . // &*x is a nop, &x.clone() is not . ExprKind::AddrOf(..) => ParentIsSuffixExpr::Return, . // (*x).func() is useless, x.clone().func() can work in case func borrows self . ExprKind::MethodCall(_, self_arg, ..) . if expr.hir_id == self_arg.hir_id . && cx.typeck_results().expr_ty(expr) != cx.typeck_results().expr_ty_adjusted(expr) => . { . ParentIsSuffixExpr::Return . }, . // ? is a Call, makes sure not to rec *x?, but rather (*x)? 14 ( 0.00%) ExprKind::Call(hir_callee, [_]) => { 12 ( 0.00%) if matches!( . hir_callee.kind, . ExprKind::Path(qpath) 32 ( 0.00%) if cx.tcx.qpath_is_lang_item(qpath, rustc_hir::LangItem::TryTraitBranch) 448 ( 0.00%) => ???:::qpath_is_lang_item (4x) . ) { . ParentIsSuffixExpr::Yes . } else { . ParentIsSuffixExpr::No . } . }, . ExprKind::MethodCall(_, self_arg, ..) if expr.hir_id == self_arg.hir_id => ParentIsSuffixExpr::Yes, . ExprKind::Match(_, _, MatchSource::TryDesugar(_) | MatchSource::AwaitDesugar) -- line 46 ---------------------------------------- -- line 49 ---------------------------------------- . _ => ParentIsSuffixExpr::No, . }, . // local binding capturing a reference . Node::LetStmt(l) if matches!(l.pat.kind, PatKind::Binding(BindingMode(ByRef::Yes(..), _), ..)) => { . ParentIsSuffixExpr::Return . }, . _ => ParentIsSuffixExpr::No, . } 720 ( 0.00%) } . . /// Checks for the `CLONE_ON_COPY` lint. 2,443 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, receiver: &Expr<'_>) { . if cx . .typeck_results() 1,396 ( 0.00%) .type_dependent_def_id(expr.hir_id) 17,799 ( 0.00%) => ???:::type_dependent_def_id (349x) 2,443 ( 0.00%) .and_then(|id| cx.tcx.trait_of_assoc(id)) 94,359 ( 0.01%) => ???:::trait_of_assoc (349x) 698 ( 0.00%) .zip(cx.tcx.lang_items().clone_trait()) 13,960 ( 0.00%) => ???:::lang_items (349x) . .is_none_or(|(x, y)| x != y) . { . return; . } 1,047 ( 0.00%) let arg_adjustments = cx.typeck_results().expr_adjustments(receiver); 15,007 ( 0.00%) => ???:::expr_adjustments (349x) . let arg_ty = arg_adjustments . .last() . .map_or_else(|| cx.typeck_results().expr_ty(receiver), |a| a.target); . 1,396 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 13,960 ( 0.00%) => ???:::expr_ty (349x) 698 ( 0.00%) if let ty::Ref(_, inner, _) = arg_ty.kind() 1,047 ( 0.00%) && let ty::Ref(..) = inner.kind() . { . return; // don't report clone_on_copy . } . 1,396 ( 0.00%) if !is_copy(cx, ty) { 942,302 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (349x) . return; . } 360 ( 0.00%) let check_res = check_parent_is_suffix_expr(cx, expr); 14,329 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_parent_is_suffix_expr (90x) 180 ( 0.00%) if check_res == ParentIsSuffixExpr::Return { . return; . } . 90 ( 0.00%) let mut app = Applicability::MachineApplicable; 540 ( 0.00%) let snip = snippet_with_context(cx, receiver.span, expr.span.ctxt(), "_", &mut app).0; . . let deref_count = arg_adjustments . .iter() 95 ( 0.00%) .take_while(|adj| matches!(adj.kind, Adjust::Deref(_))) . .count(); 360 ( 0.00%) let (help, sugg) = if deref_count == 0 { 425 ( 0.00%) ("try removing the `clone` call", snip.into()) 10 ( 0.00%) } else if check_res == ParentIsSuffixExpr::Yes { . ("try dereferencing it", format!("({}{snip})", "*".repeat(deref_count))) . } else { 35 ( 0.00%) ("try dereferencing it", format!("{}{snip}", "*".repeat(deref_count))) . }; . 1,350 ( 0.00%) span_lint_and_sugg( 118,840 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (90x) . cx, . CLONE_ON_COPY, . expr.span, 450 ( 0.00%) with_forced_trimmed_paths!(format!( 360 ( 0.00%) => ???:::new (90x) . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); 2,972 ( 0.00%) } . 10,248 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>) { 4,392 ( 0.00%) let ExprKind::Call(func, args) = expr.kind else { return }; . 8,784 ( 0.00%) if let ExprKind::Path(qpath) = func.kind 8,784 ( 0.00%) && let Some(def_id) = cx.typeck_results().qpath_res(&qpath, func.hir_id).opt_def_id() 38,948 ( 0.00%) => ???:::qpath_res (1,464x) 14,928 ( 0.00%) && cx.tcx.trait_of_assoc(def_id) == cx.tcx.lang_items().clone_trait() 172,349 ( 0.01%) => ???:::trait_of_assoc (1,450x) 58,000 ( 0.00%) => ???:::lang_items (1,450x) . && let [arg] = args . && let ty = cx.typeck_results().expr_ty(expr) . { . if !is_copy(cx, ty) { . return; . } . . let check_res = check_parent_is_suffix_expr(cx, expr); -- line 131 ---------------------------------------- -- line 166 ---------------------------------------- . with_forced_trimmed_paths!(format!( . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); . } 11,712 ( 0.00%) } 7,797 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/multi_assignments.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub MULTI_ASSIGNMENTS, . suspicious, . "instead of using `a = b = c;` use `a = c; b = c;`" . } . . declare_lint_pass!(MultiAssignments => [MULTI_ASSIGNMENTS]); . . fn strip_paren_blocks(expr: &Expr) -> &Expr { 2,305 ( 0.00%) match &expr.kind { . ExprKind::Paren(e) => strip_paren_blocks(e), . ExprKind::Block(b, _) => { 12 ( 0.00%) if let [ . Stmt { . kind: StmtKind::Expr(e), . .. . }, 3 ( 0.00%) ] = &b.stmts[..] . { . strip_paren_blocks(e) . } else { . expr . } . }, . _ => expr, . } . } . . impl EarlyLintPass for MultiAssignments { 66,804 ( 0.00%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 44,536 ( 0.00%) if let ExprKind::Assign(target, source, _) = &expr.kind { 492 ( 0.00%) if let ExprKind::Assign(_target, _source, _) = &strip_paren_blocks(target).kind { . span_lint(cx, MULTI_ASSIGNMENTS, expr.span, "assignments don't nest intuitively"); . } 495 ( 0.00%) if let ExprKind::Assign(_target, _source, _) = &strip_paren_blocks(source).kind { . span_lint(cx, MULTI_ASSIGNMENTS, expr.span, "assignments don't nest intuitively"); . } . } 89,072 ( 0.01%) } . } 9 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 7,710 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 5,140 ( 0.00%) if let ItemKind::MacroDef(_, macro_def) = &item.kind . && item.attrs.iter().any(is_macro_export) 105 ( 0.00%) && let Some(span) = contains_unhygienic_crate_reference(¯o_def.body.tokens) 104,270 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:clippy_lints::crate_in_macro_def::contains_unhygienic_crate_reference (21x) . { . 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, . ); . } 10,280 ( 0.00%) } . } . . fn is_macro_export(attr: &Attribute) -> bool { 1,258 ( 0.00%) if let AttrKind::Normal(normal) = &attr.kind 66 ( 0.00%) && let [segment] = normal.item.path.segments.as_slice() . { . segment.ident.name == sym::macro_export . } else { . false . } . } . 4,408 ( 0.00%) fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option { . let mut prev_is_dollar = false; . let mut iter = tts.iter(); . while let Some(curr) = iter.next() { 8,514 ( 0.00%) if !prev_is_dollar . && let Some(span) = is_crate_keyword(curr) . && let Some(next) = iter.peek() . && is_token(next, &TokenKind::PathSep) . { . return Some(span); . } 4,269 ( 0.00%) if let TokenTree::Delimited(.., tts) = &curr { 2,120 ( 0.00%) let span = contains_unhygienic_crate_reference(tts); 85,092 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:clippy_lints::crate_in_macro_def::contains_unhygienic_crate_reference'2 (338x) 1,060 ( 0.00%) if span.is_some() { . return span; . } . } 9,579 ( 0.00%) prev_is_dollar = is_token(curr, &TokenKind::Dollar); 7,774 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:clippy_lints::crate_in_macro_def::is_token (676x) . } . None 4,408 ( 0.00%) } . . fn is_crate_keyword(tt: &TokenTree) -> Option { 10,294 ( 0.00%) if let TokenTree::Token( . Token { 1,450 ( 0.00%) kind: TokenKind::Ident(kw::Crate, _), . span, . }, . _, . ) = tt . { . Some(*span) . } else { . None . } . } . 9,579 ( 0.00%) fn is_token(tt: &TokenTree, kind: &TokenKind) -> bool { 6,386 ( 0.00%) if let TokenTree::Token(Token { kind: other, .. }, _) = tt { . kind == other . } else { . false . } 12,772 ( 0.00%) } 2,166 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs -------------------------------------------------------------------------------- Ir -- line 62 ---------------------------------------- . decl: &'tcx FnDecl<'_>, . expr: &'tcx Expr<'_>, . body_span: Span, . ) { . if body_span.from_expansion() { . return; . } . 849 ( 0.00%) let mut cc = 1u64; 849 ( 0.00%) let mut returns = 0u64; 849 ( 0.00%) let mut prev_expr: Option<&ExprKind<'tcx>> = None; . let _: Option = for_each_expr_without_closures(expr, |e| { 196,598 ( 0.01%) match e.kind { . ExprKind::If(_, _, _) => { . cc += 1; . }, 1,272 ( 0.00%) ExprKind::Match(_, arms, _) => { 1,272 ( 0.00%) if arms.len() > 1 { 1,154 ( 0.00%) cc += 1; . } . cc += arms.iter().filter(|arm| arm.guard.is_some()).count() as u64; . }, 3,409 ( 0.00%) ExprKind::Ret(_) if !matches!(prev_expr, Some(ExprKind::Ret(_))) => { 487 ( 0.00%) returns += 1; . }, . _ => {}, . } 41,484 ( 0.00%) prev_expr = Some(&e.kind); . ControlFlow::Continue(()) . }); . 2,547 ( 0.00%) let ret_ty = cx.typeck_results().node_type(expr.hir_id); 34,857 ( 0.00%) => ???:::node_type (849x) 1,090 ( 0.00%) let ret_adjust = if ret_ty.is_diag_item(cx, sym::Result) { 213 ( 0.00%) returns . } else { . #[expect(clippy::integer_division)] 1,272 ( 0.00%) (returns / 2) . }; . . // prevent degenerate cases where unreachable code contains `return` statements 4,245 ( 0.00%) if cc >= ret_adjust { 1,698 ( 0.00%) cc -= ret_adjust; . } . 1,698 ( 0.00%) if cc > self.limit.limit() { 4 ( 0.00%) let fn_span = match kind { . FnKind::ItemFn(ident, _, _) | FnKind::Method(ident, _) => ident.span, . FnKind::Closure => { . let header_span = body_span.with_hi(decl.output.span().lo()); . if let Some(range) = header_span.map_range(cx, |_, src, range| { . let mut idxs = src.get(range.clone())?.match_indices('|'); . Some(range.start + idxs.next()?.0..range.start + idxs.next()?.0 + 1) . }) { . range.with_ctxt(header_span.ctxt()) -- line 115 ---------------------------------------- -- line 118 ---------------------------------------- . } . }, . }; . . span_lint_and_help( . cx, . COGNITIVE_COMPLEXITY, . fn_span, 14 ( 0.00%) format!( . "the function has a cognitive complexity of ({cc}/{})", . self.limit.limit() . ), 2 ( 0.00%) None, . "you could split it up into multiple smaller functions", . ); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for CognitiveComplexity { 26,610 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . span: Span, . def_id: LocalDefId, . ) { . #[allow(deprecated)] 1,774 ( 0.00%) if cx.tcx.get_attrs(def_id, sym::test).next().is_none() { 19,514 ( 0.00%) let expr = if kind.asyncness().is_async() { 18,314 ( 0.00%) => ???:::asyncness (1,774x) . match get_async_fn_body(cx.tcx, body) { . Some(b) => b, . None => { . return; . }, . } . } else { 1,774 ( 0.00%) body.value . }; . 8,870 ( 0.00%) self.check(cx, kind, decl, expr, span); . } 14,192 ( 0.00%) } . . fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { . self.limit.push_attrs(cx.sess(), attrs, sym::cognitive_complexity); . } . fn check_attributes_post(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { . self.limit.pop_attrs(cx.sess(), attrs, sym::cognitive_complexity); . } . } -- line 170 ---------------------------------------- 29,695 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs -------------------------------------------------------------------------------- Ir -- line 90 ---------------------------------------- . pub fn new(conf: &'static Conf) -> Self { . Self { . msrv: conf.msrv.into(), . lint_commented_code: conf.lint_commented_code, . } . } . . fn check_collapsible_else_if(&self, cx: &LateContext<'_>, then_span: Span, else_block: &Block<'_>) { 158 ( 0.00%) if let Some(else_) = expr_block(else_block) 202 ( 0.00%) && !else_.span.from_expansion() 192 ( 0.00%) && let ExprKind::If(else_if_cond, ..) = else_.kind . && self.check_significant_tokens_and_expect_attrs(cx, else_block, else_, sym::collapsible_else_if) . { . span_lint_hir_and_then( . cx, . COLLAPSIBLE_ELSE_IF, . else_.hir_id, . else_block.span, . "this `else { if .. }` block can be collapsed", -- line 108 ---------------------------------------- -- line 160 ---------------------------------------- . ), . applicability, . ); . }, . ); . } . } . 1,216 ( 0.00%) fn check_collapsible_if_if(&self, cx: &LateContext<'_>, expr: &Expr<'_>, check: &Expr<'_>, then: &Block<'_>) { 28 ( 0.00%) if let Some(inner) = expr_block(then) 348 ( 0.00%) && let ExprKind::If(check_inner, _, None) = &inner.kind 15 ( 0.00%) && self.eligible_condition(cx, check_inner) . && expr.span.eq_ctxt(inner.span) . && self.check_significant_tokens_and_expect_attrs(cx, then, inner, sym::collapsible_if) . && let then_closing_bracket = { . let end = then.span.shrink_to_hi(); . end.with_lo(end.lo() - BytePos(1)) . } . && !span_contains_cfg(cx, inner.span.between(then_closing_bracket)) . { -- line 179 ---------------------------------------- -- line 209 ---------------------------------------- . . sugg.extend(parens_around(check)); . sugg.extend(parens_around(check_inner)); . . diag.multipart_suggestion("collapse nested if block", sugg, Applicability::MachineApplicable); . }, . ); . } 1,216 ( 0.00%) } . . fn eligible_condition(&self, cx: &LateContext<'_>, cond: &Expr<'_>) -> bool { 779 ( 0.00%) !matches!(cond.kind, ExprKind::Let(..)) || can_use_if_let_chains(cx, self.msrv) 246 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::can_use_if_let_chains (41x) . } . . // Check that nothing significant can be found between the initial `{` of `inner_if` and . // the beginning of `inner_if_expr`... . // . // Unless it's only an `#[expect(clippy::collapsible{,_else}_if)]` attribute, in which case we . // _do_ need to lint, in order to actually fulfill its expectation (#13365) . fn check_significant_tokens_and_expect_attrs( -- line 228 ---------------------------------------- -- line 256 ---------------------------------------- . . // There are other attributes, which are significant tokens -- check failed . _ => false, . } . } . } . . impl LateLintPass<'_> for CollapsibleIf { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 54,388 ( 0.00%) if let ExprKind::If(cond, then, else_) = &expr.kind 890 ( 0.00%) && !expr.span.from_expansion() . { 1,161 ( 0.00%) if let Some(else_) = else_ . // Short circuit if both `if` branches contain only a single `if {..} else {}`, as . // collapsing such blocks can lead to less readable code (#4971) 197 ( 0.00%) && !(single_inner_if_else(then) && single_inner_if_else(else_)) 721 ( 0.00%) && let ExprKind::Block(else_, None) = else_.kind . { 111 ( 0.00%) self.check_collapsible_else_if(cx, then.span, else_); . } else if else_.is_none() 468 ( 0.00%) && self.eligible_condition(cx, cond) 912 ( 0.00%) && let ExprKind::Block(then, None) = then.kind . { 2,128 ( 0.00%) self.check_collapsible_if_if(cx, expr, cond, then); 4,253 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_collapsible_if_if (152x) . } . } 216,336 ( 0.01%) } . } . . /// Returns true if `expr` is a block that contains only one `if {..} else {}` statement . fn single_inner_if_else(expr: &Expr<'_>) -> bool { 979 ( 0.00%) if let ExprKind::Block(block, None) = expr.kind 252 ( 0.00%) && let Some(inner_expr) = expr_block(block) 300 ( 0.00%) && let ExprKind::If(_, _, else_) = inner_expr.kind . && else_.is_some() . { . true . } else { . false . } . } . . /// If `block` is a block with either one expression or a statement containing an expression, . /// return the expression. We don't peel blocks recursively, as extra blocks might be intentional. . fn expr_block<'tcx>(block: &Block<'tcx>) -> Option<&'tcx Expr<'tcx>> { 1,242 ( 0.00%) match (block.stmts, block.expr) { 1,506 ( 0.00%) ([], expr) => expr, 444 ( 0.00%) ([stmt], None) if let StmtKind::Semi(expr) = stmt.kind => Some(expr), . _ => None, . } . } . . /// If the expression is a `||`, suggest parentheses around it. . pub(super) fn parens_around(expr: &Expr<'_>) -> Vec<(Span, String)> { . if let ExprKind::Binary(op, _, _) = expr.peel_drop_temps().kind . && op.node == BinOpKind::Or -- line 311 ---------------------------------------- 426 ( 0.00%) -------------------------------------------------------------------------------- -- 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)] 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Skip path expressions from deref calls. e.g. `Deref::deref(e)` 54,388 ( 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 54,388 ( 0.00%) if expr.span.from_expansion() { 19,152 ( 0.00%) 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 35,022 ( 0.00%) if let Some((state, data)) = self.state.take() { 134 ( 0.00%) self.report(cx, expr, state, data, typeck); . } . return; . }; 442 ( 0.00%) self.skip_expr = skip_expr; . 884 ( 0.00%) if is_from_proc_macro(cx, expr) { . if let Some((state, data)) = self.state.take() { . self.report(cx, expr, state, data, cx.typeck_results()); . } . return; . } . 884 ( 0.00%) match (self.state.take(), kind) { . (None, kind) => { 1,768 ( 0.00%) let expr_ty = typeck.expr_ty(expr); 17,716 ( 0.00%) => ???:::expr_ty (442x) 2,210 ( 0.00%) let use_site = get_expr_use_site(cx.tcx, typeck, SyntaxContext::root(), expr); 158,951 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (442x) 2,734 ( 0.00%) let adjusted_ty = use_site.adjustments.last().map_or(expr_ty, |a| a.target); . 4,862 ( 0.00%) match kind { 142 ( 0.00%) RefOp::Deref if use_site.same_ctxt => { 71 ( 0.00%) let use_node = use_site.use_node(cx); 1,952 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (71x) 213 ( 0.00%) let sub_ty = typeck.expr_ty(sub_expr); 2,840 ( 0.00%) => ???:::expr_ty (71x) 426 ( 0.00%) if let ExprUseNode::FieldAccess(name) = use_node . && !use_site.moved_before_use . && !ty_contains_field(sub_ty, name.name) . { . self.state = Some(( . State::ExplicitDerefField { . name: name.name, . derefs_manually_drop: is_manually_drop(sub_ty), . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 71 ( 0.00%) } else if sub_ty.is_ref() . // Linting method receivers would require verifying that name lookup . // would resolve the same way. This is complicated by trait methods. . && !use_node.is_recv() 177 ( 0.00%) && let Some(ty) = use_node.defined_ty(cx) 20,712 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (59x) 58 ( 0.00%) && TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()).is_deref_stable() 5,224 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty (29x) . { . self.state = Some(( . State::ExplicitDeref { mutability: None }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); -- line 315 ---------------------------------------- -- line 328 ---------------------------------------- . mutbl, . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); . }, 742 ( 0.00%) RefOp::AddrOf(mutability) if use_site.same_ctxt => { . // Find the number of times the borrow is auto-derefed. . let mut iter = use_site.adjustments.iter(); . let mut deref_count = 0usize; . let next_adjust = loop { . match iter.next() { . Some(adjust) => { 2,889 ( 0.00%) if !matches!(adjust.kind, Adjust::Deref(_)) { . break Some(adjust); 642 ( 0.00%) } else if !adjust.target.is_ref() { . deref_count += 1; . break iter.next(); . } . deref_count += 1; . }, . None => break None, . } . }; . 2,208 ( 0.00%) let use_node = use_site.use_node(cx); 13,584 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (368x) 1,472 ( 0.00%) let stability = use_node.defined_ty(cx).map_or(TyCoercionStability::None, |ty| { 203,882 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (368x) 578 ( 0.00%) TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()) 990,000 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty (289x) . }); 4,846 ( 0.00%) let can_auto_borrow = match use_node { . ExprUseNode::FieldAccess(_) . if !use_site.moved_before_use && matches!(sub_expr.kind, ExprKind::Field(..)) => . { . // `DerefMut` will not be automatically applied to `ManuallyDrop<_>` . // field expressions when the base type is a union and the parent . // expression is also a field access. . // . // e.g. `&mut x.y.z` where `x` is a union, and accessing `z` requires a -- line 367 ---------------------------------------- -- line 467 ---------------------------------------- . // // Removing the borrow will cause `x` to be moved . // Some(x) => &mut *x, . // None => y . // }; . // } . // ``` . let (required_refs, msg) = if can_auto_borrow { . (1, if deref_count == 1 { borrow_msg } else { deref_msg }) 1,763 ( 0.00%) } else if let Some(&Adjustment { . kind: Adjust::Borrow(AutoBorrow::Ref(mutability)), . .. 368 ( 0.00%) }) = next_adjust 1,992 ( 0.00%) && matches!(mutability, AutoBorrowMutability::Mut { .. }) . && !stability.is_reborrow_stable() . { . (3, deref_msg) . } else { . (2, deref_msg) . }; . 736 ( 0.00%) if deref_count >= required_refs { . self.state = Some(( . State::DerefedBorrow(DerefedBorrow { . // One of the required refs is for the current borrow expression, the remaining ones . // can't be removed without breaking the code. See earlier comment. . count: deref_count - required_refs, . msg, . stability, . for_field_access: if let ExprUseNode::FieldAccess(name) = use_node -- line 495 ---------------------------------------- -- line 500 ---------------------------------------- . None . }, . }), . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 368 ( 0.00%) } else if stability.is_deref_stable() . // Auto-deref doesn't combine with other adjustments 1,904 ( 0.00%) && next_adjust.is_none_or(|a| matches!(a.kind, Adjust::Deref(_) | Adjust::Borrow(_))) . && iter.all(|a| matches!(a.kind, Adjust::Deref(_) | Adjust::Borrow(_))) . { 402 ( 0.00%) self.state = Some(( . State::Borrow { mutability }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); . } . }, -- line 521 ---------------------------------------- -- 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), . } 217,552 ( 0.01%) } . 46,571 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 26,257 ( 0.00%) if let PatKind::Binding(BindingMode::REF, id, name, _) = pat.kind { . if let Some(opt_prev_pat) = self.ref_locals.get_mut(&id) { . // This binding id has been seen before. Add this pattern to the list of changes. . if let Some(prev_pat) = opt_prev_pat { . if pat.span.from_expansion() { . // Doesn't match the context of the previous pattern. Can't lint here. . *opt_prev_pat = None; . } else { . prev_pat.spans.push(pat.span); -- line 661 ---------------------------------------- -- line 685 ---------------------------------------- . spans: vec![pat.span], . app, . replacements: vec![(pat.span, snip.into())], . hir_id: pat.hir_id, . }), . ); . } . } 53,224 ( 0.00%) } . 13,860 ( 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; . } 15,840 ( 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 9,106 ( 0.00%) if !self.in_deref_impl() && is_deref_or_derefmut_impl(cx, item) { 94 ( 0.00%) 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) { 47 ( 0.00%) self.outermost_deref_impl = None; . } . } . } . . fn is_deref_or_derefmut_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 12,768 ( 0.00%) if let hir::ItemKind::Impl(impl_) = item.kind . && let Some(of_trait) = impl_.of_trait 4,050 ( 0.00%) && let Some(trait_id) = of_trait.trait_ref.trait_def_id() 17,550 ( 0.00%) => ???:::trait_def_id (1,350x) . { 5,376 ( 0.00%) cx.tcx.lang_items().deref_trait() == Some(trait_id) || cx.tcx.lang_items().deref_mut_trait() == Some(trait_id) 107,040 ( 0.01%) => ???:::lang_items (2,676x) . } else { . false . } . } . . fn try_parse_ref_op<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'_>, . expr: &'tcx Expr<'_>, . ) -> Option<(RefOp, &'tcx Expr<'tcx>, Option)> { 111,987 ( 0.01%) let (call_path_id, def_id, arg) = match expr.kind { 18,566 ( 0.00%) ExprKind::MethodCall(_, arg, [], _) => (None, typeck.type_dependent_def_id(expr.hir_id)?, arg), 70,017 ( 0.00%) => ???:::type_dependent_def_id (1,371x) . ExprKind::Call( . &Expr { 884 ( 0.00%) kind: ExprKind::Path(QPath::Resolved(None, path)), 871 ( 0.00%) hir_id, . .. . }, 3,799 ( 0.00%) [arg], . ) => (Some(hir_id), path.res.opt_def_id()?, arg), 687 ( 0.00%) ExprKind::Unary(UnOp::Deref, sub_expr) if !typeck.expr_ty(sub_expr).is_raw_ptr() => { 3,080 ( 0.00%) => ???:::expr_ty (77x) . return Some((RefOp::Deref, sub_expr, None)); . }, . ExprKind::AddrOf(BorrowKind::Ref, mutability, sub_expr) => { 1,855 ( 0.00%) return Some((RefOp::AddrOf(mutability), sub_expr, None)); . }, . _ => return None, . }; 20,178 ( 0.00%) let mutbl = match tcx.get_diagnostic_name(def_id) { 147,198 ( 0.01%) => ???:::get_diagnostic_name (2,242x) . Some(sym::deref_method) => Mutability::Not, . Some(sym::deref_mut_method) => Mutability::Mut, . _ => return None, . }; . Some(( . RefOp::Method { . mutbl, . is_ufcs: call_path_id.is_some(), -- line 777 ---------------------------------------- -- line 821 ---------------------------------------- . #[derive(Clone, Copy, Debug)] . enum TyCoercionStability { . Deref, . Reborrow, . None, . } . impl TyCoercionStability { . fn is_deref_stable(self) -> bool { 765 ( 0.00%) matches!(self, Self::Deref) . } . . fn is_reborrow_stable(self) -> bool { . matches!(self, Self::Deref | Self::Reborrow) . } . 1,908 ( 0.00%) fn for_defined_ty<'tcx>(cx: &LateContext<'tcx>, ty: DefinedTy<'tcx>, for_return: bool) -> Self { 954 ( 0.00%) match ty { . DefinedTy::Hir(ty) => Self::for_hir_ty(ty), 918 ( 0.00%) DefinedTy::Mir { def_site_def_id, ty } => Self::for_mir_ty( . cx.tcx, . def_site_def_id, 954 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ty), 155,019 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (318x) . for_return, . ), . } 2,226 ( 0.00%) } . . // Checks the stability of type coercions when assigned to a binding with the given explicit type. . // . // e.g. . // let x = Box::new(Box::new(0u32)); . // let y1: &Box<_> = x.deref(); . // let y2: &Box<_> = &x; . // -- line 854 ---------------------------------------- -- line 907 ---------------------------------------- . Self::for_hir_ty(ty) . }, . TyKind::UnsafeBinder(..) => Self::None, . }; . } . } . . fn for_mir_ty<'tcx>(tcx: TyCtxt<'tcx>, def_site_def_id: Option, ty: Ty<'tcx>, for_return: bool) -> Self { 636 ( 0.00%) let ty::Ref(_, mut ty, _) = *ty.kind() else { . return Self::None; . }; . 564 ( 0.00%) if let Some(def_id) = def_site_def_id { 1,112 ( 0.00%) let typing_env = ty::TypingEnv::non_body_analysis(tcx, def_id); 552,429 ( 0.03%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::non_body_analysis:: (278x) . ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)) . .unwrap_or(ty); . } . loop { 1,410 ( 0.00%) break match *ty.kind() { . ty::Ref(_, ref_ty, _) => { . ty = ref_ty; . continue; . }, 75 ( 0.00%) ty::Param(_) if for_return => Self::Deref, . ty::Alias( . _, . ty::AliasTy { . kind: ty::Free { .. } | ty::Inherent { .. }, . .. . }, . ) => unreachable!("should have been normalized away above"), . ty::Alias( -- line 939 ---------------------------------------- -- line 952 ---------------------------------------- . kind: ty::Opaque { .. }, . .. . }, . ) . | ty::Placeholder(_) . | ty::Dynamic(..) . | ty::Param(_) => Self::Reborrow, . ty::Adt(_, args) 300 ( 0.00%) if ty.has_placeholders() . || ty.has_opaque_types() 407 ( 0.00%) || (!for_return && args.has_non_region_param()) => . { . Self::Reborrow . }, . ty::Bool . | ty::Char . | ty::Int(_) . | ty::Uint(_) . | ty::Array(..) -- line 970 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . impl<'tcx> Dereferencing<'tcx> { . fn in_deref_impl(&self) -> bool { . self.outermost_deref_impl.is_some() . } . . fn check_local_usage(&mut self, cx: &LateContext<'tcx>, e: &Expr<'tcx>, local: HirId) { 27,056 ( 0.00%) if let Some(outer_pat) = self.ref_locals.get_mut(&local) 81,168 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (6,764x) . && let Some(pat) = outer_pat . // Check for auto-deref . && !matches!( . cx.typeck_results().expr_adjustments(e), . [ . Adjustment { . kind: Adjust::Deref(_), . .. -- line 1046 ---------------------------------------- -- line 1089 ---------------------------------------- . // binding, but not if the identifier was created in a macro. e.g. `concat_idents` and proc . // macros . _ => *outer_pat = None, . } . } . } . . #[expect(clippy::needless_pass_by_value, clippy::too_many_lines)] 1,340 ( 0.00%) fn report( . &self, . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . state: State, . data: StateData<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . ) { 1,072 ( 0.00%) match state { . State::DerefMethod { . ty_changed_count, . is_ufcs, . mutbl, . } => { . if self.in_deref_impl() { . // `deref(_mut)` is fine in an `impl Deref(Mut)` . return; -- line 1113 ---------------------------------------- -- line 1293 ---------------------------------------- . snip.into_owned() . }; . diag.span_suggestion(data.first_expr.span, "try", sugg, app); . }, . ); . }, . State::Borrow { .. } | State::Reborrow { .. } => (), . } 1,072 ( 0.00%) } . } 62,463 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . /// Any decimal or hexadecimal digit depending on the location. . Num, . /// An attribute. . Attr(Symbol), . } . . /// Checks if the start and the end of the span's text matches the patterns. This will return false . /// if the span crosses multiple files or if source is not available. 22,110 ( 0.00%) fn span_matches_pat(sess: &Session, span: Span, start_pat: Pat, end_pat: Pat) -> bool { 11,055 ( 0.00%) let pos = sess.source_map().lookup_byte_offset(span.lo()); 336,244 ( 0.02%) => ???:::lookup_byte_offset (2,211x) 4,422 ( 0.00%) let Some(ref src) = pos.sf.src else { . return false; . }; . let end = span.hi() - pos.sf.start_pos; 17,688 ( 0.00%) src.get(pos.pos.0 as usize..end.0 as usize).is_some_and(|s| { . // Spans can be wrapped in a mixture or parenthesis, whitespace, and trailing commas. 2,211 ( 0.00%) let start_str = s.trim_start_matches(|c: char| c.is_whitespace() || c == '('); . let end_str = s.trim_end_matches(|c: char| c.is_whitespace() || c == ')' || c == ','); 28,743 ( 0.00%) (match start_pat { . Pat::Str(text) => start_str.starts_with(text), . Pat::MultiStr(texts) => texts.iter().any(|s| start_str.starts_with(s)), . Pat::OwnedMultiStr(texts) => texts.iter().any(|s| start_str.starts_with(s)), . Pat::Sym(sym) => start_str.starts_with(sym.as_str()), . Pat::Num => start_str.as_bytes().first().is_some_and(u8::is_ascii_digit), . Pat::Attr(sym) => { . let start_str = start_str . .strip_prefix("#[") . .or_else(|| start_str.strip_prefix("#![")) . .unwrap_or(start_str); . start_str.trim_start().starts_with(sym.as_str()) . }, 17,544 ( 0.00%) } && match end_pat { . Pat::Str(text) => end_str.ends_with(text), . Pat::MultiStr(texts) => texts.iter().any(|s| end_str.ends_with(s)), . Pat::OwnedMultiStr(texts) => texts.iter().any(|s| end_str.ends_with(s)), 426 ( 0.00%) Pat::Sym(sym) => end_str.ends_with(sym.as_str()), . Pat::Num => end_str.as_bytes().last().is_some_and(u8::is_ascii_hexdigit), . Pat::Attr(_) => false, . }) 6,615 ( 0.00%) }) 19,899 ( 0.00%) } . . /// Get the search patterns to use for the given literal . fn lit_search_pat(lit: &LitKind) -> (Pat, Pat) { 25 ( 0.00%) match lit { 3 ( 0.00%) LitKind::Str(_, StrStyle::Cooked) => (Pat::Str("\""), Pat::Str("\"")), . LitKind::Str(_, StrStyle::Raw(0)) => (Pat::Str("r"), Pat::Str("\"")), . LitKind::Str(_, StrStyle::Raw(_)) => (Pat::Str("r#"), Pat::Str("#")), . LitKind::ByteStr(_, StrStyle::Cooked) => (Pat::Str("b\""), Pat::Str("\"")), . LitKind::ByteStr(_, StrStyle::Raw(0)) => (Pat::Str("br\""), Pat::Str("\"")), . LitKind::ByteStr(_, StrStyle::Raw(_)) => (Pat::Str("br#\""), Pat::Str("#")), 7 ( 0.00%) LitKind::Byte(_) => (Pat::Str("b'"), Pat::Str("'")), . LitKind::Char(_) => (Pat::Str("'"), Pat::Str("'")), . LitKind::Int(_, LitIntType::Signed(IntTy::Isize)) => (Pat::Num, Pat::Str("isize")), . LitKind::Int(_, LitIntType::Unsigned(UintTy::Usize)) => (Pat::Num, Pat::Str("usize")), 4 ( 0.00%) LitKind::Int(..) => (Pat::Num, Pat::Num), . LitKind::Float(..) => (Pat::Num, Pat::Str("")), . LitKind::Bool(true) => (Pat::Str("true"), Pat::Str("true")), . LitKind::Bool(false) => (Pat::Str("false"), Pat::Str("false")), . _ => (Pat::Str(""), Pat::Str("")), . } 3 ( 0.00%) } . . /// Get the search patterns to use for the given path 577 ( 0.00%) fn qpath_search_pat(path: &QPath<'_>) -> (Pat, Pat) { 1,158 ( 0.00%) match path { . QPath::Resolved(ty, path) => { 579 ( 0.00%) let start = if ty.is_some() { . Pat::Str("<") . } else { 579 ( 0.00%) path.segments.first().map_or(Pat::Str(""), |seg| { 1,158 ( 0.00%) if seg.ident.name == kw::PathRoot { . Pat::Str("::") . } else { . Pat::Sym(seg.ident.name) . } . }) . }; . let end = path.segments.last().map_or(Pat::Str(""), |seg| { 581 ( 0.00%) if seg.args.is_some() { . Pat::Str(">") . } else { . Pat::Sym(seg.ident.name) . } . }); 3,474 ( 0.00%) (start, end) . }, . QPath::TypeRelative(_, name) => (Pat::Str(""), Pat::Sym(name.ident.name)), . } 577 ( 0.00%) } . . fn path_search_pat(path: &Path<'_>) -> (Pat, Pat) { . let (head, tail) = match path.segments { . [] => return (Pat::Str(""), Pat::Str("")), . [p] => (Pat::Sym(p.ident.name), p), . // QPath::Resolved can have a path that looks like `::baz` where . // the path (`Bar::baz`) has it's span covering the whole QPath. . [.., tail] => (Pat::Str(""), tail), -- line 144 ---------------------------------------- -- line 150 ---------------------------------------- . } else { . Pat::Sym(tail.ident.name) . }, . ) . } . . /// Get the search patterns to use for the given expression . fn expr_search_pat(tcx: TyCtxt<'_>, e: &Expr<'_>) -> (Pat, Pat) { 26,856 ( 0.00%) fn expr_search_pat_inner(tcx: TyCtxt<'_>, e: &Expr<'_>, outer_span: Span) -> (Pat, Pat) { . // The expression can have subexpressions in different contexts, in which case . // building up a search pattern from the macro expansion would lead to false positives; . // e.g. `return format!(..)` would be considered to be from a proc macro . // if we build up a pattern for the macro expansion and compare it to the invocation `format!()`. . // So instead we return an empty pattern such that `span_matches_pat` always returns true. 5,968 ( 0.00%) if !e.span.eq_ctxt(outer_span) { . return (Pat::Str(""), Pat::Str("")); . } . 9,215 ( 0.00%) match e.kind { 9 ( 0.00%) ExprKind::ConstBlock(_) => (Pat::Str("const"), Pat::Str("}")), . // Parenthesis are trimmed from the text before the search patterns are matched. . // See: `span_matches_pat` . ExprKind::Tup([]) => (Pat::Str(")"), Pat::Str("(")), 1,441 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) => (Pat::Str("*"), expr_search_pat_inner(tcx, e, outer_span).1), 7,316 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (71x) . ExprKind::Unary(UnOp::Not, e) => (Pat::Str("!"), expr_search_pat_inner(tcx, e, outer_span).1), . ExprKind::Unary(UnOp::Neg, e) => (Pat::Str("-"), expr_search_pat_inner(tcx, e, outer_span).1), 33 ( 0.00%) ExprKind::Lit(lit) => lit_search_pat(&lit.node), 52 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::lit_search_pat (3x) 56 ( 0.00%) ExprKind::Array(_) | ExprKind::Repeat(..) => (Pat::Str("["), Pat::Str("]")), 372 ( 0.00%) ExprKind::Call(e, []) | ExprKind::MethodCall(_, e, [], _) => { 360 ( 0.00%) (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("(")) 249 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (3x) . }, 36 ( 0.00%) ExprKind::Call(first, [.., last]) 96 ( 0.00%) | ExprKind::MethodCall(_, first, [.., last], _) . | ExprKind::Binary(_, first, last) . | ExprKind::Tup([first, .., last]) . | ExprKind::Assign(first, last, _) 200 ( 0.00%) | ExprKind::AssignOp(_, first, last) => ( 150 ( 0.00%) expr_search_pat_inner(tcx, first, outer_span).0, 6,795 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (24x) 400 ( 0.00%) expr_search_pat_inner(tcx, last, outer_span).1, 9,446 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (24x) . ), . ExprKind::Tup([e]) | ExprKind::DropTemps(e) => expr_search_pat_inner(tcx, e, outer_span), . ExprKind::Cast(e, _) | ExprKind::Type(e, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("")), . ExprKind::Let(let_expr) => (Pat::Str("let"), expr_search_pat_inner(tcx, let_expr.init, outer_span).1), 6 ( 0.00%) ExprKind::If(..) => (Pat::Str("if"), Pat::Str("}")), . ExprKind::Loop(_, Some(_), _, _) | ExprKind::Block(_, Some(_)) => (Pat::Str("'"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::Loop, _) => (Pat::Str("loop"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::While, _) => (Pat::Str("while"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::ForLoop, _) | ExprKind::Match(_, _, MatchSource::ForLoopDesugar) => { . (Pat::Str("for"), Pat::Str("}")) . }, . ExprKind::Match(_, _, MatchSource::Normal) => (Pat::Str("match"), Pat::Str("}")), 1 ( 0.00%) ExprKind::Match(e, _, MatchSource::TryDesugar(_)) => { 7 ( 0.00%) (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("?")) 46 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (1x) . }, . ExprKind::Match(e, _, MatchSource::AwaitDesugar) | ExprKind::Yield(e, YieldSource::Await { .. }) => { . (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("await")) . }, 69 ( 0.00%) ExprKind::Closure(&Closure { body, .. }) => ( 92 ( 0.00%) Pat::Str(""), 207 ( 0.00%) expr_search_pat_inner(tcx, tcx.hir_body(body).value, outer_span).1, 8,226 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (23x) 1,979 ( 0.00%) => ???:::hir_body (23x) . ), . ExprKind::Block( . Block { . rules: BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided), . .. . }, . None, . ) => (Pat::Str("unsafe"), Pat::Str("}")), 2 ( 0.00%) ExprKind::Block(_, None) => (Pat::Str("{"), Pat::Str("}")), 2,990 ( 0.00%) ExprKind::Field(e, name) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Sym(name.name)), 83 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (1x) 900 ( 0.00%) ExprKind::Index(e, _, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("]")), 5,042 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (44x) 6,336 ( 0.00%) ExprKind::Path(ref path) => qpath_search_pat(path), 850 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (25x) 3,024 ( 0.00%) ExprKind::AddrOf(_, _, e) => (Pat::Str("&"), expr_search_pat_inner(tcx, e, outer_span).1), 49,810 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (371x) . ExprKind::Break(Destination { label: None, .. }, None) => (Pat::Str("break"), Pat::Str("break")), . ExprKind::Break(Destination { label: Some(name), .. }, None) => { . (Pat::Str("break"), Pat::Sym(name.ident.name)) . }, . ExprKind::Break(_, Some(e)) => (Pat::Str("break"), expr_search_pat_inner(tcx, e, outer_span).1), . ExprKind::Continue(Destination { label: None, .. }) => (Pat::Str("continue"), Pat::Str("continue")), . ExprKind::Continue(Destination { label: Some(name), .. }) => { . (Pat::Str("continue"), Pat::Sym(name.ident.name)) . }, . ExprKind::Ret(None) => (Pat::Str("return"), Pat::Str("return")), 7 ( 0.00%) ExprKind::Ret(Some(e)) => (Pat::Str("return"), expr_search_pat_inner(tcx, e, outer_span).1), 219 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 (1x) 10 ( 0.00%) ExprKind::Struct(path, _, _) => (qpath_search_pat(path).0, Pat::Str("}")), 34 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (1x) . ExprKind::Yield(e, YieldSource::Yield) => (Pat::Str("yield"), expr_search_pat_inner(tcx, e, outer_span).1), . _ => (Pat::Str(""), Pat::Str("")), . } 7,304 ( 0.00%) } . 1,620 ( 0.00%) expr_search_pat_inner(tcx, e, e.span) 122,260 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner (540x) . } . . fn fn_header_search_pat(header: FnHeader) -> Pat { 915 ( 0.00%) if header.is_async() { . Pat::Str("async") 1,830 ( 0.00%) } else if matches!(header.constness, rustc_hir::Constness::Const { always: false }) { . Pat::Str("const") . } else if header.is_unsafe() { . Pat::Str("unsafe") 2,730 ( 0.00%) } else if header.abi != ExternAbi::Rust { . Pat::Str("extern") . } else { . Pat::MultiStr(&["fn", "extern"]) . } . } . . fn item_search_pat(item: &Item<'_>) -> (Pat, Pat) { 12,035 ( 0.00%) let (start_pat, end_pat) = match &item.kind { . ItemKind::ExternCrate(..) => (Pat::Str("extern"), Pat::Str(";")), . ItemKind::Static(..) => (Pat::Str("static"), Pat::Str(";")), . ItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")), 1,089 ( 0.00%) ItemKind::Fn { sig, .. } => (fn_header_search_pat(sig.header), Pat::Str("")), . ItemKind::ForeignMod { .. } => (Pat::Str("extern"), Pat::Str("}")), . ItemKind::TyAlias(..) => (Pat::Str("type"), Pat::Str(";")), . ItemKind::Enum(..) => (Pat::Str("enum"), Pat::Str("}")), . ItemKind::Struct(_, _, VariantData::Struct { .. }) => (Pat::Str("struct"), Pat::Str("}")), . ItemKind::Struct(..) => (Pat::Str("struct"), Pat::Str(";")), . ItemKind::Union(..) => (Pat::Str("union"), Pat::Str("}")), . ItemKind::Trait { . safety: Safety::Unsafe, .. -- line 270 ---------------------------------------- -- line 284 ---------------------------------------- . ItemKind::Macro(_, def, _) => ( . Pat::Str(if def.macro_rules { "macro_rules" } else { "macro" }), . Pat::Str(""), . ), . ItemKind::TraitAlias(..) => (Pat::Str("trait"), Pat::Str(";")), . ItemKind::GlobalAsm { .. } => return (Pat::Str("global_asm"), Pat::Str("")), . ItemKind::Use(..) => return (Pat::Str(""), Pat::Str("")), . }; 1,744 ( 0.00%) if item.vis_span.is_empty() { 5,778 ( 0.00%) (start_pat, end_pat) . } else { 1,840 ( 0.00%) (Pat::Str("pub"), end_pat) . } . } . . fn trait_item_search_pat(item: &TraitItem<'_>) -> (Pat, Pat) { 231 ( 0.00%) match &item.kind { . TraitItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")), . TraitItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")), 63 ( 0.00%) TraitItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . } . } . . fn impl_item_search_pat(item: &ImplItem<'_>) -> (Pat, Pat) { 6,256 ( 0.00%) let (mut start_pat, end_pat) = match &item.kind { . ImplItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")), . ImplItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")), 736 ( 0.00%) ImplItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . }; 986 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind 250 ( 0.00%) && !vis_span.is_empty() . { 900 ( 0.00%) start_pat = Pat::Str("pub"); . } 4,416 ( 0.00%) (start_pat, end_pat) . } . . fn field_def_search_pat(def: &FieldDef<'_>) -> (Pat, Pat) { . if def.vis_span.is_empty() { . if def.is_positional() { . (Pat::Str(""), Pat::Str("")) . } else { . (Pat::Sym(def.ident.name), Pat::Str("")) -- line 326 ---------------------------------------- -- line 333 ---------------------------------------- . fn variant_search_pat(v: &Variant<'_>) -> (Pat, Pat) { . match v.data { . VariantData::Struct { .. } => (Pat::Sym(v.ident.name), Pat::Str("}")), . VariantData::Tuple(..) => (Pat::Sym(v.ident.name), Pat::Str("")), . VariantData::Unit(..) => (Pat::Sym(v.ident.name), Pat::Sym(v.ident.name)), . } . } . 1,467 ( 0.00%) fn fn_kind_pat(tcx: TyCtxt<'_>, kind: &FnKind<'_>, body: &Body<'_>, hir_id: HirId) -> (Pat, Pat) { 1,712 ( 0.00%) let (mut start_pat, end_pat) = match kind { 122 ( 0.00%) FnKind::ItemFn(.., header) => (fn_header_search_pat(*header), Pat::Str("")), 82 ( 0.00%) FnKind::Method(.., sig) => (fn_header_search_pat(sig.header), Pat::Str("")), . FnKind::Closure => return (Pat::Str(""), expr_search_pat(tcx, body.value).1), . }; 1,589 ( 0.00%) match tcx.hir_node(hir_id) { 10,169 ( 0.00%) => ???:::hir_node (163x) 366 ( 0.00%) Node::Item(Item { vis_span, .. }) . | Node::ImplItem(ImplItem { 41 ( 0.00%) impl_kind: ImplItemImplKind::Inherent { vis_span, .. }, . .. . }) => { 403 ( 0.00%) if !vis_span.is_empty() { . start_pat = Pat::Str("pub"); . } . }, . Node::ImplItem(_) | Node::TraitItem(_) => {}, . _ => start_pat = Pat::Str(""), . } 1,630 ( 0.00%) (start_pat, end_pat) 1,467 ( 0.00%) } . . fn attr_search_pat(attr: &Attribute) -> (Pat, Pat) { . match attr.kind { . AttrKind::Normal(..) => { . if let Some(name) = attr.name() { . // NOTE: This will likely have false positives, like `allow = 1` . (Pat::Attr(name), Pat::Str("")) . } else { -- line 369 ---------------------------------------- -- line 383 ---------------------------------------- . (Pat::Str("/**"), Pat::Str("*/")) . } else { . (Pat::Str("/*!"), Pat::Str("*/")) . } . }, . } . } . 32 ( 0.00%) fn ty_search_pat(ty: &Ty<'_>) -> (Pat, Pat) { 36 ( 0.00%) match ty.kind { . TyKind::Slice(..) | TyKind::Array(..) => (Pat::Str("["), Pat::Str("]")), . TyKind::Ptr(MutTy { ty, .. }) => (Pat::Str("*"), ty_search_pat(ty).1), 32 ( 0.00%) TyKind::Ref(_, MutTy { ty, .. }) => (Pat::Str("&"), ty_search_pat(ty).1), 116 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::ty_search_pat'2 (2x) . TyKind::FnPtr(fn_ptr) => ( . if fn_ptr.safety.is_unsafe() { . Pat::Str("unsafe") . } else if fn_ptr.abi != ExternAbi::Rust { . Pat::Str("extern") . } else { . Pat::MultiStr(&["fn", "extern"]) . }, -- line 403 ---------------------------------------- -- line 414 ---------------------------------------- . ), . TyKind::Never => (Pat::Str("!"), Pat::Str("!")), . // Parenthesis are trimmed from the text before the search patterns are matched. . // See: `span_matches_pat` . TyKind::Tup([]) => (Pat::Str(")"), Pat::Str("(")), . TyKind::Tup([ty]) => ty_search_pat(ty), . TyKind::Tup([head, .., tail]) => (ty_search_pat(head).0, ty_search_pat(tail).1), . TyKind::OpaqueDef(..) => (Pat::Str("impl"), Pat::Str("")), 2 ( 0.00%) TyKind::Path(qpath) => qpath_search_pat(&qpath), . TyKind::Infer(()) => (Pat::Str("_"), Pat::Str("_")), . TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ty_search_pat(binder_ty.inner_ty).1), . TyKind::TraitObject(_, tagged_ptr) if let TraitObjectSyntax::Dyn = tagged_ptr.tag() => { . (Pat::Str("dyn"), Pat::Str("")) . }, . // NOTE: `TraitObject` is incomplete. It will always return true then. . _ => (Pat::Str(""), Pat::Str("")), . } 32 ( 0.00%) } . . fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) { . use ast::{Extern, FnRetTy, MutTy, Safety, TraitObjectSyntax, TyKind}; . . match &ty.kind { . TyKind::Slice(..) | TyKind::Array(..) => (Pat::Str("["), Pat::Str("]")), . TyKind::Ptr(MutTy { ty, .. }) => (Pat::Str("*"), ast_ty_search_pat(ty).1), . TyKind::Ref(_, MutTy { ty, .. }) | TyKind::PinnedRef(_, MutTy { ty, .. }) => { -- line 439 ---------------------------------------- -- line 689 ---------------------------------------- . type Context: LintContext; . fn search_pat(&self, cx: &Self::Context) -> (Pat, Pat); . fn span(&self) -> Span; . } . macro_rules! impl_with_search_pat { . (($cx_ident:ident: $cx_ty:ident<$cx_lt:lifetime>, $self:tt: $ty:ty) => $fn:ident($($args:tt)*)) => { . impl<$cx_lt> WithSearchPat<$cx_lt> for $ty { . type Context = $cx_ty<$cx_lt>; 8,801 ( 0.00%) fn search_pat(&$self, $cx_ident: &Self::Context) -> (Pat, Pat) { 2 ( 0.00%) $fn($($args)*) 206 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::ty_search_pat (2x) 10,411 ( 0.00%) } . fn span(&self) -> Span { . self.span . } . } . }; . } 540 ( 0.00%) impl_with_search_pat!((cx: LateContext<'tcx>, self: Expr<'tcx>) => expr_search_pat(cx.tcx, self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: Item<'_>) => item_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: TraitItem<'_>) => trait_item_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: ImplItem<'_>) => impl_item_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: FieldDef<'_>) => field_def_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: Variant<'_>) => variant_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: Ty<'_>) => ty_search_pat(self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: Ident) => ident_search_pat(*self)); . impl_with_search_pat!((_cx: LateContext<'tcx>, self: Lit) => lit_search_pat(&self.node)); -- line 714 ---------------------------------------- -- line 718 ---------------------------------------- . . impl_with_search_pat!((_cx: EarlyContext<'tcx>, self: Attribute) => attr_search_pat(self)); . impl_with_search_pat!((_cx: EarlyContext<'tcx>, self: ast::Ty) => ast_ty_search_pat(self)); . . impl<'cx> WithSearchPat<'cx> for (&FnKind<'cx>, &Body<'cx>, HirId, Span) { . type Context = LateContext<'cx>; . . fn search_pat(&self, cx: &Self::Context) -> (Pat, Pat) { 1,141 ( 0.00%) fn_kind_pat(cx.tcx, self.0, self.1, self.2) 32,687 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::fn_kind_pat (163x) . } . . fn span(&self) -> Span { . self.3 . } . } . . /// Checks if the item likely came from a proc-macro. . /// . /// This should be called after `in_external_macro` and the initial pattern matching of the ast as . /// it is significantly slower than both of those. 816 ( 0.00%) pub fn is_from_proc_macro<'cx, T: WithSearchPat<'cx>>(cx: &T::Context, item: &T) -> bool { 6,117 ( 0.00%) let (start_pat, end_pat) = item.search_pat(cx); 15,114 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::search_pat (13x) 24,547 ( 0.00%) !span_matches_pat(cx.sess(), item.span(), start_pat, end_pat) 7,153 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (13x) 544 ( 0.00%) } . . /// Checks if the span actually refers to a match expression . pub fn is_span_match(cx: &impl LintContext, span: Span) -> bool { 2,860 ( 0.00%) span_matches_pat(cx.sess(), span, Pat::Str("match"), Pat::Str("}")) 97,634 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (220x) . } . . /// Checks if the span actually refers to an if expression . pub fn is_span_if(cx: &impl LintContext, span: Span) -> bool { 375 ( 0.00%) span_matches_pat(cx.sess(), span, Pat::Str("if"), Pat::Str("}")) 8,925 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (25x) . } 38,852 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } else { . write!(f, "an array") . } . } . } . . impl LateLintPass<'_> for SingleRangeInVecInit { . #[expect(clippy::too_many_lines)] 244,746 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . // inner_expr: `vec![0..200]` or `[0..200]` . // ^^^^^^ ^^^^^^^ . // span: `vec![0..200]` or `[0..200]` . // ^^^^^^^^^^^^ ^^^^^^^^ . // suggested_type: What to print, "an array" or "a `Vec`" 54,598 ( 0.00%) let (inner_expr, span, suggested_type) = if let ExprKind::Array([inner_expr]) = expr.kind 76 ( 0.00%) && !expr.span.from_expansion() . { 9 ( 0.00%) (inner_expr, expr.span, SuggestedType::Array) 1,103 ( 0.00%) } else if let Some(macro_call) = root_macro_call_first_node(cx, expr) 1,847 ( 0.00%) && let Some(VecArgs::Vec([expr])) = VecArgs::hir(cx, expr) 14,546 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (366x) . { . (expr, macro_call.span, SuggestedType::Vec) . } else { . return; . }; . 84 ( 0.00%) let Some(range) = Range::hir(cx, inner_expr) else { 698 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (14x) . return; . }; . . let Some(snippet) = span.get_text(cx) else { . return; . }; . // `is_from_proc_macro` will skip any `vec![]`. Let's not! . if !snippet.starts_with(suggested_type.starts_with()) || !snippet.ends_with(suggested_type.ends_with()) { -- line 99 ---------------------------------------- -- line 188 ---------------------------------------- . format!("if you wanted {suggested_type} of len {end_snippet}, try"), . format!("{start_snippet}; {end_snippet}"), . applicability, . ); . } . } . }, . ); 217,552 ( 0.01%) } . } 394 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/freeze.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . #[inline] . pub fn is_frozen(&self) -> bool { . self.frozen.load(Ordering::Acquire) . } . . /// Get the inner value if frozen. . #[inline] . pub fn get(&self) -> Option<&T> { 5 ( 0.00%) if self.frozen.load(Ordering::Acquire) { . // SAFETY: This is frozen so the data cannot be modified. . unsafe { Some(&*self.data.get()) } . } else { . hint::cold_path(); . None . } . } . . #[inline] . pub fn read(&self) -> FreezeReadGuard<'_, T> { . FreezeReadGuard { 16,266 ( 0.00%) _lock_guard: if self.frozen.load(Ordering::Acquire) { . None . } else { . Some(self.lock.read()) . }, . data: unsafe { NonNull::new_unchecked(self.data.get()) }, . } . } . -- line 83 ---------------------------------------- -- line 137 ---------------------------------------- . // the data cannot be modified and shared access is sound. . unsafe { &*self.data.as_ptr() } . } . } . . impl<'a, T: ?Sized> FreezeReadGuard<'a, T> { . #[inline] . pub fn map(this: Self, f: impl FnOnce(&T) -> &U) -> FreezeReadGuard<'a, U> { 10,596 ( 0.00%) FreezeReadGuard { data: NonNull::from(f(&*this)), _lock_guard: this._lock_guard } . } . } . . /// A guard holding mutable access to a `FreezeLock` which is in a locked state or frozen. . #[must_use = "if unused the FreezeLock may immediately unlock"] . pub struct FreezeWriteGuard<'a, T: ?Sized> { . _lock_guard: WriteGuard<'a, ()>, . frozen: &'a AtomicBool, -- line 153 ---------------------------------------- 8,133 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_resolve/src/rustdoc.rs -------------------------------------------------------------------------------- Ir -- line 199 ---------------------------------------- . . pub fn attrs_to_doc_fragments<'a, A: AttributeExt + Clone + 'a>( . attrs: impl Iterator)>, . doc_only: bool, . ) -> (Vec, ThinVec) { . let (min_size, max_size) = attrs.size_hint(); . let size_hint = max_size.unwrap_or(min_size); . let mut doc_fragments = Vec::with_capacity(size_hint); 85,668 ( 0.00%) let mut other_attrs = ThinVec::::with_capacity(if doc_only { 0 } else { size_hint }); . for (attr, item_id) in attrs { 141 ( 0.00%) if let Some((doc_str, fragment_kind)) = attr.doc_str_and_fragment_kind() { 15,402 ( 0.00%) let doc = beautify_doc_string(doc_str, fragment_kind.comment_kind()); 539,927 ( 0.03%) => ???:rustc_ast::util::comments::beautify_doc_string (5,134x) 20,536 ( 0.00%) let attr_span = attr.span(); 11,932 ( 0.00%) 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()) . } . }; . let fragment = . DocFragment { span, doc, kind: fragment_kind, item_id, indent: 0, from_expansion }; . doc_fragments.push(fragment); -- line 220 ---------------------------------------- -- line 221 ---------------------------------------- . } else if !doc_only { . other_attrs.push(attr.clone()); . } . } . . doc_fragments.shrink_to_fit(); . other_attrs.shrink_to_fit(); . 40,131 ( 0.00%) unindent_doc_fragments(&mut doc_fragments); 2,121,201 ( 0.12%) => ???:rustc_resolve::rustdoc::unindent_doc_fragments (40,131x) . 240,786 ( 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 ---------------------------------------- 15,674 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/to_digit_is_some.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl ToDigitIsSome { . pub(crate) fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ToDigitIsSome { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 59,748 ( 0.00%) if let hir::ExprKind::MethodCall(is_some_path, to_digit_expr, [], _) = &expr.kind 3,094 ( 0.00%) && is_some_path.ident.name == sym::is_some . { 160 ( 0.00%) let match_result = match to_digit_expr.kind { 36 ( 0.00%) hir::ExprKind::MethodCall(to_digits_path, char_arg, [radix_arg], _) => { 4 ( 0.00%) if to_digits_path.ident.name == sym::to_digit . && cx.typeck_results().expr_ty_adjusted(char_arg).is_char() . { . Some((true, char_arg, radix_arg)) . } else { . None . } . }, . hir::ExprKind::Call(to_digits_call, [char_arg, radix_arg]) => { -- line 65 ---------------------------------------- -- line 89 ---------------------------------------- . format!("{char_arg_snip}.is_digit({radix_snip})") . } else { . format!("char::is_digit({char_arg_snip}, {radix_snip})") . }, . applicability, . ); . } . } 217,552 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/mod.rs -------------------------------------------------------------------------------- Ir -- line 1033 ---------------------------------------- . modulo_arithmetic_allow_comparison_to_zero: bool, . msrv: Msrv, . } . . impl Operators { . pub fn new(conf: &'static Conf) -> Self { . Self { . arithmetic_context: numeric_arithmetic::Context::default(), 2 ( 0.00%) verbose_bit_mask_threshold: conf.verbose_bit_mask_threshold, 1 ( 0.00%) modulo_arithmetic_allow_comparison_to_zero: conf.allow_comparison_to_zero, . msrv: conf.msrv.into(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Operators { 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 81,582 ( 0.00%) eq_op::check_assert(cx, e); 2,985,762 ( 0.17%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert (27,194x) 81,582 ( 0.00%) float_cmp::check_assert(cx, e); 2,062,126 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert (27,194x) 128,558 ( 0.01%) match e.kind { 1,146 ( 0.00%) ExprKind::Binary(op, lhs, rhs) => { 764 ( 0.00%) if !e.span.from_expansion() { 2,148 ( 0.00%) absurd_extreme_comparisons::check(cx, e, op.node, lhs, rhs); 100,197 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::check (358x) . if !(macro_with_not_op(lhs) || macro_with_not_op(rhs)) { 2,148 ( 0.00%) eq_op::check(cx, e, op.node, lhs, rhs); 229,344 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check (358x) 2,148 ( 0.00%) op_ref::check(cx, e, op.node, lhs, rhs); 19,367 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/op_ref.rs:clippy_lints::operators::op_ref::check (358x) . } . erasing_op::check(cx, e, op.node, lhs, rhs); 2,148 ( 0.00%) identity_op::check(cx, e, op.node, lhs, rhs); 97,633 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::check (358x) . invalid_upcast_comparisons::check(cx, op.node, lhs, rhs, e.span); 2,506 ( 0.00%) needless_bitwise_bool::check(cx, e, op.node, lhs, rhs); 7,518 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/needless_bitwise_bool.rs:clippy_lints::operators::needless_bitwise_bool::check (358x) 2,864 ( 0.00%) manual_midpoint::check(cx, e, op.node, lhs, rhs, self.msrv); 9,402 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/manual_midpoint.rs:clippy_lints::operators::manual_midpoint::check (358x) 2,506 ( 0.00%) manual_is_multiple_of::check(cx, e, op.node, lhs, rhs, self.msrv); 18,974 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/manual_is_multiple_of.rs:clippy_lints::operators::manual_is_multiple_of::check (358x) 2,506 ( 0.00%) manual_isolate_lowest_one::check(cx, e, op.node, lhs, rhs, self.msrv); 6,086 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::check (358x) 1,790 ( 0.00%) decimal_bitwise_operands::check(cx, op.node, lhs, rhs); 6,444 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/decimal_bitwise_operands.rs:clippy_lints::operators::decimal_bitwise_operands::check (358x) . } 2,674 ( 0.00%) self.arithmetic_context.check_binary(cx, e, op.node, lhs, rhs); 19,963 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_binary (382x) 2,292 ( 0.00%) bit_mask::check(cx, e, op.node, lhs, rhs); 26,864 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check (382x) . verbose_bit_mask::check(cx, e, op.node, lhs, rhs, self.verbose_bit_mask_threshold); 2,674 ( 0.00%) double_comparison::check(cx, op.node, lhs, rhs, e.span); 20,376 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/double_comparison.rs:clippy_lints::operators::double_comparison::check (382x) 2,292 ( 0.00%) const_comparisons::check(cx, op, lhs, rhs, e.span); 7,103 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs:clippy_lints::operators::const_comparisons::check (382x) 2,292 ( 0.00%) duration_subsec::check(cx, e, op.node, lhs, rhs); 6,498 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/duration_subsec.rs:clippy_lints::operators::duration_subsec::check (382x) 2,292 ( 0.00%) float_equality_without_abs::check(cx, e, op.node, lhs, rhs); 8,453 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_equality_without_abs.rs:clippy_lints::operators::float_equality_without_abs::check (382x) 2,292 ( 0.00%) integer_division::check(cx, e, op.node, lhs, rhs); 9,406 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/integer_division.rs:clippy_lints::operators::integer_division::check (382x) 2,292 ( 0.00%) integer_division_remainder_used::check(cx, op.node, lhs, rhs, e.span); 15,126 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/integer_division_remainder_used.rs:clippy_lints::operators::integer_division_remainder_used::check (382x) . cmp_owned::check(cx, e, op.node, lhs, rhs); 2,042 ( 0.00%) float_cmp::check(cx, e, op.node, lhs, rhs); 14,948 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check (382x) . modulo_one::check(cx, e, op.node, rhs); 2,292 ( 0.00%) modulo_arithmetic::check( 7,982 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/modulo_arithmetic.rs:clippy_lints::operators::modulo_arithmetic::check (382x) . cx, . e, . op.node, . lhs, . rhs, 382 ( 0.00%) self.modulo_arithmetic_allow_comparison_to_zero, . ); 5,348 ( 0.00%) manual_div_ceil::check(cx, e, op.node, lhs, rhs, self.msrv); 7,542 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/manual_div_ceil.rs:clippy_lints::operators::manual_div_ceil::check (382x) . }, 51 ( 0.00%) ExprKind::AssignOp(op, lhs, rhs) => { . let bin_op = op.node.into(); 34 ( 0.00%) if !e.span.from_expansion() { 85 ( 0.00%) decimal_bitwise_operands::check(cx, bin_op, lhs, rhs); 340 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/decimal_bitwise_operands.rs:clippy_lints::operators::decimal_bitwise_operands::check (17x) . } 136 ( 0.00%) self.arithmetic_context.check_binary(cx, e, bin_op, lhs, rhs); 2,154 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_binary (17x) 102 ( 0.00%) misrefactored_assign_op::check(cx, e, bin_op, lhs, rhs); 87 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/misrefactored_assign_op.rs:clippy_lints::operators::misrefactored_assign_op::check (17x) 238 ( 0.00%) modulo_arithmetic::check(cx, e, bin_op, lhs, rhs, false); 289 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/modulo_arithmetic.rs:clippy_lints::operators::modulo_arithmetic::check (17x) . }, 326 ( 0.00%) ExprKind::Assign(lhs, rhs, _) => { 978 ( 0.00%) assign_op_pattern::check(cx, e, lhs, rhs, self.msrv); 17,732 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/assign_op_pattern.rs:clippy_lints::operators::assign_op_pattern::check (163x) 1,956 ( 0.00%) self_assignment::check(cx, e, lhs, rhs); 138,674 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/self_assignment.rs:clippy_lints::operators::self_assignment::check (163x) . }, 4 ( 0.00%) ExprKind::Unary(op, arg) => . { . #[expect(clippy::collapsible_match)] 451 ( 0.00%) if op == UnOp::Neg { 48 ( 0.00%) self.arithmetic_context.check_negate(cx, e, arg); 1,361 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_negate (4x) . } . }, . _ => (), . } 213,024 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'_>, e: &Expr<'_>) { . self.arithmetic_context.expr_post(e.hir_id); . } . . fn check_body(&mut self, cx: &LateContext<'tcx>, b: &Body<'_>) { . self.arithmetic_context.enter_body(cx, b); . } . . fn check_body_post(&mut self, cx: &LateContext<'tcx>, b: &Body<'_>) { . self.arithmetic_context.body_post(cx, b); . } . } . . fn macro_with_not_op(e: &Expr<'_>) -> bool { 1,483 ( 0.00%) if let ExprKind::Unary(_, e) = e.kind { 102 ( 0.00%) e.span.from_expansion() . } else { . false . } . } 8,140 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . pub(super) trait SpecFromIterNested { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIterNested for Vec . where . I: Iterator, . { 414,062 ( 0.02%) default fn from_iter(mut iterator: I) -> Self { . // Unroll the first iteration, as the vector is going to be . // expanded on this iteration in every case when the iterable is not . // empty, but the loop in extend_desugared() is not going to see the . // vector being full in the few subsequent loop iterations. . // So we get better branch prediction. 14,218 ( 0.00%) let mut vector = match iterator.next() { 23,360 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:>>>, clippy_utils::search_same<&rustc_hir::hir::Expr, clippy_lints::ifs::ifs_same_cond::check::{closure#0}, clippy_lints::ifs::ifs_same_cond::check::{closure#1}>::{closure#1}> as core::iter::traits::iterator::Iterator>::next (28x) . None => return Vec::new(), 25 ( 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); . } 3,600 ( 0.00%) vector . } . }; . // must delegate to spec_extend() since extend() itself delegates . // to spec_from for empty Vecs 5,780 ( 0.00%) as SpecExtend>::spec_extend(&mut vector, iterator); 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) 6,599 ( 0.00%) vector 457,934 ( 0.03%) } . } . . impl SpecFromIterNested for Vec . where . I: TrustedLen, . { 13,132 ( 0.00%) fn from_iter(iterator: I) -> Self { 306 ( 0.00%) 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 1,938 ( 0.00%) vector.spec_extend(iterator); 8,033 ( 0.00%) vector 13,306 ( 0.00%) } . } 9,329 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/items_after_test_module.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub ITEMS_AFTER_TEST_MODULE, . style, . "An item was found after the testing module `tests`" . } . . declare_lint_pass!(ItemsAfterTestModule => [ITEMS_AFTER_TEST_MODULE]); . . fn cfg_test_module<'tcx>(cx: &LateContext<'tcx>, item: &Item<'tcx>) -> bool { 6,410 ( 0.00%) if let ItemKind::Mod(_, test_mod) = item.kind 836 ( 0.00%) && item.span.hi() == test_mod.spans.inner_span.hi() 170 ( 0.00%) && is_cfg_test(cx.tcx, item.hir_id()) 3,224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_cfg_test (34x) . && !item.span.from_expansion() . && !is_from_proc_macro(cx, item) . { . true . } else { . false . } . } . . impl LateLintPass<'_> for ItemsAfterTestModule { 693 ( 0.00%) fn check_mod(&mut self, cx: &LateContext<'_>, module: &Mod<'_>, _: HirId) { 6,411 ( 0.00%) let mut items = module.item_ids.iter().map(|&id| cx.tcx.hir_item(id)); 205,310 ( 0.01%) => ???:::hir_item (3,167x) . . let Some((mod_pos, test_mod)) = items.by_ref().enumerate().find(|(_, item)| cfg_test_module(cx, item)) else { . return; . }; . . let after: Vec<_> = items . .filter(|item| { . // Ignore the generated test main function -- line 69 ---------------------------------------- -- line 109 ---------------------------------------- . ], . Applicability::MachineApplicable, . SuggestionStyle::HideCodeAlways, . ); . } . }, . ); . } 616 ( 0.00%) } . } 77 ( 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/collections/btree/search.rs -------------------------------------------------------------------------------- Ir -- line 218 ---------------------------------------- . where . Q: Ord, . K: Borrow, . { . let node = self.reborrow(); . let keys = node.keys(); . debug_assert!(start_index <= keys.len()); . for (offset, k) in unsafe { keys.get_unchecked(start_index..) }.iter().enumerate() { 40,849 ( 0.00%) match key.cmp(k.borrow()) { 628,358 ( 0.04%) => ???:::cmp (6,819x) . Ordering::Greater => {} . Ordering::Equal => return IndexResult::KV(start_index + offset), . Ordering::Less => return IndexResult::Edge(start_index + offset), . } . } . IndexResult::Edge(keys.len()) . } . -- line 234 ---------------------------------------- 1,164 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/octal_escapes.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . pub OCTAL_ESCAPES, . suspicious, . "string escape sequences looking like octal characters" . } . . declare_lint_pass!(OctalEscapes => [OCTAL_ESCAPES]); . . impl EarlyLintPass for OctalEscapes { 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 44,536 ( 0.00%) if let ExprKind::Lit(lit) = &expr.kind . // The number of bytes from the start of the token to the start of literal's text. 12,728 ( 0.00%) && let start_offset = BytePos::from_u32(match lit.kind { . LitKind::Str => 1, . LitKind::ByteStr | LitKind::CStr => 2, . _ => return, . }) 2,466 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . let s = lit.symbol.as_str(); . let mut iter = s.as_bytes().iter(); 6,622 ( 0.00%) while let Some(&c) = iter.next() { 13,260 ( 0.00%) if c == b'\\' . // Always move the iterator to read the escape char. 32 ( 0.00%) && let Some(b'0') = iter.next() . { . // C-style octal escapes read from one to three characters. . // The first character (`0`) has already been read. . let (tail, len, c_hi, c_lo) = match *iter.as_slice() { . [c_hi @ b'0'..=b'7', c_lo @ b'0'..=b'7', ref tail @ ..] => (tail, 4, c_hi, c_lo), . [c_lo @ b'0'..=b'7', ref tail @ ..] => (tail, 3, b'0', c_lo), . _ => continue, . }; -- line 76 ---------------------------------------- -- line 107 ---------------------------------------- . ); . }); . } else { . break; . } . } . } . } 178,144 ( 0.01%) } . } 5,927 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/needless_return_with_question_mark.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_hir::LangItem::ResultErr; . use rustc_hir::{Expr, ExprKind, HirId, MatchSource, Node, Stmt, StmtKind}; . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty::adjustment::Adjust; . . use super::NEEDLESS_RETURN_WITH_QUESTION_MARK; . . pub(super) fn check_stmt<'tcx>(cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 5,159 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 2,461 ( 0.00%) && let ExprKind::Ret(Some(ret)) = expr.kind . // return Err(...)? desugars to a match . // over a Err(...).branch() . // which breaks down to a branch call, with the callee being . // the constructor of the Err variant 230 ( 0.00%) && let ExprKind::Match(maybe_cons, _, MatchSource::TryDesugar(_)) = ret.kind . && let ExprKind::Call(_, [maybe_result_err]) = maybe_cons.kind . && let ExprKind::Call(maybe_constr, _) = maybe_result_err.kind . && maybe_constr.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . . // Ensure this is not the final stmt, otherwise removing it would cause a compile error . && let block = cx.tcx.hir_body_owned_by(cx.tcx.hir_enclosing_body_owner(expr.hir_id)).value . && let ExprKind::Block(block, _) = peel_async_body(block).kind . && !is_inside_let_else(cx.tcx, expr) -- line 27 ---------------------------------------- -- line 36 ---------------------------------------- . NEEDLESS_RETURN_WITH_QUESTION_MARK, . expr.span.until(ret.span), . "unneeded `return` statement with `?` operator", . "remove it", . String::new(), . Applicability::MachineApplicable, . ); . } 2,055 ( 0.00%) } . . /// In async functions, the body is wrapped in a . /// `Block { expr: DropTemps(inner) }`. We peel through to `inner` so . /// we can check the actual stmts. . /// Returns `body_value` unchanged for non-async functions. . fn peel_async_body<'a>(body_value: &'a Expr<'a>) -> &'a Expr<'a> { . if let ExprKind::Block(block, _) = body_value.kind . && let Some(expr) = block.expr -- line 52 ---------------------------------------- 14,686 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . use super::CAST_SLICE_FROM_RAW_PARTS; . . enum RawPartsKind { . Immutable, . Mutable, . } . . fn raw_parts_kind(cx: &LateContext<'_>, did: DefId) -> Option { 1,376 ( 0.00%) match cx.tcx.get_diagnostic_name(did)? { 39,484 ( 0.00%) => ???:::get_diagnostic_name (688x) . sym::slice_from_raw_parts => Some(RawPartsKind::Immutable), . sym::slice_from_raw_parts_mut => Some(RawPartsKind::Mutable), . _ => None, . } . } . 456 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_to: Ty<'_>, msrv: Msrv) { 114 ( 0.00%) if let ty::RawPtr(ptrty, _) = cast_to.kind() 132 ( 0.00%) && let ty::Slice(_) = ptrty.kind() . && let ExprKind::Call(fun, [ptr_arg, len_arg]) = cast_expr.peel_blocks().kind . && let ExprKind::Path(ref qpath) = fun.kind . && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() . && let Some(rpk) = raw_parts_kind(cx, fun_def_id) . && let ctxt = expr.span.ctxt() . && cast_expr.span.ctxt() == ctxt . && msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) . && !expr.span.in_external_macro(cx.tcx.sess.source_map()) -- line 38 ---------------------------------------- -- line 51 ---------------------------------------- . CAST_SLICE_FROM_RAW_PARTS, . span, . format!("casting the result of `{func}` to {cast_to}"), . "replace with", . format!("{krate}::ptr::slice_{func}({ptr}, {len})"), . applicability, . ); . } 456 ( 0.00%) } . . /// Checks for implicit cast from slice reference to raw slice pointer. 217,552 ( 0.01%) pub(super) fn check_implicit_cast(cx: &LateContext<'_>, expr: &Expr<'_>) { 8,680 ( 0.00%) if let ExprKind::Call(fun, [ptr_arg, len_arg]) = expr.peel_blocks().kind 2,064 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 2,752 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 26,518 ( 0.00%) => ???:::qpath_res (688x) 2,064 ( 0.00%) && let Some(rpk) = raw_parts_kind(cx, fun_def_id) . && !matches!(get_parent_expr(cx, expr).map(|e| e.kind), Some(ExprKind::Cast(..))) . && let [deref, borrow] = cx.typeck_results().expr_adjustments(expr) . && matches!(deref.kind, Adjust::Deref(..)) . && let Adjustment { . kind: Adjust::Borrow(AutoBorrow::RawPtr(..)), . target, . } = borrow . && let ty::RawPtr(pointee_ty, _) = target.kind() -- line 74 ---------------------------------------- -- line 89 ---------------------------------------- . CAST_SLICE_FROM_RAW_PARTS, . expr.span, . format!("implicitly casting the result of `{func}` to `{target}`"), . "replace_with", . format!("{krate}::ptr::slice_{func}({ptr}, {len})"), . applicability, . ); . } 217,552 ( 0.01%) } 30,634 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use clippy_utils::{std_or_core, sym}; . use rustc_errors::Applicability; . use rustc_hir::{self as hir, Expr, ExprKind, QPath}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty, TypeVisitableExt as _}; . . use super::PTR_CAST_CONSTNESS; . 399 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'_>, . expr: &Expr<'_>, . cast_from_expr: &Expr<'_>, . cast_from: Ty<'tcx>, . cast_to: Ty<'tcx>, . msrv: Msrv, . ) { 114 ( 0.00%) if let ty::RawPtr(from_ty, from_mutbl) = cast_from.kind() . && let ty::RawPtr(to_ty, to_mutbl) = cast_to.kind() . && from_mutbl != to_mutbl . && from_ty == to_ty . && !from_ty.has_erased_regions() . { . if let ExprKind::Call(func, []) = cast_from_expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = func.kind . && let Some(defid) = path.res.opt_def_id() -- line 29 ---------------------------------------- -- line 69 ---------------------------------------- . expr.span, . "`as` casting between raw pointers while changing only its constness", . format!("try `pointer::cast_{constness}`, a safer alternative"), . format!("{}.cast_{constness}()", sugg.maybe_paren()), . app, . ); . } . } 456 ( 0.00%) } . 163,164 ( 0.01%) pub(super) fn check_null_ptr_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 61,295 ( 0.00%) if let ExprKind::MethodCall(method, cast_from_expr, [], _) = expr.kind 3,139 ( 0.00%) && let ExprKind::Call(func, []) = cast_from_expr.kind 18 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = func.kind . && let Some(defid) = path.res.opt_def_id() 16 ( 0.00%) && let method = match (cx.tcx.get_diagnostic_name(defid), method.ident.name) { 160 ( 0.00%) => ???:::get_diagnostic_name (2x) . (Some(sym::ptr_null), sym::cast_mut) => "null_mut", . (Some(sym::ptr_null_mut), sym::cast_const) => "null", . _ => return, . } . && let Some(prefix) = std_or_core(cx) . && let mut app = Applicability::MachineApplicable . && let sugg = snippet_with_applicability(cx, cast_from_expr.span, "_", &mut app) . && let Some((_, after_lt)) = sugg.split_once("::<") -- line 92 ---------------------------------------- -- line 97 ---------------------------------------- . PTR_CAST_CONSTNESS, . expr.span, . "changing constness of a null pointer", . format!("use `{method}()` directly instead"), . format!("{prefix}::ptr::{method}::<{after_lt}"), . app, . ); . } 190,358 ( 0.01%) } 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use clippy_utils::visitors::for_each_expr; . use clippy_utils::{fulfill_or_allowed, is_doc_hidden, is_inside_always_const_context, method_chain_args, return_ty}; . use rustc_hir::{BodyId, FnSig, OwnerId, Safety}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::{Span, sym}; . use std::ops::ControlFlow; . 4,706 ( 0.00%) pub fn check( . cx: &LateContext<'_>, . owner_id: OwnerId, . sig: FnSig<'_>, . headers: DocHeaders, . body_id: Option, . check_private_items: bool, . ) { 2,534 ( 0.00%) if !check_private_items && !cx.effective_visibilities.is_exported(owner_id.def_id) { 19,329 ( 0.00%) => ???:::is_exported (362x) . return; // Private functions do not require doc comments . } . . // do not lint if any parent has `#[doc(hidden)]` attribute (#7347) . if !check_private_items 196 ( 0.00%) && cx . .tcx . .hir_parent_iter(owner_id.into()) 2,352 ( 0.00%) .any(|(id, _node)| is_doc_hidden(cx.tcx.hir_attrs(id))) 34,017 ( 0.00%) => ???:::hir_attrs (588x) . { . return; . } . . let span = cx.tcx.def_span(owner_id); 965 ( 0.00%) match (headers.safety, sig.header.safety()) { . (false, Safety::Unsafe) => span_lint( . cx, . MISSING_SAFETY_DOC, . span, . "unsafe function's docs are missing a `# Safety` section", . ), . (true, Safety::Safe) => span_lint( . cx, . UNNECESSARY_SAFETY_DOC, . span, . "safe function's docs have unnecessary `# Safety` section", . ), . _ => (), . } 561 ( 0.00%) if !headers.panics . && let Some(body_id) = body_id 360 ( 0.00%) && let Some(panic_span) = find_panic(cx, body_id) . { . span_lint_and_note( . cx, . MISSING_PANICS_DOC, . span, . "docs for function which may panic missing `# Panics` section", . Some(panic_span), . "first possible panic found here", . ); . } 386 ( 0.00%) if !headers.errors { 889 ( 0.00%) if return_ty(cx, owner_id).is_diag_item(cx, sym::Result) { 66,500 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (193x) . span_lint( . cx, . MISSING_ERRORS_DOC, . span, . "docs for function returning `Result` missing `# Errors` section", . ); 149 ( 0.00%) } else if let Some(body_id) = body_id 584 ( 0.00%) && let Some(future) = cx.tcx.lang_items().future_trait() 5,840 ( 0.00%) => ???:::lang_items (146x) 1,022 ( 0.00%) && let typeck = cx.tcx.typeck_body(body_id) 280,306 ( 0.02%) => ???:::typeck_body (146x) 584 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 9,203 ( 0.00%) => ???:::hir_body (146x) 584 ( 0.00%) && let ret_ty = typeck.expr_ty(body.value) 5,840 ( 0.00%) => ???:::expr_ty (146x) 2,190 ( 0.00%) && implements_trait_with_env( 840,537 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait_with_env (146x) . cx.tcx, 584 ( 0.00%) ty::TypingEnv::non_body_analysis(cx.tcx, owner_id.def_id), 693,220 ( 0.04%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::non_body_analysis:: (146x) . ret_ty, . future, . Some(owner_id.def_id.to_def_id()), . &[], . ) . && let ty::Coroutine(_, subs) = ret_ty.kind() . && subs.as_coroutine().return_ty().is_diag_item(cx, sym::Result) . { -- line 88 ---------------------------------------- -- line 89 ---------------------------------------- . span_lint( . cx, . MISSING_ERRORS_DOC, . span, . "docs for function returning `Result` missing `# Errors` section", . ); . } . } 2,896 ( 0.00%) } . . fn find_panic(cx: &LateContext<'_>, body_id: BodyId) -> Option { 180 ( 0.00%) let mut panic_span = None; 1,260 ( 0.00%) let typeck = cx.tcx.typeck_body(body_id); 6,359,210 ( 0.36%) => ???:::typeck_body (180x) 900 ( 0.00%) for_each_expr(cx.tcx, cx.tcx.hir_body(body_id), |expr| { 11,353 ( 0.00%) => ???:::hir_body (180x) 28,480 ( 0.00%) if is_inside_always_const_context(cx.tcx, expr.hir_id) { 63,132 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (180x) . return ControlFlow::::Continue(()); . } . 200 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 240 ( 0.00%) && (is_panic(cx, macro_call.def_id) 3,075 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_panic (40x) 111 ( 0.00%) || matches!( 148 ( 0.00%) cx.tcx.get_diagnostic_name(macro_call.def_id), 2,260 ( 0.00%) => ???:::get_diagnostic_name (37x) . Some(sym::assert_macro | sym::assert_eq_macro | sym::assert_ne_macro) . )) 3 ( 0.00%) && !fulfill_or_allowed(cx, MISSING_PANICS_DOC, [expr.hir_id]) . && panic_span.is_none() . { . panic_span = Some(macro_call.span); . } . . // check for `unwrap` and `expect` for both `Option` and `Result` 2,858 ( 0.00%) if let Some(arglists) = 34,126 ( 0.00%) method_chain_args(expr, &[sym::unwrap]).or_else(|| method_chain_args(expr, &[sym::expect])) 54,312 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (360x) 30 ( 0.00%) && let receiver_ty = typeck.expr_ty(arglists[0].0).peel_refs() 400 ( 0.00%) => ???:::expr_ty (10x) 46 ( 0.00%) && matches!(receiver_ty.opt_diag_name(cx), Some(sym::Option | sym::Result)) 10 ( 0.00%) && !fulfill_or_allowed(cx, MISSING_PANICS_DOC, [expr.hir_id]) . && panic_span.is_none() . { . panic_span = Some(expr.span); . } . . // Visit all nodes to fulfill any `#[expect]`s after the first linted panic . ControlFlow::::Continue(()) . }); -- line 132 ---------------------------------------- 1,456 ( 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/edition.rs -------------------------------------------------------------------------------- Ir . use std::fmt; . use std::str::FromStr; . . use rustc_macros::{BlobDecodable, Encodable, StableHash}; . . /// The edition of the compiler. (See [RFC 2052](https://github.com/rust-lang/rfcs/blob/master/text/2052-epochs.md).) 53,194 ( 0.00%) #[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug, Encodable, BlobDecodable, Eq)] . #[derive(StableHash)] . pub enum Edition { . // When adding new editions, be sure to do the following: . // . // - update the `ALL_EDITIONS` const . // - update the `EDITION_NAME_LIST` const . // - add a `rust_####()` function to the session . // - update the enum in Cargo's sources as well -- line 15 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs -------------------------------------------------------------------------------- Ir -- line 134 ---------------------------------------- . struct InputMinMax<'tcx> { . input: &'tcx Expr<'tcx>, . min: &'tcx Expr<'tcx>, . max: &'tcx Expr<'tcx>, . is_float: bool, . } . . impl<'tcx> LateLintPass<'tcx> for ManualClamp { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { . // Cheap kind check before the costlier const context query. 27,194 ( 0.00%) if matches!( 54,388 ( 0.00%) expr.kind, . ExprKind::If(..) | ExprKind::Match(..) | ExprKind::MethodCall(..) | ExprKind::Call(..) 14,332 ( 0.00%) ) && !expr.span.from_expansion() 19,236 ( 0.00%) && !is_in_const_context(cx) 1,573,745 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (4,809x) . { . let suggestion = is_if_elseif_else_pattern(cx, expr) 8,830 ( 0.00%) .or_else(|| is_max_min_pattern(cx, expr)) . .or_else(|| is_call_max_min_pattern(cx, expr)) . .or_else(|| is_match_pattern(cx, expr)) . .or_else(|| is_if_elseif_pattern(cx, expr)); . if let Some(suggestion) = suggestion . && self.msrv.meets(cx, msrvs::CLAMP) . { . maybe_emit_suggestion(cx, &suggestion); . } . } 217,552 ( 0.01%) } . 19,880 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . // Cheap `if`-statement check before the costlier const context query. 2,840 ( 0.00%) if !block . .stmts . .iter() 3,886 ( 0.00%) .any(|stmt| matches!(stmt.kind, StmtKind::Expr(e) if matches!(e.kind, ExprKind::If(..)))) . { . return; . } . 1,254 ( 0.00%) if is_in_const_context(cx) || !self.msrv.meets(cx, msrvs::CLAMP) { 37,438 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (114x) 3,078 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (114x) . return; . } . for suggestion in is_two_if_pattern(cx, block) { . maybe_emit_suggestion(cx, &suggestion); . } 22,720 ( 0.00%) } . } . . fn maybe_emit_suggestion<'tcx>(cx: &LateContext<'tcx>, suggestion: &ClampSuggestion<'tcx>) { . if !suggestion.min_less_than_max(cx) { . return; . } . let ClampSuggestion { . params: InputMinMax { -- line 187 ---------------------------------------- -- line 227 ---------------------------------------- . Float, . Ord, . } . . impl TypeClampability { . fn is_clampable<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option { . if ty.is_floating_point() { . Some(TypeClampability::Float) 12 ( 0.00%) } else if cx . .tcx 8 ( 0.00%) .get_diagnostic_item(sym::Ord) 424 ( 0.00%) => ???:::get_diagnostic_item (4x) 24 ( 0.00%) .is_some_and(|id| implements_trait(cx, ty, id, &[])) 342,057 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (4x) . { . Some(TypeClampability::Ord) . } else { . None . } . } . . fn is_float(self) -> bool { -- line 246 ---------------------------------------- -- line 269 ---------------------------------------- . r#else: Some(else_if), . }) = If::hir(expr) . && let Some(If { . cond: else_if_cond, . then: else_if_then, . r#else: Some(else_body), . }) = If::hir(peel_blocks(else_if)) . { 24 ( 0.00%) let params = is_clamp_meta_pattern( 342,933 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:clippy_lints::manual_clamp::is_clamp_meta_pattern (4x) . cx, 70 ( 0.00%) expr.span.ctxt(), 36 ( 0.00%) &BinaryOp::new(peel_blocks(cond))?, 8 ( 0.00%) &BinaryOp::new(peel_blocks(else_if_cond))?, . peel_blocks(then), . peel_blocks(else_if_then), 20 ( 0.00%) None, . )?; . // Contents of the else should be the resolved input. . if !eq_expr_value(cx, expr.span.ctxt(), params.input, peel_blocks(else_body)) { . return None; . } . Some(ClampSuggestion { . params, . span: expr.span, -- line 292 ---------------------------------------- -- line 302 ---------------------------------------- . /// . /// ```no_run . /// # let (input, min_value, max_value) = (0, -3, 12); . /// . /// input.max(min_value).min(max_value) . /// # ; . /// ``` . fn is_max_min_pattern<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option> { 14,699 ( 0.00%) if let ExprKind::MethodCall(seg_second, receiver, [arg_second], _) = expr.kind 2,254 ( 0.00%) && let ExprKind::MethodCall(seg_first, input, [arg_first], _) = &receiver.kind . // Match method names before the costlier type queries. 48 ( 0.00%) && let Some((min, max)) = match (seg_first.ident.name, seg_second.ident.name) { 64 ( 0.00%) (sym::min, sym::max) => Some((arg_second, arg_first)), . (sym::max, sym::min) => Some((arg_first, arg_second)), . _ => None, . } . && (cx.typeck_results().expr_ty_adjusted(receiver).is_floating_point() . || cx.ty_based_def(expr).assoc_fn_parent(cx).is_diag_item(cx, sym::Ord)) . && (cx.typeck_results().expr_ty_adjusted(input).is_floating_point() . || cx.ty_based_def(receiver).assoc_fn_parent(cx).is_diag_item(cx, sym::Ord)) . { -- line 322 ---------------------------------------- -- line 367 ---------------------------------------- . } . . enum FunctionType<'tcx> { . CmpMin, . CmpMax, . OrdOrFloat(&'tcx PathSegment<'tcx>), . } . 3,996 ( 0.00%) fn check<'tcx>( . cx: &LateContext<'tcx>, . outer_fn: &'tcx Expr<'tcx>, . inner_call: &'tcx Expr<'tcx>, . outer_arg: &'tcx Expr<'tcx>, . span: Span, . ) -> Option> { 904 ( 0.00%) if let ExprKind::Call(inner_fn, [first, second]) = &inner_call.kind . && let Some(inner_seg) = segment(cx, inner_fn) . && let Some(outer_seg) = segment(cx, outer_fn) . { . let typeck = cx.typeck_results(); . let (input, inner_arg) = match ( . is_const_evaluatable(cx.tcx, typeck, first), . is_const_evaluatable(cx.tcx, typeck, second), . ) { -- line 390 ---------------------------------------- -- line 412 ---------------------------------------- . max, . is_float, . }, . span, . make_assignment: None, . hir_with_ignore_attr: None, . }) . } else { 444 ( 0.00%) None . } 3,552 ( 0.00%) } . 27,660 ( 0.00%) if let ExprKind::Call(outer_fn, [first, second]) = &expr.kind { 4,218 ( 0.00%) check(cx, outer_fn, first, second, expr.span).or_else(|| check(cx, outer_fn, second, first, expr.span)) 8,896 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:clippy_lints::manual_clamp::is_call_max_min_pattern::check (444x) . } else { . None . } . } . . /// Targets patterns like . /// . /// ```no_run -- line 433 ---------------------------------------- -- line 436 ---------------------------------------- . /// match input { . /// input if input > max => max, . /// input if input < min => min, . /// input => input, . /// } . /// # ; . /// ``` . fn is_match_pattern<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option> { 7,549 ( 0.00%) if let ExprKind::Match(value, [first_arm, second_arm, last_arm], rustc_hir::MatchSource::Normal) = &expr.kind { . // Find possible min/max branches . let minmax_values = |a: &'tcx Arm<'tcx>| { 129 ( 0.00%) if let PatKind::Binding(_, var_hir_id, _, None) = &a.pat.kind . && let Some(e) = a.guard . { . Some((e, var_hir_id, a.body)) . } else { . None . } . }; . let (first, first_hir_id, first_expr) = minmax_values(first_arm)?; -- line 455 ---------------------------------------- -- line 497 ---------------------------------------- . /// let mut x = input; . /// if x < min { x = min; } . /// if x > max { x = max; } . /// ``` . fn is_two_if_pattern<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) -> Vec> { . block_stmt_with_last(block) . .tuple_windows() . .filter_map(|(maybe_set_first, maybe_set_second)| { 2,662 ( 0.00%) if let StmtKind::Expr(first_expr) = *maybe_set_first 931 ( 0.00%) && let StmtKind::Expr(second_expr) = *maybe_set_second . && let Some(If { . cond: first_cond, . then: first_then, . r#else: None, . }) = If::hir(first_expr) . && let Some(If { . cond: second_cond, . then: second_then, . r#else: None, . }) = If::hir(second_expr) 22 ( 0.00%) && let ExprKind::Assign(maybe_input_first_path, maybe_min_max_first, _) = 44 ( 0.00%) peel_blocks_with_stmt(first_then).kind 242 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_blocks_with_stmt (11x) . && let ExprKind::Assign(maybe_input_second_path, maybe_min_max_second, _) = . peel_blocks_with_stmt(second_then).kind . && let ctxt = first_expr.span.ctxt() . && second_expr.span.ctxt() == ctxt . && eq_expr_value(cx, ctxt, maybe_input_first_path, maybe_input_second_path) . && let Some(first_bin) = BinaryOp::new(first_cond) . && let Some(second_bin) = BinaryOp::new(second_cond) . && let Some(input_min_max) = is_clamp_meta_pattern( -- line 526 ---------------------------------------- -- line 540 ---------------------------------------- . max: input_min_max.max, . is_float: input_min_max.is_float, . }, . span: first_expr.span.to(second_expr.span), . make_assignment: Some(maybe_input_first_path), . hir_with_ignore_attr: Some(first_expr.hir_id), . }) . } else { 414 ( 0.00%) None . } . }) . .collect() . } . . /// Targets patterns like . /// . /// ```no_run -- line 556 ---------------------------------------- -- line 568 ---------------------------------------- . then, . r#else: Some(else_if), . }) = If::hir(expr) . && let Some(If { . cond: else_if_cond, . then: else_if_then, . r#else: None, . }) = If::hir(peel_blocks(else_if)) 18 ( 0.00%) && let ExprKind::Assign(maybe_input_first_path, maybe_min_max_first, _) = peel_blocks_with_stmt(then).kind . && let ExprKind::Assign(maybe_input_second_path, maybe_min_max_second, _) = . peel_blocks_with_stmt(else_if_then).kind . { . let ctxt = expr.span.ctxt(); . let params = is_clamp_meta_pattern( . cx, . ctxt, . &BinaryOp::new(peel_blocks(cond))?, -- line 584 ---------------------------------------- -- line 608 ---------------------------------------- . left: &'tcx Expr<'tcx>, . right: &'tcx Expr<'tcx>, . } . . impl<'tcx> BinaryOp<'tcx> { . fn new(e: &'tcx Expr<'tcx>) -> Option> { . match &e.kind { . ExprKind::Binary(op, left, right) => Some(BinaryOp { 16 ( 0.00%) op: op.node, 16 ( 0.00%) left, . right, . }), . _ => None, . } . } . . fn flip(&self) -> Self { . Self { -- line 625 ---------------------------------------- -- line 651 ---------------------------------------- . /// - `Range` . /// - `RangeInclusive` . /// . /// And all other range types are not accepted. For the purposes of `clamp` it's irrelevant . /// whether the range is inclusive or not, the output is the same. . /// . /// - The result of each if statement must be equal to the argument unique to that if statement. The . /// result can not be the shared argument in either case. 36 ( 0.00%) fn is_clamp_meta_pattern<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . first_bin: &BinaryOp<'tcx>, . second_bin: &BinaryOp<'tcx>, . first_expr: &'tcx Expr<'tcx>, . second_expr: &'tcx Expr<'tcx>, . // This parameters is exclusively for the match pattern. . // It exists because the variable bindings used in that pattern -- line 667 ---------------------------------------- -- line 708 ---------------------------------------- . let exprs = [ . first_bin.left, . first_bin.right, . second_bin.left, . second_bin.right, . first_expr, . second_expr, . ]; 20 ( 0.00%) let clampability = TypeClampability::is_clampable(cx, cx.typeck_results().expr_ty(first_expr))?; 160 ( 0.00%) => ???:::expr_ty (4x) . let is_float = clampability.is_float(); 4 ( 0.00%) if exprs.iter().any(|e| peel_blocks(e).can_have_side_effects()) { 38 ( 0.00%) => ???:::can_have_side_effects (2x) . return None; . } . let first_bin = try_normalize_unsigned_eq_to_ord(cx, first_bin, first_expr).unwrap_or(*first_bin); . let second_bin = try_normalize_unsigned_eq_to_ord(cx, second_bin, second_expr).unwrap_or(*second_bin); . let (first_bin, second_bin) = (&first_bin, &second_bin); . if !(is_ord_op(first_bin.op) && is_ord_op(second_bin.op)) { . return None; . } -- line 726 ---------------------------------------- -- line 750 ---------------------------------------- . &first, . second_expr, . first_expr, . input_hir_ids.map(|(l, r)| (r, l)), . is_float, . ) . }) . }) 32 ( 0.00%) } . . fn block_stmt_with_last<'tcx>(block: &'tcx Block<'tcx>) -> impl Iterator> { . block . .stmts . .iter() . .map(|s| MaybeBorrowedStmtKind::Borrowed(&s.kind)) . .chain( . block -- line 766 ---------------------------------------- -- line 819 ---------------------------------------- . #[derive(Debug)] . enum MaybeBorrowedStmtKind<'a> { . Borrowed(&'a StmtKind<'a>), . Owned(StmtKind<'a>), . } . . impl Clone for MaybeBorrowedStmtKind<'_> { . fn clone(&self) -> Self { 2,004 ( 0.00%) match self { . Self::Borrowed(t) => Self::Borrowed(t), . Self::Owned(StmtKind::Expr(e)) => Self::Owned(StmtKind::Expr(e)), . Self::Owned(_) => unreachable!("Owned should only ever contain a StmtKind::Expr."), . } . } . } . . impl<'a> Deref for MaybeBorrowedStmtKind<'a> { -- line 835 ---------------------------------------- 49,818 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::{self as hir, QPath, TyKind}; . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_span::symbol::sym; . . use super::{REDUNDANT_ALLOCATION, utils}; . 7,128 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, qpath: &QPath<'tcx>, def_id: DefId) -> bool { 594 ( 0.00%) let mut applicability = Applicability::MaybeIncorrect; 5,796 ( 0.00%) let outer_sym = match cx.tcx.get_diagnostic_name(def_id) { 34,823 ( 0.00%) => ???:::get_diagnostic_name (594x) 1,224 ( 0.00%) _ if Some(def_id) == cx.tcx.lang_items().owned_box() => "Box", 23,760 ( 0.00%) => ???:::lang_items (594x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; . . if let Some(span) = utils::match_borrows_parameter(cx, qpath) { . let generic_snippet = snippet_with_applicability(cx, span, "..", &mut applicability); . span_lint_and_then( -- line 26 ---------------------------------------- -- line 33 ---------------------------------------- . diag.note(format!( . "`{generic_snippet}` is already a pointer, `{outer_sym}<{generic_snippet}>` allocates a pointer on the heap" . )); . }, . ); . return true; . } . 82 ( 0.00%) let Some(ty) = qpath_generic_tys(qpath).next() else { 779 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (41x) . return false; . }; . let Some(id) = ty.basic_res().opt_def_id() else { . return false; . }; 136 ( 0.00%) let (inner_sym, ty) = match cx.tcx.get_diagnostic_name(id) { 1,071 ( 0.00%) => ???:::get_diagnostic_name (17x) . Some(sym::Arc) => ("Arc", ty), . Some(sym::Rc) => ("Rc", ty), 34 ( 0.00%) _ if Some(id) == cx.tcx.lang_items().owned_box() => ("Box", ty), 680 ( 0.00%) => ???:::lang_items (17x) . _ => return false, . }; . . let TyKind::Path(inner_qpath) = &ty.kind else { . return false; . }; . let inner_span = match qpath_generic_tys(inner_qpath).next() { . Some(hir_ty) => { -- line 58 ---------------------------------------- -- line 99 ---------------------------------------- . )); . diag.help(format!( . "consider using just `{outer_sym}<{generic_snippet}>` or `{inner_sym}<{generic_snippet}>`" . )); . }, . ); . } . true 4,752 ( 0.00%) } 915 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_ifs.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . pub NEEDLESS_IFS, . complexity, . "checks for empty if branches" . } . . declare_lint_pass!(NeedlessIfs => [NEEDLESS_IFS]); . . impl LateLintPass<'_> for NeedlessIfs { 14,385 ( 0.00%) fn check_stmt<'tcx>(&mut self, cx: &LateContext<'tcx>, stmt: &Stmt<'tcx>) { 4,385 ( 0.00%) if let StmtKind::Expr(expr) = stmt.kind . && let Some(If { . cond, . then, . r#else: None, . }) = If::hir(expr) 348 ( 0.00%) && let ExprKind::Block(block, ..) = then.kind 116 ( 0.00%) && block.stmts.is_empty() 12 ( 0.00%) && block.expr.is_none() . && !expr.span.in_external_macro(cx.sess().source_map()) . && then.span.check_text(cx, |src| { . // Ignore . // - empty macro expansions . // - empty reptitions in macro expansions . // - comments . // - #[cfg]'d out code . src.bytes() -- line 57 ---------------------------------------- -- line 76 ---------------------------------------- . format!("{cond_snippet};") . } . } else { . String::new() . }, . Applicability::MachineApplicable, . ); . } 16,440 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/let_underscore.rs -------------------------------------------------------------------------------- Ir -- line 130 ---------------------------------------- . declare_lint_pass!(LetUnderscore => [ . LET_UNDERSCORE_FUTURE, . LET_UNDERSCORE_LOCK, . LET_UNDERSCORE_MUST_USE, . LET_UNDERSCORE_UNTYPED, . ]); . . impl<'tcx> LateLintPass<'tcx> for LetUnderscore { 4,942 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) { 1,412 ( 0.00%) if matches!(local.source, LocalSource::Normal) 2,115 ( 0.00%) && let PatKind::Wild = local.pat.kind 24 ( 0.00%) && let Some(init) = local.init 56 ( 0.00%) && !local.span.in_external_macro(cx.tcx.sess.source_map()) . { 8 ( 0.00%) let init_ty = cx.typeck_results().expr_ty(init); 320 ( 0.00%) => ???:::expr_ty (8x) 16 ( 0.00%) let contains_sync_guard = init_ty.walk().any(|inner| match inner.kind() { 56 ( 0.00%) => ???:::walk (8x) . GenericArgKind::Type(inner_ty) => inner_ty . .ty_adt_def() . .is_some_and(|adt| paths::PARKING_LOT_GUARDS.iter().any(|path| path.matches(cx, adt.did()))), . GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, . }); 8 ( 0.00%) if contains_sync_guard { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . LET_UNDERSCORE_LOCK, . local.span, . "non-binding `let` on a synchronization lock", . |diag| { . diag.help( . "consider using an underscore-prefixed named \ . binding or dropping explicitly with `std::mem::drop`", . ); . }, . ); 8 ( 0.00%) } else if local.ty.is_none() 24 ( 0.00%) && let Some(future_trait_def_id) = cx.tcx.lang_items().future_trait() 320 ( 0.00%) => ???:::lang_items (8x) 88 ( 0.00%) && implements_trait(cx, cx.typeck_results().expr_ty(init), future_trait_def_id, &[]) 59,734 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (8x) 320 ( 0.00%) => ???:::expr_ty (8x) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . LET_UNDERSCORE_FUTURE, . local.span, . "non-binding `let` on a future", . |diag| { . diag.help("consider awaiting the future or dropping explicitly with `std::mem::drop`"); . }, . ); 64 ( 0.00%) } else if let Some(must_use_path) = opt_must_use_path(cx, cx.typeck_results().expr_ty(init)) { 9,846 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::opt_must_use_path (8x) 320 ( 0.00%) => ???:::expr_ty (8x) . span_lint_and_then( . cx, . LET_UNDERSCORE_MUST_USE, . local.span, . "non-binding `let` on an expression with `#[must_use]` type", . |diag| { . diag.help("consider explicitly using expression value"); . let ty_span = local.ty.map_or(init.span, |ty| ty.span); . diag.span_note( . ty_span, . format!("type is {}", describe_must_use_type(cx, &must_use_path)), . ); . }, . ); 40 ( 0.00%) } else if is_must_use_func_call(cx, init) { 96 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_must_use_func_call (8x) . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . LET_UNDERSCORE_MUST_USE, . local.span, . "non-binding `let` on a result of a `#[must_use]` function", . |diag| { . diag.help("consider explicitly using function result"); . }, . ); . } . 32 ( 0.00%) if local.pat.default_binding_modes && local.ty.is_none() { . // When `default_binding_modes` is true, the `let` keyword is present. . . // Ignore unnameable types . if let Some(init) = local.init 24 ( 0.00%) && !cx.typeck_results().expr_ty(init).is_suggestable(cx.tcx, true) 320 ( 0.00%) => ???:::expr_ty (8x) . { . return; . } . . // Ignore if it is from a procedural macro... 32 ( 0.00%) if is_from_proc_macro(cx, init) { 5,200 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (8x) . return; . } . 80 ( 0.00%) span_lint_and_then( 9,372 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_local::{closure#5}> (8x) . cx, . LET_UNDERSCORE_UNTYPED, . local.span, . "non-binding `let` without a type annotation", . |diag| { . diag.span_help( . Span::new( . local.pat.span.hi(), -- line 230 ---------------------------------------- -- line 233 ---------------------------------------- . local.pat.span.parent(), . ), . "consider adding a type annotation", . ); . }, . ); . } . } 5,648 ( 0.00%) } . } 804 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::snippet_opt; . use clippy_utils::sym; . use rustc_errors::Applicability; . use rustc_hir as hir; . use rustc_hir::def_id::DefId; . use rustc_lint::LateContext; . use rustc_span::Span; . 5,787 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, qpath: &hir::QPath<'_>, def_id: DefId) -> bool { 5,144 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Cow, def_id) 39,198 ( 0.00%) => ???:::is_diagnostic_item (643x) . && let hir::QPath::Resolved(_, path) = qpath . && let [.., last_seg] = path.segments . && let Some(args) = last_seg.args . && let [_lt, carg] = args.args . && let hir::GenericArg::Type(cty) = carg . && let Some((span, repl)) = replacement(cx, cty.as_unambig_ty()) . { . span_lint_and_sugg( -- line 20 ---------------------------------------- -- line 24 ---------------------------------------- . "needlessly owned Cow type", . "use", . repl, . Applicability::Unspecified, . ); . return true; . } . false 5,144 ( 0.00%) } . . fn replacement(cx: &LateContext<'_>, cty: &hir::Ty<'_>) -> Option<(Span, String)> { . if cty.basic_res().is_lang_item(cx, hir::LangItem::String) { . return Some((cty.span, "str".into())); . } . if cty.basic_res().is_diag_item(cx, sym::Vec) { . return if let hir::TyKind::Path(hir::QPath::Resolved(_, path)) = cty.kind . && let [.., last_seg] = path.segments -- line 40 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_pop_if.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . msrv: Msrv, . binary_heap_pop_if_feature_enabled: bool, . } . . impl ManualPopIf { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { . Self { . msrv: conf.msrv.into(), 6 ( 0.00%) binary_heap_pop_if_feature_enabled: tcx.features().enabled(sym::binary_heap_pop_if), 40 ( 0.00%) => ???:::features (1x) 4 ( 0.00%) => ???:::enabled (1x) . } . } . . fn msrv_compatible(&self, cx: &LateContext<'_>, kind: ManualPopIfKind) -> bool { 916 ( 0.00%) match kind { . ManualPopIfKind::Vec => self.msrv.meets(cx, msrvs::VEC_POP_IF), . ManualPopIfKind::VecDequeBack => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_BACK_IF), . ManualPopIfKind::VecDequeFront => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_FRONT_IF), . ManualPopIfKind::BinaryHeap => self.binary_heap_pop_if_feature_enabled, . } . } . } . -- line 84 ---------------------------------------- -- line 199 ---------------------------------------- . cond: &'tcx Expr<'_>, . then_block: &'tcx Expr<'_>, . if_expr_span: Span, . kind: ManualPopIfKind, . ) -> Option> { . let peek_method = kind.peek_method(); . let pop_method = kind.pop_method(); . 2,304 ( 0.00%) if let ExprKind::MethodCall(path, receiver, [closure_arg], _) = cond.kind 88 ( 0.00%) && path.ident.name == sym::is_some_and . && let ExprKind::MethodCall(check_path, collection_expr, [], _) = receiver.kind . && check_path.ident.name == peek_method . && kind.is_diag_item(cx, collection_expr) . && let ExprKind::Closure(closure) = closure_arg.kind . && let body = cx.tcx.hir_body(closure.body) . && let Some((pop_collection, pop_span, suggestable)) = check_pop_unwrap(cx, then_block, pop_method) . && eq_expr_value(cx, if_expr_span.ctxt(), collection_expr, pop_collection) . && let Some(param) = body.params.first() -- line 216 ---------------------------------------- -- line 243 ---------------------------------------- . cond: &'tcx Expr<'_>, . then_block: &'tcx Expr<'_>, . if_expr_span: Span, . kind: ManualPopIfKind, . ) -> Option> { . let peek_method = kind.peek_method(); . let pop_method = kind.pop_method(); . 1,996 ( 0.00%) if let ExprKind::Let(let_expr) = cond.kind 1,668 ( 0.00%) && let PatKind::TupleStruct(qpath, [binding_pat], _) = let_expr.pat.kind . { 864 ( 0.00%) let res = cx.qpath_res(&qpath, let_expr.pat.hir_id); 3,312 ( 0.00%) => ???:::qpath_res (144x) . . if let Some(def_id) = res.opt_def_id() 576 ( 0.00%) && is_lang_item_or_ctor(cx, def_id, LangItem::OptionSome) 40,222 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lang_item_or_ctor (144x) 208 ( 0.00%) && let PatKind::Binding(_, binding_id, binding_name, _) = binding_pat.kind 108 ( 0.00%) && let ExprKind::MethodCall(path, collection_expr, [], _) = let_expr.init.kind . && path.ident.name == peek_method . && kind.is_diag_item(cx, collection_expr) . && let ExprKind::Block(block, _) = then_block.kind . { . // The inner if can be either a statement or a block expression . let inner_if = match (block.stmts, block.expr) { . ([stmt], _) => match stmt.kind { . StmtKind::Expr(expr) | StmtKind::Semi(expr) => expr, -- line 267 ---------------------------------------- -- line 307 ---------------------------------------- . cond: &'tcx Expr<'_>, . then_block: &'tcx Expr<'_>, . if_expr_span: Span, . kind: ManualPopIfKind, . ) -> Option> { . let peek_method = kind.peek_method(); . let pop_method = kind.pop_method(); . 1,880 ( 0.00%) if let ExprKind::Binary(op, left, right) = cond.kind 200 ( 0.00%) && op.node == rustc_ast::BinOpKind::And 96 ( 0.00%) && let ExprKind::Let(let_expr) = left.kind . && let PatKind::TupleStruct(qpath, [binding_pat], _) = let_expr.pat.kind . { . let res = cx.qpath_res(&qpath, let_expr.pat.hir_id); . . if let Some(def_id) = res.opt_def_id() . && is_lang_item_or_ctor(cx, def_id, LangItem::OptionSome) . && let PatKind::Binding(_, binding_id, binding_name, _) = binding_pat.kind . && let ExprKind::MethodCall(path, collection_expr, [], _) = let_expr.init.kind -- line 325 ---------------------------------------- -- line 355 ---------------------------------------- . cond: &'tcx Expr<'_>, . then_block: &'tcx Expr<'_>, . if_expr_span: Span, . kind: ManualPopIfKind, . ) -> Option> { . let peek_method = kind.peek_method(); . let pop_method = kind.pop_method(); . 2,304 ( 0.00%) if let ExprKind::MethodCall(unwrap_path, receiver, [default_arg], _) = cond.kind 88 ( 0.00%) && unwrap_path.ident.name == sym::unwrap_or . && matches!(default_arg.kind, ExprKind::Lit(lit) if matches!(lit.node, LitKind::Bool(false))) . && let ExprKind::MethodCall(map_path, map_receiver, [closure_arg], _) = receiver.kind . && map_path.ident.name == sym::map . && let ExprKind::MethodCall(check_path, collection_expr, [], _) = map_receiver.kind . && check_path.ident.name == peek_method . && kind.is_diag_item(cx, collection_expr) . && let ExprKind::Closure(closure) = closure_arg.kind . && let body = cx.tcx.hir_body(closure.body) -- line 372 ---------------------------------------- -- line 455 ---------------------------------------- . ControlFlow::Break((collection_expr, span, false)) . } else { . ControlFlow::Continue(()) . } . }) . } . . impl<'tcx> LateLintPass<'tcx> for ManualPopIf { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 55,965 ( 0.00%) let ExprKind::If(cond, then_block, None) = expr.kind else { . return; . }; . 1,145 ( 0.00%) let in_else_clause = is_else_clause(cx.tcx, expr); 37,161 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (229x) . 5,954 ( 0.00%) for kind in [ . ManualPopIfKind::Vec, . ManualPopIfKind::VecDequeBack, . ManualPopIfKind::VecDequeFront, . ManualPopIfKind::BinaryHeap, . ] { . if let Some(mut pattern) = check_is_some_and_pattern(cx, cond, then_block, expr.span, kind) 576 ( 0.00%) .or_else(|| check_if_let_pattern(cx, cond, then_block, expr.span, kind)) . .or_else(|| check_let_chain_pattern(cx, cond, then_block, expr.span, kind)) . .or_else(|| check_map_unwrap_or_pattern(cx, cond, then_block, expr.span, kind)) . && self.msrv_compatible(cx, kind) . { . if in_else_clause { . pattern.suggestable = false; . } . . pattern.emit_lint(cx); . return; . } . } 217,552 ( 0.01%) } . } 1,695 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . . #[derive(Default)] . pub struct SuspiciousOperationGroupings { . // Spans already linted. . linted_spans: FxHashSet, . } . . impl EarlyLintPass for SuspiciousOperationGroupings { 200,412 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 44,536 ( 0.00%) if expr.span.from_expansion() { . return; . } . 51,147 ( 0.00%) if let Some(binops) = extract_related_binops(&expr.kind) { 72 ( 0.00%) check_binops(cx, &binops.iter().collect::>(), &mut self.linted_spans); 8,070 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::check_binops (24x) . . let mut op_types = Vec::with_capacity(binops.len()); . // We could use a hashmap, etc. to avoid being O(n*m) here, but . // we want the lints to be emitted in a consistent order. Besides, . // m, (the number of distinct `BinOpKind`s in `binops`) . // will often be small, and does have an upper limit. . binops.iter().map(|b| b.op).for_each(|op| { . if !op_types.contains(&op) { . op_types.push(op); . } . }); . 110 ( 0.00%) for op_type in op_types { . let ops: Vec<_> = binops.iter().filter(|b| b.op == op_type).collect(); . 114 ( 0.00%) check_binops(cx, &ops, &mut self.linted_spans); 18,229 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::check_binops (38x) . } . } 178,144 ( 0.01%) } . } . 558 ( 0.00%) fn check_binops(cx: &EarlyContext<'_>, binops: &[&BinaryOp<'_>], linted_spans: &mut FxHashSet) { . let binop_count = binops.len(); 124 ( 0.00%) if binop_count < 2 { . // Single binary operation expressions would likely be false . // positives. . return; . } . . let mut one_ident_difference_count = 0; . let mut no_difference_info = None; . let mut double_difference_info = None; . let mut expected_ident_loc = None; . . let mut paired_identifiers = FxHashSet::default(); . 52 ( 0.00%) for (i, BinaryOp { left, right, op, .. }) in binops.iter().enumerate() { 216 ( 0.00%) match ident_difference_expr(left, right) { . IdentDifference::NoDifference => { . if is_useless_with_eq_exprs(*op) { . // The `eq_op` lint should catch this in this case. . return; . } . . no_difference_info = Some(i); . }, . IdentDifference::Single(ident_loc) => { . one_ident_difference_count += 1; 24 ( 0.00%) if let Some(previous_expected) = expected_ident_loc { 2 ( 0.00%) if previous_expected != ident_loc { . // This expression doesn't match the form we're . // looking for. . return; . } . } else { . expected_ident_loc = Some(ident_loc); . } . . // If there was only a single difference, all other idents . // must have been the same, and thus were paired. 120 ( 0.00%) for id in skip_index(IdentIter::from(*left), ident_loc.index) { 3,328 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/ident_iter.rs:>::from (12x) . paired_identifiers.insert(id); . } 12 ( 0.00%) }, . IdentDifference::Double(ident_loc1, ident_loc2) => { . double_difference_info = Some((i, ident_loc1, ident_loc2)); . }, . IdentDifference::Multiple | IdentDifference::NonIdent => { . // It's too hard to know whether this is a bug or not. . return; . }, . } -- line 153 ---------------------------------------- -- line 176 ---------------------------------------- . { . emit_suggestion(cx, binop.span, sugg, applicability, linted_spans); . } . } . }, . _ => {}, . } . } 496 ( 0.00%) } . . fn attempt_to_emit_no_difference_lint( . cx: &EarlyContext<'_>, . binops: &[&BinaryOp<'_>], . i: usize, . expected_loc: IdentLocation, . linted_spans: &mut FxHashSet, . ) { -- line 192 ---------------------------------------- -- line 346 ---------------------------------------- . fn new(op: BinOpKind, span: Span, (left, right): (&'exprs Expr, &'exprs Expr)) -> Self { . Self { op, span, left, right } . } . } . . fn strip_non_ident_wrappers(expr: &Expr) -> &Expr { . let mut output = expr; . loop { 556 ( 0.00%) output = match &output.kind { 12 ( 0.00%) ExprKind::Paren(inner) | ExprKind::Unary(_, inner) => inner, . _ => { . return output; . }, . }; . } . } . . fn extract_related_binops(kind: &ExprKind) -> Option>> { 51,099 ( 0.00%) append_opt_vecs(chained_binops(kind), if_statement_binops(kind)) 456,113 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops (17,033x) 374,792 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (17,033x) . } . 122,605 ( 0.01%) fn if_statement_binops(kind: &ExprKind) -> Option>> { 121,795 ( 0.01%) match kind { 916 ( 0.00%) ExprKind::If(condition, _, _) => chained_binops(&condition.kind), 20 ( 0.00%) ExprKind::Paren(e) => if_statement_binops(&e.kind), . ExprKind::Block(block, _) => { 347 ( 0.00%) let mut output = None; 347 ( 0.00%) for stmt in &block.stmts { 2,264 ( 0.00%) match &stmt.kind { . StmtKind::Expr(e) | StmtKind::Semi(e) => { 6,748 ( 0.00%) output = append_opt_vecs(output, if_statement_binops(&e.kind)); 13,206 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops'2 (472x) 10,386 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (472x) . }, . _ => {}, . } . } 2,429 ( 0.00%) output . }, . _ => None, . } 139,192 ( 0.01%) } . 122,605 ( 0.01%) fn append_opt_vecs(target_opt: Option>, source_opt: Option>) -> Option> { 87,575 ( 0.00%) match (target_opt, source_opt) { . (Some(mut target), Some(source)) => { . target.reserve(source.len()); . for op in source { . target.push(op); . } . Some(target) . }, 100 ( 0.00%) (Some(v), None) | (None, Some(v)) => Some(v), 34,980 ( 0.00%) (None, None) => None, . } 140,120 ( 0.01%) } . . fn chained_binops(kind: &ExprKind) -> Option>> { 123,088 ( 0.01%) match kind { 3,550 ( 0.00%) ExprKind::Binary(_, left_outer, right_outer) => chained_binops_helper(left_outer, right_outer), 4,381 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper (101x) 250 ( 0.00%) ExprKind::Paren(e) | ExprKind::Unary(_, e) => chained_binops(&e.kind), 16,654 ( 0.00%) _ => None, . } . } . 5,670 ( 0.00%) fn chained_binops_helper<'expr>(left_outer: &'expr Expr, right_outer: &'expr Expr) -> Option>> { 4,490 ( 0.00%) match (&left_outer.kind, &right_outer.kind) { . ( . ExprKind::Paren(left_e) | ExprKind::Unary(_, left_e), . ExprKind::Paren(right_e) | ExprKind::Unary(_, right_e), 2 ( 0.00%) ) => chained_binops_helper(left_e, right_e), . (ExprKind::Paren(left_e) | ExprKind::Unary(_, left_e), _) => chained_binops_helper(left_e, right_outer), 87 ( 0.00%) (_, ExprKind::Paren(right_e) | ExprKind::Unary(_, right_e)) => chained_binops_helper(left_outer, right_e), . ( . ExprKind::Binary(Spanned { node: left_op, .. }, left_left, left_right), . ExprKind::Binary(Spanned { node: right_op, .. }, right_left, right_right), 288 ( 0.00%) ) => match ( 252 ( 0.00%) chained_binops_helper(left_left, left_right), 3,232 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper'2 (24x) 216 ( 0.00%) chained_binops_helper(right_left, right_right), 1,062 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper'2 (24x) . ) { . (Some(mut left_ops), Some(right_ops)) => { . left_ops.reserve(right_ops.len()); . for op in right_ops { . left_ops.push(op); . } . Some(left_ops) . }, 30 ( 0.00%) (Some(mut left_ops), _) => { 20 ( 0.00%) left_ops.push(BinaryOp::new(*right_op, right_outer.span, (right_left, right_right))); 50 ( 0.00%) Some(left_ops) . }, 8 ( 0.00%) (_, Some(mut right_ops)) => { 6 ( 0.00%) right_ops.insert(0, BinaryOp::new(*left_op, left_outer.span, (left_left, left_right))); 6 ( 0.00%) Some(right_ops) . }, 264 ( 0.00%) (None, None) => Some(vec![ 48 ( 0.00%) BinaryOp::new(*left_op, left_outer.span, (left_left, left_right)), 48 ( 0.00%) BinaryOp::new(*right_op, right_outer.span, (right_left, right_right)), . ]), 36 ( 0.00%) }, 531 ( 0.00%) _ => None, . } 4,536 ( 0.00%) } . 2 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] . struct IdentLocation { . index: usize, . } . . impl Add for IdentLocation { . type Output = IdentLocation; . . fn add(self, other: Self) -> Self::Output { . Self { 17 ( 0.00%) index: self.index + other.index, . } . } . } . . impl AddAssign for IdentLocation { . fn add_assign(&mut self, other: Self) { . *self = *self + other; . } -- line 466 ---------------------------------------- -- line 474 ---------------------------------------- . Multiple, . NonIdent, . } . . impl Add for IdentDifference { . type Output = IdentDifference; . . fn add(self, other: Self) -> Self::Output { 50 ( 0.00%) match (self, other) { . (Self::NoDifference, output) | (output, Self::NoDifference) => output, . (Self::Multiple, _) . | (_, Self::Multiple) . | (Self::Double(_, _), Self::Single(_)) . | (Self::Single(_) | Self::Double(_, _), Self::Double(_, _)) => Self::Multiple, . (Self::NonIdent, _) | (_, Self::NonIdent) => Self::NonIdent, . (Self::Single(il1), Self::Single(il2)) => Self::Double(il1, il2), . } -- line 490 ---------------------------------------- -- line 537 ---------------------------------------- . // . // If it turns out that problematic cases are more prevalent than we assume, . // then we should be able to change this function to do the correct traversal, . // without needing to change the rest of the code. . . #[allow(clippy::enum_glob_use)] . use ExprKind::*; . 500 ( 0.00%) match ( . &strip_non_ident_wrappers(left).kind, . &strip_non_ident_wrappers(right).kind, . ) { . (Yield(_), Yield(_)) . | (Try(_), Try(_)) . | (Paren(_), Paren(_)) . | (Repeat(_, _), Repeat(_, _)) . | (Struct(_), Struct(_)) -- line 553 ---------------------------------------- -- line 617 ---------------------------------------- . ) -> (IdentDifference, IdentLocation) { . // See the note in `ident_difference_expr_with_base_location` about `IdentIter` . let mut difference = IdentDifference::NoDifference; . . let mut left_iterator = left.into(); . let mut right_iterator = right.into(); . . loop { 485 ( 0.00%) match (left_iterator.next(), right_iterator.next()) { 1,116 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/ident_iter.rs:::next (116x) . (Some(left_ident), Some(right_ident)) => { 38 ( 0.00%) if !eq_id(left_ident, right_ident) { . difference += IdentDifference::Single(base); . if difference.is_complete() { . return (difference, base); . } . } . }, . (Some(_), None) | (None, Some(_)) => { . return (IdentDifference::NonIdent, base); -- line 635 ---------------------------------------- -- line 667 ---------------------------------------- . }) . } . . fn skip_index(iter: Iter, index: usize) -> impl Iterator . where . Iter: Iterator, . { . iter.enumerate() 112 ( 0.00%) .filter_map(move |(i, a)| if i == index { None } else { Some(a) }) . } 107,516 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . . impl ManualBits { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualBits { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,388 ( 0.00%) if let ExprKind::Binary(bin_op, left_expr, right_expr) = expr.kind 764 ( 0.00%) && let BinOpKind::Mul = &bin_op.node 4 ( 0.00%) && !expr.span.from_expansion() 2 ( 0.00%) && let ctxt = expr.span.ctxt() 4 ( 0.00%) && left_expr.span.ctxt() == ctxt 4 ( 0.00%) && right_expr.span.ctxt() == ctxt . && let Some((real_ty_span, resolved_ty, other_expr)) = get_one_size_of_ty(cx, left_expr, right_expr) . && matches!(resolved_ty.kind(), ty::Int(_) | ty::Uint(_)) . && let ExprKind::Lit(lit) = &other_expr.kind . && let LitKind::Int(Pu128(8), _) = lit.node . && self.msrv.meets(cx, msrvs::INTEGER_BITS) . { . let mut app = Applicability::MachineApplicable; . let ty_snip = snippet_with_context(cx, real_ty_span, ctxt, "..", &mut app).0; -- line 64 ---------------------------------------- -- line 69 ---------------------------------------- . MANUAL_BITS, . expr.span, . "usage of `size_of::()` to obtain the size of `T` in bits", . "consider using", . sugg, . app, . ); . } 217,552 ( 0.01%) } . } . . fn get_one_size_of_ty<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'_>, . expr2: &'tcx Expr<'_>, . ) -> Option<(Span, Ty<'tcx>, &'tcx Expr<'tcx>)> { 28 ( 0.00%) match (get_size_of_ty(cx, expr1), get_size_of_ty(cx, expr2)) { 56 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs:clippy_lints::manual_bits::get_size_of_ty (4x) . (Some((real_ty_span, resolved_ty)), None) => Some((real_ty_span, resolved_ty, expr2)), . (None, Some((real_ty_span, resolved_ty))) => Some((real_ty_span, resolved_ty, expr1)), . _ => None, . } . } . 20 ( 0.00%) fn get_size_of_ty<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<(Span, Ty<'tcx>)> { 8 ( 0.00%) if let ExprKind::Call(count_func, []) = expr.kind . && let ExprKind::Path(ref count_func_qpath) = count_func.kind . && let QPath::Resolved(_, count_func_path) = count_func_qpath . && let Some(segment_zero) = count_func_path.segments.first() . && let Some(args) = segment_zero.args . && let Some(real_ty_span) = args.args.first().map(GenericArg::span) . && let Some(def_id) = cx.qpath_res(count_func_qpath, count_func.hir_id).opt_def_id() . && cx.tcx.is_diagnostic_item(sym::mem_size_of, def_id) . { . cx.typeck_results() . .node_args(count_func.hir_id) . .types() . .next() . .map(|resolved_ty| (real_ty_span, resolved_ty)) . } else { 4 ( 0.00%) None . } 24 ( 0.00%) } . . fn create_sugg(cx: &LateContext<'_>, expr: &Expr<'_>, base_sugg: String) -> String { . if let Some(parent_expr) = get_parent_expr(cx, expr) { . if is_ty_conversion(parent_expr) { . return base_sugg; . } . . // These expressions have precedence over casts, the suggestion therefore -- line 118 ---------------------------------------- 44 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/res.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . /// only returned so logic errors can be handled by not emitting a lint on . /// release builds. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_based_def(&self, node: impl HasHirId) -> Option { . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn f(typeck: &TypeckResults<'_>, id: HirId) -> Option { 1,906 ( 0.00%) if typeck.hir_owner == id.owner { 8,694 ( 0.00%) let def = typeck.type_dependent_def(id); 6,215 ( 0.00%) => ???:::type_dependent_def (113x) . debug_assert!( . def.is_some(), . "attempted type-dependent lookup for a node with no definition\ . \n node `{id:?}`", . ); . def . } else { . debug_assert!( -- line 58 ---------------------------------------- -- line 99 ---------------------------------------- . /// use for type dependant lookup. . fn opt_qpath(self) -> Option>; . . /// If this is a path gets its resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn res<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>) -> Res { . #[cfg_attr(debug_assertions, track_caller)] 5,900 ( 0.00%) fn f(qpath: &QPath<'_>, id: HirId, typeck: &TypeckResults<'_>) -> Res { 12,748 ( 0.00%) match *qpath { 27,779 ( 0.00%) QPath::Resolved(_, p) => p.res, 4,943 ( 0.00%) QPath::TypeRelative(..) if let Some((kind, id)) = typeck.ty_based_def(id) => Res::Def(kind, id), . QPath::TypeRelative(..) => Res::Err, . } 6,766 ( 0.00%) } . match self.opt_qpath() { 15,241 ( 0.00%) Some((qpath, id)) if let Some(typeck) = typeck.typeck_res() => f(qpath, id, typeck), 34,365 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f (2,361x) 24 ( 0.00%) _ => Res::Err, . } . } . . /// If this is a path with the specified name as its final segment gets its . /// resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn res_if_named<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>, name: Symbol) -> Res { -- line 124 ---------------------------------------- -- line 243 ---------------------------------------- . } . . /// If this is a type-relative path gets the definition it resolves to. . /// . /// Only inherent associated items require a type-relative path. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_rel_def<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>) -> Option { 343 ( 0.00%) match self.opt_qpath() { 115 ( 0.00%) Some((QPath::TypeRelative(..), id)) => typeck.ty_based_def(id), . _ => None, . } . } . . /// If this is a type-relative path to an item with the specified name gets . /// the definition it resolves to. . /// . /// Only inherent associated items require a type-relative path. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_rel_def_if_named<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>, name: Symbol) -> Option { 160 ( 0.00%) match self.opt_qpath() { 51 ( 0.00%) Some((&QPath::TypeRelative(_, seg), id)) if seg.ident.name == name => typeck.ty_based_def(id), . _ => None, . } . } . . /// If this is a type-relative path gets the definition it resolves to and . /// its final segment. . /// . /// Only inherent associated items require a type-relative path. -- line 273 ---------------------------------------- -- line 285 ---------------------------------------- . #[inline] . fn opt_qpath(self) -> Option> { . Some((self.0, self.1)) . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx Expr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { 37,479 ( 0.00%) match &self.kind { 17,718 ( 0.00%) ExprKind::Path(qpath) => Some((qpath, self.hir_id)), . _ => None, . } . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx PatExpr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { . match &self.kind { -- line 302 ---------------------------------------- -- line 366 ---------------------------------------- . fn basic_res(self) -> &'a Res { . self.opt_res_path().1.map_or(&Res::Err, |p| &p.res) . } . . /// If this node is a path to a local gets the local's `HirId`. . #[inline] . fn res_local_id(self) -> Option { . if let (_, Some(p)) = self.opt_res_path() 102,205 ( 0.01%) && let Res::Local(id) = p.res . { . Some(id) . } else { . None . } . } . . /// If this node is a path to a local gets the local's `HirId` and identifier. -- line 382 ---------------------------------------- -- line 405 ---------------------------------------- . #[inline] . fn basic_res(self) -> &'a Res { . &self.res . } . } . impl<'a> MaybeResPath<'a> for &QPath<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 13,644 ( 0.00%) match *self { 38,571 ( 0.00%) QPath::Resolved(ty, path) => (ty, Some(path)), . QPath::TypeRelative(..) => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match *self { . QPath::TypeRelative(ty, seg) => Some((ty, seg)), . QPath::Resolved(..) => None, . } . } . } . impl<'a> MaybeResPath<'a> for &Expr<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 392,778 ( 0.02%) match &self.kind { 2,710 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 (7x) . ExprKind::Path(qpath) => qpath.opt_res_path(), . _ => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match &self.kind { -- line 438 ---------------------------------------- -- line 456 ---------------------------------------- . PatExprKind::Path(qpath) => qpath.opt_ty_rel_path(), . PatExprKind::Lit { .. } => None, . } . } . } . impl<'a, AmbigArg> MaybeResPath<'a> for &hir::Ty<'a, AmbigArg> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 3,097 ( 0.00%) match &self.kind { . TyKind::Path(qpath) => qpath.opt_res_path(), . _ => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match &self.kind { -- line 472 ---------------------------------------- -- line 518 ---------------------------------------- . . /// Gets this definition's id and kind. This will lookup the kind in the def . /// tree if needed. . fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)>; . . /// Gets the diagnostic name of this definition if it has one. . #[inline] . fn opt_diag_name<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 6,141 ( 0.00%) self.opt_def_id().and_then(|id| tcx.tcx().get_diagnostic_name(id)) 9,257 ( 0.00%) => ???:::get_diagnostic_name (149x) . } . . /// Checks if this definition has the specified diagnostic name. . #[inline] . fn is_diag_item<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>, name: Symbol) -> bool { . self.opt_def_id() 34,373 ( 0.00%) .is_some_and(|id| tcx.tcx().is_diagnostic_item(name, id)) 412 ( 0.00%) => ???:::is_diagnostic_item (4x) . } . . /// Checks if this definition is the specified `LangItem`. . #[inline] . fn is_lang_item<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>, item: LangItem) -> bool { . self.opt_def_id() 1,050 ( 0.00%) .is_some_and(|id| tcx.tcx().lang_items().get(item) == Some(id)) 40 ( 0.00%) => ???:::lang_items (1x) . } . . /// If this definition is an impl block gets its type. . #[inline] 1,470 ( 0.00%) fn opt_impl_ty<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option>> { 834 ( 0.00%) match self.opt_def(tcx) { 14,291 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:::opt_def:: (78x) 113 ( 0.00%) Some((DefKind::Impl { .. }, id)) => Some(tcx.tcx().type_of(id)), . _ => None, . } 1,351 ( 0.00%) } . . /// Gets the parent of this definition if it has one. . #[inline] 20 ( 0.00%) fn opt_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { . self.opt_def_id().and_then(|id| tcx.tcx().opt_parent(id)) 40 ( 0.00%) } . . /// Checks if this definition is an impl block. . #[inline] . fn is_impl<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> bool { 170 ( 0.00%) matches!(self.opt_def(tcx), Some((DefKind::Impl { .. }, _))) . } . . /// If this definition is a constructor gets the `DefId` of it's type or variant. . #[inline] . fn ctor_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 738 ( 0.00%) match self.opt_def(tcx) { . Some((DefKind::Ctor(..), id)) => tcx.tcx().opt_parent(id), . _ => None, . } . } . . /// If this definition is an associated item of an impl or trait gets the . /// `DefId` of its parent. . #[inline] 255 ( 0.00%) fn assoc_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 366 ( 0.00%) match self.opt_def(tcx) { . Some((DefKind::AssocConst { .. } | DefKind::AssocFn | DefKind::AssocTy, id)) => tcx.tcx().opt_parent(id), . _ => None, . } 340 ( 0.00%) } . . /// If this definition is an associated function of an impl or trait gets the . /// `DefId` of its parent. . #[inline] . fn assoc_fn_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 42 ( 0.00%) match self.opt_def(tcx) { . Some((DefKind::AssocFn, id)) => tcx.tcx().opt_parent(id), . _ => None, . } . } . } . impl MaybeDef for DefId { . #[inline] . fn opt_def_id(self) -> Option { . Some(self) . } . . #[inline] 1,364 ( 0.00%) fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { . self.opt_def_id().map(|id| (tcx.tcx().def_kind(id), id)) 904 ( 0.00%) } . } . impl MaybeDef for (DefKind, DefId) { . #[inline] . fn opt_def_id(self) -> Option { . Some(self.1) . } . . #[inline] . fn opt_def<'tcx>(self, _: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 21 ( 0.00%) Some(self) . } . } . impl MaybeDef for AdtDef<'_> { . #[inline] . fn opt_def_id(self) -> Option { . Some(self.did()) . } . -- line 620 ---------------------------------------- -- line 642 ---------------------------------------- . impl MaybeDef for Res { . #[inline] . fn opt_def_id(self) -> Option { . Res::opt_def_id(&self) . } . . #[inline] . fn opt_def<'tcx>(self, _: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 1,388 ( 0.00%) match self { 754 ( 0.00%) Res::Def(kind, id) => Some((kind, id)), . _ => None, . } . } . } . impl MaybeDef for Option { . #[inline] . fn opt_def_id(self) -> Option { . self.and_then(T::opt_def_id) . } . . #[inline] . fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 70 ( 0.00%) self.and_then(|x| T::opt_def(x, tcx)) 4,130 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:::opt_def:: (35x) . } . } . impl MaybeDef for EarlyBinder<'_, T> { . #[inline] . fn opt_def_id(self) -> Option { . self.skip_binder().opt_def_id() . } . -- line 672 ---------------------------------------- 92,266 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs -------------------------------------------------------------------------------- Ir -- line 108 ---------------------------------------- . (sym::rmatch_indices, 0), . (sym::trim_start_matches, 0), . (sym::trim_end_matches, 0), . (sym::replace, 0), . (sym::replacen, 0), . ]; . . fn check_single_char_pattern_lint(cx: &LateContext<'_>, arg: &Expr<'_>) { 15 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 35 ( 0.00%) if let Some(hint) = str_literal_to_char_literal(cx, arg, &mut applicability, true) { 115 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::str_literal_to_char_literal::<&rustc_lint::context::LateContext> (5x) . span_lint_and_sugg( . cx, . SINGLE_CHAR_PATTERN, . arg.span, . "single-character string constant used as pattern", . "consider using a `char`", . hint, . applicability, -- line 125 ---------------------------------------- -- line 134 ---------------------------------------- . { . Some(expr.span) . } else { . None . } . } . . fn check_manual_pattern_char_comparison(cx: &LateContext<'_>, method_arg: &Expr<'_>, msrv: Msrv) { 10 ( 0.00%) if let ExprKind::Closure(closure) = method_arg.kind . && let body = cx.tcx.hir_body(closure.body) . && let Some(PatKind::Binding(_, binding, ..)) = body.params.first().map(|p| p.pat.kind) . { . let mut set_char_spans: Vec = Vec::new(); . . // We want to retrieve all the comparisons done. . // They are ordered in a nested way and so we need to traverse the AST to collect them all. . if for_each_expr(cx.tcx, body.value, |sub_expr| -> ControlFlow<(), Descend> { -- line 150 ---------------------------------------- -- line 222 ---------------------------------------- . ); . } . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for StringPatterns { 163,164 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 63,964 ( 0.00%) if !expr.span.from_expansion() 9,712 ( 0.00%) && let ExprKind::MethodCall(method, receiver, args, _) = expr.kind 2,428 ( 0.00%) && let method_name = method.ident.name 16 ( 0.00%) && let Some(&(_, pos)) = PATTERN_METHODS . .iter() . .find(|(array_method_name, _)| *array_method_name == method_name) . && let Some(arg) = args.get(pos) 24 ( 0.00%) && let ty::Ref(_, ty, _) = cx.typeck_results().expr_ty_adjusted(receiver).kind() 424 ( 0.00%) => ???:::expr_ty_adjusted (8x) 24 ( 0.00%) && ty.is_str() . { . check_single_char_pattern_lint(cx, arg); . 5 ( 0.00%) check_manual_pattern_char_comparison(cx, arg, self.msrv); . } 163,164 ( 0.01%) } . } 35,255 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs -------------------------------------------------------------------------------- Ir -- line 584 ---------------------------------------- . use crate::num::NonZero; . use crate::ops::{self, ControlFlow, Deref, DerefMut, Residual, Try}; . use crate::panicking::{panic, panic_display}; . use crate::pin::Pin; . use crate::{cmp, convert, hint, mem, slice}; . . /// The `Option` type. See [the module level documentation](self) for more. . #[doc(search_unbox)] 11,282 ( 0.00%) #[derive(Copy, Debug, Hash)] 457 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::hash:: (10x) . #[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 { 192,388 ( 0.01%) matches!(*self, Some(_)) . } . . /// Returns `true` if the option is a [`Some`] and the value inside of it matches a predicate. . /// . /// # Examples . /// . /// ``` . /// let x: Option = Some(2); -- line 642 ---------------------------------------- -- line 652 ---------------------------------------- . /// assert_eq!(x.as_ref().is_some_and(|x| x.len() > 1), true); . /// println!("still alive {:?}", x); . /// ``` . #[must_use] . #[inline] . #[stable(feature = "is_some_and", since = "1.70.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn is_some_and(self, f: impl [const] FnOnce(T) -> bool + [const] Destruct) -> bool { 85,911 ( 0.00%) match self { . None => false, 17,325 ( 0.00%) Some(x) => f(x), 8,660 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr::{closure#0} (523x) . } . } . . /// Returns `true` if the option is a [`None`] value. . /// . /// # Examples . /// . /// ``` -- line 670 ---------------------------------------- -- line 675 ---------------------------------------- . /// assert_eq!(x.is_none(), true); . /// ``` . #[must_use = "if you intended to assert that this doesn't have a value, consider \ . wrapping this in an `assert!()` instead"] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . pub const fn is_none(&self) -> bool { 29 ( 0.00%) !self.is_some() . } . . /// Returns `true` if the option is a [`None`] or the value inside of it matches a predicate. . /// . /// # Examples . /// . /// ``` . /// let x: Option = Some(2); -- line 691 ---------------------------------------- -- 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 { 160,373 ( 0.01%) match self { . None => true, 4 ( 0.00%) Some(x) => f(x), . } . } . . ///////////////////////////////////////////////////////////////////////// . // Adapter for working with references . ///////////////////////////////////////////////////////////////////////// . . /// Converts from `&Option` to `Option<&T>`. -- line 719 ---------------------------------------- -- 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> { 51,258 ( 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> { 89,526 ( 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. 5,877 ( 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 { 241,389 ( 0.01%) match self { 492 ( 0.00%) 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. . /// Panics are meant for unrecoverable errors, and -- line 976 ---------------------------------------- -- 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 { 7,358 ( 0.00%) match self { 6,490 ( 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, . { 112,883 ( 0.01%) match self { 2,568 ( 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, . { 8,401 ( 0.00%) match self { 7,326 ( 0.00%) Some(x) => x, . None => f(), . } . } . . /// Returns the contained [`Some`] value or a default. . /// . /// Consumes the `self` argument then, if [`Some`], returns the contained . /// value, otherwise if [`None`], returns the [default value] for that -- line 1072 ---------------------------------------- -- 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, . { 8,549 ( 0.00%) match self { 12,288 ( 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, . { 179,576 ( 0.01%) match self { 28,616 ( 0.00%) Some(x) => Some(f(x)), 86 ( 0.00%) None => None, . } 114 ( 0.00%) } . . /// Calls a function with a reference to the contained value if [`Some`]. . /// . /// Returns the original option. . /// . /// # Examples . /// . /// ``` -- line 1174 ---------------------------------------- -- 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, . { 22,186 ( 0.00%) match self { 2,867 ( 0.00%) Some(t) => f(t), 1,944 ( 0.00%) None => default, . } 1,921 ( 0.00%) } 6 ( 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:: (1x) . . /// Computes a default function result (if none), or . /// applies a different function to the contained value (if any). . /// . /// # Basic examples . /// . /// ``` . /// let k = 21; -- line 1239 ---------------------------------------- -- line 1266 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn map_or_else(self, default: D, f: F) -> U . where . D: [const] FnOnce() -> U + [const] Destruct, . F: [const] FnOnce(T) -> U + [const] Destruct, . { 5,939 ( 0.00%) match self { 349 ( 0.00%) Some(t) => f(t), . None => default(), . } 862 ( 0.00%) } . . /// Maps an `Option` to a `U` by applying function `f` to the contained . /// value if the option is [`Some`], otherwise if [`None`], returns the . /// [default value] for the type `U`. . /// . /// # Examples . /// . /// ``` -- line 1286 ---------------------------------------- -- 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, . { 22,635 ( 0.00%) match self { 14,657 ( 0.00%) Some(x) => f(x), 13 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression::{closure#3} (1x) 3,110 ( 0.00%) 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 . /// value), and -- line 1551 ---------------------------------------- -- 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, . { 95,505 ( 0.01%) if let Some(x) = self { 15,736 ( 0.00%) if predicate(&x) { 3,914 ( 0.00%) return Some(x); . } . } 27,739 ( 0.00%) None 139 ( 0.00%) } . . /// 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. . /// . /// [`or_else`]: Option::or_else -- line 1593 ---------------------------------------- -- line 1613 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn or(self, optb: Option) -> Option . where . T: [const] Destruct, . { 774 ( 0.00%) match self { . x @ Some(_) => x, . None => optb, . } . } . . /// Returns the option if it contains a value, otherwise calls `f` and . /// returns the result. . /// -- line 1629 ---------------------------------------- -- 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, . { 7,509 ( 0.00%) match self { 2,290 ( 0.00%) x @ Some(_) => x, . None => f(), . } 55 ( 0.00%) } . . /// Returns [`Some`] if exactly one of `self`, `optb` is [`Some`], otherwise returns [`None`]. . /// . /// # Examples . /// . /// ``` . /// let x = Some(2); . /// let y: Option = None; -- line 1662 ---------------------------------------- -- line 1714 ---------------------------------------- . #[must_use = "if you intended to set a value, consider assignment instead"] . #[inline] . #[stable(feature = "option_insert", since = "1.53.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn insert(&mut self, value: T) -> &mut T . where . T: [const] Destruct, . { 9,678 ( 0.00%) *self = Some(value); . . // SAFETY: the code above just filled the option . unsafe { self.as_mut().unwrap_unchecked() } . } . . /// Inserts `value` into the option if it is [`None`], then . /// returns a mutable reference to the contained value. . /// -- line 1730 ---------------------------------------- -- line 1801 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "option_entry", since = "1.20.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn get_or_insert_with(&mut self, f: F) -> &mut T . where . F: [const] FnOnce() -> T + [const] Destruct, . { 528 ( 0.00%) if let None = self { . // The effect of the following statement is identical to . // *self = Some(f()); . // except that it does not drop the old value of `*self`. This is not a leak, because . // we just checked that the old value is `None`, which contains no fields to drop. . // This implementation strategy . // . // * avoids needing a `T: [const] Destruct` bound, to the benefit of `const` callers, . // * and avoids possibly compiling needless drop code (as would sometimes happen in the -- line 1817 ---------------------------------------- -- line 1976 ---------------------------------------- . /// ``` . #[stable(feature = "option_zip_option", since = "1.46.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn zip(self, other: Option) -> Option<(T, U)> . where . T: [const] Destruct, . U: [const] Destruct, . { 2,443 ( 0.00%) match (self, other) { . (Some(a), Some(b)) => Some((a, b)), . _ => None, . } . } . . /// Combines the value in `self` with the value in another `Option`, using the function `f`. . /// . /// If `self` is `Some(s)` and `other` is `Some(o)`, this method returns `Some(f(s, o))`. -- line 1992 ---------------------------------------- -- 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 { 43,803 ( 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 { 374,581 ( 0.02%) match self { 342 ( 0.00%) Some(x) => Some(x.clone()), . None => None, . } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . match (self, source) { . (Some(to), Some(from)) => to.clone_from(from), -- line 2283 ---------------------------------------- -- 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` 564,055 ( 0.03%) match (self, other) { 2 ( 0.00%) (Some(l), Some(r)) => *l == *r, 39 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (1x) . (Some(_), None) => false, . (None, Some(_)) => false, . (None, None) => true, . } . } . } . . // Manually implementing here somewhat improves codegen for -- line 2448 ---------------------------------------- -- line 2844 ---------------------------------------- . /// assert_eq!(res, None); . /// assert_eq!(shared, 6); . /// ``` . /// . /// Since the third element caused an underflow, no further elements were taken, . /// so the final value of `shared` is 6 (= `3 + 2 + 1`), not 16. . #[inline] . fn from_iter>>(iter: I) -> Option { 51 ( 0.00%) iter::try_process(iter.into_iter(), |i| i.collect()) 7,833 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:core::iter::adapters::try_process::, ::multi::{closure#0}>, clippy_utils::consts::Constant, core::option::Option, > as core::iter::traits::collect::FromIterator>>::from_iter, ::multi::{closure#0}>>::{closure#0}, alloc::vec::Vec> (44x) . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl ops::Try for Option { . type Output = T; . type Residual = Option; -- line 2860 ---------------------------------------- -- line 2861 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . Some(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 179,954 ( 0.01%) match self { 15,751 ( 0.00%) 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 { 2,228 ( 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 ---------------------------------------- -- line 2930 ---------------------------------------- . #[inline] . #[stable(feature = "option_flattening", since = "1.40.0")] . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn flatten(self) -> Option { . // FIXME(const-hack): could be written with `and_then` . match self { . Some(inner) => inner, 27 ( 0.00%) None => None, . } . } . } . . impl<'a, T> Option<&'a Option> { . /// Converts from `Option<&Option>` to `Option<&T>`. . /// . /// # Examples -- line 2946 ---------------------------------------- 328,835 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_field_pattern.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::{span_lint, span_lint_and_then}; . use clippy_utils::source::SpanExt as _; . use itertools::Itertools as _; . use rustc_ast::ast::{Pat, PatKind}; . use rustc_lint::{EarlyContext, LintContext as _}; . . use super::UNNEEDED_FIELD_PATTERN; . 38,024 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 9,506 ( 0.00%) if let PatKind::Struct(_, ref npat, ref pfields, _) = pat.kind { . let mut wilds = 0; 6 ( 0.00%) let type_name = npat . .segments . .last() . .expect("A path must have at least one segment") . .ident . .name; . 12 ( 0.00%) for field in pfields { 30 ( 0.00%) if let PatKind::Wild = field.pat.kind { . wilds += 1; . } . } 3 ( 0.00%) if !pfields.is_empty() && wilds == pfields.len() { . if !pat.span.in_external_macro(cx.sess().source_map()) { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . UNNEEDED_FIELD_PATTERN, . pat.span, . "all the struct fields are matched to a wildcard pattern, consider using `..`", . |diag| { . diag.help(format!("try with `{type_name} {{ .. }}` instead")); . }, . ); . } . return; . } 6 ( 0.00%) if wilds > 0 { . for field in pfields { . if let PatKind::Wild = field.pat.kind . && !field.span.in_external_macro(cx.sess().source_map()) . { . wilds -= 1; . if wilds > 0 { . span_lint( . cx, -- line 47 ---------------------------------------- -- line 69 ---------------------------------------- . )); . }, . ); . } . } . } . } . } 38,024 ( 0.00%) } 3 ( 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/enumerate.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "Enumerate"] . pub struct Enumerate { . iter: I, . count: usize, . } . impl Enumerate { . pub(in crate::iter) const fn new(iter: I) -> Enumerate { 48 ( 0.00%) Enumerate { iter, count: 0 } . } . . /// Retrieve the current position of the iterator. . /// . /// If the iterator has not advanced, the position returned will be 0. . /// . /// The position may also exceed the bounds of the iterator to allow for calculating . /// the displacement of the iterator from following calls to [`Iterator::next`]. -- line 32 ---------------------------------------- -- line 72 ---------------------------------------- . /// overflow checks are enabled, a panic is guaranteed. . /// . /// # Panics . /// . /// Might panic if the index of the element overflows a `usize`. . #[inline] . #[rustc_inherit_overflow_checks] . fn next(&mut self) -> Option<(usize, ::Item)> { 420 ( 0.00%) let a = self.iter.next()?; 37,144 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::next (210x) 190 ( 0.00%) let i = self.count; 22,385 ( 0.00%) self.count += 1; . Some((i, a)) . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.iter.size_hint() . } . -- line 90 ---------------------------------------- -- line 111 ---------------------------------------- . { . #[inline] . fn enumerate<'a, T, Acc, R>( . count: &'a mut usize, . mut fold: impl FnMut(Acc, (usize, T)) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { . #[rustc_inherit_overflow_checks] . move |acc, item| { 481 ( 0.00%) let acc = fold(acc, (*count, item)); 6,559 ( 0.00%) *count += 1; . acc . } . } . . self.iter.try_fold(init, enumerate(&mut self.count, fold)) . } . . #[inline] -- line 128 ---------------------------------------- -- line 133 ---------------------------------------- . #[inline] . fn enumerate( . mut count: usize, . mut fold: impl FnMut(Acc, (usize, T)) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { . #[rustc_inherit_overflow_checks] . move |acc, item| { . let acc = fold(acc, (count, item)); 1,252 ( 0.00%) count += 1; . acc . } . } . . self.iter.fold(init, enumerate(self.count, fold)) . } . . #[inline] -- line 149 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/inherent_to_string.rs -------------------------------------------------------------------------------- Ir -- line 91 ---------------------------------------- . declare_lint_pass!(InherentToString => [ . INHERENT_TO_STRING, . INHERENT_TO_STRING_SHADOW_DISPLAY, . ]); . . impl<'tcx> LateLintPass<'tcx> for InherentToString { . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { . // Check if item is a method called `to_string` and has a parameter 'self' 3,008 ( 0.00%) if let ImplItemKind::Fn(ref signature, _) = impl_item.kind . // #11201 2,876 ( 0.00%) && let header = signature.header . && header.is_safe() 10,052 ( 0.00%) && header.abi == ExternAbi::Rust 67,492 ( 0.00%) => ???:::eq (1,436x) . && impl_item.ident.name == sym::to_string 1 ( 0.00%) && let decl = signature.decl 3 ( 0.00%) && decl.implicit_self().has_implicit_self() 8 ( 0.00%) => ???:::implicit_self (1x) 2 ( 0.00%) && decl.inputs.len() == 1 3 ( 0.00%) && impl_item.generics.params.iter().all(|p| matches!(p.kind, GenericParamKind::Lifetime { .. })) 2 ( 0.00%) && !impl_item.span.from_expansion() . // Check if return type is String 7 ( 0.00%) && return_ty(cx, impl_item.owner_id).is_lang_item(cx, LangItem::String) 107 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (1x) . // Filters instances of to_string which are required by a trait 4 ( 0.00%) && trait_ref_of_method(cx, impl_item.owner_id).is_none() 145 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1x) . { 4 ( 0.00%) show_lint(cx, impl_item); 262,228 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/inherent_to_string.rs:clippy_lints::inherent_to_string::show_lint (1x) . } 1,504 ( 0.00%) } . } . 10 ( 0.00%) fn show_lint(cx: &LateContext<'_>, item: &ImplItem<'_>) { 1 ( 0.00%) let display_trait_id = cx . .tcx 3 ( 0.00%) .get_diagnostic_item(sym::Display) 106 ( 0.00%) => ???:::get_diagnostic_item (1x) . .expect("Failed to get trait ID of `Display`!"); . . // Get the real type of 'self' . let self_type = cx.tcx.fn_sig(item.owner_id).skip_binder().input(0); . let self_type = self_type.skip_binder().peel_refs(); . . // Emit either a warning or an error 8 ( 0.00%) if implements_trait(cx, self_type, display_trait_id, &[]) { 257,050 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (1x) . span_lint_and_help( . cx, . INHERENT_TO_STRING_SHADOW_DISPLAY, . item.span, . format!( . "type `{self_type}` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`" . ), . None, . format!("remove the inherent method from type `{self_type}`"), . ); . } else { . span_lint_and_help( . cx, . INHERENT_TO_STRING, . item.span, 3 ( 0.00%) format!("implementation of inherent method `to_string(&self) -> String` for type `{self_type}`"), 1 ( 0.00%) None, 2 ( 0.00%) format!("implement trait `Display` for type `{self_type}` instead"), . ); . } 8 ( 0.00%) } 18,698 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . pub BYTE_CHAR_SLICES, . style, . "hard to read byte char slice" . } . . declare_lint_pass!(ByteCharSlice => [BYTE_CHAR_SLICES]); . . impl<'tcx> LateLintPass<'tcx> for ByteCharSlice { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,388 ( 0.00%) if !expr.span.from_expansion() . && let Some((has_ref, slice)) = is_byte_char_slices(cx, expr) . { . span_lint_and_then( . cx, . BYTE_CHAR_SLICES, . expr.span, . "can be more succinctly written as a byte str", . |diag| { -- line 49 ---------------------------------------- -- line 64 ---------------------------------------- . if !has_ref && !cx.typeck_results().expr_ty_adjusted(expr).is_array_slice() { . sugg = sugg.deref(); . } . . diag.span_suggestion(expr.span, "try", sugg, app); . }, . ); . } 217,552 ( 0.01%) } . } . . /// Checks whether the slice is that of byte chars, and if so, builds a byte-string out of it . fn is_byte_char_slices<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option<(bool, Vec)> { 54,688 ( 0.00%) let (has_ref, expr) = if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = expr.kind { . (true, inner) 86,340 ( 0.00%) } else if let Some(parent) = get_parent_expr(cx, expr) // Already checked by the parent expr. 2,075,878 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (17,268x) 25,962 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, _) = parent.kind . { . return None; . } else { . (false, expr) . }; . 35,428 ( 0.00%) if let ExprKind::Array(members) = expr.kind 66 ( 0.00%) && !members.is_empty() 33 ( 0.00%) && !span_contains_comment(cx, expr.span) 165 ( 0.00%) && !span_contains_cfg(cx, expr.span) 77,547 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (33x) . { . return members . .iter() . .try_fold(Vec::new(), |mut acc, member| { 66 ( 0.00%) if let ExprKind::Lit(lit) = member.kind 4 ( 0.00%) && let LitKind::Byte(_) = lit.node . && expr.span.eq_ctxt(member.span) . { . acc.push(lit.span); . return Some(acc); . } . None . }) . .map(|s| (has_ref, s)); -- line 104 ---------------------------------------- 67,791 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs -------------------------------------------------------------------------------- Ir -- line 52 ---------------------------------------- . f.write_str(match self { . Self::Left => "rotate_left", . Self::Right => "rotate_right", . }) . } . } . . fn parse_shift<'tcx>(expr: &'tcx Expr<'tcx>) -> Option<(ShiftDirection, &'tcx Expr<'tcx>, &'tcx Expr<'tcx>)> { 104 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind { 27 ( 0.00%) let dir = match op.node { . BinOpKind::Shl => ShiftDirection::Left, . BinOpKind::Shr => ShiftDirection::Right, . _ => return None, . }; . return Some((dir, l, r)); . } . None . } . . impl LateLintPass<'_> for ManualRotate { 190,358 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 55,568 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 1,146 ( 0.00%) && let BinOpKind::Add | BinOpKind::BitOr = op.node . && let Some((l_shift_dir, l_expr, l_amount)) = parse_shift(l) . && let Some((r_shift_dir, r_expr, r_amount)) = parse_shift(r) . && l_shift_dir != r_shift_dir . && let ctxt = expr.span.ctxt() . && clippy_utils::eq_expr_value(cx, ctxt, l_expr, r_expr) . && let Some(bit_width) = match cx.typeck_results().expr_ty(expr).kind() { . ty::Int(itype) => itype.bit_width(), . ty::Uint(itype) => itype.bit_width(), -- line 82 ---------------------------------------- -- line 130 ---------------------------------------- . expr.span, . "this expression can be rewritten as", . format!("{expr_sugg}.{shift_function}({amount})"), . applicability, . ); . }, . ); . } 217,552 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . . impl StrlenOnCStrings { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for StrlenOnCStrings { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 63,964 ( 0.00%) if !expr.span.from_expansion() 3,947 ( 0.00%) && let ExprKind::Call(func, [recv]) = expr.kind 3,057 ( 0.00%) && let ExprKind::Path(path) = &func.kind 5,095 ( 0.00%) && let Some(did) = cx.qpath_res(path, func.hir_id).opt_def_id() 30,764 ( 0.00%) => ???:::qpath_res (1,019x) 5,030 ( 0.00%) && match_libc_symbol(cx, did, sym::strlen) 75,450 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol (1,006x) . && let ExprKind::MethodCall(path, self_arg, [], _) = recv.kind . && !recv.span.from_expansion() . && path.ident.name == sym::as_ptr . && let typeck = cx.typeck_results() . && typeck . .expr_ty_adjusted(self_arg) . .peel_refs() . .is_lang_item(cx, LangItem::CStr) -- line 66 ---------------------------------------- -- line 100 ---------------------------------------- . } else { . format!("{val_name}.to_bytes().len()") . }; . . diag.span_suggestion(span, "use", suggestion, app); . }, . ); . } 217,552 ( 0.01%) } . } 38,293 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/msrvs.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . } . } . . 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 6,543 ( 0.00%) pub fn current(self, cx: &LateContext<'_>) -> Option { 64,267 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(cx.tcx, cx.last_node_with_lint_attrs) . } else { . self.0 . } 8,724 ( 0.00%) } . . /// Returns the MSRV 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 at(self, tcx: TyCtxt<'_>, node: HirId) -> Option { 3 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(tcx, node) . } else { . self.0 . } . } . . fn for_attrs(self, tcx: TyCtxt<'_>, node: HirId) -> Option { . once(node) -- line 139 ---------------------------------------- -- 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 310,430 ( 0.02%) pub fn meets(self, cx: &LateContext<'_>, required: RustcVersion) -> bool { 248,344 ( 0.01%) self.current(cx).is_none_or(|msrv| msrv >= required) 248,344 ( 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 232 ---------------------------------------- . } . . impl MsrvStack { . pub fn current(&self) -> Option { . self.stack.last().copied() . } . . pub fn meets(&self, required: RustcVersion) -> bool { 146,075 ( 0.01%) self.current().is_none_or(|msrv| msrv >= required) 29,215 ( 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); . } 215,011 ( 0.01%) } . . pub fn check_attributes_post(&mut self, attrs: &[Attribute]) { . if parse_attrs(attrs).is_some() { . self.stack.pop(); . } 215,011 ( 0.01%) } . } . . fn parse_attrs(attrs: &[impl AttributeExt]) -> Option { 345,920 ( 0.02%) let msrv_attr = attrs.iter().find(|attr| attr.path_matches(&[sym::clippy, sym::msrv]))?; 204,828 ( 0.01%) => ???:::path_matches (43,240x) . . let msrv = msrv_attr.value_str()?; . . parse_version(msrv) . } . 288,872 ( 0.02%) pub fn check_attrs(sess: &Session, attrs: &[impl AttributeExt]) { 30,048 ( 0.00%) let mut msrv_attrs = attrs.iter().filter(|attr| attr.path_matches(&[sym::clippy, sym::msrv])); 35,220 ( 0.00%) => ???:::path_matches (7,512x) . . 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")); . } 288,872 ( 0.02%) } 69,598 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_sugg; . use rustc_ast::{Pat, PatKind}; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, LintContext as _}; . . use super::REDUNDANT_AT_REST_PATTERN; . . pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 9,506 ( 0.00%) if let PatKind::Slice(slice) = &pat.kind . && let [one] = &**slice . && let PatKind::Ident(annotation, ident, Some(rest)) = &one.kind . && let PatKind::Rest = rest.kind . && !pat.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( . cx, . REDUNDANT_AT_REST_PATTERN, . pat.span, . "using a rest pattern to bind an entire slice to a local", . "this is better represented with just the binding", . format!("{}{ident}", annotation.prefix_str()), . Applicability::MachineApplicable, . ); . } 4,753 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . impl RedundantStaticLifetimes { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl RedundantStaticLifetimes { . // Recursively visit types 670 ( 0.00%) fn visit_type(ty: &Ty, cx: &EarlyContext<'_>, reason: &'static str) { 535 ( 0.00%) match ty.kind { . // Be careful of nested structures (arrays and tuples) . TyKind::Array(ref ty, _) | TyKind::Slice(ref ty) => { 22 ( 0.00%) Self::visit_type(ty, cx, reason); . }, . TyKind::Tup(ref tup) => { . for tup_ty in tup { 220 ( 0.00%) Self::visit_type(tup_ty, cx, reason); 1,100 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::visit_type'2 (44x) . } . }, . // This is what we are looking for ! . TyKind::Ref(ref optional_lifetime, ref borrow_type) => { . // Match the 'static lifetime . if let Some(lifetime) = *optional_lifetime { . match borrow_type.ty.kind { . TyKind::Path(..) | TyKind::Slice(..) | TyKind::Array(..) | TyKind::Tup(..) -- line 67 ---------------------------------------- -- line 80 ---------------------------------------- . }, . _ => {}, . } . } . Self::visit_type(&borrow_type.ty, cx, reason); . }, . _ => {}, . } 536 ( 0.00%) } . } . . impl EarlyLintPass for RedundantStaticLifetimes { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 23,130 ( 0.00%) if !self.msrv.meets(msrvs::STATIC_IN_CONST) { 61,680 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (2,570x) . return; . } . . if !item.span.from_expansion() { 6,050 ( 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) . } . 23 ( 0.00%) if let ItemKind::Static(StaticItem { ty: ref var_type, .. }) = item.kind { 69 ( 0.00%) Self::visit_type(var_type, cx, "statics have by default a `'static` lifetime"); . } . } . } . . extract_msrv_attr!(); . } 2,638 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs -------------------------------------------------------------------------------- Ir -- line 134 ---------------------------------------- . style, . "use `std::ptr::eq` when comparing raw pointers" . } . . declare_lint_pass!(Ptr => [CMP_NULL, MUT_FROM_REF, PTR_ARG, PTR_EQ]); . . impl<'tcx> LateLintPass<'tcx> for Ptr { . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 80 ( 0.00%) if let TraitItemKind::Fn(sig, trait_method) = &item.kind { . if matches!(trait_method, TraitFn::Provided(_)) { . // Handled by `check_body`. . return; . } . 60 ( 0.00%) mut_from_ref::check(cx, sig, None); 3,409 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (15x) 60 ( 0.00%) ptr_arg::check_trait_item(cx, item.owner_id, sig); 15,538 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_trait_item (15x) . } . } . 17,820 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 5,940 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(body.value.hir_id); 6,108 ( 0.00%) let (item_id, sig, is_trait_item) = match parents.next() { . Some((_, Node::Item(i))) => { 790 ( 0.00%) if let ItemKind::Fn { sig, .. } = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::ImplItem(i))) => { 2,882 ( 0.00%) if !matches!(parents.next(), 4,323 ( 0.00%) Some((_, Node::Item(i))) if matches!(&i.kind, ItemKind::Impl(i) if i.of_trait.is_none()) . ) { . return; . } 448 ( 0.00%) if let ImplItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::TraitItem(i))) => { 8 ( 0.00%) if let TraitItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, true) . } else { . return; . } . }, . _ => return, . }; . 1,888 ( 0.00%) mut_from_ref::check(cx, sig, Some(body)); 526,629 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (472x) 2,832 ( 0.00%) ptr_arg::check_body(cx, body, item_id, sig, is_trait_item); 204,516 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_body (472x) 16,312 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 1,528 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 1,116 ( 0.00%) && (op.node == BinOpKind::Eq || op.node == BinOpKind::Ne) . { . #[expect( . clippy::collapsible_if, . reason = "the outer `if`s check the HIR, the inner ones run lints" . )] 918 ( 0.00%) if !cmp_null::check(cx, expr, op.node, l, r) { 189,584 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/cmp_null.rs:clippy_lints::ptr::cmp_null::check (102x) 612 ( 0.00%) ptr_eq::check(cx, op.node, l, r, expr.span); 19,738 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_eq.rs:clippy_lints::ptr::ptr_eq::check (102x) . } . } . } . } 4,991 ( 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.rs -------------------------------------------------------------------------------- Ir -- line 94 ---------------------------------------- . pub(super) const fn new(slice: &'a [T]) -> Self { . let len = slice.len(); . let ptr: NonNull = NonNull::from_ref(slice).cast(); . // SAFETY: Similar to `IterMut::new`. . unsafe { . let end_or_len = . if T::IS_ZST { without_provenance(len) } else { ptr.as_ptr().add(len) }; . 235 ( 0.00%) Self { ptr, end_or_len, _marker: PhantomData } . } . } . . /// Views the underlying data as a subslice of the original data. . /// . /// # Examples . /// . /// Basic usage: -- line 110 ---------------------------------------- -- line 453 ---------------------------------------- . impl<'a, T, P> Iterator for Split<'a, T, P> . where . P: FnMut(&T) -> bool, . { . type Item = &'a [T]; . . #[inline] . fn next(&mut self) -> Option<&'a [T]> { 9 ( 0.00%) if self.finished { . return None; . } . . match self.v.iter().position(|x| (self.pred)(x)) { . None => self.finish(), . Some(idx) => { . let (left, right) = . // SAFETY: if v.iter().position returns Some(idx), that . // idx is definitely a valid index for v . unsafe { (self.v.get_unchecked(..idx), self.v.get_unchecked(idx + 1..)) }; . let ret = Some(left); . self.v = right; . ret 6 ( 0.00%) } . } . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . if self.finished { . (0, Some(0)) . } else { -- line 483 ---------------------------------------- -- line 1347 ---------------------------------------- . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl<'a, T> Iterator for Windows<'a, T> { . type Item = &'a [T]; . . #[inline] . fn next(&mut self) -> Option<&'a [T]> { 18,644 ( 0.00%) if self.size.get() > self.v.len() { . None . } else { . let ret = Some(&self.v[..self.size.get()]); . self.v = &self.v[1..]; . ret . } . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { 45 ( 0.00%) if self.size.get() > self.v.len() { . (0, Some(0)) . } else { . let size = self.v.len() - self.size.get() + 1; . (size, Some(size)) . } . } . . #[inline] -- line 1374 ---------------------------------------- 4,056 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default_instead_of_iter_empty.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub DEFAULT_INSTEAD_OF_ITER_EMPTY, . style, . "check `std::iter::Empty::default()` and replace with `std::iter::empty()`" . } . . declare_lint_pass!(DefaultIterEmpty => [DEFAULT_INSTEAD_OF_ITER_EMPTY]); . . impl<'tcx> LateLintPass<'tcx> for DefaultIterEmpty { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 60,964 ( 0.00%) if let ExprKind::Call(iter_expr, []) = &expr.kind 1,165 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, _)) = &iter_expr.kind 660 ( 0.00%) && let TyKind::Path(ty_path) = &ty.kind 880 ( 0.00%) && let QPath::Resolved(None, path) = ty_path 660 ( 0.00%) && let def::Res::Def(_, def_id) = &path.res 2,200 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::IterEmpty, *def_id) 14,089 ( 0.00%) => ???:::is_diagnostic_item (220x) . && let ctxt = expr.span.ctxt() . && ty.span.ctxt() == ctxt . { . let mut applicability = Applicability::MachineApplicable; . let Some(path) = std_or_core(cx) else { return }; . let path = format!("{path}::iter::empty"); . let sugg = make_sugg(cx, ty_path, ctxt, &mut applicability, &path); . span_lint_and_sugg( -- line 49 ---------------------------------------- -- line 51 ---------------------------------------- . DEFAULT_INSTEAD_OF_ITER_EMPTY, . expr.span, . format!("`{path}()` is the more idiomatic way"), . "try", . sugg, . applicability, . ); . } 217,552 ( 0.01%) } . } . . fn make_sugg( . cx: &LateContext<'_>, . ty_path: &QPath<'_>, . ctxt: SyntaxContext, . applicability: &mut Applicability, . path: &str, -- line 67 ---------------------------------------- 220 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . } . } . . impl<'a, T: 'a> Drop for LockGuard<'a, T> { . #[inline] . fn drop(&mut self) { . // SAFETY (union access): We get `self.mode` from the lock operation so it is consistent . // with the `lock.mode` state. This means we access the right union fields. 123,920 ( 0.01%) match self.mode { . Mode::NoSync => { . let cell = unsafe { &self.lock.mode_union.no_sync }; . debug_assert!(cell.get()); . cell.set(false); 108 ( 0.00%) } . // SAFETY (unlock): We know that the lock is locked as this type is a proof of that. . Mode::Sync => unsafe { self.lock.mode_union.sync.unlock() }, . } . } . } . . union ModeUnion { . /// Indicates if the cell is locked. Only used if `Lock.mode` is `NoSync`. -- line 69 ---------------------------------------- -- line 143 ---------------------------------------- . #[cold] . fn lock_held() -> ! { . panic!("lock was already held") . } . . // SAFETY: This is safe since the union fields are used in accordance with `mode` . // which also must match `self.mode` due to the safety precondition. . unsafe { 215,106 ( 0.01%) match mode { . Mode::NoSync => { 227,110 ( 0.01%) if self.mode_union.no_sync.replace(LOCKED) == LOCKED { . hint::cold_path(); . lock_held() . } . } . Mode::Sync => self.mode_union.sync.lock(), . } . } . LockGuard { lock: self, marker: PhantomData, mode } . } . . #[inline(always)] . #[track_caller] . pub fn lock(&self) -> LockGuard<'_, T> { 107,553 ( 0.01%) unsafe { self.lock_assume(self.mode) } . } . } . . unsafe impl DynSend for Lock {} . unsafe impl DynSync for Lock {} . . impl Lock { . #[inline(always)] -- line 175 ---------------------------------------- 111,731 ( 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/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 { 22,848 ( 0.00%) if size == 1 { . 8 . } else if size <= 1024 { . 4 . } else { . 1 . } . } . -- line 167 ---------------------------------------- -- line 178 ---------------------------------------- . _marker: PhantomData, . } . } . . /// A specialized version of `self.reserve(len, 1)` which requires the . /// caller to ensure `len == self.capacity()`. . #[cfg(not(no_global_oom_handling))] . #[inline(never)] 12,564 ( 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) } 12,564 ( 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 376 ---------------------------------------- . . /// The same as `reserve_exact`, but returns on errors instead of panicking or aborting. . pub(crate) fn try_reserve_exact( . &mut self, . len: usize, . additional: usize, . ) -> Result<(), TryReserveError> { . // SAFETY: All calls on self.inner pass T::LAYOUT as the elem_layout 166 ( 0.00%) unsafe { self.inner.try_reserve_exact(len, additional, T::LAYOUT) } 1,568 ( 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:::try_reserve_exact (14x) . } . . /// Shrinks the buffer down to the specified capacity. If the given amount . /// is 0, actually completely deallocates. . /// . /// # Panics . /// . /// Panics if the given amount is *larger* than the current capacity. -- line 392 ---------------------------------------- -- 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. 228,277 ( 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] . fn with_capacity_in(capacity: usize, alloc: A, elem_layout: Layout) -> Self { 14 ( 0.00%) match Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc, elem_layout) { 154 ( 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:::try_allocate_in (2x) 2 ( 0.00%) Ok(this) => { . unsafe { . // Make it more obvious that a subsequent Vec::reserve(capacity) will not allocate. . hint::assert_unchecked(!this.needs_to_grow(0, capacity, elem_layout)); . } . this . } . Err(err) => handle_error(err), . } . } . 18 ( 0.00%) fn try_allocate_in( . capacity: usize, . init: AllocInit, . alloc: A, . elem_layout: Layout, . ) -> Result { . // 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. 43,831 ( 0.00%) if layout.size() == 0 { . return Ok(Self::new_in(alloc, elem_layout.alignment())); . } . 4 ( 0.00%) let result = match init { . AllocInit::Uninitialized => alloc.allocate(layout), . #[cfg(not(no_global_oom_handling))] . AllocInit::Zeroed => alloc.allocate_zeroed(layout), . }; 43,176 ( 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::()`. 6 ( 0.00%) Ok(Self { . ptr: Unique::from(ptr.cast()), . cap: unsafe { Cap::new_unchecked(capacity) }, . alloc, . }) 14 ( 0.00%) } . . /// # 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 3,141 ( 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); . 6,528 ( 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`. 9,671 ( 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 28,642 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 81,986 ( 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 (816x) . . // 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] 75,988 ( 0.00%) unsafe fn finish_grow( . &self, . cap: usize, . elem_layout: Layout, . ) -> Result, TryReserveError> { . let new_layout = layout_array(cap, elem_layout)?; . . let memory = if let Some((ptr, old_layout)) = unsafe { self.current_memory(elem_layout) } { . // FIXME(const-hack): switch to `debug_assert_eq` -- line 552 ---------------------------------------- -- line 556 ---------------------------------------- . hint::assert_unchecked(old_layout.align() == new_layout.align()); . self.alloc.grow(ptr, old_layout, new_layout) . } . } else { . self.alloc.allocate(new_layout) . }; . . memory.map_err(const |_| AllocError { layout: new_layout, non_exhaustive: () }.into()) 56,992 ( 0.00%) } . } . . impl RawVecInner { . #[inline] . const fn new_in(alloc: A, align: Alignment) -> Self { . let ptr = Unique::from_non_null(NonNull::without_provenance(align.as_nonzero_usize())); . // `cap: 0` means "unallocated". zero-sized types are ignored. . Self { ptr, cap: ZERO_CAP, alloc } -- line 572 ---------------------------------------- -- line 603 ---------------------------------------- . . #[inline] . const fn ptr(&self) -> *mut T { . self.non_null::().as_ptr() . } . . #[inline] . const fn non_null(&self) -> NonNull { 235,237 ( 0.01%) self.ptr.cast().as_non_null_ptr() . } . . #[inline] . const fn capacity(&self, elem_size: usize) -> usize { 7,088 ( 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)> { 245,976 ( 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] 13,059 ( 0.00%) unsafe fn do_reserve_and_handle( . slf: &mut RawVecInner, . len: usize, . additional: usize, . elem_layout: Layout, . ) { . // SAFETY: Precondition passed to caller . if let Err(err) = unsafe { slf.grow_amortized(len, additional, elem_layout) } { . handle_error(err); . } 13,060 ( 0.00%) } . 9,646 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . unsafe { 23,461 ( 0.00%) do_reserve_and_handle(self, len, additional, elem_layout); 451 ( 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 708 ---------------------------------------- . 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 54 ( 0.00%) unsafe fn try_reserve_exact( . &mut self, . len: usize, . additional: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { 18 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . // SAFETY: Precondition passed to caller . unsafe { . self.grow_exact(len, additional, elem_layout)?; . } . } . unsafe { . // Inform the optimizer that the reservation has succeeded or wasn't needed . hint::assert_unchecked(!self.needs_to_grow(len, additional, elem_layout)); . } . Ok(()) 18 ( 0.00%) } . . /// # 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 less than or equal to `self.capacity(elem_layout.size())` . #[cfg(not(no_global_oom_handling))] . #[inline] -- line 741 ---------------------------------------- -- 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 { 10,478 ( 0.00%) additional > self.capacity(elem_layout.size()).wrapping_sub(len) . } . . #[inline] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe fn set_ptr_and_cap(&mut self, ptr: NonNull<[u8]>, cap: usize) { . // Allocators currently return a `NonNull<[u8]>` whose length matches . // the size requested. If that ever changes, the capacity here should . // change to `ptr.len() / size_of::()`. 6,426 ( 0.00%) self.ptr = Unique::from(ptr.cast()); 6,424 ( 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( . &mut self, . len: usize, . additional: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { 18 ( 0.00%) if elem_layout.size() == 0 { . // 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 18,665 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 504,997 ( 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:::finish_grow (1,512x) . . // 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,375 ( 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,750 ( 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 ---------------------------------------- 728,397 ( 0.04%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/multiple_bound_locations.rs -------------------------------------------------------------------------------- Ir -- line 33 ---------------------------------------- . pub MULTIPLE_BOUND_LOCATIONS, . style, . "defining generic bounds in multiple locations" . } . . declare_lint_pass!(MultipleBoundLocations => [MULTIPLE_BOUND_LOCATIONS]); . . impl EarlyLintPass for MultipleBoundLocations { 12,523 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 5,282 ( 0.00%) if let FnKind::Fn(_, _, Fn { generics, .. }) = kind 1,704 ( 0.00%) && !generics.params.is_empty() 163 ( 0.00%) && !generics.where_clause.predicates.is_empty() . { . let mut generic_params_with_bounds = FxHashMap::default(); . . for param in &generics.params { 18 ( 0.00%) if !param.bounds.is_empty() { . generic_params_with_bounds.insert(param.ident.as_str(), param.ident.span); . } . } . for clause in &generics.where_clause.predicates { 36 ( 0.00%) match &clause.kind { . WherePredicateKind::BoundPredicate(pred) => { 36 ( 0.00%) if (!pred.bound_generic_params.is_empty() || !pred.bounds.is_empty()) 90 ( 0.00%) && let Some(Some(bound_span)) = pred . .bounded_ty . .span 54 ( 0.00%) .with_source_text(cx, |src| generic_params_with_bounds.get(src)) 8,154 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::with_source_text::, &rustc_lint::context::EarlyContext, ::check_fn::{closure#0}> (18x) . { . emit_lint(cx, *bound_span, pred.bounded_ty.span); . } . }, . WherePredicateKind::RegionPredicate(pred) => { . if !pred.bounds.is_empty() . && let Some(bound_span) = generic_params_with_bounds.get(&pred.lifetime.ident.as_str()) . { . emit_lint(cx, *bound_span, pred.lifetime.ident.span); . } . }, . } . } 14 ( 0.00%) } 14,312 ( 0.00%) } . } . . fn emit_lint(cx: &EarlyContext<'_>, bound_span: Span, where_span: Span) { . span_lint( . cx, . MULTIPLE_BOUND_LOCATIONS, . vec![bound_span, where_span], . "bound is defined in more than one place", -- line 83 ---------------------------------------- 50 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . fn emit_if_duplicated( . cx: &EarlyContext<'_>, . attr: &MetaItem, . attr_paths: &mut FxHashMap, . complete_path: String, . ) { . match attr_paths.entry(complete_path) { . Entry::Vacant(v) => { 96 ( 0.00%) v.insert(attr.span); 94 ( 0.00%) }, . Entry::Occupied(o) => { . span_lint_and_then(cx, DUPLICATED_ATTRIBUTES, attr.span, "duplicated attribute", |diag| { . diag.span_note(*o.get(), "first defined here"); . diag.span_help(attr.span, "remove this attribute"); . }); . }, . } . } . 14,839 ( 0.00%) fn check_duplicated_attr( . cx: &EarlyContext<'_>, . attr: &MetaItem, . attr_paths: &mut FxHashMap, . parent: &mut Vec, . ) { 2,698 ( 0.00%) if attr.span.from_expansion() { . return; . } 1,735 ( 0.00%) let attr_path = if let Some(ident) = attr.ident() { 2,529 ( 0.00%) => ???:::ident (282x) 578 ( 0.00%) ident.name . } else { 174 ( 0.00%) Symbol::intern(&path_to_string(&attr.path)) 3,657 ( 0.00%) => ???:rustc_ast_pretty::pprust::path_to_string (3x) . }; 2,167 ( 0.00%) if let Some(ident) = attr.ident() { 2,529 ( 0.00%) => ???:::ident (282x) . let name = ident.name; . if name == sym::doc || name == sym::rustc_on_unimplemented || name == sym::reason { . // FIXME: Would be nice to handle `cfg_attr` as well. Only problem is to check that cfg . // conditions are the same. . // `#[rustc_on_unimplemented]` contains duplicated subattributes, that's expected. . return; . } . } 4 ( 0.00%) if let Some(value) = attr.value_str() { . emit_if_duplicated( . cx, . attr, . attr_paths, 30 ( 0.00%) format!("{}:{attr_path}={value}", parent.iter().join(":")), 48 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (2x) . ); 424 ( 0.00%) } else if let Some(sub_attrs) = attr.meta_item_list() { 188 ( 0.00%) => ???:::meta_item_list (41x) 12 ( 0.00%) parent.push(attr_path); 36 ( 0.00%) for sub_attr in sub_attrs { . if let Some(meta) = sub_attr.meta_item() { 390 ( 0.00%) check_duplicated_attr(cx, meta, attr_paths, parent); 176,765 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr'2 (65x) . } . } . parent.pop(); . } else { 1,128 ( 0.00%) emit_if_duplicated(cx, attr, attr_paths, format!("{}:{attr_path}", parent.iter().join(":"))); 696 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (29x) . } 10,792 ( 0.00%) } . . pub fn check(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . let mut attr_paths = FxHashMap::default(); . . for attr in attrs { 50,400 ( 0.00%) if let Some(meta) = attr.meta() { 499,512 ( 0.03%) => ???:::meta (7,512x) 6,420 ( 0.00%) check_duplicated_attr(cx, &meta, &mut attr_paths, &mut Vec::new()); 265,491 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr (1,284x) . } . } . } 173 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::{Arm, Expr, PatExpr, PatExprKind, PatKind, PathSegment, QPath, Ty, TyKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, VariantDef}; . use rustc_span::sym; . . use super::{MATCH_WILDCARD_FOR_SINGLE_VARIANTS, WILDCARD_ENUM_MATCH_ARM}; . . #[expect(clippy::too_many_lines)] 1,602 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>]) { 356 ( 0.00%) let ty = cx.typeck_results().expr_ty(ex).peel_refs(); 7,120 ( 0.00%) => ???:::expr_ty (178x) . let adt_def = match ty.kind() { . ty::Adt(adt_def, _) 838 ( 0.00%) if adt_def.is_enum() && !matches!(ty.opt_diag_name(cx), Some(sym::Option | sym::Result)) => . { . adt_def . }, . _ => return, . }; . . // First pass - check for violation, but don't do much book-keeping because this is hopefully . // the uncommon case, and the book-keeping is slightly expensive. . let mut wildcard_span = None; 112 ( 0.00%) let mut wildcard_ident = None; . let mut has_non_wild = false; . for arm in arms { 4,404 ( 0.00%) match peel_hir_pat_refs(arm.pat).0.kind { 1,845 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_pat_refs (369x) 30 ( 0.00%) PatKind::Wild if arm.guard.is_none() => wildcard_span = Some(arm.pat.span), 8 ( 0.00%) PatKind::Binding(_, _, ident, None) => { . wildcard_span = Some(arm.pat.span); . wildcard_ident = Some(ident); 2 ( 0.00%) }, . _ => has_non_wild = true, . } . } 321 ( 0.00%) let wildcard_span = match wildcard_span { 17 ( 0.00%) Some(x) if has_non_wild => x, . _ => return, . }; . . // Accumulate the variants which should be put in place of the wildcard because they're not . // already covered. 17 ( 0.00%) let is_external = adt_def.did().as_local().is_none(); 39 ( 0.00%) let has_external_hidden = is_external && adt_def.variants().iter().any(|x| is_hidden(cx, x)); 3,760 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::is_hidden (4x) 1 ( 0.00%) let mut missing_variants: Vec<_> = adt_def . .variants() . .iter() 432 ( 0.00%) .filter(|x| !(is_external && is_hidden(cx, x))) 516 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::is_hidden (4x) . .collect(); . 51 ( 0.00%) let mut path_prefix = CommonPrefixSearcher::None; . for arm in arms { . // Guards mean that this case probably isn't exhaustively covered. Technically . // this is incorrect, as we should really check whether each variant is exhaustively . // covered by the set of guards that cover it, but that's really hard to do. 617 ( 0.00%) recurse_or_patterns(arm.pat, |pat| { 465 ( 0.00%) let path = match &peel_hir_pat_refs(pat).0.kind { 195 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_pat_refs (39x) . PatKind::Expr(PatExpr { . hir_id, 2 ( 0.00%) kind: PatExprKind::Path(path), . .. . }) => { . // FIXME(clippy): don't you want to use the hir id of the peeled pat? 30 ( 0.00%) let id = match cx.qpath_res(path, *hir_id) { 46 ( 0.00%) => ???:::qpath_res (2x) . Res::Def(DefKind::Const { .. } | DefKind::ConstParam | DefKind::AnonConst, _) => return, 4 ( 0.00%) Res::Def(_, id) => id, . _ => return, . }; 6 ( 0.00%) if arm.guard.is_none() { 6 ( 0.00%) missing_variants.retain(|e| e.ctor_def_id() != Some(id)); 347 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::retain:: (2x) . } . path . }, 20 ( 0.00%) PatKind::TupleStruct(path, patterns, ..) => { 180 ( 0.00%) if let Some(id) = cx.qpath_res(path, pat.hir_id).opt_def_id() 460 ( 0.00%) => ???:::qpath_res (20x) 40 ( 0.00%) && arm.guard.is_none() 68 ( 0.00%) && patterns.iter().all(|p| !is_refutable(cx, p)) 750 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_refutable (18x) . { 36 ( 0.00%) missing_variants.retain(|e| e.ctor_def_id() != Some(id)); 1,169 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::retain:: (12x) . } . path . }, . PatKind::Struct(path, patterns, ..) => { . if let Some(id) = cx.qpath_res(path, pat.hir_id).opt_def_id() . && arm.guard.is_none() . && patterns.iter().all(|p| !is_refutable(cx, p.pat)) . { . missing_variants.retain(|e| e.def_id != id); . } . path . }, . _ => return, . }; 44 ( 0.00%) match path { 88 ( 0.00%) QPath::Resolved(_, path) => path_prefix.with_path(path.segments), . QPath::TypeRelative( . Ty { . kind: TyKind::Path(QPath::Resolved(_, path)), . .. . }, . _, . ) => path_prefix.with_prefix(path.segments), . QPath::TypeRelative(..) => (), . } 312 ( 0.00%) }); . } . 85 ( 0.00%) let format_suggestion = |variant: &VariantDef| { . format!( . "{}{}{}{}", . wildcard_ident.map_or(String::new(), |ident| { . ident . .span . .get_text(cx) . .map_or_else(|| format!("{} @ ", ident.name), |s| format!("{s} @ ")) . }), -- line 121 ---------------------------------------- -- line 137 ---------------------------------------- . Some(CtorKind::Fn) => "(..)", . Some(CtorKind::Const) => "", . None => " { .. }", . } . ) . }; . . match missing_variants.as_slice() { 68 ( 0.00%) [] => (), . [x] if !adt_def.is_variant_list_non_exhaustive() && !has_external_hidden => span_lint_and_sugg( . cx, . MATCH_WILDCARD_FOR_SINGLE_VARIANTS, . wildcard_span, . "wildcard matches only a single variant and will also match any future added variants", . "try", . format_suggestion(x), . Applicability::MaybeIncorrect, . ), . variants => { 153 ( 0.00%) let (message, add_wildcard) = if adt_def.is_variant_list_non_exhaustive() || has_external_hidden { . ( . "wildcard matches known variants and will also match future added variants", . true, . ) . } else { . ("wildcard match will also match any future added variants", false) . }; . 255 ( 0.00%) span_lint_and_then(cx, WILDCARD_ENUM_MATCH_ARM, wildcard_span, message, |diag| { 22,763 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (17x) . let mut suggestions: Vec<_> = variants.iter().copied().map(format_suggestion).collect(); . if add_wildcard { . suggestions.push("_".into()); . } . diag.span_suggestion( . wildcard_span, . "try", . suggestions.join(" | "), . Applicability::MaybeIncorrect, . ); . }); . }, . } 1,424 ( 0.00%) } . . enum CommonPrefixSearcher<'a> { . None, . Path(&'a [PathSegment<'a>]), . Mixed, . } . impl<'a> CommonPrefixSearcher<'a> { . fn with_path(&mut self, path: &'a [PathSegment<'a>]) { 66 ( 0.00%) if let [path @ .., _] = path { . self.with_prefix(path); . } . } . . fn with_prefix(&mut self, path: &'a [PathSegment<'a>]) { 76 ( 0.00%) match self { 68 ( 0.00%) Self::None => *self = Self::Path(path), . Self::Path(self_path) 5 ( 0.00%) if path . .iter() . .map(|p| p.ident.name) 25 ( 0.00%) .eq(self_path.iter().map(|p| p.ident.name)) => {}, . Self::Path(_) => *self = Self::Mixed, . Self::Mixed => (), . } . } . } . 64 ( 0.00%) fn is_hidden(cx: &LateContext<'_>, variant_def: &VariantDef) -> bool { . cx.tcx.is_doc_hidden(variant_def.def_id) 48 ( 0.00%) } 202 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . NotEndsWith(&'static str), . IsSelfTypeCopy(bool), . ImplementsTrait(bool), . IsTraitItem(bool), . } . . impl Convention { . #[must_use] 4,984 ( 0.00%) fn check<'tcx>( . &self, . cx: &LateContext<'tcx>, . self_ty: Ty<'tcx>, . other: &str, . implements_trait: bool, . is_trait_item: bool, . ) -> bool { 3,560 ( 0.00%) match *self { 8 ( 0.00%) Self::Eq(this) => this == other, 999 ( 0.00%) Self::StartsWith(this) => other.starts_with(this) && this != other, 700 ( 0.00%) Self::EndsWith(this) => other.ends_with(this) && this != other, 64 ( 0.00%) Self::NotEndsWith(this) => !Self::EndsWith(this).check(cx, self_ty, other, implements_trait, is_trait_item), 440 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check'2 (8x) 48 ( 0.00%) Self::IsSelfTypeCopy(is_true) => is_true == is_copy(cx, self_ty), 48,632 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (8x) 31 ( 0.00%) Self::ImplementsTrait(is_true) => is_true == implements_trait, 15 ( 0.00%) Self::IsTraitItem(is_true) => is_true == is_trait_item, . } 4,272 ( 0.00%) } . } . . impl fmt::Display for Convention { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { . match *self { . Self::Eq(this) => write!(f, "`{this}`"), . Self::StartsWith(this) => write!(f, "`{this}*`"), . Self::EndsWith(this) => write!(f, "`*{this}`"), -- line 67 ---------------------------------------- -- line 76 ---------------------------------------- . Self::IsTraitItem(is_true) => { . let suffix = if is_true { " is" } else { " is not" }; . write!(f, "method{suffix} a trait item") . }, . } . } . } . 1,001 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item_name: Symbol, . self_ty: Ty<'tcx>, . first_arg_ty: Ty<'tcx>, . first_arg_span: Span, . implements_trait: bool, . is_trait_item: bool, . ) { . let item_name_str = item_name.as_str(); . if let Some((conventions, self_kinds)) = &CONVENTIONS.iter().find(|(convs, _)| { . convs . .iter() 5,786 ( 0.00%) .all(|conv| conv.check(cx, self_ty, item_name_str, implements_trait, is_trait_item)) 80,646 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check (704x) . }) { . // don't lint if it implements a trait but not willing to check `Copy` types conventions (see #7032) 12 ( 0.00%) if implements_trait 1 ( 0.00%) && !conventions . .iter() 1 ( 0.00%) .any(|conv| matches!(conv, Convention::IsSelfTypeCopy(_))) . { . return; . } 40 ( 0.00%) if !self_kinds.iter().any(|k| k.matches(cx, self_ty, first_arg_ty)) { 175 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/lib.rs:::matches (7x) . let suggestion = { . if conventions.len() > 1 { . // Don't mention `NotEndsWith` when there is also `StartsWith` convention present . let cut_ends_with_conv = conventions.iter().any(|conv| matches!(conv, Convention::StartsWith(_))) . && conventions . .iter() . .any(|conv| matches!(conv, Convention::NotEndsWith(_))); . -- line 115 ---------------------------------------- -- line 133 ---------------------------------------- . "{suggestion} usually take {}", . self_kinds.iter().map(|k| k.description()).format(" or ") . ), . None, . "consider choosing a less ambiguous name", . ); . } . } 616 ( 0.00%) } 38 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } . } else { . count = 0; . } . } . count == 2 . } . 1,248 ( 0.00%) fn check_ident(cx: &LateContext<'_>, ident: &Ident, hir_id: HirId, be_aggressive: bool) { 288 ( 0.00%) let s = ident.as_str(); 3,072 ( 0.00%) => ???:::as_str (96x) . . // By default, only warn for upper case identifiers with at least 3 characters. 192 ( 0.00%) let replacement = if s.len() > 2 && s.bytes().all(|c| c.is_ascii_uppercase()) { . let mut r = String::with_capacity(s.len()); . let mut s = s.chars(); . r.push(s.next().unwrap()); . r.extend(s.map(|c| c.to_ascii_lowercase())); . r 192 ( 0.00%) } else if be_aggressive . // Only lint if the ident starts with an upper case character. . && let unprefixed = s.trim_start_matches('_') . && unprefixed.starts_with(|c: char| c.is_ascii_uppercase()) . && contains_acronym(unprefixed) . { . let mut r = String::with_capacity(s.len()); . let mut s = s.chars(); . let mut prev_upper = false; -- line 91 ---------------------------------------- -- line 115 ---------------------------------------- . diag.span_suggestion( . ident.span, . "consider making the acronym lowercase, except the initial letter", . replacement, . Applicability::MaybeIncorrect, . ); . }, . ); 768 ( 0.00%) } . . impl LateLintPass<'_> for UpperCaseAcronyms { 31,920 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, it: &Item<'_>) { . // do not lint public items or in macros 9,576 ( 0.00%) if it.span.in_external_macro(cx.sess().source_map()) 22,330 ( 0.00%) || (self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(it.owner_id.def_id)) 173,430 ( 0.01%) => ???:::is_exported (3,190x) . { . return; . } 5,795 ( 0.00%) match it.kind { 168 ( 0.00%) ItemKind::TyAlias(ident, ..) | ItemKind::Struct(ident, ..) | ItemKind::Trait { ident, .. } => { 210 ( 0.00%) check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); 3,157 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (42x) . }, 28 ( 0.00%) ItemKind::Enum(ident, _, ref enumdef) => { 42 ( 0.00%) check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); 525 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (7x) . // 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 7 ( 0.00%) enumdef.variants.iter().for_each(|variant| { 282 ( 0.00%) check_ident(cx, &variant.ident, variant.hir_id, self.upper_case_acronyms_aggressive); 3,511 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (47x) . }); . }, . _ => {}, . } 25,536 ( 0.00%) } . } 49 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use rustc_errors::Applicability; . use rustc_hir as hir; . use rustc_lint::{LateContext, Lint}; . use rustc_middle::ty; . use rustc_span::Symbol; . . /// Wrapper fn for `CHARS_NEXT_CMP` and `CHARS_LAST_CMP` lints. 6,084 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 2,340 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 65,248 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (468x) . && let hir::ExprKind::Call(fun, [arg_char]) = info.other.kind . && let Some(id) = fun.res(cx).opt_def_id().map(|ctor_id| cx.tcx.parent(ctor_id)) . && Some(id) == cx.tcx.lang_items().option_some_variant() . { . let mut applicability = Applicability::MachineApplicable; . let self_ty = cx.typeck_results().expr_ty_adjusted(args[0].0).peel_refs(); . . if *self_ty.kind() != ty::Str { -- line 27 ---------------------------------------- -- line 42 ---------------------------------------- . ), . applicability, . ); . . return true; . } . . false 3,744 ( 0.00%) } 468 ( 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/mem/mod.rs -------------------------------------------------------------------------------- Ir -- line 460 ---------------------------------------- . /// assert_eq!(13, unsafe { mem::size_of_val_raw(y) }); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . pub const unsafe fn size_of_val_raw(val: *const T) -> usize { . // SAFETY: the caller must provide a valid raw pointer 1 ( 0.00%) unsafe { intrinsics::size_of_val(val) } . } . . /// Returns the [ABI]-required minimum alignment of a type in bytes. . /// . /// Every reference to a value of the type `T` must be a multiple of this number. . /// . /// This is the alignment used for struct fields. It may be smaller than the preferred alignment. . /// -- line 476 ---------------------------------------- -- line 634 ---------------------------------------- . /// . /// [type-layout]: ../../reference/type-layout.html#r-layout.primitive . #[inline] . #[must_use] . #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . pub const unsafe fn align_of_val_raw(val: *const T) -> usize { . // SAFETY: the caller must provide a valid raw pointer 1 ( 0.00%) unsafe { intrinsics::align_of_val(val) } . } . . /// Returns `true` if dropping values of type `T` matters. . /// . /// This is purely an optimization hint, and may be implemented conservatively: . /// it may return `true` for types that don't actually need to be dropped. . /// As such always returning `true` would be a valid implementation of . /// this function. However if this function actually returns `false`, then you -- line 650 ---------------------------------------- -- line 825 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_swap", since = "1.85.0")] . #[rustc_diagnostic_item = "mem_swap"] . pub const fn swap(x: &mut T, y: &mut T) { . // SAFETY: `&mut` guarantees these are typed readable and writable . // as well as non-overlapping. 712 ( 0.00%) unsafe { intrinsics::typed_swap_nonoverlapping(x, y) } . } . . /// Replaces `dest` with the default value of `T`, returning the previous `dest` value. . /// . /// * If you want to replace the values of two variables, see [`swap`]. . /// * If you want to replace with a passed value instead of the default value, see [`replace`]. . /// . /// # Examples -- line 841 ---------------------------------------- -- line 967 ---------------------------------------- . // such that the old value is not duplicated. Nothing is dropped and . // nothing here can panic. . unsafe { . // Ideally we wouldn't use the intrinsics here, but going through the . // `ptr` methods introduces two unnecessary UbChecks, so until we can . // remove those for pointers that come from references, this uses the . // intrinsics instead so this stays very cheap in MIR (and debug). . 324,387 ( 0.02%) let result = crate::intrinsics::read_via_copy(dest); 441,198 ( 0.03%) crate::intrinsics::write_via_move(dest, src); . result . } . } . . /// Disposes of a value. . /// . /// This effectively does nothing for types which implement `Copy`, e.g. . /// integers. Such values are copied and _then_ moved into the function, so the -- line 984 ---------------------------------------- -- line 1406 ---------------------------------------- . /// // ⚠️ This is undefined behavior. Don't do this. ⚠️ . /// // assert_eq!(0, unsafe { std::mem::transmute::<_, u8>(std::mem::discriminant(&unit_like)) }); . /// ``` . #[stable(feature = "discriminant_value", since = "1.21.0")] . #[rustc_const_stable(feature = "const_discriminant", since = "1.75.0")] . #[rustc_diagnostic_item = "mem_discriminant"] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const fn discriminant(v: &T) -> Discriminant { 8,183 ( 0.00%) Discriminant(intrinsics::discriminant_value(v)) . } . . /// Returns the number of variants in the enum type `T`. . /// . /// If `T` is not an enum, calling this function will not result in undefined behavior, but the . /// return value is unspecified. Equally, if `T` is an enum with more variants than `usize::MAX` . /// the return value is unspecified. Uninhabited variants will be counted. . /// -- line 1422 ---------------------------------------- 30,417 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_mut_passed.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub UNNECESSARY_MUT_PASSED, . style, . "an argument passed as a mutable reference although the callee only demands an immutable reference" . } . . declare_lint_pass!(UnnecessaryMutPassed => [UNNECESSARY_MUT_PASSED]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryMutPassed { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 54,388 ( 0.00%) if e.span.from_expansion() { . // Issue #11268 . return; . } . 85,162 ( 0.00%) match e.kind { 2,928 ( 0.00%) ExprKind::Call(fn_expr, arguments) => { 2,928 ( 0.00%) if let ExprKind::Path(ref path) = fn_expr.kind . && arguments.iter().any(is_mut_ref_arg) . { 90 ( 0.00%) check_arguments( . cx, . &mut arguments.iter(), 20 ( 0.00%) cx.typeck_results().expr_ty(fn_expr), 400 ( 0.00%) => ???:::expr_ty (10x) . #[allow(trivial_casts)] 20 ( 0.00%) &|| { . rustc_hir_pretty::qpath_to_string( . &(&cx.tcx as &dyn intravisit::HirTyCtxt<'_>) as &dyn PpAnn, . path, . ) . }, . "function", . ); . } . }, 2 ( 0.00%) ExprKind::MethodCall(path, receiver, arguments, _) 7,284 ( 0.00%) if iter::once(receiver).chain(arguments.iter()).any(is_mut_ref_arg) 9 ( 0.00%) && let Some(def_id) = cx.typeck_results().type_dependent_def_id(e.hir_id) => 51 ( 0.00%) => ???:::type_dependent_def_id (1x) . { 5 ( 0.00%) let args = cx.typeck_results().node_args(e.hir_id); 34 ( 0.00%) => ???:::node_args (1x) 1 ( 0.00%) let method_type = cx.tcx.type_of(def_id).instantiate(cx.tcx, args).skip_norm_wip(); 9 ( 0.00%) check_arguments( . cx, . &mut iter::once(receiver).chain(arguments.iter()), . method_type, 1 ( 0.00%) &|| path.ident.as_str().to_owned(), . "method", . ); . }, . _ => (), . } 217,552 ( 0.01%) } . } . . /// Only `&mut ...` arguments can lint, so the type and path lookups run only after one is found. . fn is_mut_ref_arg(argument: &Expr<'_>) -> bool { 11,138 ( 0.00%) matches!(argument.kind, ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _)) . } . 132 ( 0.00%) fn check_arguments<'tcx>( . cx: &LateContext<'tcx>, . arguments: &mut dyn Iterator>, . type_definition: Ty<'tcx>, . name: &dyn Fn() -> String, . fn_kind: &str, . ) { . if type_definition.is_fn() { 30 ( 0.00%) let parameters = type_definition.fn_sig(cx.tcx).skip_binder().inputs(); 25,822 ( 0.00%) => ???:::fn_sig (10x) . for (argument, parameter) in iter::zip(arguments, parameters) { 202 ( 0.00%) if let ty::Ref(_, _, Mutability::Not) | ty::RawPtr(_, Mutability::Not) = parameter.kind() 14 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, arg) = argument.kind . { . let applicability = Applicability::MachineApplicable; . . let span_to_remove = { . let span_until_arg = argument.span.until(arg.span); . if let Some(Some(ref_pos)) = span_until_arg.with_source_text(cx, |src| { . src . // we don't use `strip_prefix` here, because `argument` might be enclosed in parens, in -- line 111 ---------------------------------------- -- line 128 ---------------------------------------- . format!("the {fn_kind} `{}` doesn't need a mutable reference", name()), . |diag| { . diag.span_suggestion_verbose(span_to_remove, "remove this `mut`", String::new(), applicability); . }, . ); . } . } . } 88 ( 0.00%) } 89 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs -------------------------------------------------------------------------------- Ir -- line 61 ---------------------------------------- . . pub struct DisallowedTypes { . def_ids: DefIdMap<(&'static str, &'static DisallowedPath)>, . prim_tys: FxHashMap, . } . . impl DisallowedTypes { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 8 ( 0.00%) let (def_ids, prim_tys) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map:: (1x) . tcx, . &conf.disallowed_types, . PathNS::Type, . def_kind_predicate, . "type", . true, . ); 8 ( 0.00%) Self { def_ids, prim_tys } . } . 44,640 ( 0.00%) fn check_res_emit(&self, cx: &LateContext<'_>, res: &Res, span: Span) { 43,684 ( 0.00%) let (path, disallowed_path) = match res { . Res::Def(_, did) if let Some(&x) = self.def_ids.get(did) => x, . Res::PrimTy(prim) if let Some(&x) = self.prim_tys.get(prim) => x, . _ => return, . }; . span_lint_and_then( . cx, . DISALLOWED_TYPES, . span, . format!("use of a disallowed type `{path}`"), . disallowed_path.diag_amendment(span), . ); 53,568 ( 0.00%) } . } . . pub fn def_kind_predicate(def_kind: DefKind) -> bool { . matches!( . def_kind, . DefKind::Struct . | DefKind::Union . | DefKind::Enum -- line 101 ---------------------------------------- -- line 103 ---------------------------------------- . | DefKind::TyAlias . | DefKind::ForeignTy . | DefKind::AssocTy . ) . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedTypes { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 8,554 ( 0.00%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind 7,327 ( 0.00%) && let Some(res) = path.res.type_ns . { 3,644 ( 0.00%) self.check_res_emit(cx, &res, item.span); 16,398 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (911x) . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx, AmbigArg>) { 26,628 ( 0.00%) if let TyKind::Path(path) = &ty.kind { 85,360 ( 0.00%) self.check_res_emit(cx, &cx.qpath_res(path, ty.hir_id), ty.span); 183,861 ( 0.01%) => ???:::qpath_res (7,760x) 135,482 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (7,760x) . } . } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { 2,313 ( 0.00%) self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span); 4,626 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (257x) . } . } 911 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_strip.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . . #[derive(Clone, Copy, Debug, Eq, PartialEq)] . enum StripKind { . Prefix, . Suffix, . } . . impl<'tcx> LateLintPass<'tcx> for ManualStrip { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let Some(higher::If { cond, then, .. }) = higher::If::hir(expr) 1,163 ( 0.00%) && let ExprKind::MethodCall(_, target_arg, [pattern], _) = cond.kind 226 ( 0.00%) && let ExprKind::Path(target_path) = &target_arg.kind 565 ( 0.00%) && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(cond.hir_id) 5,787 ( 0.00%) => ???:::type_dependent_def_id (113x) . { 904 ( 0.00%) let strip_kind = match cx.tcx.get_diagnostic_name(method_def_id) { 5,989 ( 0.00%) => ???:::get_diagnostic_name (113x) . Some(sym::str_starts_with) => StripKind::Prefix, . Some(sym::str_ends_with) => StripKind::Suffix, . _ => return, . }; . let target_res = cx.qpath_res(target_path, target_arg.hir_id); . if target_res == Res::Err { . return; . } -- line 85 ---------------------------------------- -- line 144 ---------------------------------------- . ) . .collect(), . app, . ); . }, . ); . } . } 217,552 ( 0.01%) } . } . . // Returns `Some(arg)` if `expr` matches `arg.len()` and `None` otherwise. . fn len_arg<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::MethodCall(_, arg, [], _) = expr.kind . && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::str_len, method_def_id) . { -- line 160 ---------------------------------------- 226 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 25,536 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 7,789 ( 0.00%) let ItemKind::Impl(imp) = item.kind else { return }; 2,810 ( 0.00%) let Some(of_trait) = imp.of_trait else { return }; 4,050 ( 0.00%) let Some(trait_def_id) = of_trait.trait_ref.trait_def_id() else { 17,550 ( 0.00%) => ???:::trait_def_id (1,350x) . return; . }; 9,450 ( 0.00%) if !cx.tcx.is_diagnostic_item(sym::TryFrom, trait_def_id) { 103,858 ( 0.01%) => ???:::is_diagnostic_item (1,350x) . return; . } . for ii in cx . .tcx . .associated_items(item.owner_id.def_id) . .filter_by_name_unhygienic_and_kind(sym::Error, AssocTag::Type) . { . let ii_ty = cx.tcx.type_of(ii.def_id).instantiate_identity().skip_norm_wip(); -- line 61 ---------------------------------------- -- line 75 ---------------------------------------- . span_lint( . cx, . INFALLIBLE_TRY_FROM, . span, . "infallible TryFrom impl; consider implementing From instead", . ); . } . } 25,536 ( 0.00%) } . } 4,105 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . use rustc_hir as hir; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::{Span, Symbol}; . . use super::{OR_FUN_CALL, UNWRAP_OR_DEFAULT}; . . /// Checks for the `OR_FUN_CALL` lint. 7,284 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &hir::Expr<'_>, . method_span: Span, . name: Symbol, . receiver: &'tcx hir::Expr<'_>, . args: &'tcx [hir::Expr<'_>], . msrv: Msrv, . ) { . // Bail out early unless the method is one that `check_unwrap_or_default` or . // `check_or_fn_call` can lint, to avoid walking the argument of every method call. . if !matches!( . name, 16,200 ( 0.00%) sym::unwrap_or . | sym::unwrap_or_else . | sym::or_insert . | sym::or_insert_with . | sym::get_or_insert . | sym::map_or . | sym::ok_or . | sym::or . | sym::and . ) { . return; . } . 34 ( 0.00%) if let [arg] = args { 7 ( 0.00%) let inner_arg = peel_blocks(arg); 7 ( 0.00%) for_each_expr(cx.tcx, inner_arg, |ex| { . // `or_fun_call` lint needs to take nested expr into account, . // but `unwrap_or_default` lint doesn't, we don't want something like: . // `opt.unwrap_or(Foo { inner: String::default(), other: 1 })` to get replaced by . // `opt.unwrap_or_default()`. 9 ( 0.00%) let is_nested_expr = ex.hir_id != inner_arg.hir_id; . 60 ( 0.00%) let is_triggered = match ex.kind { . hir::ExprKind::Call(fun, fun_args) => { . let inner_fun_has_args = !fun_args.is_empty(); . let fun_span = if inner_fun_has_args || is_nested_expr { . None . } else { . Some(fun.span) . }; . (!inner_fun_has_args . && !is_nested_expr . && check_unwrap_or_default(cx, name, receiver, fun, Some(ex), expr.span, method_span, msrv)) . || check_or_fn_call(cx, name, method_span, receiver, arg, None, expr.span, fun_span) . }, 10 ( 0.00%) hir::ExprKind::Path(..) | hir::ExprKind::Closure(..) if !is_nested_expr => { 52 ( 0.00%) check_unwrap_or_default(cx, name, receiver, ex, None, expr.span, method_span, msrv) 112 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check_unwrap_or_default (4x) . }, . hir::ExprKind::Index(..) | hir::ExprKind::MethodCall(..) => { . check_or_fn_call(cx, name, method_span, receiver, arg, None, expr.span, None) . }, . _ => false, . }; . 12 ( 0.00%) if is_triggered { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }); . } . . // `map_or` takes two arguments 3 ( 0.00%) if let [arg, lambda] = args { 3 ( 0.00%) let inner_arg = peel_blocks(arg); 3 ( 0.00%) for_each_expr(cx.tcx, inner_arg, |ex| { 3 ( 0.00%) let is_top_most_expr = ex.hir_id == inner_arg.hir_id; 15 ( 0.00%) match ex.kind { . hir::ExprKind::Call(fun, fun_args) => { . let fun_span = if fun_args.is_empty() && is_top_most_expr { . Some(fun.span) . } else { . None . }; . if check_or_fn_call(cx, name, method_span, receiver, arg, Some(lambda), expr.span, fun_span) { . return ControlFlow::Break(()); -- line 102 ---------------------------------------- -- line 107 ---------------------------------------- . { . return ControlFlow::Break(()); . }, . _ => {}, . } . ControlFlow::Continue(()) . }); . } 4,856 ( 0.00%) } . . /// Checks for `unwrap_or(T::new())`, `unwrap_or(T::default())`, . /// `or_insert(T::new())` or `or_insert(T::default())`. . /// Similarly checks for `unwrap_or_else(T::new)`, `unwrap_or_else(T::default)`, . /// `or_insert_with(T::new)` or `or_insert_with(T::default)`. . #[expect(clippy::too_many_arguments)] 48 ( 0.00%) fn check_unwrap_or_default( . cx: &LateContext<'_>, . name: Symbol, . receiver: &hir::Expr<'_>, . fun: &hir::Expr<'_>, . call_expr: Option<&hir::Expr<'_>>, . span: Span, . method_span: Span, . msrv: Msrv, . ) -> bool { 4 ( 0.00%) let sugg = match (name, call_expr.is_some()) { 16 ( 0.00%) (sym::unwrap_or, true) | (sym::unwrap_or_else, false) => sym::unwrap_or_default, . (sym::or_insert, true) | (sym::or_insert_with, false) => sym::or_default, . _ => return false, . }; . . let receiver_ty = cx.typeck_results().expr_ty_adjusted(receiver).peel_refs(); . . // Check MSRV, but only for `Result::unwrap_or_default` . if receiver_ty.is_diag_item(cx, sym::Result) && !msrv.meets(cx, msrvs::RESULT_UNWRAP_OR_DEFAULT) { -- line 141 ---------------------------------------- -- line 232 ---------------------------------------- . format!("{sugg}()"), . Applicability::MachineApplicable, . ); . . true . } else { . false . } 32 ( 0.00%) } . . /// Checks for `*or(foo())`. . #[expect(clippy::too_many_arguments)] . fn check_or_fn_call<'tcx>( . cx: &LateContext<'tcx>, . name: Symbol, . method_span: Span, . self_expr: &hir::Expr<'_>, -- line 248 ---------------------------------------- 4,948 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs -------------------------------------------------------------------------------- Ir -- line 12 ---------------------------------------- . Block, Closure, Destination, Expr, ExprKind, HirId, InlineAsm, InlineAsmOperand, Node, Pat, Stmt, StmtKind, . StructTailExpr, . }; . use rustc_lint::LateContext; . use rustc_span::{BytePos, Span}; . use std::iter::once; . use std::ops::ControlFlow; . 800 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . block: &Block<'tcx>, . loop_id: HirId, . span: Span, . for_loop: Option<&ForLoop<'_>>, . ) { 480 ( 0.00%) match never_loop_block(cx, block, &mut Vec::new(), loop_id) { 712,863 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block (80x) . NeverLoopResult::Diverging { 4 ( 0.00%) break_spans, 4 ( 0.00%) never_spans, 5 ( 0.00%) non_obvious_exprs, . } => { 12 ( 0.00%) span_lint_and_then(cx, NEVER_LOOP, span, "this loop never actually loops", |diag| { 2,220 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (1x) . if let Some(ForLoop { . arg: iterator, . pat, . span: for_span, . label, . .. . }) = for_loop . { -- line 41 ---------------------------------------- -- line 78 ---------------------------------------- . . for span in non_obvious_spans { . diag.span_note(span, "this expression never returns"); . } . }); . }, . NeverLoopResult::MayContinueMainLoop | NeverLoopResult::Normal => (), . } 400 ( 0.00%) } . 9 ( 0.00%) pub(super) fn check_iterator_reduction<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . recv: &'tcx Expr<'tcx>, . closure: &'tcx Closure<'tcx>, . ) { 4 ( 0.00%) let closure_body = cx.tcx.hir_body(closure.body).value; 76 ( 0.00%) => ???:::hir_body (1x) 2 ( 0.00%) let body_ty = cx.typeck_results().expr_ty(closure_body); 40 ( 0.00%) => ???:::expr_ty (1x) 1 ( 0.00%) if body_ty.is_never() && !contains_return(closure_body) { . span_lint_and_then( . cx, . NEVER_LOOP, . expr.span, . "this iterator reduction never loops (closure always diverges)", . |diag| { . let mut app = Applicability::HasPlaceholders; . let recv_snip = snippet_with_context(cx, recv.span, expr.span.ctxt(), "", &mut app).0; . diag.note("if you only need one element, `if let Some(x) = iter.next()` is clearer"); . let sugg = format!("if let Some(x) = {recv_snip}.next() {{ ... }}"); . diag.span_suggestion_verbose(expr.span, "consider this pattern", sugg, app); . }, . ); . } 6 ( 0.00%) } . . fn contains_any_break_or_continue(block: &Block<'_>) -> bool { . for_each_expr_without_closures(block, |e| match e.kind { . ExprKind::Break(..) | ExprKind::Continue(..) => ControlFlow::Break(()), . ExprKind::InlineAsm(asm) if contains_label(asm) => ControlFlow::Break(()), . ExprKind::Loop(..) => ControlFlow::Continue(Descend::No), . _ => ControlFlow::Continue(Descend::Yes), . }) -- line 119 ---------------------------------------- -- line 131 ---------------------------------------- . /// * Has any (reachable) code path hit a `continue` of the main loop? . /// * Is the current code path diverging (that is, the next expression is not reachable) . /// * For each block label `'a` inside the main loop, has any (reachable) code path encountered a . /// `break 'a`? . /// . /// The first two bits of information are in this enum, and the last part is in the . /// `local_labels` variable, which contains a list of `(block_id, reachable)` pairs ordered by . /// scope. 8,786 ( 0.00%) #[derive(Clone, Debug)] . enum NeverLoopResult { . /// A continue may occur for the main loop. . MayContinueMainLoop, . /// We have not encountered any main loop continue, . /// but we are diverging (subsequent control flow is not reachable) . Diverging { . break_spans: Vec, . never_spans: Vec, -- line 147 ---------------------------------------- -- line 149 ---------------------------------------- . }, . /// We have not encountered any main loop continue, . /// and subsequent control flow is (possibly) reachable . Normal, . } . . #[must_use] . fn absorb_break(arg: &NeverLoopResult) -> NeverLoopResult { 18 ( 0.00%) match arg { . NeverLoopResult::Diverging { .. } | NeverLoopResult::Normal => NeverLoopResult::Normal, . NeverLoopResult::MayContinueMainLoop => NeverLoopResult::MayContinueMainLoop, . } . } . . // Combine two results for parts that are called in order. . #[must_use] 15 ( 0.00%) fn combine_seq(first: NeverLoopResult, second: impl FnOnce() -> NeverLoopResult) -> NeverLoopResult { 8,491 ( 0.00%) match first { 4,110 ( 0.00%) NeverLoopResult::Diverging { .. } | NeverLoopResult::MayContinueMainLoop => first, 421 ( 0.00%) NeverLoopResult::Normal => second(), 293,767 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr::{closure#2} (63x) 227,796 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr::{closure#3} (46x) . } 147 ( 0.00%) } 6 ( 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:: (1x) . . // Combine an iterator of results for parts that are called in order. . #[must_use] . fn combine_seq_many(iter: impl IntoIterator) -> NeverLoopResult { 6,790 ( 0.00%) for e in iter { 7,023 ( 0.00%) if let NeverLoopResult::Diverging { .. } | NeverLoopResult::MayContinueMainLoop = e { 2,880 ( 0.00%) return e; . } 184 ( 0.00%) } 54 ( 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:: (9x) 2,339 ( 0.00%) NeverLoopResult::Normal . } . . // Combine two results where only one of the part may have been executed. . #[must_use] 5,080 ( 0.00%) fn combine_branches(b1: NeverLoopResult, b2: NeverLoopResult) -> NeverLoopResult { 17,748 ( 0.00%) match (b1, b2) { . (NeverLoopResult::MayContinueMainLoop, _) | (_, NeverLoopResult::MayContinueMainLoop) => { . NeverLoopResult::MayContinueMainLoop . }, . (NeverLoopResult::Normal, _) | (_, NeverLoopResult::Normal) => NeverLoopResult::Normal, . ( . NeverLoopResult::Diverging { 460 ( 0.00%) break_spans: mut break_spans1, 460 ( 0.00%) never_spans: mut never_spans1, 460 ( 0.00%) non_obvious_exprs: mut non_obvious_exprs1, . }, . NeverLoopResult::Diverging { 115 ( 0.00%) break_spans: mut break_spans2, 115 ( 0.00%) never_spans: mut never_spans2, 115 ( 0.00%) non_obvious_exprs: mut non_obvious_exprs2, . }, . ) => { . break_spans1.append(&mut break_spans2); . never_spans1.append(&mut never_spans2); . non_obvious_exprs1.append(&mut non_obvious_exprs2); . NeverLoopResult::Diverging { 460 ( 0.00%) break_spans: break_spans1, 460 ( 0.00%) never_spans: never_spans1, 460 ( 0.00%) non_obvious_exprs: non_obvious_exprs1, . } . }, 1,965 ( 0.00%) } 4,000 ( 0.00%) } . 4,589 ( 0.00%) fn never_loop_block<'tcx>( . cx: &LateContext<'tcx>, . block: &Block<'tcx>, . local_labels: &mut Vec<(HirId, bool)>, . main_loop_id: HirId, . ) -> NeverLoopResult { 706 ( 0.00%) let iter = block . .stmts . .iter() . .filter_map(stmt_to_expr) 2,824 ( 0.00%) .chain(block.expr.map(|expr| (expr, None))); . combine_seq_many(iter.map(|(e, els)| { 3,612 ( 0.00%) let e = never_loop_expr(cx, e, local_labels, main_loop_id); 698,087 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr (166x) . // els is an else block in a let...else binding 3,010 ( 0.00%) els.map_or(e.clone(), |els| { . combine_seq(e, || match never_loop_block(cx, els, local_labels, main_loop_id) { . // Returning MayContinueMainLoop here means that . // we will not evaluate the rest of the body . NeverLoopResult::MayContinueMainLoop => NeverLoopResult::MayContinueMainLoop, . // An else block always diverges, so the Normal case should not happen, . // but the analysis is approximate so it might return Normal anyway. . // Returning Normal here says that nothing more happens on the main path . NeverLoopResult::Diverging { .. } | NeverLoopResult::Normal => NeverLoopResult::Normal, . }) . }) . })) 2,824 ( 0.00%) } . . fn stmt_to_expr<'tcx>(stmt: &Stmt<'tcx>) -> Option<(&'tcx Expr<'tcx>, Option<&'tcx Block<'tcx>>)> { 2,144 ( 0.00%) match stmt.kind { . StmtKind::Semi(e) | StmtKind::Expr(e) => Some((e, None)), . // add the let...else expression (if present) 222 ( 0.00%) StmtKind::Let(local) => local.init.map(|init| (init, local.els)), . StmtKind::Item(..) => None, . } . } . 630 ( 0.00%) fn stmt_source_span(stmt: &Stmt<'_>) -> Span { 630 ( 0.00%) let call_span = stmt.span.source_callsite(); 6,868 ( 0.00%) => ???:::source_callsite (90x) . // if it is a macro call, the span will be missing the trailing semicolon 52 ( 0.00%) if stmt.span == call_span { . return call_span; . } . . // An expression without a trailing semi-colon (must have unit type). . if let StmtKind::Expr(..) = stmt.kind { . return call_span; . } . . call_span.with_hi(call_span.hi() + BytePos(1)) 1,170 ( 0.00%) } . . /// Returns a Vec of all the individual spans after the highlighted expression in a block 981 ( 0.00%) fn all_spans_after_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> Vec { 962 ( 0.00%) if let Node::Stmt(stmt) = cx.tcx.parent_hir_node(expr.hir_id) { 11,772 ( 0.00%) => ???:::parent_hir_node (109x) 720 ( 0.00%) if let Node::Block(block) = cx.tcx.parent_hir_node(stmt.hir_id) { 9,720 ( 0.00%) => ???:::parent_hir_node (90x) 180 ( 0.00%) return block . .stmts . .iter() . .skip_while(|inner| inner.hir_id != stmt.hir_id) . .map(stmt_source_span) 90 ( 0.00%) .chain(block.expr.map(|e| e.span)) . .collect(); . } . 4 ( 0.00%) return vec![stmt.span]; 114 ( 0.00%) } else if let Node::Block(_) = cx.tcx.parent_hir_node(expr.hir_id) { 2,052 ( 0.00%) => ???:::parent_hir_node (19x) 8 ( 0.00%) return vec![expr.span]; . } . 15 ( 0.00%) vec![] 763 ( 0.00%) } . . fn is_label_for_block(cx: &LateContext<'_>, dest: &Destination) -> bool { . dest.target_id 264 ( 0.00%) .is_ok_and(|hir_id| matches!(cx.tcx.hir_node(hir_id), Node::Block(_))) 5,456 ( 0.00%) => ???:::hir_node (88x) . } . . #[expect(clippy::too_many_lines)] 53,295 ( 0.00%) fn never_loop_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . local_labels: &mut Vec<(HirId, bool)>, . main_loop_id: HirId, . ) -> NeverLoopResult { 17,765 ( 0.00%) let result = match expr.kind { . ExprKind::Unary(_, e) . | ExprKind::Cast(e, _) . | ExprKind::Type(e, _) . | ExprKind::Field(e, _) . | ExprKind::AddrOf(_, _, e) . | ExprKind::Repeat(e, _) . | ExprKind::DropTemps(e) . | ExprKind::UnsafeBinderCast(_, e, _) => never_loop_expr(cx, e, local_labels, main_loop_id), 51 ( 0.00%) ExprKind::Let(let_expr) => never_loop_expr(cx, let_expr.init, local_labels, main_loop_id), 27 ( 0.00%) ExprKind::Array(es) | ExprKind::Tup(es) => never_loop_expr_all(cx, es.iter(), local_labels, main_loop_id), . ExprKind::Use(expr, _) => never_loop_expr(cx, expr, local_labels, main_loop_id), 897 ( 0.00%) ExprKind::MethodCall(_, receiver, es, _) => { . never_loop_expr_all(cx, once(receiver).chain(es.iter()), local_labels, main_loop_id) . }, 120 ( 0.00%) ExprKind::Struct(_, fields, base) => { . let fields = never_loop_expr_all(cx, fields.iter().map(|f| f.expr), local_labels, main_loop_id); 160 ( 0.00%) if let StructTailExpr::Base(base) = base { 95 ( 0.00%) combine_seq(fields, || never_loop_expr(cx, base, local_labels, main_loop_id)) 5,577 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::combine_seq:: (5x) . } else { 385 ( 0.00%) fields . } . }, 1,128 ( 0.00%) ExprKind::Call(e, es) => never_loop_expr_all(cx, once(e).chain(es.iter()), local_labels, main_loop_id), 452 ( 0.00%) ExprKind::Binary(op, e1, _) if matches!(op.node, BinOpKind::And | BinOpKind::Or) => { . never_loop_expr(cx, e1, local_labels, main_loop_id) . }, . ExprKind::Binary(_, e1, e2) . | ExprKind::Assign(e1, e2, _) . | ExprKind::AssignOp(_, e1, e2) . | ExprKind::Index(e1, e2, _) => never_loop_expr_all(cx, [e1, e2].iter().copied(), local_labels, main_loop_id), 6 ( 0.00%) ExprKind::Loop(b, _, _, _) => { . // We don't attempt to track reachability after a loop, . // just assume there may have been a break somewhere 24 ( 0.00%) absorb_break(&never_loop_block(cx, b, local_labels, main_loop_id)) 54,564 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block'2 (6x) . }, 625 ( 0.00%) ExprKind::If(e, e2, e3) => { 625 ( 0.00%) let e1 = never_loop_expr(cx, e, local_labels, main_loop_id); 56,322 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (63x) 2,000 ( 0.00%) combine_seq(e1, || { 1,250 ( 0.00%) let e2 = never_loop_expr(cx, e2, local_labels, main_loop_id); 263,536 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (84x) 375 ( 0.00%) let e3 = e3.as_ref().map_or(NeverLoopResult::Normal, |e| { 357 ( 0.00%) never_loop_expr(cx, e, local_labels, main_loop_id) 91,592 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (36x) . }); 250 ( 0.00%) combine_branches(e2, e3) 8,959 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::combine_branches (84x) 875 ( 0.00%) }) . }, 296 ( 0.00%) ExprKind::Match(e, arms, _) => { 740 ( 0.00%) let e = never_loop_expr(cx, e, local_labels, main_loop_id); 22,109 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (46x) 1,776 ( 0.00%) combine_seq(e, || { 148 ( 0.00%) arms.iter().fold( . NeverLoopResult::Diverging { . break_spans: vec![], . never_spans: vec![], . non_obvious_exprs: vec![], . }, 7,042 ( 0.00%) |a, b| combine_branches(a, never_loop_expr(cx, b.body, local_labels, main_loop_id)), 342,838 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (259x) 21,847 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::combine_branches (259x) . ) 1,184 ( 0.00%) }) . }, 267 ( 0.00%) ExprKind::Block(b, _) => { 534 ( 0.00%) if b.targeted_by_break { . local_labels.push((b.hir_id, false)); . } 1,602 ( 0.00%) let ret = never_loop_block(cx, b, local_labels, main_loop_id); 6,475 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block'2 (1x) 534 ( 0.00%) let jumped_to = b.targeted_by_break && local_labels.pop().unwrap().1; . match ret { . NeverLoopResult::Diverging { .. } if jumped_to => NeverLoopResult::Normal, . _ => ret, . } . }, 51 ( 0.00%) ExprKind::Continue(d) => { . let id = d . .target_id . .expect("target ID can only be missing in the presence of compilation errors"); 17 ( 0.00%) if id == main_loop_id { 26 ( 0.00%) NeverLoopResult::MayContinueMainLoop . } else { 24 ( 0.00%) NeverLoopResult::Diverging { 16 ( 0.00%) break_spans: all_spans_after_expr(cx, expr), 1,604 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::all_spans_after_expr (4x) . never_spans: vec![], . non_obvious_exprs: vec![], . } . } . }, 127 ( 0.00%) ExprKind::Ret(e) => { 127 ( 0.00%) let first = e.as_ref().map_or(NeverLoopResult::Normal, |e| { 508 ( 0.00%) never_loop_expr(cx, e, local_labels, main_loop_id) 9,584 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (1x) . }); . combine_seq(first, || { . // checks if break targets a block instead of a loop . mark_block_as_reachable(expr, local_labels); 1,143 ( 0.00%) NeverLoopResult::Diverging { . break_spans: vec![], . never_spans: vec![], . non_obvious_exprs: vec![], . } . }) . }, 264 ( 0.00%) ExprKind::Break(dest, e) => { 88 ( 0.00%) let first = e.as_ref().map_or(NeverLoopResult::Normal, |e| { . never_loop_expr(cx, e, local_labels, main_loop_id) . }); . combine_seq(first, || { . // checks if break targets a block instead of a loop . mark_block_as_reachable(expr, local_labels); 1,144 ( 0.00%) NeverLoopResult::Diverging { 88 ( 0.00%) break_spans: if is_label_for_block(cx, &dest) { . vec![] . } else { 352 ( 0.00%) all_spans_after_expr(cx, expr) 39,497 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::all_spans_after_expr (88x) . }, . never_spans: vec![], . non_obvious_exprs: vec![], . } . }) . }, . ExprKind::Become(e) => combine_seq(never_loop_expr(cx, e, local_labels, main_loop_id), || { . NeverLoopResult::Diverging { -- line 417 ---------------------------------------- -- line 447 ---------------------------------------- . }, . })), . ExprKind::OffsetOf(_, _) . | ExprKind::Yield(_, _) . | ExprKind::Closure { .. } . | ExprKind::Path(_) . | ExprKind::ConstBlock(_) . | ExprKind::Lit(_) 1,601 ( 0.00%) | ExprKind::Err(_) => NeverLoopResult::Normal, . }; . 6,695 ( 0.00%) let result = combine_seq(result, || { 9,426 ( 0.00%) if cx.typeck_results().expr_ty(expr).is_never() { 6,172 ( 0.00%) => ???:::expr_ty (154x) 187 ( 0.00%) NeverLoopResult::Diverging { . break_spans: vec![], 51 ( 0.00%) never_spans: all_spans_after_expr(cx, expr), 11,405 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::all_spans_after_expr (17x) 34 ( 0.00%) non_obvious_exprs: vec![expr.hir_id], . } . } else { 6,250 ( 0.00%) NeverLoopResult::Normal . } . }); 10,642 ( 0.00%) if let NeverLoopResult::Diverging { .. } = result 36 ( 0.00%) && let Some(macro_call) = root_macro_call_first_node(cx, expr) 36 ( 0.00%) && let Some(sym::todo_macro) = cx.tcx.get_diagnostic_name(macro_call.def_id) 783 ( 0.00%) => ???:::get_diagnostic_name (9x) . { . // We return MayContinueMainLoop here because we treat `todo!()` . // as potentially containing any code, including a continue of the main loop. . // This effectively silences the lint whenever a loop contains this macro anywhere. . NeverLoopResult::MayContinueMainLoop . } else { 35,530 ( 0.00%) result . } 28,424 ( 0.00%) } . . fn never_loop_expr_all<'tcx, T: Iterator>>( . cx: &LateContext<'tcx>, . es: T, . local_labels: &mut Vec<(HirId, bool)>, . main_loop_id: HirId, . ) -> NeverLoopResult { 10,435 ( 0.00%) combine_seq_many(es.map(|e| never_loop_expr(cx, e, local_labels, main_loop_id))) 25,551 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 (119x) . } . . fn for_to_if_let_sugg(cx: &LateContext<'_>, iterator: &Expr<'_>, pat: &Pat<'_>) -> String { . let pat_snippet = snippet(cx, pat.span, "_"); . let iter_snippet = make_iterator_snippet(cx, iterator, &mut Applicability::Unspecified); . . format!("if let Some({pat_snippet}) = {iter_snippet}.next()") . } . . fn mark_block_as_reachable(expr: &Expr<'_>, local_labels: &mut [(HirId, bool)]) { 176 ( 0.00%) if let ExprKind::Break(Destination { target_id: Ok(t), .. }, _) = expr.kind . && let Some((_, reachable)) = local_labels.iter_mut().find(|(label, _)| *label == t) . { . *reachable = true; . } . } . . fn find_non_obvious_spans<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) -> Vec { . let mut spans = vec![]; -- line 507 ---------------------------------------- 22,974 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default_constructed_unit_structs.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . "unit structs can be constructed without calling `default`" . } . . declare_lint_pass!(DefaultConstructedUnitStructs => [ . DEFAULT_CONSTRUCTED_UNIT_STRUCTS, . ]); . . fn is_alias(ty: hir::Ty<'_>) -> bool { 660 ( 0.00%) if let hir::TyKind::Path(ref qpath) = ty.kind { 220 ( 0.00%) is_ty_alias(qpath) 3,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias (220x) . } else { . false . } . } . . impl LateLintPass<'_> for DefaultConstructedUnitStructs { 190,358 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 61,197 ( 0.00%) if let ExprKind::Call(fn_expr, &[]) = expr.kind . // make sure we have a call to `Default::default` 1,152 ( 0.00%) && let ExprKind::Path(ref qpath @ hir::QPath::TypeRelative(base, _)) = fn_expr.kind . // make sure this isn't a type alias: . // `::Assoc` cannot be used as a constructor 1,760 ( 0.00%) && !is_alias(*base) 2,200 ( 0.00%) && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) 17,160 ( 0.00%) => ???:::qpath_res (220x) 1,100 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 14,659 ( 0.00%) => ???:::is_diagnostic_item (220x) . // make sure we have a struct with no fields (unit struct) 76 ( 0.00%) && let ty::Adt(def, ..) = cx.typeck_results().expr_ty(expr).kind() 772 ( 0.00%) => ???:::expr_ty (19x) 34 ( 0.00%) && def.is_struct() 61 ( 0.00%) && let var @ ty::VariantDef { ctor: Some((hir::def::CtorKind::Const, _)), .. } = def.non_enum_variant() 136 ( 0.00%) => ???:::non_enum_variant (17x) . && !var.is_field_list_non_exhaustive() . && !expr.span.from_expansion() && !qpath.span().from_expansion() . // do not suggest replacing an expression by a type name with placeholders . && !base.is_suggestable_infer_ty() . { . let mut removals = vec![(expr.span.with_lo(qpath.qself_span().hi()), String::new())]; . if expr.span.check_text(cx, |s| s.starts_with('<')) { . // Remove `<`, '>` has already been removed by the existing removal expression. -- line 82 ---------------------------------------- -- line 91 ---------------------------------------- . diag.multipart_suggestion( . "remove this call to `default`", . removals, . Applicability::MachineApplicable, . ); . }, . ); . } 217,552 ( 0.01%) } . } 880 ( 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/hygiene.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . use crate::edition::Edition; . use crate::source_map::SourceMap; . use crate::symbol::{Symbol, kw, sym}; . use crate::{DUMMY_SP, Span, SpanDecoder, SpanEncoder, with_session_globals}; . . /// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks". . /// . /// See for more explanation. 75,978 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash)] . pub struct SyntaxContext(u32); . . // To ensure correctness of incremental compilation, . // `SyntaxContext` must not implement `Ord` or `PartialOrd`. . // See https://github.com/rust-lang/rust/issues/90317. . impl !Ord for SyntaxContext {} . impl !PartialOrd for SyntaxContext {} . -- line 61 ---------------------------------------- -- line 98 ---------------------------------------- . . rustc_index::newtype_index! { . /// A unique ID associated with a macro invocation and expansion. . #[orderable] . pub struct ExpnIndex {} . } . . /// A unique ID associated with a macro invocation and expansion. 95,670 ( 0.01%) #[derive(Clone, Copy, PartialEq, Eq, Hash)] . pub struct ExpnId { . pub krate: CrateNum, . pub local_id: ExpnIndex, . } . . impl fmt::Debug for ExpnId { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . // Generate crate_::{{expn_}}. -- line 114 ---------------------------------------- -- line 286 ---------------------------------------- . #[inline] . #[track_caller] . pub fn expect_local(self) -> LocalExpnId { . self.as_local().unwrap() . } . . #[inline] . pub fn expn_data(self) -> ExpnData { 43,360 ( 0.00%) HygieneData::with(|data| data.expn_data(self).clone()) 650,400 ( 0.04%) => ???:::expn_data (43,360x) . } . . #[inline] . pub fn is_descendant_of(self, ancestor: ExpnId) -> bool { . // a few "fast path" cases to avoid locking HygieneData 7,960 ( 0.00%) if ancestor == ExpnId::root() || ancestor == self { . return true; . } . if ancestor.krate != self.krate { . return false; . } 422 ( 0.00%) HygieneData::with(|data| data.is_descendant_of(self, ancestor)) 19,367 ( 0.00%) => ???:::is_descendant_of (422x) . } . . /// `expn_id.outer_expn_is_descendant_of(ctxt)` is equivalent to but faster than . /// `expn_id.is_descendant_of(ctxt.outer_expn())`. . #[inline] . pub fn outer_expn_is_descendant_of(self, ctxt: SyntaxContext) -> bool { . // fast path to avoid locking: everything is a descendant of the root context's . // outer expansion -- line 314 ---------------------------------------- -- line 385 ---------------------------------------- . syntax_context_data: vec![root_ctxt_data], . syntax_context_map: iter::once((root_ctxt_data.key(), SyntaxContext(0))).collect(), . expn_data_disambiguators: UnhashMap::default(), . } . } . . #[inline] . fn with(f: impl FnOnce(&mut HygieneData) -> R) -> R { 150,804 ( 0.01%) with_session_globals(|session_globals| f(&mut session_globals.hygiene_data.borrow_mut())) . } . . #[inline] . fn expn_hash(&self, expn_id: ExpnId) -> ExpnHash { . match expn_id.as_local() { . Some(expn_id) => self.local_expn_hashes[expn_id], . None => self.foreign_expn_hashes[&expn_id], . } -- line 401 ---------------------------------------- -- line 441 ---------------------------------------- . #[inline] . fn normalize_to_macro_rules(&self, ctxt: SyntaxContext) -> SyntaxContext { . self.syntax_context_data[ctxt.0 as usize].opaque_and_semiopaque . } . . /// See [`SyntaxContextData::outer_expn`] . #[inline] . fn outer_expn(&self, ctxt: SyntaxContext) -> ExpnId { 116,856 ( 0.01%) self.syntax_context_data[ctxt.0 as usize].outer_expn . } . . /// The last macro expansion and its Transparency . #[inline] . fn outer_mark(&self, ctxt: SyntaxContext) -> (ExpnId, Transparency) { . let data = &self.syntax_context_data[ctxt.0 as usize]; . (data.outer_expn, data.outer_transparency) . } -- line 457 ---------------------------------------- -- line 698 ---------------------------------------- . impl SyntaxContext { . #[inline] . pub const fn root() -> Self { . SyntaxContext(0) . } . . #[inline] . pub const fn is_root(self) -> bool { 145,349 ( 0.01%) self.0 == SyntaxContext::root().as_u32() . } . . #[inline] . pub(crate) const fn as_u32(self) -> u32 { . self.0 . } . . #[inline] -- line 714 ---------------------------------------- -- line 904 ---------------------------------------- . pub fn outer_expn(self) -> ExpnId { . HygieneData::with(|data| data.outer_expn(self)) . } . . /// `ctxt.outer_expn_data()` is equivalent to but faster than . /// `ctxt.outer_expn().expn_data()`. . #[inline] . pub fn outer_expn_data(self) -> ExpnData { 9,834 ( 0.00%) HygieneData::with(|data| data.expn_data(data.outer_expn(self)).clone()) 147,510 ( 0.01%) => ???:::expn_data (9,834x) . } . . /// See [`HygieneData::outer_mark`] . #[inline] . fn outer_mark(self) -> (ExpnId, Transparency) { . HygieneData::with(|data| data.outer_mark(self)) . } . -- line 920 ---------------------------------------- -- line 975 ---------------------------------------- . }; . let expn_id = LocalExpnId::fresh(expn_data, hcx); . self.apply_mark(expn_id.to_expn_id(), Transparency::Transparent) . } . } . . /// A subset of properties from both macro definition and macro call available through global data. . /// Avoid using this if you have access to the original definition or call structures. 638,328 ( 0.04%) #[derive(Clone, Debug, Encodable, Decodable, StableHash)] . pub struct ExpnData { . // --- The part unique to each expansion. . pub kind: ExpnKind, . /// The expansion that contains the definition of the macro for this expansion. . pub parent: ExpnId, . /// The span of the macro call which produced this expansion. . /// . /// This span will typically have a different `ExpnData` and `call_site`. -- line 991 ---------------------------------------- -- line 1003 ---------------------------------------- . /// that have identical `ExpnData`s. This violates the contract of `StableHash` . /// - the two `ExpnId`s are not equal, but their `Fingerprint`s are equal . /// (since the numerical `ExpnId` value is not considered by the `StableHash` . /// implementation). . /// . /// The `disambiguator` field is set by `update_disambiguator` when two distinct . /// `ExpnId`s would end up with the same `Fingerprint`. Since `ExpnData` includes . /// a `krate` field, this value only needs to be unique within a single crate. 53,194 ( 0.00%) disambiguator: u32, . . // --- The part specific to the macro/desugaring definition. . // --- It may be reasonable to share this part between expansions with the same definition, . // --- but such sharing is known to bring some minor inconveniences without also bringing . // --- noticeable perf improvements (PR #62898). . /// The span of the macro definition (possibly dummy). . /// This span serves only informational purpose and is not used for resolution. . pub def_site: Span, -- line 1019 ---------------------------------------- -- line 1024 ---------------------------------------- . /// Edition of the crate in which the macro is defined. . pub edition: Edition, . /// The `DefId` of the macro being invoked, . /// if this `ExpnData` corresponds to a macro invocation . pub macro_def_id: Option, . /// The normal module (`mod`) in which the expanded macro was defined. . pub parent_module: Option, . /// Suppresses the `unsafe_code` lint for code produced by this macro. 53,194 ( 0.00%) pub(crate) allow_internal_unsafe: bool, . /// Enables the macro helper hack (`ident!(...)` -> `$crate::ident!(...)`) for this macro. . pub local_inner_macros: bool, . /// Should debuginfo for the macro be collapsed to the outermost expansion site (in other . /// words, was the macro definition annotated with `#[collapse_debuginfo]`)? . pub(crate) collapse_debuginfo: bool, . /// When true, we prevent diagnostics pointing into this macro, if it is one, and we do not . /// display the note telling people to use the `-Zmacro-backtrace` flag. . pub diagnostic_opaque: bool, -- line 1040 ---------------------------------------- -- line 1123 ---------------------------------------- . fn hash_expn(&self, hcx: &mut impl StableHashCtxt) -> Hash64 { . let mut hasher = StableHasher::new(); . self.stable_hash(hcx, &mut hasher); . hasher.finish() . } . } . . /// Expansion kind. 53,859 ( 0.00%) #[derive(Clone, Debug, PartialEq, Encodable, Decodable, StableHash)] . pub enum ExpnKind { . /// No expansion, aka root expansion. Only `ExpnId::root()` has this kind. . Root, . /// Expansion produced by a macro. 10 ( 0.00%) Macro(MacroKind, Symbol), . /// Transform done by the compiler on the AST. . AstPass(AstPass), . /// Desugaring done by the compiler during AST lowering. . Desugaring(DesugaringKind), . } . . impl ExpnKind { . pub fn descr(&self) -> String { -- line 1144 ---------------------------------------- -- line 1151 ---------------------------------------- . }, . ExpnKind::AstPass(kind) => kind.descr().to_string(), . ExpnKind::Desugaring(kind) => format!("desugaring of {}", kind.descr()), . } . } . } . . /// The kind of macro invocation or definition. 20 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable, Hash, Debug)] . #[derive(StableHash)] . pub enum MacroKind { . /// A bang macro `foo!()`. . Bang, . /// An attribute macro `#[foo]`. . Attr, . /// A derive macro `#[derive(Foo)]` . Derive, -- line 1167 ---------------------------------------- -- line 1205 ---------------------------------------- . AstPass::StdImports => "standard library imports", . AstPass::TestHarness => "test harness", . AstPass::ProcMacroHarness => "proc macro harness", . } . } . } . . /// The kind of compiler desugaring. 1,530 ( 0.00%) #[derive(Clone, Copy, PartialEq, Debug, Encodable, Decodable, StableHash)] . pub enum DesugaringKind { . QuestionMark, . TryBlock, . YeetExpr, . /// Desugaring of an `impl Trait` in return type position . /// to an `type Foo = impl Trait;` and replacing the . /// `impl Trait` with `Foo`. . OpaqueTy, -- line 1221 ---------------------------------------- 27,049 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_span::symbol::sym; . . use super::VEC_BOX; . 6,534 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . hir_ty: &hir::Ty<'_>, . qpath: &QPath<'tcx>, . def_id: DefId, . box_size_threshold: u64, . ) -> bool { 4,752 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Vec, def_id) 36,302 ( 0.00%) => ???:::is_diagnostic_item (594x) 50 ( 0.00%) && let Some(last) = last_path_segment(qpath).args 120 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (10x) . // Get the _ part of Vec<_> 40 ( 0.00%) && let Some(GenericArg::Type(ty)) = last.args.first() . // extract allocator from the Vec for later . && let vec_alloc_ty = last.args.get(1) . // ty is now _ at this point 38 ( 0.00%) && let TyKind::Path(ref ty_qpath) = ty.kind 48 ( 0.00%) && let res = cx.qpath_res(ty_qpath, ty.hir_id) 184 ( 0.00%) => ???:::qpath_res (8x) . && let Some(def_id) = res.opt_def_id() 8 ( 0.00%) && Some(def_id) == cx.tcx.lang_items().owned_box() 160 ( 0.00%) => ???:::lang_items (4x) . // At this point, we know ty is Box, now get T . && let Some(last) = last_path_segment(ty_qpath).args . && let Some(GenericArg::Type(boxed_ty)) = last.args.first() . // extract allocator from the Box for later . && let boxed_alloc_ty = last.args.get(1) . // we don't expect to encounter `_` here so ignore `GenericArg::Infer` is okay . && let ty_ty = lower_ty(cx.tcx, boxed_ty.as_unambig_ty()) . && !ty_ty.has_escaping_bound_vars() -- line 40 ---------------------------------------- -- line 69 ---------------------------------------- . "try", . format!("Vec<{}>", snippet(cx, boxed_ty.span, "..")), . Applicability::Unspecified, . ); . true . } else { . false . } 4,752 ( 0.00%) } 8 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs -------------------------------------------------------------------------------- Ir -- line 82 ---------------------------------------- . #[inline(always)] . const unsafe fn get_offset_len_noubcheck( . ptr: *const [T], . offset: usize, . len: usize, . ) -> *const [T] { . let ptr = ptr as *const T; . // SAFETY: The caller already checked these preconditions 23,339 ( 0.00%) let ptr = unsafe { crate::intrinsics::offset(ptr, offset) }; . crate::intrinsics::aggregate_raw_ptr(ptr, len) . } . . #[inline(always)] . const unsafe fn get_offset_len_mut_noubcheck( . ptr: *mut [T], . offset: usize, . len: usize, . ) -> *mut [T] { . let ptr = ptr as *mut T; . // SAFETY: The caller already checked these preconditions 227 ( 0.00%) let ptr = unsafe { crate::intrinsics::offset(ptr, offset) }; . crate::intrinsics::aggregate_raw_ptr(ptr, len) . } . . /// A helper trait used for indexing operations. . /// . /// Implementations of this trait have to promise that if the argument . /// to `get_unchecked(_mut)` is a safe reference, then so is the result. . #[stable(feature = "slice_get_slice", since = "1.28.0")] -- line 110 ---------------------------------------- -- line 176 ---------------------------------------- . /// The methods `index` and `index_mut` panic if the index is out of bounds. . #[stable(feature = "slice_get_slice_impls", since = "1.15.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex<[T]> for usize { . type Output = T; . . #[inline] . fn get(self, slice: &[T]) -> Option<&T> { 431,156 ( 0.02%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. 14,797 ( 0.00%) unsafe { Some(slice_get_unchecked(slice, self)) } . } else { . None . } . } . . #[inline] . #[rustc_no_writable] . fn get_mut(self, slice: &mut [T]) -> Option<&mut T> { 1,510 ( 0.00%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. . unsafe { Some(slice_get_unchecked(slice, self)) } . } else { . None . } . } . . #[inline] -- line 203 ---------------------------------------- -- line 211 ---------------------------------------- . // SAFETY: the caller guarantees that `slice` is not dangling, so it . // cannot be longer than `isize::MAX`. They also guarantee that . // `self` is in bounds of `slice` so `self` cannot overflow an `isize`, . // so the call to `add` is safe. . unsafe { . // Use intrinsics::assume instead of hint::assert_unchecked so that we don't check the . // precondition of this function twice. . crate::intrinsics::assume(self < slice.len()); 971 ( 0.00%) slice_get_unchecked(slice, self) . } . } . . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut T { . assert_unsafe_precondition!( . check_library_ub, . "slice::get_unchecked_mut requires that the index is within the slice", . (this: usize = self, len: usize = slice.len()) => this < len . ); . // SAFETY: see comments for `get_unchecked` above. 517 ( 0.00%) unsafe { slice_get_unchecked(slice, self) } . } . . #[inline] . fn index(self, slice: &[T]) -> &T { . // N.B., use intrinsic indexing 447,686 ( 0.03%) &(*slice)[self] . } . . #[inline] . #[rustc_no_writable] . fn index_mut(self, slice: &mut [T]) -> &mut T { . // N.B., use intrinsic indexing 22,558 ( 0.00%) &mut (*slice)[self] . } . } . . /// Because `IndexRange` guarantees `start <= end`, fewer checks are needed here . /// than there are for a general `Range` (which might be `100..3`). . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex<[T]> for ops::IndexRange { . type Output = [T]; -- line 253 ---------------------------------------- -- line 391 ---------------------------------------- . ( . start: usize = self.start, . end: usize = self.end, . len: usize = slice.len() . ) => end >= start && end <= len . ); . // SAFETY: see comments for `get_unchecked` above. . unsafe { 4 ( 0.00%) let new_len = crate::intrinsics::unchecked_sub(self.end, self.start); . get_offset_len_mut_noubcheck(slice, self.start, new_len) . } . } . . #[inline(always)] . fn index(self, slice: &[T]) -> &[T] { . // Using checked_sub is a safe way to get `SubUnchecked` in MIR . if let Some(new_len) = usize::checked_sub(self.end, self.start) 214 ( 0.00%) && self.end <= slice.len() . { . // SAFETY: `self` is checked to be valid and in bounds above. . unsafe { &*get_offset_len_noubcheck(slice, self.start, new_len) } . } else { . slice_index_fail(self.start, self.end, slice.len()) . } . } . -- line 416 ---------------------------------------- -- line 536 ---------------------------------------- . #[inline] . unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T] { . // SAFETY: the caller has to uphold the safety contract for `get_unchecked_mut`. . unsafe { (self.start..slice.len()).get_unchecked_mut(slice) } . } . . #[inline] . fn index(self, slice: &[T]) -> &[T] { 711 ( 0.00%) if self.start > slice.len() { . slice_index_fail(self.start, slice.len(), slice.len()) . } . // SAFETY: `self` is checked to be valid and in bounds above. . unsafe { 54 ( 0.00%) let new_len = crate::intrinsics::unchecked_sub(slice.len(), self.start); . &*get_offset_len_noubcheck(slice, self.start, new_len) . } . } . . #[inline] . #[rustc_no_writable] . fn index_mut(self, slice: &mut [T]) -> &mut [T] { . if self.start > slice.len() { -- line 557 ---------------------------------------- 62,612 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . declare_lint_pass!(LintPass => [ . SHORT_CIRCUIT_STATEMENT, . USED_UNDERSCORE_BINDING, . USED_UNDERSCORE_ITEMS, . ]); . . impl<'tcx> LateLintPass<'tcx> for LintPass { . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 5,159 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 2,098 ( 0.00%) && let ExprKind::Binary(binop, a, b) = &expr.kind . && matches!(binop.node, BinOpKind::And | BinOpKind::Or) . && !stmt.span.from_expansion() . && expr.span.eq_ctxt(stmt.span) . { . span_lint_hir_and_then( . cx, . SHORT_CIRCUIT_STATEMENT, . expr.hir_id, -- line 113 ---------------------------------------- -- line 117 ---------------------------------------- . let mut app = Applicability::MachineApplicable; . let test = Sugg::hir_with_context(cx, a, expr.span.ctxt(), "_", &mut app); . let test = if binop.node == BinOpKind::Or { !test } else { test }; . let then = Sugg::hir_with_context(cx, b, expr.span.ctxt(), "_", &mut app); . diag.span_suggestion(stmt.span, "replace it with", format!("if {test} {{ {then}; }}"), app); . }, . ); . } 2,055 ( 0.00%) } . 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,582 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) 68,883 ( 0.00%) || expr.span.desugaring_kind().is_some() 2,193,570 ( 0.12%) => ???:::desugaring_kind (22,961x) 180,520 ( 0.01%) || in_automatically_derived(cx.tcx, expr.hir_id) 16,794,054 ( 0.95%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (22,565x) . { . return; . } . . used_underscore_binding(cx, expr); . used_underscore_items(cx, expr); 217,552 ( 0.01%) } . } . . fn used_underscore_items<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,851 ( 0.01%) let (def_id, ident) = match expr.kind { 2,118 ( 0.00%) ExprKind::Call(func, ..) => { 10,153 ( 0.00%) if let ExprKind::Path(QPath::Resolved(.., path)) = func.kind . && let Some(last_segment) = path.segments.last() . && let Res::Def(_, def_id) = last_segment.res . { . (def_id, last_segment.ident) . } else { . return; . } . }, . ExprKind::MethodCall(path, ..) => { 8,037 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 138,589 ( 0.01%) => ???:::type_dependent_def_id (2,679x) 2,679 ( 0.00%) (def_id, path.ident) . } else { . return; . } 2,679 ( 0.00%) }, . ExprKind::Struct(QPath::Resolved(_, path), ..) => { 597 ( 0.00%) if let Some(last_segment) = path.segments.last() . && let Res::Def(_, def_id) = last_segment.res . { . (def_id, last_segment.ident) . } else { . return; . } . }, . _ => return, . }; . . let name = ident.name.as_str(); . let definition_span = cx.tcx.def_span(def_id); 4,939 ( 0.00%) if name.starts_with('_') 2 ( 0.00%) && !name.starts_with("__") . && !definition_span.from_expansion() . && def_id.is_local() . && !cx.tcx.is_foreign_item(def_id) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_ITEMS, . expr.span, -- line 182 ---------------------------------------- -- line 184 ---------------------------------------- . |diag| { . diag.span_note(definition_span, "item is defined here".to_string()); . }, . ); . } . } . . fn used_underscore_binding<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 131,558 ( 0.01%) let (definition_hir_id, ident) = match expr.kind { . ExprKind::Path(ref qpath) => { 35,098 ( 0.00%) if let QPath::Resolved(None, path) = qpath 43,851 ( 0.00%) && let Res::Local(id) = path.res 668 ( 0.00%) && is_used(cx, expr) . { 29,620 ( 0.00%) (id, last_path_segment(qpath).ident) 71,088 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (5,924x) . } else { . return; . } 5,924 ( 0.00%) }, 3,621 ( 0.00%) ExprKind::Field(recv, ident) => { 1,207 ( 0.00%) if let Some(adt_def) = cx.typeck_results().expr_ty_adjusted(recv).ty_adt_def() 66,870 ( 0.00%) => ???:::expr_ty_adjusted (1,207x) . && let Some(field) = adt_def.all_fields().find(|field| field.name == ident.name) . && let Some(local_did) = field.did.as_local() 1,068 ( 0.00%) && !cx.tcx.type_of(field.did).skip_binder().is_phantom_data() . { . (cx.tcx.local_def_id_to_hir_id(local_did), ident) . } else { . return; . } . }, . _ => return, . }; . . let name = ident.name.as_str(); 7,115 ( 0.00%) if name.starts_with('_') 75 ( 0.00%) && !name.starts_with("__") 675 ( 0.00%) && let definition_span = cx.tcx.hir_span(definition_hir_id) 11,775 ( 0.00%) => ???:::hir_span (75x) . && !definition_span.from_expansion() . && !fulfill_or_allowed(cx, USED_UNDERSCORE_BINDING, [expr.hir_id, definition_hir_id]) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_BINDING, . expr.span, . "used underscore-prefixed binding".to_string(), -- line 228 ---------------------------------------- -- line 232 ---------------------------------------- . ); . } . } . . /// Heuristic to see if an expression is used. Should be compatible with . /// `unused_variables`'s idea . /// of what it means for an expression to be "used". . fn is_used(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 99,581 ( 0.01%) get_parent_expr(cx, expr).is_none_or(|parent| match parent.kind { 2,121,315 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (17,527x) 334 ( 0.00%) ExprKind::Assign(_, rhs, _) | ExprKind::AssignOp(_, _, rhs) => { 1,670 ( 0.00%) SpanlessEq::new(cx).eq_expr(parent.span.ctxt(), rhs, expr) 690,709 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (334x) . }, . _ => is_used(cx, parent), . }) . } 141,375 ( 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/context.rs -------------------------------------------------------------------------------- Ir -- line 523 ---------------------------------------- . lint: &'static Lint, . span: Option, . decorate: impl for<'a> Diagnostic<'a, ()>, . ); . . /// Emit a lint at `span` from a lint struct (some type that implements `Diagnostic`, . /// typically generated by `#[derive(Diagnostic)]`). . #[track_caller] 7,835 ( 0.00%) fn emit_span_lint>( . &self, . lint: &'static Lint, . span: S, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { . self.opt_span_lint(lint, Some(span), decorator); 5,789 ( 0.00%) } . . /// This returns the lint level spec for the given lint at the current location. . fn get_lint_level_spec(&self, lint: &'static Lint) -> LevelSpec; . . /// This function can be used to manually fulfill an expectation. This can . /// be used for lints which contain several spans, and should be suppressed, . /// if either location was marked with an expectation. . /// -- line 546 ---------------------------------------- -- line 584 ---------------------------------------- . } . } . . impl<'tcx> LintContext for LateContext<'tcx> { . type LintExpectationId = StableLintExpectationId; . . /// Gets the overall compiler `Session` object. . fn sess(&self) -> &Session { 443,245 ( 0.03%) self.tcx.sess . } . . fn opt_span_lint>( . &self, . lint: &'static Lint, . span: Option, . decorate: impl for<'a> Diagnostic<'a, ()>, . ) { 870 ( 0.00%) let hir_id = self.last_node_with_lint_attrs; . 870 ( 0.00%) match span { 3,045 ( 0.00%) Some(s) => self.tcx.emit_node_span_lint(lint, hir_id, s, decorate), . None => self.tcx.emit_node_lint(lint, hir_id, decorate), . } . } . . fn get_lint_level_spec(&self, lint: &'static Lint) -> StableLevelSpec { . self.tcx.lint_level_spec_at_node(lint, self.last_node_with_lint_attrs) . } . } -- line 612 ---------------------------------------- -- line 660 ---------------------------------------- . } . . /// Gets the type-checking results for the current body. . /// As this will ICE if called outside bodies, only call when working with . /// `Expr` or `Pat` nodes (they are guaranteed to be found only in bodies). . #[inline] . #[track_caller] . pub fn typeck_results(&self) -> &'tcx ty::TypeckResults<'tcx> { 116,277 ( 0.01%) self.typeck_results.expect("`LateContext::typeck_results` called outside of body") . } . . /// Returns the final resolution of a `QPath`, or `Res::Err` if unavailable. . /// Unlike `.typeck_results().qpath_res(qpath, id)`, this can be used even outside . /// bodies (e.g. for paths in `hir::Ty`), without any risk of ICE-ing. . pub fn qpath_res(&self, qpath: &hir::QPath<'_>, id: hir::HirId) -> Res { . match *qpath { . hir::QPath::Resolved(_, path) => path.res, -- line 676 ---------------------------------------- -- line 949 ---------------------------------------- . fn data_layout(&self) -> &abi::TargetDataLayout { . &self.tcx.data_layout . } . } . . impl<'tcx> ty::layout::HasTyCtxt<'tcx> for LateContext<'tcx> { . #[inline] . fn tcx(&self) -> TyCtxt<'tcx> { 14,213 ( 0.00%) self.tcx . } . } . . impl<'tcx> ty::layout::HasTypingEnv<'tcx> for LateContext<'tcx> { . #[inline] . fn typing_env(&self) -> ty::TypingEnv<'tcx> { 308 ( 0.00%) self.typing_env() 5,520 ( 0.00%) => ???:::typing_env (214x) . } . } . . impl<'tcx> LayoutOfHelpers<'tcx> for LateContext<'tcx> { . type LayoutOfResult = Result, LayoutError<'tcx>>; . . #[inline] . fn handle_layout_err(&self, err: LayoutError<'tcx>, _: Span, _: Ty<'tcx>) -> LayoutError<'tcx> { -- line 972 ---------------------------------------- 42,505 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . use rustc_errors::{Applicability, Diag, DiagCtxtHandle, DiagMessage, Diagnostic, Level, MultiSpan}; . #[cfg(debug_assertions)] . use rustc_errors::{EmissionGuarantee, SubstitutionPart, Suggestions}; . use rustc_hir::HirId; . use rustc_lint::{LateContext, Lint, LintContext}; . use rustc_span::Span; . use std::env; . 5 ( 0.00%) fn docs_link(diag: &mut Diag<'_, ()>, lint: &'static Lint) { 2 ( 0.00%) if env::var("CLIPPY_DISABLE_DOCS_LINKS").is_err() 4 ( 0.00%) && let Some(lint) = lint.name_lower().strip_prefix("clippy::") 131 ( 0.00%) => ???:::name_lower (1x) . { 6 ( 0.00%) diag.help(format!( . "for further information visit https://rust-lang.github.io/rust-clippy/{}/index.html#{lint}", . match option_env!("CFG_RELEASE_CHANNEL") { . // Clippy version is 0.1.xx . // . // Always use .0 because we do not generate separate lint doc pages for rust patch releases . Some("stable") => concat!("rust-1.", env!("CARGO_PKG_VERSION_PATCH"), ".0"), . Some("beta") => "beta", 3 ( 0.00%) _ => "main", . } . )); . } 4 ( 0.00%) } . . /// Makes sure that a diagnostic is well formed. . /// . /// rustc debug asserts a few properties about spans, . /// but the clippy repo uses a distributed rustc build with debug assertions disabled, . /// so this has historically led to problems during subtree syncs where those debug assertions . /// only started triggered there. . /// -- line 43 ---------------------------------------- -- line 99 ---------------------------------------- . /// error: usage of mem::forget on Drop type . /// --> tests/ui/mem_forget.rs:17:5 . /// | . /// 17 | std::mem::forget(seven); . /// | ^^^^^^^^^^^^^^^^^^^^^^^ . /// ``` . #[track_caller] . pub fn span_lint(cx: &T, lint: &'static Lint, sp: impl Into, msg: impl Into) { 367 ( 0.00%) span_lint_and_then(cx, lint, sp, msg, |_| {}); 46,573 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (44x) . } . . /// Same as [`span_lint`] but with an extra `help` message. . /// . /// Use this if you want to provide some general help but . /// can't provide a specific machine applicable suggestion. . /// . /// The `help` message can be optionally attached to a `Span`. -- line 115 ---------------------------------------- -- line 145 ---------------------------------------- . pub fn span_lint_and_help( . cx: &T, . lint: &'static Lint, . span: impl Into, . msg: impl Into, . help_span: Option, . help: impl Into, . ) { 32 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 1,142 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (1x) . if let Some(help_span) = help_span { . diag.span_help(help_span, help.into()); . } else { . diag.help(help.into()); . } . }); . } . -- line 161 ---------------------------------------- -- line 228 ---------------------------------------- . /// `LintPass::check_*` function, consider using [`span_lint_hir_and_then`] instead. . /// This is needed for `#[allow]` and `#[expect]` attributes to work on the node . /// highlighted in the displayed warning. . /// . /// If you're unsure which function you should use, you can test if the `#[expect]` attribute works . /// where you would expect it to. . /// If it doesn't, you likely need to use [`span_lint_hir_and_then`] instead. . #[track_caller] 10,158 ( 0.00%) pub fn span_lint_and_then(cx: &C, lint: &'static Lint, sp: S, msg: M, f: F) . where . C: LintContext, . S: Into, . M: Into, . F: FnOnce(&mut Diag<'_, ()>), . { . struct ClippyDiag)>(F); . -- line 244 ---------------------------------------- -- line 247 ---------------------------------------- . let mut lint = Diag::new(dcx, level, ""); . (self.0)(&mut lint); . lint . } . } . . let sp = sp.into(); . #[expect(clippy::disallowed_methods)] 1,307 ( 0.00%) cx.emit_span_lint( 1,430 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::emit_span_lint::::{closure#0}>> (2x) . lint, . sp.clone(), 18,618 ( 0.00%) ClippyDiag(|diag: &mut Diag<'_, ()>| { 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) . diag.primary_message(msg); . diag.span(sp); . f(diag); . docs_link(diag, lint); . . #[cfg(debug_assertions)] . validate_diag(diag); . }), . ); 5,840 ( 0.00%) } . . /// Like [`span_lint`], but emits the lint at the node identified by the given `HirId`. . /// . /// This is in contrast to [`span_lint`], which always emits the lint at the node that was last . /// passed to the `LintPass::check_*` function. . /// . /// The `HirId` is used for checking lint level attributes and to fulfill lint expectations defined . /// via the `#[expect]` attribute. -- line 276 ---------------------------------------- -- line 329 ---------------------------------------- . msg: impl Into, . f: impl FnOnce(&mut Diag<'_, ()>), . ) { . #[expect(clippy::disallowed_methods)] . cx.tcx.emit_node_span_lint( . lint, . hir_id, . sp, 3 ( 0.00%) rustc_errors::DiagDecorator(|diag| { . diag.primary_message(msg); 3 ( 0.00%) f(diag); 3 ( 0.00%) docs_link(diag, lint); 2,909 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::docs_link (1x) . . #[cfg(debug_assertions)] . validate_diag(diag); . }), . ); . } . . /// Add a span lint with a suggestion on how to fix it. -- line 348 ---------------------------------------- -- line 374 ---------------------------------------- . /// --> tests/ui/methods.rs:390:13 . /// | . /// 390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2); . /// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)` . /// | . /// = note: `-D fold-any` implied by `-D warnings` . /// ``` . #[track_caller] 1,209 ( 0.00%) pub fn span_lint_and_sugg( . cx: &T, . lint: &'static Lint, . sp: Span, . msg: impl Into, . help: impl Into, . sugg: String, . applicability: Applicability, . ) { 465 ( 0.00%) span_lint_and_then(cx, lint, sp, msg.into(), |diag| { . diag.span_suggestion(sp, help.into(), sugg, applicability); . . // This dummy construct is here to prevent the internal `clippy::collapsible_span_lint_calls` . // lint from triggering. We don't want to allow/expect it as internal lints might or might . // not be activated when linting, and we don't want an unknown lint warning either. . std::hint::black_box(()); . }); 744 ( 0.00%) } 37,514 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/consts.rs -------------------------------------------------------------------------------- Ir -- line 98 ---------------------------------------- . UintTy::U128 => 128, . UintTy::Usize => usize::BITS.into(), . } . } . } . impl IntTypeBounds for IntTy { . type Output = i128; . fn min_max(self) -> Option<(Self::Output, Self::Output)> { 4 ( 0.00%) Some(match self { . IntTy::I8 => (i8::MIN.into(), i8::MAX.into()), . IntTy::I16 => (i16::MIN.into(), i16::MAX.into()), . IntTy::I32 => (i32::MIN.into(), i32::MAX.into()), . IntTy::I64 => (i64::MIN.into(), i64::MAX.into()), . IntTy::I128 => (i128::MIN, i128::MAX), . IntTy::Isize => (isize::MIN.try_into().ok()?, isize::MAX.try_into().ok()?), . }) . } -- line 114 ---------------------------------------- -- line 120 ---------------------------------------- . IntTy::I64 => 64, . IntTy::I128 => 128, . IntTy::Isize => isize::BITS.into(), . } . } . } . . impl PartialEq for Constant { 840 ( 0.00%) fn eq(&self, other: &Self) -> bool { 1,049 ( 0.00%) match (self, other) { . (Self::Str(ls), Self::Str(rs)) => ls == rs, . (Self::Binary(l), Self::Binary(r)) => l == r, . (&Self::Char(l), &Self::Char(r)) => l == r, 204 ( 0.00%) (&Self::Int(l), &Self::Int(r)) => l == r, . (&Self::F64(l), &Self::F64(r)) => { . // `to_bits` is required to catch non-matching `0.0` and `-0.0`. . l.to_bits() == r.to_bits() && !l.is_nan() . }, . (&Self::F32(l), &Self::F32(r)) => { . // `to_bits` is required to catch non-matching `0.0` and `-0.0`. . l.to_bits() == r.to_bits() && !l.is_nan() . }, 9 ( 0.00%) (&Self::Bool(l), &Self::Bool(r)) => l == r, . (&Self::Vec(ref l), &Self::Vec(ref r)) | (&Self::Tuple(ref l), &Self::Tuple(ref r)) => l == r, . (Self::Repeat(lv, ls), Self::Repeat(rv, rs)) => ls == rs && lv == rv, . (Self::Ref(lb), Self::Ref(rb)) => *lb == *rb, . // TODO: are there inter-type equalities? . _ => false, . } 420 ( 0.00%) } . } . . impl Hash for Constant { 420 ( 0.00%) fn hash(&self, state: &mut H) . where . H: Hasher, . { . std::mem::discriminant(self).hash(state); 210 ( 0.00%) match *self { . Self::Adt(ref elem) => { . elem.hash(state); . }, . Self::Str(ref s) => { . s.hash(state); . }, . Self::Binary(ref b) => { . b.hash(state); -- line 166 ---------------------------------------- -- line 179 ---------------------------------------- . f64::from(f).to_bits().hash(state); . }, . Self::F64(f) => { . f.to_bits().hash(state); . }, . Self::F128(f) => { . f.hash(state); . }, 5 ( 0.00%) Self::Bool(b) => { . b.hash(state); . }, . Self::Vec(ref v) | Self::Tuple(ref v) => { . v.hash(state); . }, . Self::Repeat(ref c, l) => { . c.hash(state); . l.hash(state); -- line 195 ---------------------------------------- -- line 197 ---------------------------------------- . Self::RawPtr(u) => { . u.hash(state); . }, . Self::Ref(ref r) => { . r.hash(state); . }, . Self::Err => {}, . } 252 ( 0.00%) } . } . . impl Constant { . pub fn partial_cmp(tcx: TyCtxt<'_>, cmp_type: Ty<'_>, left: &Self, right: &Self) -> Option { . match (left, right) { . (Self::Str(ls), Self::Str(rs)) => Some(ls.cmp(rs)), . (Self::Char(l), Self::Char(r)) => Some(l.cmp(r)), . (&Self::Int(l), &Self::Int(r)) => match *cmp_type.kind() { -- line 213 ---------------------------------------- -- line 259 ---------------------------------------- . rb, . ), . // TODO: are there any useful inter-type orderings? . _ => None, . } . } . . /// Returns the integer value or `None` if `self` or `val_type` is not integer type. 190 ( 0.00%) pub fn int_value(&self, tcx: TyCtxt<'_>, val_type: Ty<'_>) -> Option { 384 ( 0.00%) if let Constant::Int(const_int) = *self { 485 ( 0.00%) match *val_type.kind() { . ty::Int(ity) => Some(FullInt::S(sext(tcx, const_int, ity))), 392 ( 0.00%) ty::Uint(_) => Some(FullInt::U(const_int)), . _ => None, . } . } else { . None . } 285 ( 0.00%) } . . #[must_use] 344 ( 0.00%) pub fn peel_refs(mut self) -> Self { 129 ( 0.00%) while let Constant::Ref(r) = self { . self = *r; . } 172 ( 0.00%) self 301 ( 0.00%) } . . fn parse_f16(s: &str) -> Self { . let f: Half = s.parse().unwrap(); . Self::F16(f.to_bits().try_into().unwrap()) . } . . fn parse_f128(s: &str) -> Self { . let f: Quad = s.parse().unwrap(); -- line 293 ---------------------------------------- -- line 391 ---------------------------------------- . (&Self::Char(x), &ty::Char) => x == char::MAX, . (&Self::F32(x), &ty::Float(FloatTy::F32)) => x == f32::INFINITY, . (&Self::F64(x), &ty::Float(FloatTy::F64)) => x == f64::INFINITY, . _ => false, . } . } . . pub fn is_pos_infinity(&self) -> bool { 9 ( 0.00%) match *self { . // FIXME(f16_f128): add f16 and f128 when constants are available . Constant::F32(x) => x == f32::INFINITY, . Constant::F64(x) => x == f64::INFINITY, . _ => false, . } . } . . pub fn is_neg_infinity(&self) -> bool { -- line 407 ---------------------------------------- -- line 410 ---------------------------------------- . Constant::F32(x) => x == f32::NEG_INFINITY, . Constant::F64(x) => x == f64::NEG_INFINITY, . _ => false, . } . } . } . . /// Parses a `LitKind` to a `Constant`. 3,738 ( 0.00%) pub fn lit_to_mir_constant(lit: &LitKind, ty: Option>) -> Constant { 2,670 ( 0.00%) match *lit { 236 ( 0.00%) LitKind::Str(ref is, _) => Constant::Str(is.to_string()), 516 ( 0.00%) LitKind::Byte(b) => Constant::Int(u128::from(b)), 27 ( 0.00%) LitKind::ByteStr(ref s, _) | LitKind::CStr(ref s, _) => Constant::Binary(s.as_byte_str().to_vec()), 96 ( 0.00%) => ???:::as_byte_str (3x) 90 ( 0.00%) LitKind::Char(c) => Constant::Char(c), 468 ( 0.00%) LitKind::Int(n, _) => Constant::Int(n.get()), . LitKind::Float(ref is, LitFloatType::Suffixed(fty)) => match fty { . // FIXME(f16_f128): just use `parse()` directly when available for `f16`/`f128` . FloatTy::F16 => Constant::parse_f16(is.as_str()), . FloatTy::F32 => Constant::F32(is.as_str().parse().unwrap()), . FloatTy::F64 => Constant::F64(is.as_str().parse().unwrap()), . FloatTy::F128 => Constant::parse_f128(is.as_str()), . }, . LitKind::Float(ref is, LitFloatType::Unsuffixed) => match ty.expect("type of float is known").kind() { . ty::Float(FloatTy::F16) => Constant::parse_f16(is.as_str()), . ty::Float(FloatTy::F32) => Constant::F32(is.as_str().parse().unwrap()), . ty::Float(FloatTy::F64) => Constant::F64(is.as_str().parse().unwrap()), . ty::Float(FloatTy::F128) => Constant::parse_f128(is.as_str()), . _ => bug!(), . }, 240 ( 0.00%) LitKind::Bool(b) => Constant::Bool(b), . LitKind::Err(_) => Constant::Err, . } 4,272 ( 0.00%) } . . /// The source of a constant value. . #[derive(Clone, Copy)] . pub enum ConstantSource { . /// The value is determined solely from the expression. . Local, . /// The value is dependent on another definition that may change independently from the local . /// expression. -- line 450 ---------------------------------------- -- line 466 ---------------------------------------- . pub fn is_zero(self) -> bool { . matches!(self, Self::S(0) | Self::U(0)) . } . } . . impl PartialEq for FullInt { . fn eq(&self, other: &Self) -> bool { . self.cmp(other) == Ordering::Equal 166 ( 0.00%) } . } . . impl PartialOrd for FullInt { . fn partial_cmp(&self, other: &Self) -> Option { . Some(self.cmp(other)) . } . } . -- line 482 ---------------------------------------- -- line 483 ---------------------------------------- . impl Ord for FullInt { . fn cmp(&self, other: &Self) -> Ordering { . use FullInt::{S, U}; . . fn cmp_s_u(s: i128, u: u128) -> Ordering { . u128::try_from(s).map_or(Ordering::Less, |x| x.cmp(&u)) . } . 8,100 ( 0.00%) match (*self, *other) { . (S(s), S(o)) => s.cmp(&o), . (U(s), U(o)) => s.cmp(&o), . (S(s), U(o)) => cmp_s_u(s, o), . (U(s), S(o)) => cmp_s_u(o, s).reverse(), . } 734 ( 0.00%) } . } . . /// Evaluates an expression if it's a builtin integer type. 20 ( 0.00%) pub fn eval_int(cx: &LateContext<'_>, e: &Expr<'_>) -> Option { 10 ( 0.00%) match e.kind { 14 ( 0.00%) ExprKind::Lit(lit) if let LitKind::Int(val, _) = lit.node => Some(FullInt::U(val.0)), . ExprKind::Unary(UnOp::Neg, e) . if let ExprKind::Lit(lit) = e.kind . && let LitKind::Int(val, _) = lit.node => . { . Some(FullInt::S(val.0.cast_signed().wrapping_neg())) . }, . _ if let ty = cx.typeck_results().expr_ty(e) . && let ty::Int(_) | ty::Uint(_) = *ty.kind() => . { . ConstEvalCtxt::new(cx).eval(e).and_then(|x| x.int_value(cx.tcx, ty)) . }, . _ => None, . } 18 ( 0.00%) } . . /// The context required to evaluate a constant expression. . /// . /// This is currently limited to constant folding and reading the value of named constants. . /// . /// See the module level documentation for some context. . pub struct ConstEvalCtxt<'tcx> { . pub tcx: TyCtxt<'tcx>, -- line 525 ---------------------------------------- -- line 527 ---------------------------------------- . pub typeck: &'tcx TypeckResults<'tcx>, . source: Cell, . ctxt: Cell, . } . . impl<'tcx> ConstEvalCtxt<'tcx> { . /// Creates the evaluation context from the lint context. This requires the lint context to be . /// in a body (i.e. `cx.enclosing_body.is_some()`). 3,978 ( 0.00%) pub fn new(cx: &LateContext<'tcx>) -> Self { 5,356 ( 0.00%) Self { 1,352 ( 0.00%) tcx: cx.tcx, 689 ( 0.00%) typing_env: cx.typing_env(), 19,890 ( 0.00%) => ???:::typing_env (663x) . typeck: cx.typeck_results(), . source: Cell::new(ConstantSource::Local), . ctxt: Cell::new(SyntaxContext::root()), . } 3,978 ( 0.00%) } . . /// Creates an evaluation context. . pub fn with_env(tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>, typeck: &'tcx TypeckResults<'tcx>) -> Self { 27,524 ( 0.00%) Self { . tcx, . typing_env, . typeck, . source: Cell::new(ConstantSource::Local), . ctxt: Cell::new(SyntaxContext::root()), . } . } . . /// Attempts to evaluate the expression and returns both the value and whether it's dependant on . /// other items. . pub fn eval_with_source(&self, e: &Expr<'_>, ctxt: SyntaxContext) -> Option<(Constant, ConstantSource)> { . self.source.set(ConstantSource::Local); . self.ctxt.set(ctxt); 10,837 ( 0.00%) self.expr(e).map(|c| (c, self.source.get())) 706 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr (5x) . } . . /// Attempts to evaluate the expression. . pub fn eval(&self, e: &Expr<'_>) -> Option { 220 ( 0.00%) self.expr(e) 28,224 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr (220x) . } . . /// Attempts to evaluate the expression without accessing other items. . /// . /// The context argument is the context used to view the evaluated expression. e.g. when . /// evaluating the argument in `f(m!(1))` the context of the call expression should be used. . /// This is need so the const evaluator can see the `m` macro and marke the evaluation as . /// non-local independant of what the macro expands to. 1,080 ( 0.00%) pub fn eval_local(&self, e: &Expr<'_>, ctxt: SyntaxContext) -> Option { 2,313 ( 0.00%) match self.eval_with_source(e, ctxt) { 1,679 ( 0.00%) Some((x, ConstantSource::Local)) => Some(x), 1,633 ( 0.00%) _ => None, 3,037 ( 0.00%) } 25 ( 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:: (1x) 1,080 ( 0.00%) } . . /// Attempts to evaluate the expression as an integer without accessing other items. . /// . /// The context argument is the context used to view the evaluated expression. e.g. when . /// evaluating the argument in `f(m!(1))` the context of the call expression should be used. . /// This is need so the const evaluator can see the `m` macro and marke the evaluation as . /// non-local independant of what the macro expands to. 50 ( 0.00%) pub fn eval_full_int(&self, e: &Expr<'_>, ctxt: SyntaxContext) -> Option { 12 ( 0.00%) match self.eval_with_source(e, ctxt) { 18 ( 0.00%) Some((x, ConstantSource::Local)) => x.int_value(self.tcx, self.typeck.expr_ty(e)), 80 ( 0.00%) => ???:::expr_ty (2x) 6 ( 0.00%) _ => None, 3 ( 0.00%) } 45 ( 0.00%) } . 760 ( 0.00%) pub fn eval_pat_expr(&self, pat_expr: &PatExpr<'_>) -> Option { 190 ( 0.00%) match &pat_expr.kind { . PatExprKind::Lit { lit, negated } => { 665 ( 0.00%) let ty = self.typeck.node_type_opt(pat_expr.hir_id); 3,515 ( 0.00%) => ???:::node_type_opt (95x) 380 ( 0.00%) let val = lit_to_mir_constant(&lit.node, ty); 2,467 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::lit_to_mir_constant (95x) 190 ( 0.00%) if *negated { . self.constant_negate(&val, ty?) . } else { 380 ( 0.00%) Some(val) . } 95 ( 0.00%) }, . PatExprKind::Path(qpath) => self.qpath(qpath, pat_expr.hir_id), . } 855 ( 0.00%) } . . fn check_ctxt(&self, ctxt: SyntaxContext) { 8,786 ( 0.00%) if self.ctxt.get() != ctxt { . self.source.set(ConstantSource::NonLocal); . } . } . 31,170 ( 0.00%) fn qpath(&self, qpath: &QPath<'_>, hir_id: HirId) -> Option { . self.fetch_path(qpath, hir_id) 70 ( 0.00%) .and_then(|c| mir_to_const(self.tcx, c, self.typeck.node_type(hir_id))) 287 ( 0.00%) => ???:::node_type (7x) 232 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::mir_to_const (7x) 24,936 ( 0.00%) } . . /// Simple constant folding: Insert an expression, get a constant or none. 105,896 ( 0.01%) fn expr(&self, e: &Expr<'_>) -> Option { 7,565 ( 0.00%) self.check_ctxt(e.span.ctxt()); 45,390 ( 0.00%) match e.kind { . ExprKind::ConstBlock(ConstBlock { body, .. }) => self.expr(self.tcx.hir_body(body).value), . ExprKind::DropTemps(e) => self.expr(e), 21,819 ( 0.00%) ExprKind::Path(ref qpath) => self.qpath(qpath, e.hir_id), 350,809 ( 0.02%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::qpath (2,466x) 37 ( 0.00%) ExprKind::Block(block, _) => { 37 ( 0.00%) self.check_ctxt(block.span.ctxt()); . self.block(block) . }, 1,756 ( 0.00%) ExprKind::Lit(lit) => { 439 ( 0.00%) self.check_ctxt(lit.span.ctxt()); 3,073 ( 0.00%) Some(lit_to_mir_constant(&lit.node, self.typeck.expr_ty_opt(e))) 24,204 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::lit_to_mir_constant (414x) 16,146 ( 0.00%) => ???:::expr_ty_opt (414x) . }, 6 ( 0.00%) ExprKind::Array(vec) => self.multi(vec).map(Constant::Vec), 96 ( 0.00%) ExprKind::Tup(tup) => self.multi(tup).map(Constant::Tuple), . ExprKind::Repeat(value, _) => { . let n = match self.typeck.expr_ty(e).kind() { . ty::Array(_, n) => n.try_to_target_usize(self.tcx)?, . _ => span_bug!(e.span, "typeck error"), . }; . self.expr(value).map(|v| Constant::Repeat(Box::new(v), n)) . }, 566 ( 0.00%) ExprKind::Unary(op, operand) => self.expr(operand).and_then(|o| match op { 9,988 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (116x) . UnOp::Not => self.constant_not(&o, self.typeck.expr_ty(e)), 10 ( 0.00%) UnOp::Neg => self.constant_negate(&o, self.typeck.expr_ty(e)), 40 ( 0.00%) => ???:::expr_ty (1x) 102 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::constant_negate (1x) . UnOp::Deref => Some(if let Constant::Ref(r) = o { *r } else { o }), 6 ( 0.00%) }), 25 ( 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:: (1x) 51 ( 0.00%) ExprKind::If(cond, then, ref otherwise) => self.ifthenelse(cond, then, *otherwise), 2,235 ( 0.00%) ExprKind::Binary(op, left, right) => { . self.check_ctxt(e.span.ctxt()); . self.binop(op.node, left, right) . }, 1,192 ( 0.00%) ExprKind::Call(callee, []) => { . // We only handle a few const functions for now. 48 ( 0.00%) if let ExprKind::Path(qpath) = &callee.kind 72 ( 0.00%) && let Some(did) = self.typeck.qpath_res(qpath, callee.hir_id).opt_def_id() 752 ( 0.00%) => ???:::qpath_res (12x) . { 60 ( 0.00%) match self.tcx.get_diagnostic_name(did) { 908 ( 0.00%) => ???:::get_diagnostic_name (12x) . Some(sym::i8_legacy_fn_max_value) => Some(Constant::Int(i8::MAX as u128)), . Some(sym::i16_legacy_fn_max_value) => Some(Constant::Int(i16::MAX as u128)), . Some(sym::i32_legacy_fn_max_value) => Some(Constant::Int(i32::MAX as u128)), . Some(sym::i64_legacy_fn_max_value) => Some(Constant::Int(i64::MAX as u128)), . Some(sym::i128_legacy_fn_max_value) => Some(Constant::Int(i128::MAX as u128)), . _ => None, . } . } else { . None . } . }, 510 ( 0.00%) ExprKind::Index(arr, index, _) => self.index(arr, index), 513 ( 0.00%) ExprKind::AddrOf(_, _, inner) => self.expr(inner).map(|r| Constant::Ref(Box::new(r))), 41,296 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (168x) . ExprKind::Field(base, ref field) 1,422 ( 0.00%) if let base_ty = self.typeck.expr_ty(base) 7,664 ( 0.00%) => ???:::expr_ty (191x) 1,037 ( 0.00%) && match self.typeck.expr_adjustments(base) { 7,693 ( 0.00%) => ???:::expr_adjustments (191x) 474 ( 0.00%) [] => true, . [.., a] => a.target == base_ty, . } 740 ( 0.00%) && let Some(Constant::Adt(constant)) = self.expr(base) 20,683 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (137x) . && let ty::Adt(adt_def, _) = *base_ty.kind() . && adt_def.is_struct() . && let Some((desired_field, ty)) = . field_of_struct(adt_def, self.tcx, constant, base_ty, field.name) => . { . self.check_ctxt(field.span.ctxt()); . mir_to_const(self.tcx, desired_field, ty) . }, . _ => None, . } 68,041 ( 0.00%) } . . /// Simple constant folding to determine if an expression is an empty slice, str, array, … . /// `None` will be returned if the constness cannot be determined, or if the resolution . /// leaves the local crate. 583 ( 0.00%) pub fn eval_is_empty(&self, e: &Expr<'_>) -> Option { 318 ( 0.00%) match e.kind { . ExprKind::ConstBlock(ConstBlock { body, .. }) => self.eval_is_empty(self.tcx.hir_body(body).value), . ExprKind::DropTemps(e) => self.eval_is_empty(e), . ExprKind::Lit(lit) => { . if is_direct_expn_of(e.span, sym::cfg).is_some() { . None . } else { . match &lit.node { . LitKind::Str(is, _) => Some(is.is_empty()), -- line 705 ---------------------------------------- -- line 713 ---------------------------------------- . if let ty::Array(_, n) = self.typeck.expr_ty(e).kind() { . Some(n.try_to_target_usize(self.tcx)? == 0) . } else { . span_bug!(e.span, "typeck error"); . } . }, . _ => None, . } 371 ( 0.00%) } . . #[expect(clippy::cast_possible_wrap)] . fn constant_not(&self, o: &Constant, ty: Ty<'_>) -> Option { . use self::Constant::{Bool, Int}; . match *o { . Bool(b) => Some(Bool(!b)), . Int(value) => { . let value = !value; -- line 729 ---------------------------------------- -- line 732 ---------------------------------------- . ty::Uint(ity) => Some(Int(clip(self.tcx, value, ity))), . _ => None, . } . }, . _ => None, . } . } . 5 ( 0.00%) fn constant_negate(&self, o: &Constant, ty: Ty<'_>) -> Option { . use self::Constant::{F32, F64, Int}; 8 ( 0.00%) match *o { . Int(value) => { 2 ( 0.00%) let ty::Int(ity) = *ty.kind() else { return None }; . let (min, _) = ity.min_max()?; . // sign extend 1 ( 0.00%) let value = sext(self.tcx, value, ity); . . // Applying unary - to the most negative value of any signed integer type panics. 4 ( 0.00%) if value == min { . return None; . } . . let value = value.checked_neg()?; . // clear unused bits 5 ( 0.00%) Some(Int(unsext(self.tcx, value, ity))) . }, . F32(f) => Some(F32(-f)), . F64(f) => Some(F64(-f)), . _ => None, . } 5 ( 0.00%) } . . /// Create `Some(Vec![..])` of all constants, unless there is any . /// non-constant part. . fn multi(&self, vec: &[Expr<'_>]) -> Option> { 188 ( 0.00%) vec.iter().map(|elem| self.expr(elem)).collect::>() 4,873 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (44x) . } . . /// Lookup a possibly constant expression from an `ExprKind::Path` and apply a function on it. . #[expect(clippy::too_many_lines)] . fn fetch_path(&self, qpath: &QPath<'_>, id: HirId) -> Option { . // Resolve the path to a constant and check if that constant is known to . // not change based on the target. . // . // This should be replaced with an attribute at some point. 12,328 ( 0.00%) let did = match *qpath { . QPath::Resolved(None, path) 9,141 ( 0.00%) if path.span.ctxt() == self.ctxt.get() 3,040 ( 0.00%) && path.segments.iter().all(|s| self.ctxt.get() == s.ident.span.ctxt()) 7,232 ( 0.00%) && let Res::Def(DefKind::Const { .. }, did) = path.res . && (matches!( . self.tcx.get_diagnostic_name(did), . Some( . sym::f32_legacy_const_digits . | sym::f32_legacy_const_epsilon . | sym::f32_legacy_const_infinity . | sym::f32_legacy_const_mantissa_dig . | sym::f32_legacy_const_max -- line 789 ---------------------------------------- -- line 839 ---------------------------------------- . sym::f16_consts_mod | sym::f32_consts_mod | sym::f64_consts_mod | sym::f128_consts_mod . ) . ) . })) => . { . did . }, . QPath::TypeRelative(ty, const_name) 490 ( 0.00%) if let TyKind::Path(QPath::Resolved(None, ty_path)) = ty.kind 280 ( 0.00%) && let [.., ty_name] = ty_path.segments . && (matches!( 210 ( 0.00%) ty_name.ident.name, 512 ( 0.00%) sym::i8 . | sym::i16 . | sym::i32 . | sym::i64 . | sym::i128 . | sym::u8 . | sym::u16 . | sym::u32 . | sym::u64 . | sym::u128 . | sym::f32 . | sym::f64 . | sym::char . ) || (ty_name.ident.name == sym::usize && const_name.ident.name == sym::MIN)) 6 ( 0.00%) && const_name.ident.span.ctxt() == self.ctxt.get() 4 ( 0.00%) && ty.span.ctxt() == self.ctxt.get() 4 ( 0.00%) && ty_name.ident.span.ctxt() == self.ctxt.get() 4 ( 0.00%) && matches!(ty_path.res, Res::PrimTy(_)) 22 ( 0.00%) && let Some((DefKind::AssocConst { .. }, did)) = self.typeck.type_dependent_def(id) 110 ( 0.00%) => ???:::type_dependent_def (2x) . && self.tcx.inherent_impl_of_assoc(did).is_some() => . { . did . }, . // TODO: revisit when feature `min_generic_const_args` is stabilized. In the meantime, . // `TyCtxt::const_eval_resolve()` will trigger an ICE when evaluating the body of the . // `type const` definition. 9,908 ( 0.00%) _ if let Res::Def( . DefKind::Const { is_type_const: false } | DefKind::AssocConst { is_type_const: false }, 14 ( 0.00%) did, 22,362 ( 0.00%) ) = self.typeck.qpath_res(qpath, id) => 50,395 ( 0.00%) => ???:::qpath_res (3,117x) . { . self.source.set(ConstantSource::NonLocal); . did . }, . _ => return None, . }; . 42 ( 0.00%) let args = self.typeck.node_args(id); 248 ( 0.00%) => ???:::node_args (7x) . 14 ( 0.00%) if !args.is_empty() { 4 ( 0.00%) let owner_def_id = self.typeck.hir_owner.def_id.to_def_id(); 6 ( 0.00%) let identity_args = ty::GenericArgs::identity_for_item(self.tcx, owner_def_id); . // Don't try to fully evaluate consts inside code whose bounds can't be satisfied. 4 ( 0.00%) if self . .tcx 6 ( 0.00%) .instantiate_and_check_impossible_clauses((owner_def_id, identity_args)) . { . return None; . } . } . 7 ( 0.00%) self.tcx 56 ( 0.00%) .const_eval_resolve(self.typing_env, mir::UnevaluatedConst::new(did, args), qpath.span()) 96,179 ( 0.01%) => ???:::const_eval_resolve (7x) 1,015 ( 0.00%) => ???:::span (7x) . .ok() . } . . fn index(&self, lhs: &'_ Expr<'_>, index: &'_ Expr<'_>) -> Option { 765 ( 0.00%) let lhs = self.expr(lhs); 16,676 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (116x) 765 ( 0.00%) let index = self.expr(index); 10,354 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (116x) . 3,315 ( 0.00%) match (lhs, index) { . (Some(Constant::Vec(vec)), Some(Constant::Int(index))) => match vec.get(index as usize) { . Some(Constant::F16(x)) => Some(Constant::F16(*x)), . Some(Constant::F32(x)) => Some(Constant::F32(*x)), . Some(Constant::F64(x)) => Some(Constant::F64(*x)), . Some(Constant::F128(x)) => Some(Constant::F128(*x)), . _ => None, . }, . (Some(Constant::Vec(vec)), _) => { -- line 919 ---------------------------------------- -- line 924 ---------------------------------------- . Some(Constant::F64(x)) => Some(Constant::F64(*x)), . Some(Constant::F128(x)) => Some(Constant::F128(*x)), . _ => None, . } . } else { . None . } . }, 255 ( 0.00%) _ => None, . } . } . . /// A block can only yield a constant if it has exactly one constant expression. . fn block(&self, block: &Block<'_>) -> Option { 37 ( 0.00%) if block.stmts.is_empty() 60 ( 0.00%) && let Some(expr) = block.expr . { . // Try to detect any `cfg`ed statements or empty macro expansions. 60 ( 0.00%) let span = block.span.data(); 1,148 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::data (20x) 20 ( 0.00%) if span.ctxt == SyntaxContext::root() { 112 ( 0.00%) if let Some(expr_span) = walk_span_to_context(expr.span, span.ctxt) 1,376 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (16x) . && let expr_lo = expr_span.lo() 16 ( 0.00%) && expr_lo >= span.lo 128 ( 0.00%) && let Some(src) = (span.lo..expr_lo).get_source_range(self.tcx) 48 ( 0.00%) && let Some(src) = src.as_str() 448 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::as_str (16x) . { . use rustc_lexer::TokenKind::{BlockComment, LineComment, OpenBrace, Semi, Whitespace}; 48 ( 0.00%) if !tokenize(src, FrontmatterAllowed::No) . .map(|t| t.kind) . .filter(|t| !matches!(t, Whitespace | LineComment { .. } | BlockComment { .. } | Semi)) . .eq([OpenBrace]) . { . self.source.set(ConstantSource::NonLocal); . } . } else { . // Unable to access the source. Assume a non-local dependency. . self.source.set(ConstantSource::NonLocal); . } . } . 80 ( 0.00%) self.expr(expr) 1,889 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (20x) . } else { . None . } . } . . fn ifthenelse(&self, cond: &Expr<'_>, then: &Expr<'_>, otherwise: Option<&Expr<'_>>) -> Option { 102 ( 0.00%) if let Some(Constant::Bool(b)) = self.expr(cond) { 2,278 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (17x) . if b { . self.expr(then) . } else { . otherwise.as_ref().and_then(|expr| self.expr(expr)) . } . } else { . None . } . } . . #[expect(clippy::too_many_lines)] . fn binop(&self, op: BinOpKind, left: &Expr<'_>, right: &Expr<'_>) -> Option { 3,725 ( 0.00%) let l = self.expr(left)?; 53,966 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (378x) 48 ( 0.00%) let r = self.expr(right); 2,216 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (16x) 339 ( 0.00%) match (l, r) { . (Constant::Int(l), Some(Constant::Int(r))) => match *self.typeck.expr_ty_opt(left)?.kind() { . ty::Int(ity) => { . let (ty_min_value, _) = ity.min_max()?; . let bits = ity.bits(); . let l = sext(self.tcx, l, ity); . let r = sext(self.tcx, r, ity); . . // Using / or %, where the left-hand argument is the smallest integer of a signed integer type and -- line 994 ---------------------------------------- -- line 1080 ---------------------------------------- . BinOpKind::Eq => Some(Constant::Bool(l == r)), . BinOpKind::Ne => Some(Constant::Bool(l != r)), . BinOpKind::Lt => Some(Constant::Bool(l < r)), . BinOpKind::Le => Some(Constant::Bool(l <= r)), . BinOpKind::Ge => Some(Constant::Bool(l >= r)), . BinOpKind::Gt => Some(Constant::Bool(l > r)), . _ => None, . }, 229 ( 0.00%) (l, r) => match (op, l, r) { 9 ( 0.00%) (BinOpKind::And, Constant::Bool(false), _) => Some(Constant::Bool(false)), . (BinOpKind::Or, Constant::Bool(true), _) => Some(Constant::Bool(true)), . (BinOpKind::And, Constant::Bool(true), Some(r)) | (BinOpKind::Or, Constant::Bool(false), Some(r)) => { . Some(r) . }, . (BinOpKind::BitXor, Constant::Bool(l), Some(Constant::Bool(r))) => Some(Constant::Bool(l ^ r)), . (BinOpKind::BitAnd, Constant::Bool(l), Some(Constant::Bool(r))) => Some(Constant::Bool(l & r)), . (BinOpKind::BitOr, Constant::Bool(l), Some(Constant::Bool(r))) => Some(Constant::Bool(l | r)), 13 ( 0.00%) _ => None, 48 ( 0.00%) }, 400 ( 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:: (16x) . } . } . } . 63 ( 0.00%) pub fn mir_to_const<'tcx>(tcx: TyCtxt<'tcx>, val: ConstValue, ty: Ty<'tcx>) -> Option { 26 ( 0.00%) match (val, ty.kind()) { 62 ( 0.00%) (_, &ty::Adt(adt_def, _)) if adt_def.is_struct() => Some(Constant::Adt(val)), 5 ( 0.00%) (ConstValue::Scalar(Scalar::Int(int)), _) => match ty.kind() { . ty::Bool => Some(Constant::Bool(int == ScalarInt::TRUE)), . ty::Uint(_) | ty::Int(_) => Some(Constant::Int(int.to_bits(int.size()))), . ty::Float(FloatTy::F16) => Some(Constant::F16(int.into())), . ty::Float(FloatTy::F32) => Some(Constant::F32(f32::from_bits(int.into()))), . ty::Float(FloatTy::F64) => Some(Constant::F64(f64::from_bits(int.into()))), . ty::Float(FloatTy::F128) => Some(Constant::F128(int.into())), . ty::RawPtr(_, _) => Some(Constant::RawPtr(int.to_bits(int.size()))), . _ => None, -- line 1114 ---------------------------------------- -- line 1134 ---------------------------------------- . FloatTy::F64 => Constant::F64(f64::from_bits(val.to_u64().discard_err()?)), . FloatTy::F128 => Constant::F128(val.to_u128().discard_err()?), . }); . } . Some(Constant::Vec(res)) . }, . _ => None, . } 63 ( 0.00%) } . . fn field_of_struct<'tcx>( . adt_def: ty::AdtDef<'tcx>, . tcx: TyCtxt<'tcx>, . value: ConstValue, . ty: Ty<'tcx>, . field: Symbol, . ) -> Option<(ConstValue, Ty<'tcx>)> { -- line 1150 ---------------------------------------- 64,188 ( 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_type_ir/src/data_structures/delayed_map.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . fn default() -> Self { . DelayedMap { cache: Default::default(), count: 0 } . } . } . . impl DelayedMap { . #[inline(always)] . pub fn insert(&mut self, key: K, value: V) -> bool { 6,804 ( 0.00%) if self.count >= CACHE_CUTOFF { . self.cold_insert(key, value) . } else { 4,536 ( 0.00%) self.count += 1; . true . } . } . . #[cold] . #[inline(never)] . fn cold_insert(&mut self, key: K, value: V) -> bool { . self.cache.insert(key, value).is_none() . } . . #[inline(always)] . pub fn get(&self, key: &K) -> Option<&V> { 2,268 ( 0.00%) if self.cache.is_empty() { None } else { self.cold_get(key) } . } . . #[cold] . #[inline(never)] . fn cold_get(&self, key: &K) -> Option<&V> { . self.cache.get(key) . } . } -- line 51 ---------------------------------------- 2,268 ( 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_lexer/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . . impl Token { . fn new(kind: TokenKind, len: u32) -> Token { . Token { kind, len } . } . } . . /// Enum representing common lexeme types. 231,624 ( 0.01%) #[derive(Clone, Copy, Debug, PartialEq, Eq)] . pub enum TokenKind { . /// A line comment, e.g. `// comment`. . LineComment { . doc_style: Option, . }, . . /// A block comment, e.g. `/* block comment */`. . /// -- line 79 ---------------------------------------- -- line 325 ---------------------------------------- . /// . /// When tokenizing a slice of a document, be sure to disallow frontmatters with [`FrontmatterAllowed::No`] . pub fn tokenize( . input: &str, . frontmatter_allowed: FrontmatterAllowed, . ) -> impl Iterator { . let mut cursor = Cursor::new(input, frontmatter_allowed); . std::iter::from_fn(move || { 188,921 ( 0.01%) let token = cursor.advance_token(); 631,911 ( 0.04%) => ???:::advance_token (4,925x) 178,759 ( 0.01%) if token.kind != TokenKind::Eof { Some(token) } else { None } . }) . } . . /// True if `c` is considered a whitespace according to Rust language definition. . /// See [Rust language reference](https://doc.rust-lang.org/reference/whitespace.html) . /// for definitions of these classes. . pub fn is_whitespace(c: char) -> bool { . // This is Pattern_White_Space. . // . // Note that this set is stable (ie, it doesn't change with different . // Unicode versions), so it's ok to just hard-code the values. . 2,419 ( 0.00%) matches!( . c, . // End-of-line characters . | '\u{000A}' // line feed (\n) . | '\u{000B}' // vertical tab . | '\u{000C}' // form feed . | '\u{000D}' // carriage return (\r) . | '\u{0085}' // next line (from latin1) . | '\u{2028}' // LINE SEPARATOR -- line 355 ---------------------------------------- 2,233 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl ManualSliceSizeCalculation { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualSliceSizeCalculation { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,388 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind 382 ( 0.00%) && BinOpKind::Mul == op.node 4 ( 0.00%) && !expr.span.from_expansion() 4 ( 0.00%) && let Some((receiver, refs_count)) = simplify(cx, left, right) . && (!is_in_const_context(cx) || self.msrv.meets(cx, msrvs::CONST_SIZE_OF_VAL)) . { . let ctxt = expr.span.ctxt(); . let mut app = Applicability::MachineApplicable; . let deref = if refs_count > 0 { . "*".repeat(refs_count - 1) . } else { . "&".into() -- line 67 ---------------------------------------- -- line 74 ---------------------------------------- . MANUAL_SLICE_SIZE_CALCULATION, . expr.span, . "manual slice size calculation", . "try", . format!("{sugg}::mem::size_of_val({deref}{val_name})"), . app, . ); . } 217,552 ( 0.01%) } . } . . fn simplify<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { 8 ( 0.00%) let expr1 = expr_or_init(cx, expr1); 52 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (2x) 8 ( 0.00%) let expr2 = expr_or_init(cx, expr2); 250 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (2x) . 16 ( 0.00%) simplify_half(cx, expr1, expr2).or_else(|| simplify_half(cx, expr2, expr1)) 104 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs:clippy_lints::manual_slice_size_calculation::simplify_half (4x) . } . 28 ( 0.00%) fn simplify_half<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { 8 ( 0.00%) if !expr1.span.from_expansion() . // expr1 is `[T1].len()`? 12 ( 0.00%) && let ExprKind::MethodCall(method_path, receiver, [], _) = expr1.kind . && method_path.ident.name == sym::len . && let receiver_ty = cx.typeck_results().expr_ty(receiver) . && let (receiver_ty, refs_count, _) = peel_and_count_ty_refs(receiver_ty) . && let ty::Slice(ty1) = receiver_ty.kind() . // expr2 is `size_of::()`? . && let ExprKind::Call(func, []) = expr2.kind . && let ExprKind::Path(ref func_qpath) = func.kind . && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() -- line 111 ---------------------------------------- -- line 113 ---------------------------------------- . && let Some(ty2) = cx.typeck_results().node_args(func.hir_id).types().next() . // T1 == T2? . && *ty1 == ty2 . { . Some((receiver, refs_count)) . } else { . None . } 36 ( 0.00%) } 8 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . declare_lint_pass!(UnitReturnExpectingOrd => [UNIT_RETURN_EXPECTING_ORD]); . . fn get_trait_predicates_for_trait_ids<'tcx>( . cx: &LateContext<'tcx>, . generics: GenericClauses<'tcx>, . trait_ids: &[Option], // At least 2 ids . ) -> [Vec>; 3] { . debug_assert!(trait_ids.len() >= 2); 7,752 ( 0.00%) let mut preds = [Vec::new(), Vec::new(), Vec::new()]; . for (clause, _) in generics.clauses { 6,985 ( 0.00%) if let ClauseKind::Trait(poly_trait_pred) = clause.kind().skip_binder() { 19,558 ( 0.00%) => ???:::kind (1,397x) . let trait_pred = cx . .tcx 8,722 ( 0.00%) .instantiate_bound_regions_with_erased(clause.kind().rebind(poly_trait_pred)); 160,016 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (1,246x) 17,444 ( 0.00%) => ???:::kind (1,246x) . for (i, tid) in trait_ids.iter().enumerate() { 4,998 ( 0.00%) if let Some(tid) = tid . && *tid == trait_pred.trait_ref.def_id . { . preds[i].push(trait_pred); . } . } . } . } 13,566 ( 0.00%) preds . } . . fn get_projection_pred<'tcx>( . cx: &LateContext<'tcx>, . generics: GenericClauses<'tcx>, . trait_pred: TraitPredicate<'tcx>, . ) -> Option> { . generics.clauses.iter().find_map(|(clause, _)| { 178 ( 0.00%) if let ClauseKind::Projection(pred) = clause.kind().skip_binder() { 420 ( 0.00%) => ???:::kind (30x) 49 ( 0.00%) let projection_pred = cx.tcx.instantiate_bound_regions_with_erased(clause.kind().rebind(pred)); 4,901 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (7x) 98 ( 0.00%) => ???:::kind (7x) 7 ( 0.00%) if projection_pred.projection_term.args == trait_pred.trait_ref.args { 42 ( 0.00%) return Some(projection_pred); . } . } . None . }) . } . . fn get_args_to_check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . args_len: usize, . fn_mut_trait: DefId, . ord_trait: Option, . partial_ord_trait: Option, . ) -> Vec<(usize, Symbol)> { . let mut args_to_check = Vec::new(); 4,845 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 51,259 ( 0.00%) => ???:::type_dependent_def_id (969x) . let fn_sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . let generics = cx.tcx.clauses_of(def_id); 12,597 ( 0.00%) let [fn_mut_preds, ord_preds, partial_ord_preds] = 969 ( 0.00%) get_trait_predicates_for_trait_ids(cx, generics, &[Some(fn_mut_trait), ord_trait, partial_ord_trait]); 969 ( 0.00%) if fn_mut_preds.is_empty() { . return vec![]; . } . . // Trying to call instantiate_bound_regions_with_erased on fn_sig.inputs() gives the following error . // The trait `rustc::ty::TypeFoldable<'_>` is not implemented for . // `&[rustc_middle::ty::Ty<'_>]` 14 ( 0.00%) let inputs_output = cx.tcx.instantiate_bound_regions_with_erased(fn_sig.inputs_and_output()); 4,143 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty>> (7x) . inputs_output . .iter() . .rev() . .skip(1) . .rev() . .enumerate() . .for_each(|(i, inp)| { . for trait_pred in &fn_mut_preds { 28 ( 0.00%) if trait_pred.self_ty() == inp 56 ( 0.00%) && let Some(return_ty_pred) = get_projection_pred(cx, generics, *trait_pred) . { . if ord_preds . .iter() . .any(|ord| Some(ord.self_ty()) == return_ty_pred.term.as_type()) . { . args_to_check.push((i, sym::Ord)); . if args_to_check.len() == args_len - 1 { . break; -- line 118 ---------------------------------------- -- line 125 ---------------------------------------- . if args_to_check.len() == args_len - 1 { . break; . } . } . } . } . }); . } 35 ( 0.00%) args_to_check . } . . fn check_arg<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'tcx>) -> Option<(Span, Option)> { . if let ExprKind::Closure(&Closure { body, fn_decl_span, .. }) = arg.kind . && let ty::Closure(_def_id, args) = &cx.typeck_results().node_type(arg.hir_id).kind() . && let ret_ty = args.as_closure().sig().output() . && let ty = cx.tcx.instantiate_bound_regions_with_erased(ret_ty) . && ty.is_unit() -- line 141 ---------------------------------------- -- line 153 ---------------------------------------- . Some((fn_decl_span, None)) . } . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for UnitReturnExpectingOrd { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 57,068 ( 0.00%) if let ExprKind::MethodCall(_, receiver, args, _) = expr.kind 2,266 ( 0.00%) && args.iter().any(|arg| { . matches!( . arg.peel_blocks().peel_borrows().peel_drop_temps().kind, . ExprKind::Path(_) | ExprKind::Closure(_) . ) . }) 4,845 ( 0.00%) && let Some(fn_mut_trait) = cx.tcx.lang_items().fn_mut_trait() 38,760 ( 0.00%) => ???:::lang_items (969x) . { 3,876 ( 0.00%) let ord_trait = cx.tcx.get_diagnostic_item(sym::Ord); 102,714 ( 0.01%) => ???:::get_diagnostic_item (969x) 1,938 ( 0.00%) let partial_ord_trait = cx.tcx.lang_items().partial_ord_trait(); 38,760 ( 0.00%) => ???:::lang_items (969x) . if (ord_trait, partial_ord_trait) == (None, None) { . return; . } . . let args = std::iter::once(receiver).chain(args.iter()).collect::>(); 1,938 ( 0.00%) let arg_indices = get_args_to_check(cx, expr, args.len(), fn_mut_trait, ord_trait, partial_ord_trait); . for (i, trait_name) in arg_indices { . if let Some((span, last_semi)) = check_arg(cx, args[i]) { . span_lint_and_then( . cx, . UNIT_RETURN_EXPECTING_ORD, . span, . format!( . "this closure returns \ -- line 186 ---------------------------------------- -- line 190 ---------------------------------------- . if let Some(last_semi) = last_semi { . diag.span_help(last_semi, "probably caused by this trailing semicolon"); . } . }, . ); . } . } . } 217,552 ( 0.01%) } . } 17,347 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_hash_one.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . . impl ManualHashOne { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualHashOne { 5,648 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'_>, local: &LetStmt<'_>) { . // `let mut hasher = seg.build_hasher();` 5,210 ( 0.00%) if let PatKind::Binding(BindingMode::MUT, hasher, _, None) = local.pat.kind 402 ( 0.00%) && let Some(init) = local.init 268 ( 0.00%) && !init.span.from_expansion() 331 ( 0.00%) && let ExprKind::MethodCall(seg, build_hasher, [], _) = init.kind 23 ( 0.00%) && seg.ident.name == sym::build_hasher . . && let Node::Stmt(local_stmt) = cx.tcx.parent_hir_node(local.hir_id) . && let Node::Block(block) = cx.tcx.parent_hir_node(local_stmt.hir_id) . . && let mut stmts = block.stmts.iter() . .skip_while(|stmt| stmt.hir_id != local_stmt.hir_id) . .skip(1) . .filter(|&stmt| is_local_used(cx, stmt, hasher)) -- line 77 ---------------------------------------- -- line 121 ---------------------------------------- . ), . ], . Applicability::MachineApplicable, . ); . } . }, . ); . } 5,648 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs -------------------------------------------------------------------------------- Ir -- line 167 ---------------------------------------- . /// assert!(!s.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_str_is_empty", since = "1.39.0")] . #[rustc_no_implicit_autorefs] . #[must_use] . #[inline] . pub const fn is_empty(&self) -> bool { 48,940 ( 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. 3,024 ( 0.00%) if index == 0 { . return true; . } . 6,138 ( 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 . // code on higher opt-levels. See PR #84751 for more details. 5 ( 0.00%) index == self.len() . } else { . self.as_bytes()[index].is_utf8_char_boundary() . } . } . . /// Finds the closest `x` not exceeding `index` where [`is_char_boundary(x)`] is `true`. . /// . /// This method can help you truncate a string so that it's still valid UTF-8, but doesn't -- line 401 ---------------------------------------- -- 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()] 1,680 ( 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)), 794 ( 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 1071 ---------------------------------------- . /// assert_eq!(Some('\u{0306}'), chars.next()); . /// . /// assert_eq!(None, chars.next()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . #[rustc_diagnostic_item = "str_chars"] . pub fn chars(&self) -> Chars<'_> { 6 ( 0.00%) Chars { iter: self.as_bytes().iter() } . } . . /// Returns an iterator over the [`char`]s of a string slice, and their . /// positions. . /// . /// As a string slice consists of valid UTF-8, we can iterate through a . /// string slice by [`char`]. This method returns an iterator of both . /// these [`char`]s, as well as their byte positions. -- line 1087 ---------------------------------------- -- 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 { 1,631 ( 0.00%) pat.is_contained_in(self) 302 ( 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:<&str as core::str::pattern::Pattern>::is_contained_in (6x) . } . . /// 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 1489 ---------------------------------------- . /// let s = "Löwe 老虎 Léopard"; . /// let x: &[_] = &['1', '2']; . /// . /// assert_eq!(s.find(x), None); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn find(&self, pat: P) -> Option { 48,081 ( 0.00%) pat.into_searcher(self).next_match().map(|(i, _)| i) 2,591,329 ( 0.15%) => /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 (16,027x) . } . . /// Returns the byte index for the first character of the last match of the pattern in . /// this string slice. . /// . /// Returns [`None`] if the pattern doesn't match. . /// . /// The [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a -- line 1505 ---------------------------------------- -- line 1663 ---------------------------------------- . /// ``` . /// . /// Use [`split_whitespace`] for this behavior. . /// . /// [`split_whitespace`]: str::split_whitespace . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn split(&self, pat: P) -> Split<'_, P> { 986 ( 0.00%) Split(SplitInternal { . start: 0, . end: self.len(), . matcher: pat.into_searcher(self), . allow_trailing_empty: true, . finished: false, . }) . } . -- line 1679 ---------------------------------------- -- line 1762 ---------------------------------------- . /// assert_eq!(v, ["ghi", "def", "abc"]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn rsplit(&self, pat: P) -> RSplit<'_, P> . where . for<'a> P::Searcher<'a>: ReverseSearcher<'a>, . { 2,559 ( 0.00%) RSplit(self.split(pat).0) . } . . /// Returns an iterator over substrings of the given string slice, separated . /// by characters matched by a pattern. . /// . /// The [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a . /// function or closure that determines if a character matches. . /// -- line 1778 ---------------------------------------- -- line 1977 ---------------------------------------- . /// ``` . /// 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] 4,462 ( 0.00%) pub fn split_once(&self, delimiter: P) -> Option<(&'_ str, &'_ str)> { 487 ( 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. 582 ( 0.00%) unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } 2,910 ( 0.00%) } . . /// Splits the string on the last occurrence of the specified delimiter and . /// returns prefix before delimiter and suffix after delimiter. . /// . /// # Examples . /// . /// ``` . /// assert_eq!("cfg".rsplit_once('='), None); -- line 1997 ---------------------------------------- -- 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 { 104,864 ( 0.01%) self.trim_matches(char::is_whitespace) 661,276 ( 0.04%) => /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> (40,131x) . } . . /// 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 { 8,723 ( 0.00%) self.trim_start_matches(char::is_whitespace) 1,160 ( 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> (40x) . } . . /// 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")] 150,414 ( 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) } 150,414 ( 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")] 18,410 ( 0.00%) pub fn trim_start_matches(&self, pat: P) -> &str { . let mut i = self.len(); . let mut matcher = pat.into_searcher(self); . if let Some((a, _)) = matcher.next_reject() { . i = a; . } . // SAFETY: `Searcher` is known to return valid indices. . unsafe { self.get_unchecked(i..self.len()) } 9,205 ( 0.00%) } . . /// Returns a string slice with the prefix removed. . /// . /// If the string starts with the pattern `prefix`, returns the substring after the prefix, . /// wrapped in `Some`. Unlike [`trim_start_matches`], this method removes the prefix exactly once. . /// . /// If the string does not start with `prefix`, returns `None`. . /// -- line 2440 ---------------------------------------- -- line 2635 ---------------------------------------- . /// A more complex pattern, using a closure: . /// . /// ``` . /// assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo"); . /// ``` . #[must_use = "this returns the trimmed string as a new slice, \ . without modifying the original"] . #[stable(feature = "trim_direction", since = "1.30.0")] 207 ( 0.00%) pub fn trim_end_matches(&self, pat: P) -> &str . where . for<'a> P::Searcher<'a>: ReverseSearcher<'a>, . { . let mut j = 0; . let mut matcher = pat.into_searcher(self); . if let Some((_, b)) = matcher.next_reject_back() { . j = b; . } . // SAFETY: `Searcher` is known to return valid indices. . unsafe { self.get_unchecked(0..j) } 203 ( 0.00%) } . . /// Returns a string slice with all prefixes that match a pattern . /// repeatedly removed. . /// . /// The [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a . /// function or closure that determines if a character matches. . /// . /// [`char`]: prim@char -- line 2662 ---------------------------------------- -- line 3316 ---------------------------------------- . unsafe { from_utf8_unchecked_mut(&mut []) } . } . } . . impl_fn_for_zst! { . /// A nameable, cloneable fn type . #[derive(Clone)] . struct LinesMap impl<'a> Fn = |line: &'a str| -> &'a str { 8,617 ( 0.00%) let Some(line) = line.strip_suffix('\n') else { return line }; . let Some(line) = line.strip_suffix('\r') else { return line }; . line . }; . . #[derive(Clone)] . struct CharEscapeDebugContinue impl Fn = |c: char| -> char::EscapeDebug { . c.escape_debug_ext(EscapeDebugExtArgs { . escape_grapheme_extender: false, -- line 3332 ---------------------------------------- 74,186 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_borrowed_ref.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub NEEDLESS_BORROWED_REFERENCE, . complexity, . "destructuring a reference and borrowing the inner value" . } . . declare_lint_pass!(NeedlessBorrowedRef => [NEEDLESS_BORROWED_REFERENCE]); . . impl<'tcx> LateLintPass<'tcx> for NeedlessBorrowedRef { 46,571 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, ref_pat: &'tcx Pat<'_>) { 13,306 ( 0.00%) if let PatKind::Ref(pat, Pinnedness::Not, Mutability::Not) = ref_pat.kind . && !ref_pat.span.from_expansion() . && cx . .tcx . .hir_parent_iter(ref_pat.hir_id) . .map_while(|(_, parent)| if let Node::Pat(pat) = parent { Some(pat) } else { None }) . // Do not lint patterns that are part of an OR `|` pattern, the binding mode must match in all arms . .all(|pat| !matches!(pat.kind, PatKind::Or(_))) . { -- line 48 ---------------------------------------- -- line 100 ---------------------------------------- . ref_pat, . pat, . fields.iter().map(|field| field.pat), . ); . }, . _ => {}, . } . } 53,224 ( 0.00%) } . } . . fn check_subpatterns<'tcx>( . cx: &LateContext<'tcx>, . message: &'static str, . ref_pat: &Pat<'_>, . pat: &Pat<'_>, . subpatterns: impl IntoIterator>, -- line 116 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub SWAP_PTR_TO_REF, . suspicious, . "call to `mem::swap` using pointer derived references" . } . . declare_lint_pass!(SwapPtrToRef => [SWAP_PTR_TO_REF]); . . impl LateLintPass<'_> for SwapPtrToRef { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 61,431 ( 0.00%) if let ExprKind::Call(fn_expr, [arg1, arg2]) = e.kind 1,460 ( 0.00%) && fn_expr.basic_res().is_diag_item(cx, sym::mem_swap) . && let ctxt = e.span.ctxt() . && let (from_ptr1, arg1_span) = is_ptr_to_ref(cx, arg1, ctxt) . && let (from_ptr2, arg2_span) = is_ptr_to_ref(cx, arg2, ctxt) . && (from_ptr1 || from_ptr2) . { . span_lint_and_then( . cx, . SWAP_PTR_TO_REF, -- line 53 ---------------------------------------- -- line 63 ---------------------------------------- . "use ptr::swap", . format!("core::ptr::swap({snip1}, {snip2})"), . app, . ); . } . }, . ); . } 217,552 ( 0.01%) } . } . . /// Checks if the expression converts a mutable pointer to a mutable reference. If it is, also . /// returns the span of the pointer expression if it's suitable for making a suggestion. . fn is_ptr_to_ref(cx: &LateContext<'_>, e: &Expr<'_>, ctxt: SyntaxContext) -> (bool, Option) { . if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, borrowed_expr) = e.kind . && let ExprKind::Unary(UnOp::Deref, derefed_expr) = borrowed_expr.kind . && cx.typeck_results().expr_ty(derefed_expr).is_raw_ptr() -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/ty_kind.rs -------------------------------------------------------------------------------- Ir -- line 133 ---------------------------------------- . } . } . . /// Defines the kinds of types used by the type system. . /// . /// Types written by the user start out as `hir::TyKind` and get . /// converted to this representation using `::lower_ty`. . #[cfg_attr(feature = "nightly", rustc_diagnostic_item = "IrTyKind")] 27,219 ( 0.00%) #[derive_where(Clone, Copy, Hash, PartialEq; I: Interner)] . #[derive(GenericTypeVisitable)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] . pub enum TyKind { . /// The primitive boolean type. Written as `bool`. . Bool, -- line 149 ---------------------------------------- -- line 1090 ---------------------------------------- . . /// Returns the safety mode. . pub fn safety(self) -> I::Safety { . if self.is_safe() { I::Safety::safe() } else { I::Safety::unsafe_mode() } . } . . /// Do the function arguments end with a C-style variadic argument? . pub fn c_variadic(self) -> bool { 936 ( 0.00%) self.flags & Self::C_VARIADIC_FLAG != 0 . } . . /// Get the index of the splatted argument, if any. . pub fn splatted(self) -> Option { . if self.splatted == Self::NO_SPLATTED_ARG_INDEX { None } else { Some(self.splatted) } . } . } . . #[derive_where(Clone, Copy, PartialEq, Hash; I: Interner)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] 2,108 ( 0.00%) #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] 1,682,976 ( 0.10%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> (1,052x) . pub struct FnSig { . pub inputs_and_output: I::Tys, 2,106 ( 0.00%) #[type_visitable(ignore)] . #[type_foldable(identity)] . pub fn_sig_kind: FnSigKind, . } . . impl Eq for FnSig {} . . impl FnSig { . pub fn inputs(self) -> I::FnInputTys { 3,446 ( 0.00%) self.inputs_and_output.inputs() 70 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs (10x) . } . . pub fn output(self) -> I::Ty { 3,715 ( 0.00%) self.inputs_and_output.output() 20 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output (4x) . } . . pub fn is_fn_trait_compatible(self) -> bool { . !self.c_variadic() && self.safety().is_safe() && self.abi() == ExternAbi::Rust . } . . /// Set the safety flag. . #[must_use = "this method does not modify the receiver"] -- line 1136 ---------------------------------------- -- line 1293 ---------------------------------------- . type Target = ty::Binder; . . fn deref(&self) -> &Self::Target { . &self.0 . } . } . . // This is just a `FnSig` without the `FnHeader` fields. 2 ( 0.00%) #[derive_where(Clone, Copy, Debug, PartialEq, Hash; I: Interner)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] 4 ( 0.00%) #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] 1,978 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::>'2 (2x) . pub struct FnSigTys { . pub inputs_and_output: I::Tys, . } . . impl Eq for FnSigTys {} . . impl FnSigTys { . pub fn inputs(self) -> I::FnInputTys { -- line 1314 ---------------------------------------- 6,376 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_locals.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . pub REDUNDANT_LOCALS, . suspicious, . "redundant redefinition of a local binding" . } . . declare_lint_pass!(RedundantLocals => [REDUNDANT_LOCALS]); . . impl<'tcx> LateLintPass<'tcx> for RedundantLocals { 6,354 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 4,236 ( 0.00%) if !local.span.is_desugaring(DesugaringKind::Async) 68,598 ( 0.00%) => ???:::is_desugaring (706x) . // the pattern is a single by-value binding 7,869 ( 0.00%) && let PatKind::Binding(BindingMode(ByRef::No, mutability), _, ident, None) = local.pat.kind . // the binding is not type-ascribed 639 ( 0.00%) && local.ty.is_none() . // the expression is a resolved path 1,695 ( 0.00%) && let Some(expr) = local.init 1,432 ( 0.00%) && let ExprKind::Path(qpath @ QPath::Resolved(None, path)) = expr.kind . // the path is a single segment equal to the local's name 81 ( 0.00%) && let [last_segment] = path.segments . && last_segment.ident == ident . // resolve the path to its defining binding pattern . && let Res::Local(binding_id) = cx.qpath_res(&qpath, expr.hir_id) . && let Node::Pat(binding_pat) = cx.tcx.hir_node(binding_id) . // the previous binding has the same mutability . && find_binding(binding_pat, ident).is_some_and(|bind| bind.1 == mutability) . // the local does not change the effect of assignments to the binding. see #11290 . && !affects_assignments(cx, mutability, binding_id, local.hir_id) -- line 68 ---------------------------------------- -- line 77 ---------------------------------------- . cx, . REDUNDANT_LOCALS, . local.span, . format!("redundant redefinition of a binding `{ident}`"), . Some(binding_pat.span), . format!("`{ident}` is initially defined here"), . ); . } 5,648 ( 0.00%) } . } . . /// Checks if the enclosing body is a closure and if the given local is captured by value. . /// . /// In those cases, the redefinition may be necessary to force a move: . /// ``` . /// fn assert_static(_: T) {} . /// -- line 93 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::res::{MaybeDef as _, MaybeResPath as _}; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::symbol::sym; . . use super::RC_MUTEX; . 4,752 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 4,752 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Rc, def_id) 36,287 ( 0.00%) => ???:::is_diagnostic_item (594x) 10 ( 0.00%) && let Some(arg) = qpath_generic_tys(qpath).next() 95 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (5x) 20 ( 0.00%) && arg.basic_res().is_diag_item(cx, sym::Mutex) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, RC_MUTEX, hir_ty.span, "usage of `Rc>`", |diag| { . diag.help("consider using `Rc>` or `Arc>` instead"); . }); . return true; . } . . false 3,564 ( 0.00%) } 599 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/missing_const_for_thread_local.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . } . . #[inline] . fn is_thread_local_initializer( . cx: &LateContext<'_>, . fn_kind: intravisit::FnKind<'_>, . span: rustc_span::Span, . ) -> Option { 5,398 ( 0.00%) let macro_def_id = span.source_callee()?.macro_def_id?; 225,328 ( 0.01%) => ???:::source_callee (1,774x) . Some( 2,775 ( 0.00%) cx.tcx.is_diagnostic_item(sym::thread_local_macro, macro_def_id) 49,950 ( 0.00%) => ???:::is_diagnostic_item (925x) . && matches!(fn_kind, intravisit::FnKind::ItemFn(..)), . ) . } . . fn is_unreachable(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . if let Some(macro_call) = macro_backtrace(expr.span).next() . && let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) . { -- line 73 ---------------------------------------- -- line 95 ---------------------------------------- . && let Ok(()) = is_min_const_fn(cx, mir, msrv) . { . return true; . } . false . } . . impl<'tcx> LateLintPass<'tcx> for MissingConstForThreadLocal { 17,740 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: intravisit::FnKind<'tcx>, . _: &'tcx rustc_hir::FnDecl<'tcx>, . body: &'tcx rustc_hir::Body<'tcx>, . span: rustc_span::Span, . local_defid: rustc_span::def_id::LocalDefId, . ) { . let defid = local_defid.to_def_id(); 3,548 ( 0.00%) if is_thread_local_initializer(cx, fn_kind, span).unwrap_or(false) . // Some implementations of `thread_local!` include an initializer fn. . // In the case of a const initializer, the init fn is also const, . // so we can skip the lint in that case. This occurs only on some . // backends due to conditional compilation: . // https://doc.rust-lang.org/src/std/sys/common/thread_local/mod.rs.html . // for details on this issue, see: . // https://github.com/rust-lang/rust-clippy/pull/12276 . && !cx.tcx.is_const_fn(defid) -- line 121 ---------------------------------------- -- line 139 ---------------------------------------- . MISSING_CONST_FOR_THREAD_LOCAL, . unpeeled.span, . "initializer for `thread_local` value can be made `const`", . "replace with", . format!("const {{ {initializer_snippet} }}"), . Applicability::MachineApplicable, . ); . } 14,192 ( 0.00%) } . } 1,774 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/asm_syntax.rs -------------------------------------------------------------------------------- Ir -- line 136 ---------------------------------------- . if let ItemKind::GlobalAsm(inline_asm) = &item.kind { . check_asm_syntax(INLINE_ASM_X86_INTEL_SYNTAX, cx, inline_asm, item.span, AsmStyle::Intel); . } . } . } . . impl EarlyLintPass for InlineAsmX86AttSyntax { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 39,176 ( 0.00%) if let ExprKind::InlineAsm(inline_asm) = &expr.kind { . check_asm_syntax(INLINE_ASM_X86_ATT_SYNTAX, cx, inline_asm, expr.span, AsmStyle::Att); . } . } . . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 6,966 ( 0.00%) if let ItemKind::GlobalAsm(inline_asm) = &item.kind { . check_asm_syntax(INLINE_ASM_X86_ATT_SYNTAX, cx, inline_asm, item.span, AsmStyle::Att); . } . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/manual_midpoint.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_ast::BinOpKind; . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . . use super::MANUAL_MIDPOINT; . 3,938 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . msrv: Msrv, . ) { . let (maybe_add_expr, require_uint) = 2,506 ( 0.00%) if op == BinOpKind::Div && (is_integer_literal(right, 2) || is_float_literal(right, 2.0)) { 20 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_float_literal (2x) . (left, false) 8 ( 0.00%) } else if op == BinOpKind::Mul && is_float_literal(left, 0.5) { 18 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_float_literal (2x) . (right, false) 8 ( 0.00%) } else if op == BinOpKind::Mul && is_float_literal(right, 0.5) { 16 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_float_literal (2x) . (left, false) . } else if op == BinOpKind::Shr && is_integer_literal(right, 1) { . (left, true) . } else { . return; . }; . . if !left.span.from_expansion() -- line 34 ---------------------------------------- -- line 52 ---------------------------------------- . MANUAL_MIDPOINT, . expr.span, . "manual implementation of `midpoint` which can overflow", . format!("use `{left_ty}::midpoint` instead"), . sugg, . app, . ); . } 2,864 ( 0.00%) } . . /// Return the left and right operands if `expr` represents an addition . fn add_operands<'e, 'tcx>(expr: &'e Expr<'tcx>) -> Option<(&'e Expr<'tcx>, &'e Expr<'tcx>)> { . match expr.kind { . ExprKind::Binary(op, left, right) if op.node == BinOpKind::Add => Some((left, right)), . _ => None, . } . } -- line 68 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/from_str_radix_10.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub FROM_STR_RADIX_10, . style, . "from_str_radix with radix 10" . } . . declare_lint_pass!(FromStrRadix10 => [FROM_STR_RADIX_10]); . . impl<'tcx> LateLintPass<'tcx> for FromStrRadix10 { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, exp: &Expr<'tcx>) { 60,964 ( 0.00%) if let ExprKind::Call(maybe_path, [src, radix]) = &exp.kind 2,335 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, pathseg)) = &maybe_path.kind . . // check if the second argument is a primitive `10` . && is_integer_literal(radix, 10) . . // check if the second part of the path indeed calls the associated . // function `from_str_radix` . && pathseg.ident.name == sym::from_str_radix . -- line 56 ---------------------------------------- -- line 79 ---------------------------------------- . FROM_STR_RADIX_10, . exp.span, . "this call to `from_str_radix` can be replaced with a call to `str::parse`", . "try", . format!("{sugg}.parse::<{}>()", prim_ty.name_str()), . Applicability::MaybeIncorrect, . ); . } 217,552 ( 0.01%) } . } . . /// Checks if a Ty is `String` or `&str` . fn is_ty_stringish(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { . ty.is_lang_item(cx, LangItem::String) || ty.peel_refs().is_str() . } 102 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use clippy_utils::consts::{ConstEvalCtxt, Constant}; . use clippy_utils::diagnostics::span_lint_and_help; . use clippy_utils::source::snippet; . use clippy_utils::ty::is_isize_or_usize; . use clippy_utils::{clip, int_bits, unsext}; . . use super::ABSURD_EXTREME_COMPARISONS; . 2,864 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 1,074 ( 0.00%) if let Some((culprit, result)) = detect_absurd_comparison(cx, op, lhs, rhs) { . let msg = "this comparison involving the minimum or maximum element for this \ . type contains a case that is always true or always false"; . . let conclusion = match result { . AbsurdComparisonResult::AlwaysFalse => "this comparison is always false".to_owned(), . AbsurdComparisonResult::AlwaysTrue => "this comparison is always true".to_owned(), . AbsurdComparisonResult::InequalityImpossible => format!( . "the case where the two sides are not equal never occurs, consider using `{} == {}` \ -- line 29 ---------------------------------------- -- line 39 ---------------------------------------- . match culprit.which { . ExtremeType::Minimum => "minimum", . ExtremeType::Maximum => "maximum", . } . ); . . span_lint_and_help(cx, ABSURD_EXTREME_COMPARISONS, expr.span, msg, None, help); . } 2,864 ( 0.00%) } . . enum ExtremeType { . Minimum, . Maximum, . } . . struct ExtremeExpr<'a> { . which: ExtremeType, -- line 55 ---------------------------------------- -- line 58 ---------------------------------------- . . enum AbsurdComparisonResult { . AlwaysFalse, . AlwaysTrue, . InequalityImpossible, . } . . fn is_cast_between_fixed_and_target<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { 1,389 ( 0.00%) if let ExprKind::Cast(cast_exp, _) = expr.kind { 15 ( 0.00%) let precast_ty = cx.typeck_results().expr_ty(cast_exp); 200 ( 0.00%) => ???:::expr_ty (5x) 15 ( 0.00%) let cast_ty = cx.typeck_results().expr_ty(expr); 200 ( 0.00%) => ???:::expr_ty (5x) . 3 ( 0.00%) return is_isize_or_usize(precast_ty) != is_isize_or_usize(cast_ty); . } . . false . } . . fn detect_absurd_comparison<'tcx>( . cx: &LateContext<'tcx>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) -> Option<(ExtremeExpr<'tcx>, AbsurdComparisonResult)> { . use AbsurdComparisonResult::{AlwaysFalse, AlwaysTrue, InequalityImpossible}; . use ExtremeType::{Maximum, Minimum}; . // absurd comparison only makes sense on primitive types . // primitive types don't implement comparison operators with each other 3,938 ( 0.00%) if cx.typeck_results().expr_ty(lhs) != cx.typeck_results().expr_ty(rhs) { 28,764 ( 0.00%) => ???:::expr_ty (716x) . return None; . } . . // comparisons between fix sized types and target sized types are considered unanalyzable 7 ( 0.00%) if is_cast_between_fixed_and_target(cx, lhs) || is_cast_between_fixed_and_target(cx, rhs) { . return None; . } . . let (rel, normalized_lhs, normalized_rhs) = normalize_comparison(op, lhs, rhs)?; . 322 ( 0.00%) let lx = detect_extreme_expr(cx, normalized_lhs); 28,719 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (95x) 351 ( 0.00%) let rx = detect_extreme_expr(cx, normalized_rhs); 23,534 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (95x) . . Some(match rel { . Rel::Lt => { 126 ( 0.00%) match (lx, rx) { . (Some(l @ ExtremeExpr { which: Maximum, .. }), _) => (l, AlwaysFalse), // max < x . (_, Some(r @ ExtremeExpr { which: Minimum, .. })) => (r, AlwaysFalse), // x < min . _ => return None, . } . }, . Rel::Le => { 64 ( 0.00%) match (lx, rx) { . (Some(l @ ExtremeExpr { which: Minimum, .. }), _) => (l, AlwaysTrue), // min <= x . (Some(l @ ExtremeExpr { which: Maximum, .. }), _) => (l, InequalityImpossible), // max <= x . (_, Some(r @ ExtremeExpr { which: Minimum, .. })) => (r, InequalityImpossible), // x <= min . (_, Some(r @ ExtremeExpr { which: Maximum, .. })) => (r, AlwaysTrue), // x <= max . _ => return None, . } . }, . Rel::Ne | Rel::Eq => return None, . }) . } . 1,520 ( 0.00%) fn detect_extreme_expr<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { 380 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 7,612 ( 0.00%) => ???:::expr_ty (190x) . 1,330 ( 0.00%) let cv = ConstEvalCtxt::new(cx).eval(expr)?; 24,628 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (190x) 10,640 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (190x) . 609 ( 0.00%) let which = match (ty.kind(), cv) { . (&ty::Bool, Constant::Bool(false)) | (&ty::Uint(_), Constant::Int(0)) => ExtremeType::Minimum, 75 ( 0.00%) (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MIN >> (128 - int_bits(cx.tcx, ity)), ity) => { 60 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (3x) 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::int_bits (3x) . ExtremeType::Minimum . }, . . (&ty::Bool, Constant::Bool(true)) => ExtremeType::Maximum, 63 ( 0.00%) (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MAX >> (128 - int_bits(cx.tcx, ity)), ity) => { 60 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (3x) 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::int_bits (3x) . ExtremeType::Maximum . }, 190 ( 0.00%) (&ty::Uint(uty), Constant::Int(i)) if clip(cx.tcx, u128::MAX, uty) == i => ExtremeType::Maximum, 446 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (19x) . . _ => return None, . }; . Some(ExtremeExpr { which, expr }) 1,710 ( 0.00%) } 879 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/expl_impl_clone_on_copy.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::ty::{implements_trait, is_copy}; . use rustc_hir::{self as hir, HirId, Item}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, GenericArgKind, Ty}; . . use super::EXPL_IMPL_CLONE_ON_COPY; . . /// Implementation of the `EXPL_IMPL_CLONE_ON_COPY` lint. 16,900 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item: &Item<'_>, . trait_ref: &hir::TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . ) { 6,500 ( 0.00%) let clone_id = match cx.tcx.lang_items().clone_trait() { 52,000 ( 0.00%) => ???:::lang_items (1,300x) 2,824 ( 0.00%) Some(id) if trait_ref.trait_def_id() == Some(id) => id, 16,900 ( 0.00%) => ???:::trait_def_id (1,300x) . _ => return, . }; 1,120 ( 0.00%) let Some(copy_id) = cx.tcx.lang_items().copy_trait() else { 8,960 ( 0.00%) => ???:::lang_items (224x) . return; . }; . let (ty_adt, ty_subs) = match *ty.kind() { . // Unions can't derive clone. 896 ( 0.00%) ty::Adt(adt, subs) if !adt.is_union() => (adt, subs), . _ => return, . }; . // If the current self type doesn't implement Copy (due to generic constraints), search to see if . // there's a Copy impl for any instance of the adt. 1,344 ( 0.00%) if !is_copy(cx, ty) { 2,352,597 ( 0.13%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (224x) . if ty_subs.non_erasable_generics().next().is_some() { 21 ( 0.00%) let has_copy_impl = cx.tcx.local_trait_impls(copy_id).iter().any(|&id| { 52,895 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as core::iter::traits::iterator::Iterator>::any:: (7x) 1,656 ( 0.00%) matches!(cx.tcx.type_of(id).instantiate_identity().skip_norm_wip().kind(), ty::Adt(adt, _) 828 ( 0.00%) if ty_adt.did() == adt.did()) . }); 14 ( 0.00%) if !has_copy_impl { . return; . } . } else { . return; . } . } . // Derive constrains all generic types to requiring Clone. Check if any type is not constrained for . // this impl. 256 ( 0.00%) if ty_subs.types().any(|ty| !implements_trait(cx, ty, clone_id, &[])) { 1,475,425 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (3x) . return; . } . // `#[repr(packed)]` structs with type/const parameters can't derive `Clone`. . // https://github.com/rust-lang/rust-clippy/issues/10188 238 ( 0.00%) if ty_adt.repr().packed() . && ty_subs . .iter() . .any(|arg| matches!(arg.kind(), GenericArgKind::Type(_) | GenericArgKind::Const(_))) . { . return; . } . // The presence of `unsafe` fields prevents deriving `Clone` automatically 238 ( 0.00%) if ty_adt.all_fields().any(|f| f.safety.is_unsafe()) { . return; . } . 952 ( 0.00%) if fulfill_or_allowed(cx, EXPL_IMPL_CLONE_ON_COPY, [adt_hir_id]) { 51,446 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fulfill_or_allowed::<[rustc_hir_id::HirId; 1]> (119x) . return; . } . . span_lint_and_help( . cx, . EXPL_IMPL_CLONE_ON_COPY, . item.span, . "you are implementing `Clone` explicitly on a `Copy` type", . None, . "consider deriving `Clone` or removing `Copy`", . ); 10,400 ( 0.00%) } 1,986 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs -------------------------------------------------------------------------------- Ir -- line 426 ---------------------------------------- . .fresh_float_tys . .get(n as usize) . .copied() . .unwrap_or_else(|| Ty::new_infer(tcx, ty::FreshFloatTy(n))) . } . . #[inline] . pub fn new_param(tcx: TyCtxt<'tcx>, index: u32, name: Symbol) -> Ty<'tcx> { 60 ( 0.00%) Ty::new(tcx, Param(ParamTy { index, name })) . } . . #[inline] . pub fn new_bound( . tcx: TyCtxt<'tcx>, . index: ty::DebruijnIndex, . bound_ty: ty::BoundTy<'tcx>, . ) -> Ty<'tcx> { -- line 442 ---------------------------------------- -- line 489 ---------------------------------------- . ty::AliasTyKind::Opaque { def_id } => { . debug_assert_matches!(tcx.def_kind(def_id), DefKind::OpaqueTy) . } . ty::AliasTyKind::Free { def_id } => { . debug_assert_matches!(tcx.def_kind(def_id), DefKind::TyAlias) . } . } . } 438 ( 0.00%) Ty::new(tcx, Alias(is_rigid, alias_ty)) . } . . #[inline] . pub fn new_pat(tcx: TyCtxt<'tcx>, base: Ty<'tcx>, pat: ty::Pattern<'tcx>) -> Ty<'tcx> { . Ty::new(tcx, Pat(base, pat)) . } . . #[inline] -- line 505 ---------------------------------------- -- line 604 ---------------------------------------- . . #[inline] . pub fn new_ref( . tcx: TyCtxt<'tcx>, . r: Region<'tcx>, . ty: Ty<'tcx>, . mutbl: ty::Mutability, . ) -> Ty<'tcx> { 49 ( 0.00%) Ty::new(tcx, Ref(r, ty, mutbl)) . } . . #[inline] . pub fn new_mut_ref(tcx: TyCtxt<'tcx>, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { . Ty::new_ref(tcx, r, ty, hir::Mutability::Mut) . } . . #[inline] -- line 620 ---------------------------------------- -- line 679 ---------------------------------------- . | DefKind::GlobalAsm . | DefKind::Impl { .. } . | DefKind::Closure . | DefKind::SyntheticCoroutineBody => { . bug!("not an adt: {def:?} ({:?})", tcx.def_kind(def.did())) . } . } . } 8 ( 0.00%) Ty::new(tcx, Adt(def, args)) . } . . #[inline] . pub fn new_foreign(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx> { . Ty::new(tcx, Foreign(def_id)) . } . . #[inline] -- line 695 ---------------------------------------- -- line 703 ---------------------------------------- . ty: Ty<'tcx>, . ct: ty::Const<'tcx>, . ) -> Ty<'tcx> { . Ty::new(tcx, Array(ty, ct)) . } . . #[inline] . pub fn new_slice(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { 6 ( 0.00%) Ty::new(tcx, Slice(ty)) . } . . #[inline] . pub fn new_tup(tcx: TyCtxt<'tcx>, ts: &[Ty<'tcx>]) -> Ty<'tcx> { . if ts.is_empty() { tcx.types.unit } else { Ty::new(tcx, Tuple(tcx.mk_type_list(ts))) } . } . . pub fn new_tup_from_iter(tcx: TyCtxt<'tcx>, iter: I) -> T::Output -- line 719 ---------------------------------------- -- line 1152 ---------------------------------------- . // noticeable performance hit. See #126069 for details. . #[inline(always)] . pub fn kind(self) -> &'tcx TyKind<'tcx> { . self.0.0 . } . . #[inline] . pub fn is_unit(self) -> bool { 11,282 ( 0.00%) match self.kind() { 124 ( 0.00%) Tuple(tys) => tys.is_empty(), . _ => false, . } . } . . /// Check if type is an `usize`. . #[inline] . pub fn is_usize(self) -> bool { . matches!(self.kind(), Uint(UintTy::Usize)) -- line 1169 ---------------------------------------- -- line 1172 ---------------------------------------- . /// Check if type is an `usize` or an integral type variable. . #[inline] . pub fn is_usize_like(self) -> bool { . matches!(self.kind(), Uint(UintTy::Usize) | Infer(IntVar(_))) . } . . #[inline] . pub fn is_never(self) -> bool { 3,157 ( 0.00%) matches!(self.kind(), Never) . } . . #[inline] . pub fn is_primitive(self) -> bool { 115 ( 0.00%) matches!(self.kind(), Bool | Char | Int(_) | Uint(_) | Float(_)) . } . . #[inline] . pub fn is_adt(self) -> bool { . matches!(self.kind(), Adt(..)) . } . . #[inline] . pub fn is_ref(self) -> bool { 396 ( 0.00%) matches!(self.kind(), Ref(..)) . } . . #[inline] . pub fn is_ty_var(self) -> bool { . matches!(self.kind(), Infer(TyVar(_))) . } . . #[inline] -- line 1203 ---------------------------------------- -- line 1218 ---------------------------------------- . . #[inline] . pub fn is_ty_or_numeric_infer(self) -> bool { . matches!(self.kind(), Infer(_)) . } . . #[inline] . pub fn is_phantom_data(self) -> bool { 3,450 ( 0.00%) if let Adt(def, _) = self.kind() { def.is_phantom_data() } else { false } . } . . #[inline] . pub fn is_unsafe_cell(self) -> bool { . if let Adt(def, _) = self.kind() { def.is_unsafe_cell() } else { false } . } . . #[inline] . pub fn is_bool(self) -> bool { 2,244 ( 0.00%) *self.kind() == Bool 44 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs: as core::cmp::PartialEq>::eq (7x) . } . . /// Returns `true` if this type is a `str`. . #[inline] . pub fn is_str(self) -> bool { 92 ( 0.00%) *self.kind() == Str 22 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs: as core::cmp::PartialEq>::eq (3x) . } . . /// Returns true if this type is `&str`. The reference's lifetime is ignored. . #[inline] . pub fn is_imm_ref_str(self) -> bool { . matches!(self.kind(), ty::Ref(_, inner, hir::Mutability::Not) if inner.is_str()) . } . . #[inline] . pub fn is_param(self, index: u32) -> bool { 16 ( 0.00%) match self.kind() { 16 ( 0.00%) ty::Param(data) => data.index == index, . _ => false, . } . } . . #[inline] . pub fn is_slice(self) -> bool { . matches!(self.kind(), Slice(_)) . } -- line 1262 ---------------------------------------- -- line 1345 ---------------------------------------- . .try_to_target_usize(tcx) . .expect("expected SIMD field to have definite array size"), . *f0_elem_ty, . ) . } . . #[inline] . pub fn is_mutable_ptr(self) -> bool { 8 ( 0.00%) matches!(self.kind(), RawPtr(_, hir::Mutability::Mut) | Ref(_, _, hir::Mutability::Mut)) . } . . /// Get the mutability of the reference or `None` when not a reference . #[inline] . pub fn ref_mutability(self) -> Option { . match self.kind() { . Ref(_, _, mutability) => Some(*mutability), . _ => None, . } . } . . #[inline] . pub fn is_raw_ptr(self) -> bool { 243 ( 0.00%) matches!(self.kind(), RawPtr(_, _)) . } . . /// Tests if this is any kind of primitive pointer type (reference, raw pointer, fn pointer). . /// `Box` is *not* considered a pointer here! . #[inline] . pub fn is_any_ptr(self) -> bool { . self.is_ref() || self.is_raw_ptr() || self.is_fn_ptr() . } -- line 1375 ---------------------------------------- -- line 1461 ---------------------------------------- . | RawPtr(_, _) . | Infer(IntVar(_) | FloatVar(_)) . ) . } . . /// Returns `true` if this type is a floating point type. . #[inline] . pub fn is_floating_point(self) -> bool { 94 ( 0.00%) matches!(self.kind(), Float(_) | Infer(FloatVar(_))) . } . . #[inline] . pub fn is_trait(self) -> bool { . matches!(self.kind(), Dynamic(_, _)) . } . . #[inline] . pub fn is_enum(self) -> bool { 8 ( 0.00%) matches!(self.kind(), Adt(adt_def, _) if adt_def.is_enum()) . } . . #[inline] . pub fn is_union(self) -> bool { . matches!(self.kind(), Adt(adt_def, _) if adt_def.is_union()) . } . . #[inline] -- line 1487 ---------------------------------------- -- line 1496 ---------------------------------------- . . #[inline] . pub fn is_coroutine_closure(self) -> bool { . matches!(self.kind(), CoroutineClosure(..)) . } . . #[inline] . pub fn is_integral(self) -> bool { 2,121 ( 0.00%) matches!(self.kind(), Infer(IntVar(_)) | Int(_) | Uint(_)) . } . . #[inline] . pub fn is_fresh_ty(self) -> bool { . matches!(self.kind(), Infer(FreshTy(_))) . } . . #[inline] -- line 1512 ---------------------------------------- -- line 1521 ---------------------------------------- . . #[inline] . pub fn is_numeric(self) -> bool { . self.is_integral() || self.is_floating_point() . } . . #[inline] . pub fn is_signed(self) -> bool { 36 ( 0.00%) matches!(self.kind(), Int(_)) . } . . #[inline] . pub fn is_ptr_sized_integral(self) -> bool { 12 ( 0.00%) matches!(self.kind(), Int(ty::IntTy::Isize) | Uint(ty::UintTy::Usize)) . } . . #[inline] . pub fn has_concrete_skeleton(self) -> bool { . !matches!(self.kind(), Param(_) | Infer(_) | Error(_)) . } . . /// Checks whether a type recursively contains another type -- line 1542 ---------------------------------------- -- line 1630 ---------------------------------------- . . #[tracing::instrument(level = "trace", skip(tcx))] . pub fn unnormalized_fn_sig(self, tcx: TyCtxt<'tcx>) -> ty::Unnormalized<'tcx, PolyFnSig<'tcx>> { . self.kind().unnormalized_fn_sig(tcx) . } . . #[inline] . pub fn is_fn(self) -> bool { 549 ( 0.00%) matches!(self.kind(), FnDef(..) | FnPtr(..)) . } . . #[inline] . pub fn is_fn_ptr(self) -> bool { . matches!(self.kind(), FnPtr(..)) . } . . #[inline] . pub fn is_opaque(self) -> bool { 152 ( 0.00%) matches!(self.kind(), Alias(_, ty::AliasTy { kind: ty::Opaque { .. }, .. })) . } . . #[inline] . pub fn ty_adt_def(self) -> Option> { 21,409 ( 0.00%) match self.kind() { 9,549 ( 0.00%) Adt(adt, _) => Some(*adt), . _ => None, . } . } . . /// Returns a list of tuple type arguments. . /// . /// Panics when called on anything but a tuple. . #[inline] . pub fn tuple_fields(self) -> &'tcx List> { 12 ( 0.00%) match self.kind() { 6 ( 0.00%) Tuple(args) => args, . _ => bug!("tuple_fields called on non-tuple: {self:?}"), . } . } . . /// Returns a list of tuple type arguments, or `None` if `self` isn't a tuple. . #[inline] . pub fn opt_tuple_fields(self) -> Option<&'tcx List>> { . match self.kind() { -- line 1673 ---------------------------------------- 190 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . use rustc_hir::intravisit::{Visitor, walk_expr}; . use rustc_hir::{Closure, Expr, ExprKind, HirId, LetStmt, Mutability, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::hir::nested_filter::OnlyBodies; . use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; . use rustc_span::Symbol; . use rustc_span::symbol::sym; . 123,326 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 30 ( 0.00%) if let Some(higher::WhileLet { if_then, let_pat, let_expr, label, .. }) = higher::WhileLet::hir(expr) . // check for `Some(..)` pattern 18 ( 0.00%) && let Some(some_pat) = as_some_pattern(cx, let_pat) 1,138 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::as_some_pattern (6x) . // check for call to `Iterator::next` 13 ( 0.00%) && let ExprKind::MethodCall(method_name, iter_expr, [], _) = let_expr.kind 1 ( 0.00%) && method_name.ident.name == sym::next . && cx.ty_based_def(let_expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) . && let Some(iter_expr_struct) = try_parse_iter_expr(cx, iter_expr) . // get the loop containing the match expression . && !uses_iter(cx, &iter_expr_struct, if_then) . { . let mut applicability = Applicability::MachineApplicable; . . let loop_label = label.map_or(String::new(), |l| format!("{}: ", l.ident.name)); -- line 33 ---------------------------------------- -- line 61 ---------------------------------------- . WHILE_LET_ON_ITERATOR, . expr.span.with_hi(let_expr.span.hi()), . "this loop could be written as a `for` loop", . "try", . format!("{loop_label}for {loop_var} in {iterator_by_ref}"), . applicability, . ); . } 140,944 ( 0.01%) } . . #[derive(Debug)] . struct IterExpr { . /// The fields used, in order of child to parent. . fields: Vec, . /// The path being used. . path: Res, . /// Whether or not the iterator can be moved. -- line 77 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . . pub struct MacroBraces { . macro_braces: (FxHashMap, usize), . /// Spans for statement macro calls, they have special behaviour with semicolons . mac_stmt_spans: Vec, . } . . impl MacroBraces { 352 ( 0.00%) pub fn new(conf: &'static Conf) -> Self { 176 ( 0.00%) Self { . macro_braces: macro_braces(&conf.standard_macro_braces), . mac_stmt_spans: Vec::new(), . } 396 ( 0.00%) } . } . . impl EarlyLintPass for MacroBraces { 5,600 ( 0.00%) fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) { . if let Some(last_segment) = mac.path.segments.last() 800 ( 0.00%) && let name = last_segment.ident.as_str() 25,600 ( 0.00%) => ???:::as_str (800x) 120 ( 0.00%) && let Some(&braces) = self.macro_braces.0.get(name) 480 ( 0.00%) && let Some(snip) = snippet_opt(cx.sess(), mac.span().with_lo(last_segment.span().lo())) 6,120 ( 0.00%) => ???:::span (40x) 200 ( 0.00%) => ???:::span (40x) 80 ( 0.00%) && let Some(macro_args_str) = &snip.strip_prefix(name).and_then(|snip| snip.strip_prefix('!')) 104 ( 0.00%) && let Some(old_open_brace @ ('{' | '(' | '[')) = macro_args_str.trim_start().chars().next() 80 ( 0.00%) && old_open_brace != braces.0 . { . // Semicolons added for statements that previously ended in braces, see issue #9913 . let add_semi = self.mac_stmt_spans.iter().any(|s| *s == mac.span()); . emit_help( . cx, . &snippet_opt(cx.sess(), mac.span()).unwrap(), . braces, . mac.span(), . add_semi, . ); . } 6,400 ( 0.00%) } . . // See issue #9913 . fn check_stmt(&mut self, _: &EarlyContext<'_>, stmt: &ast::Stmt) { 15,520 ( 0.00%) if let ast::StmtKind::MacCall(mac_callstmt) = &stmt.kind 118 ( 0.00%) && let ast::MacCallStmt { . style: ast::MacStmtStyle::Braces, . .. 59 ( 0.00%) } = **mac_callstmt . { . self.mac_stmt_spans.push(mac_callstmt.mac.span()); . } 3,749 ( 0.00%) } . . fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacroDef) { 17,570 ( 0.00%) fn check_ts(cx: &EarlyContext<'_>, ts: &TokenStream, macro_braces: &FxHashMap) { . for (i, current_token) in ts.iter().enumerate() { 29,421 ( 0.00%) if let TokenTree::Delimited(_, _, _, token_stream) = current_token { . // Peel extra braces and parenthesis in macros! 7,257 ( 0.00%) check_ts(cx, token_stream, macro_braces); 318,086 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts'2 (802x) . } else . // |-TokenKind::Bang . // v . // println! { "Hi" } . // ^^^^^^^ . // | ^^^^^^^^ Brackets always come 1 token after TokenKind::Bang . // ident_token 22,164 ( 0.00%) if let TokenTree::Token( . Token { . kind: TokenKind::Ident(ident_token, _), . span: ident_span, . }, . _, . ) = current_token . && let Some(bang_token) = ts.get(i + 1) 4,116 ( 0.00%) && let Some(macro_args_token) = ts.get(i + 2) 13,350 ( 0.00%) && let TokenTree::Token( . Token { . kind: TokenKind::Bang, .. . }, . _, . ) = *bang_token 252 ( 0.00%) && let TokenTree::Delimited(delim_span, _, delim, _) = macro_args_token . // Span from ident_token to brackets (so, the full macro call) 630 ( 0.00%) && let snip_span = ident_span.with_hi(delim_span.close.hi()) 378 ( 0.00%) && let Some(snip) = snippet_opt(cx, snip_span) . && let Some(&braces) = macro_braces.get(ident_token.as_str()) . && let Some(old_open_brace) = match delim { . Delimiter::Brace => Some('{'), . Delimiter::Parenthesis => Some('('), . Delimiter::Bracket => Some('['), . Delimiter::Invisible(_) => None, . } . && old_open_brace != braces.0 . { . emit_help(cx, &snip, braces, snip_span, false); . } . } 20,080 ( 0.00%) } . 182 ( 0.00%) if mac.macro_rules { 455 ( 0.00%) check_ts(cx, &mac.body.tokens, &self.macro_braces.0); 166,610 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts (41x) . } . } . } . . fn emit_help(cx: &EarlyContext<'_>, snip: &str, (open, close): (char, char), span: Span, add_semi: bool) { . let semi = if add_semi { ";" } else { "" }; . if let Some((macro_name, macro_args_str)) = snip.split_once('!') { . let mut macro_args = macro_args_str.trim().to_string(); -- line 144 ---------------------------------------- -- line 154 ---------------------------------------- . format!("{macro_name}!{open}{macro_args}{close}{semi}"), . Applicability::MachineApplicable, . ); . } . } . . fn macro_braces(conf: &[MacroMatcher]) -> (FxHashMap, usize) { . // TODO: Use `Symbol`s here, instead of strings. 88 ( 0.00%) let mut braces = FxHashMap::from_iter( 81,978 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs: as core::iter::traits::collect::FromIterator<(alloc::string::String, (char, char))>>::from_iter::<[(alloc::string::String, (char, char)); 13]> (44x) 2,508 ( 0.00%) [ . ("assert_matches", ('(', ')')), . ("cfg_select", ('{', '}')), . ("debug_assert_matches", ('(', ')')), . ("format", ('(', ')')), . ("format_args", ('(', ')')), . ("eprint", ('(', ')')), . ("eprintln", ('(', ')')), . ("print", ('(', ')')), -- line 171 ---------------------------------------- -- line 188 ---------------------------------------- . )] . #[expect(clippy::redundant_closure_for_method_calls, reason = "Clarity")] . let max_len = braces . .keys() . .map(|macro_name| macro_name.len()) . .max() . .expect("`braces` is non-empty"); . 176 ( 0.00%) (braces, max_len) . } 5,003 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . . declare_lint_pass!(EtaReduction => [ . REDUNDANT_CLOSURE, . REDUNDANT_CLOSURE_FOR_METHOD_CALLS, . ]); . . impl<'tcx> LateLintPass<'tcx> for EtaReduction { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 104,880 ( 0.01%) if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind { . for arg in args { 3,531 ( 0.00%) check_closure(cx, Some(receiver), arg); 63,403 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (1,177x) . } . } 9,864 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { 9,864 ( 0.00%) check_closure(cx, None, func); 59,184 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (3,288x) . for arg in args { 12,057 ( 0.00%) check_closure(cx, None, arg); 72,342 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (4,019x) . } . } . } . } . . #[expect(clippy::too_many_lines)] 67,872 ( 0.00%) fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) { 17,049 ( 0.00%) let body = if let ExprKind::Closure(c) = expr.kind 230 ( 0.00%) && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) 162 ( 0.00%) && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_)) 162 ( 0.00%) && !expr.span.from_expansion() . { 486 ( 0.00%) cx.tcx.hir_body(c.body) 6,552 ( 0.00%) => ???:::hir_body (81x) . } else { . return; . }; . 243 ( 0.00%) if body.value.span.from_expansion() { . if body.params.is_empty() . && let Some(VecArgs::Vec(&[])) = VecArgs::hir(cx, body.value) . { . let vec_crate = if is_no_std_crate(cx) { "alloc" } else { "std" }; . // replace `|| vec![]` with `Vec::new` . span_lint_hir_and_then( . cx, . REDUNDANT_CLOSURE, -- line 109 ---------------------------------------- -- line 119 ---------------------------------------- . ); . }, . ); . } . // skip `foo(|| macro!())` . return; . } . 405 ( 0.00%) if is_adjusted(cx, body.value) { 3,531 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_adjusted (81x) . return; . } . . let typeck = cx.typeck_results(); 243 ( 0.00%) let closure = if let ty::Closure(_, closure_subs) = typeck.expr_ty(expr).kind() { 3,252 ( 0.00%) => ???:::expr_ty (81x) 81 ( 0.00%) closure_subs.as_closure() . } else { . return; . }; 486 ( 0.00%) let closure_sig = cx.tcx.signature_unclosure(closure.sig(), Safety::Safe).skip_binder(); 16,501 ( 0.00%) => ???:::signature_unclosure (81x) 4,050 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/ty_kind/closure.rs:>::sig (81x) 458 ( 0.00%) match body.value.kind { 112 ( 0.00%) ExprKind::Call(callee, args) 28 ( 0.00%) if matches!( 14 ( 0.00%) callee.kind, . ExprKind::Path(QPath::Resolved(..) | QPath::TypeRelative(..)) . ) => . { 42 ( 0.00%) let callee_ty_raw = typeck.expr_ty(callee); 560 ( 0.00%) => ???:::expr_ty (14x) . let callee_ty = callee_ty_raw.peel_refs(); . if matches!(callee_ty.opt_diag_name(cx), Some(sym::Arc | sym::Rc)) 126 ( 0.00%) || !check_inputs(typeck, body.params, None, args) 376 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_inputs (14x) . { . return; . } . . let callee_ty_adjustments = typeck.expr_adjustments(callee); . let callee_ty_adjusted = callee_ty_adjustments.last().map_or(callee_ty, |a| a.target); . . let sig = match *callee_ty_adjusted.kind() { -- line 156 ---------------------------------------- -- line 257 ---------------------------------------- . snippet, . Applicability::MachineApplicable, . ); . } . }, . ); . } . }, 126 ( 0.00%) ExprKind::MethodCall(path, self_, args, _) if check_inputs(typeck, body.params, Some(self_), args) => { 636 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_inputs (14x) . if let Some(method_def_id) = typeck.type_dependent_def_id(body.value.hir_id) . && !find_attr!(cx.tcx, method_def_id, TrackCaller(..)) . && check_sig(closure_sig, cx.tcx.fn_sig(method_def_id).skip_binder().skip_binder()) . { . let mut app = Applicability::MachineApplicable; . let generic_args = match path.args.and_then(GenericArgs::span_ext) { . Some(span) => format!("::{}", snippet_with_applicability(cx, span, "<..>", &mut app)), . None => String::new(), -- line 273 ---------------------------------------- -- line 289 ---------------------------------------- . app, . ); . }, . ); . } . }, . _ => (), . } 67,872 ( 0.00%) } . 224 ( 0.00%) fn check_inputs( . typeck: &TypeckResults<'_>, . params: &[Param<'_>], . self_arg: Option<&Expr<'_>>, . args: &[Expr<'_>], . ) -> bool { 140 ( 0.00%) params.len() == self_arg.map_or(0, |_| 1) + args.len() . && params.iter().zip(self_arg.into_iter().chain(args)).all(|(p, arg)| { 30 ( 0.00%) matches!( 10 ( 0.00%) p.pat.kind, . PatKind::Binding(BindingMode::NONE, id, _, None) 2 ( 0.00%) if arg.res_local_id() == Some(id) . ) . // Only allow adjustments which change regions (i.e. re-borrowing). . && typeck 6 ( 0.00%) .expr_adjustments(arg) 86 ( 0.00%) => ???:::expr_adjustments (2x) . .last() 6 ( 0.00%) .is_none_or(|a| a.target == typeck.expr_ty(arg)) 80 ( 0.00%) => ???:::expr_ty (2x) . }) 224 ( 0.00%) } . . fn check_sig<'tcx>(closure_sig: FnSig<'tcx>, call_sig: FnSig<'tcx>) -> bool { . call_sig.safety().is_safe() && !has_late_bound_to_non_late_bound_regions(closure_sig, call_sig) . } . . /// This walks through both signatures and checks for any time a late-bound region is expected by an . /// `impl Fn` type, but the target signature does not have a late-bound region in the same position. . /// -- line 326 ---------------------------------------- 5,536 ( 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/chain.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . // . // Only the "first" iterator is actually set `None` when exhausted, depending on whether you . // iterate forward or backward. If you mix directions, then both sides may be `None`. . a: Option, . b: Option, . } . impl Chain { . pub(in super::super) const fn new(a: A, b: B) -> Chain { 10,745 ( 0.00%) Chain { a: Some(a), b: Some(b) } . } . } . . /// Converts the arguments to iterators and links them together, in a chain. . /// . /// See the documentation of [`Iterator::chain`] for more. . /// . /// # Examples -- line 45 ---------------------------------------- -- line 73 ---------------------------------------- . impl Iterator for Chain . where . A: Iterator, . B: Iterator, . { . type Item = A::Item; . . #[inline] 813 ( 0.00%) fn next(&mut self) -> Option { 1,009 ( 0.00%) and_then_or_clear(&mut self.a, Iterator::next).or_else(|| self.b.as_mut()?.next()) 821 ( 0.00%) } . . #[inline] . #[rustc_inherit_overflow_checks] . fn count(self) -> usize { . let a_count = match self.a { . Some(a) => a.count(), . None => 0, . }; . let b_count = match self.b { . Some(b) => b.count(), . None => 0, . }; . a_count + b_count . } . 1,768 ( 0.00%) fn try_fold(&mut self, mut acc: Acc, mut f: F) -> R . where . Self: Sized, . F: FnMut(Acc, Self::Item) -> R, . R: Try, . { 663 ( 0.00%) if let Some(ref mut a) = self.a { . acc = a.try_fold(acc, &mut f)?; . self.a = None; . } . if let Some(ref mut b) = self.b { . acc = b.try_fold(acc, f)?; . // we don't fuse the second iterator . } . try { acc } 2,210 ( 0.00%) } . . fn fold(self, mut acc: Acc, mut f: F) -> Acc . where . F: FnMut(Acc, Self::Item) -> Acc, . { 3,645 ( 0.00%) if let Some(a) = self.a { . acc = a.fold(acc, &mut f); . } 1,706 ( 0.00%) if let Some(b) = self.b { . acc = b.fold(acc, f); . } . acc . } . . #[inline] . fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { . if let Some(ref mut a) = self.a { -- line 131 ---------------------------------------- -- line 175 ---------------------------------------- . // Must exhaust a before b. . let a_last = self.a.and_then(Iterator::last); . let b_last = self.b.and_then(Iterator::last); . b_last.or(a_last) . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { 15,433 ( 0.00%) match self { . Chain { a: Some(a), b: Some(b) } => { . let (a_lower, a_upper) = a.size_hint(); 1,707 ( 0.00%) let (b_lower, b_upper) = b.size_hint(); . . let lower = a_lower.saturating_add(b_lower); . . let upper = match (a_upper, b_upper) { . (Some(x), Some(y)) => x.checked_add(y), . _ => None, . }; . -- line 194 ---------------------------------------- -- line 325 ---------------------------------------- . fn default() -> Self { . Chain::new(Default::default(), Default::default()) . } . } . . #[inline] . fn and_then_or_clear(opt: &mut Option, f: impl FnOnce(&mut T) -> Option) -> Option { . let x = f(opt.as_mut()?); 2,448 ( 0.00%) if x.is_none() { 4,195 ( 0.00%) *opt = None; . } . x . } 13,692 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . . #[derive(Default)] . pub struct MainRecursion { . has_no_std_attr: bool, . } . . impl LateLintPass<'_> for MainRecursion { . fn check_crate(&mut self, cx: &LateContext<'_>) { 3 ( 0.00%) self.has_no_std_attr = is_no_std_crate(cx); 1,598 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_no_std_crate (1x) . } . 108,776 ( 0.01%) fn check_expr_post(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 115,352 ( 0.01%) if self.has_no_std_attr { . return; . } . . if let ExprKind::Call(func, []) = &expr.kind 1,165 ( 0.00%) && let ExprKind::Path(QPath::Resolved(_, path)) = &func.kind 13 ( 0.00%) && let Some(def_id) = path.res.opt_def_id() 60 ( 0.00%) && is_entrypoint_fn(cx, def_id) 768 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn (12x) . { . span_lint_and_help( . cx, . MAIN_RECURSION, . func.span, . format!("recursing into entrypoint `{}`", snippet(cx, func.span, "main")), . None, . "consider using another function for this recursion", . ); . } 135,970 ( 0.01%) } . } 12 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format_args.rs -------------------------------------------------------------------------------- Ir -- line 321 ---------------------------------------- . ty_msrv_map: FxHashMap, Option>, . has_derived_debug: FxHashMap, bool>, . has_pointer_format: FxHashMap, bool>, . } . . impl<'tcx> FormatArgs<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf, format_args: FormatArgsStorage) -> Self { . let ty_msrv_map = make_ty_msrv_map(tcx); 13 ( 0.00%) Self { . format_args, . msrv: conf.msrv.into(), 1 ( 0.00%) ignore_mixed: conf.allow_mixed_uninlined_format_args, . ty_msrv_map, . has_derived_debug: FxHashMap::default(), . has_pointer_format: FxHashMap::default(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FormatArgs<'tcx> { 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 2,196 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 2,196 ( 0.00%) && is_format_macro(cx, macro_call.def_id) 202,012 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro (366x) 592 ( 0.00%) && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) 458,958 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (74x) . { 460 ( 0.00%) let mut linter = FormatArgsExpr { . cx, . expr, . macro_call: ¯o_call, . format_args, 46 ( 0.00%) ignore_mixed: self.ignore_mixed, . msrv: &self.msrv, 46 ( 0.00%) ty_msrv_map: &self.ty_msrv_map, 46 ( 0.00%) has_derived_debug: &mut self.has_derived_debug, 46 ( 0.00%) has_pointer_format: &mut self.has_pointer_format, . }; . . linter.check_trailing_comma(); . linter.check_templates(); . 276 ( 0.00%) if self.msrv.meets(cx, msrvs::FORMAT_ARGS_CAPTURE) { 1,242 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (46x) . linter.check_uninlined_args(); . } . } 217,552 ( 0.01%) } . } . . struct FormatArgsExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . macro_call: &'a MacroCall, . format_args: &'a rustc_ast::FormatArgs, . ignore_mixed: bool, -- line 373 ---------------------------------------- -- line 375 ---------------------------------------- . ty_msrv_map: &'a FxHashMap, Option>, . has_derived_debug: &'a mut FxHashMap, bool>, . has_pointer_format: &'a mut FxHashMap, bool>, . } . . impl<'tcx> FormatArgsExpr<'_, 'tcx> { . /// Check if there is a comma after the last format macro arg. . fn check_trailing_comma(&self) { 46 ( 0.00%) let span = self.macro_call.span; 322 ( 0.00%) if let Some(src) = span.get_text(self.cx) 46 ( 0.00%) && let Some(src) = src.strip_suffix([')', ']', '}']) 1,150 ( 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:::deref (46x) . && let src = src.trim_end_matches(|c: char| c.is_whitespace() && c != '\n') . && let Some(src) = src.strip_suffix(',') . && let src = src.trim_end_matches(|c: char| c.is_whitespace() && c != '\n') . && !src.ends_with('\n') . { . span_lint_and_sugg( . self.cx, . UNNECESSARY_TRAILING_COMMA, -- line 393 ---------------------------------------- -- line 397 ---------------------------------------- . "remove the trailing comma", . String::new(), . Applicability::MachineApplicable, . ); . } . } . . fn check_templates(&mut self) { 46 ( 0.00%) for piece in &self.format_args.template { 194 ( 0.00%) if let FormatArgsPiece::Placeholder(placeholder) = piece 30 ( 0.00%) && let Ok(index) = placeholder.argument.index 30 ( 0.00%) && let Some(arg) = self.format_args.arguments.all_args().get(index) 120 ( 0.00%) && let Some(arg_expr) = find_format_arg_expr(self.expr, arg) 33,882 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_format_arg_expr (30x) . { 30 ( 0.00%) self.check_unused_format_specifier(placeholder, arg_expr); 30 ( 0.00%) self.check_useless_format_width(placeholder); 120 ( 0.00%) self.check_useless_borrows_in_formatting(placeholder, arg_expr); 28,472 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::check_useless_borrows_in_formatting (30x) . . // Check width and precision arguments the same way as the value . for opt in [&placeholder.format_options.width, &placeholder.format_options.precision] { . if let Some(FormatCount::Argument(position)) = opt.as_ref() . && let Ok(pos_index) = position.index . && let Some(pos_arg) = self.format_args.arguments.all_args().get(pos_index) . && let Some(pos_arg_expr) = find_format_arg_expr(self.expr, pos_arg) . { . self.check_useless_borrows_in_formatting(placeholder, pos_arg_expr); . } . } . 8 ( 0.00%) if placeholder.format_trait == Display 135 ( 0.00%) && placeholder.format_options == FormatOptions::default() 1,215 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/format.rs:::eq (27x) 27 ( 0.00%) && !self.is_aliased(index) . { 135 ( 0.00%) let name = self.cx.tcx.item_name(self.macro_call.def_id); 108 ( 0.00%) self.check_format_in_format_args(name, arg_expr); 54 ( 0.00%) self.check_to_string_in_format_args(name, arg_expr); . } . . if placeholder.format_trait == Debug { 10 ( 0.00%) let name = self.cx.tcx.item_name(self.macro_call.def_id); . self.check_unnecessary_debug_formatting(name, arg_expr); 6 ( 0.00%) if let Some(span) = placeholder.span 16 ( 0.00%) && self.has_pointer_debug(self.cx.typeck_results().expr_ty(arg_expr), 0) 470 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::has_pointer_debug (2x) 80 ( 0.00%) => ???:::expr_ty (2x) . { . span_lint(self.cx, POINTER_FORMAT, span, "pointer formatting detected"); . } . } . . if placeholder.format_trait == Pointer . && let Some(span) = placeholder.span . { . span_lint(self.cx, POINTER_FORMAT, span, "pointer formatting detected"); . } . } . } . } . 330 ( 0.00%) fn check_useless_borrows_in_formatting(&self, placeholder: &FormatPlaceholder, arg_expr: &Expr<'tcx>) { . // Updated while peeling: 30 ( 0.00%) let mut only_mutable = true; 30 ( 0.00%) let mut has_mutable = false; . 60 ( 0.00%) if !arg_expr.span.from_expansion() 60 ( 0.00%) && !is_from_proc_macro(self.cx, arg_expr) 185 ( 0.00%) && let Some(fmt_trait) = match placeholder.format_trait { . Display => self.cx.tcx.get_diagnostic_item(sym::Display), . Debug => self.cx.tcx.get_diagnostic_item(sym::Debug), . _ => None, . } 174 ( 0.00%) && let Some(sized_trait) = self.cx.tcx.lang_items().sized_trait() 1,160 ( 0.00%) => ???:::lang_items (29x) 290 ( 0.00%) && let peeled_expr = peel_hir_expr_while(arg_expr, |e| { 551 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_while::<::check_useless_borrows_in_formatting::{closure#0}> (29x) . // Need to handle `&&&T` to `&T` when a single ref is still required 58 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, m, e) = e.kind . && let ty = self.cx.typeck_results().expr_ty(e) . && implements_trait(self.cx, ty, sized_trait, &[]) . && implements_trait(self.cx, ty, fmt_trait, &[]) . { . only_mutable = only_mutable && m == Mutability::Mut; . has_mutable = has_mutable || m == Mutability::Mut; . Some(e) . } else { . None . } . }) 29 ( 0.00%) && !std::ptr::eq(arg_expr, peeled_expr) . && let Some(peeled_snippet) = snippet_opt(self.cx, peeled_expr.span) . { . let name = self.cx.tcx.item_name(self.macro_call.def_id); . let message = if only_mutable { . "remove the redundant `&mut`" . } else if has_mutable { . "remove the redundant `&`/`&mut`" . } else { -- line 489 ---------------------------------------- -- line 494 ---------------------------------------- . USELESS_BORROWS_IN_FORMATTING, . arg_expr.span, . format!("redundant reference in `{name}!` argument"), . message, . peeled_snippet, . Applicability::MachineApplicable, . ); . } 240 ( 0.00%) } . . fn check_unused_format_specifier(&self, placeholder: &FormatPlaceholder, arg: &Expr<'_>) { . let options = &placeholder.format_options; . 90 ( 0.00%) if let Some(placeholder_span) = placeholder.span 60 ( 0.00%) && *options != FormatOptions::default() . && let ty = self.cx.typeck_results().expr_ty(arg).peel_refs() . && ty.is_lang_item(self.cx, LangItem::FormatArguments) . { . span_lint_and_then( . self.cx, . UNUSED_FORMAT_SPECS, . placeholder_span, . "format specifiers have no effect on `format_args!()`", -- line 516 ---------------------------------------- -- line 549 ---------------------------------------- . }, . ); . } . } . . /// Lint when format width has no effect on the output because the format trait's . /// minimum output is larger (e.g. `{:#02X}` outputs "0x1" so width 2 has no effect). . fn check_useless_format_width(&self, placeholder: &FormatPlaceholder) { 153 ( 0.00%) let min_width = match placeholder.format_trait { . // 0x prefix, e.g. 0x1, 0o1, 0b1 3 ( 0.00%) LowerHex | UpperHex | Octal | Binary if placeholder.format_options.alternate => 4, . LowerExp | UpperExp | Pointer => 4, // e.g. 1e0 with exponent, 0x1 for pointer . _ => return, . }; . if let Some(FormatCount::Literal(width_value)) = placeholder.format_options.width . && width_value < min_width . && let Some(placeholder_span) = placeholder.span . { . span_lint_and_help( -- line 567 ---------------------------------------- -- line 571 ---------------------------------------- . "format width has no effect on the output for this format trait", . None, . format!("consider removing the width or increasing it to at least {min_width}"), . ); . } . } . . fn check_uninlined_args(&self) { 138 ( 0.00%) if self.format_args.span.from_expansion() { . return; . } 184 ( 0.00%) if self.macro_call.span.edition() < Edition2021 2,668 ( 0.00%) => ???:::edition (46x) . && (is_panic(self.cx, self.macro_call.def_id) || is_assert_macro(self.cx, self.macro_call.def_id)) . { . // panic!, assert!, and debug_assert! before 2021 edition considers a single string argument as . // non-format . return; . } . . let mut fixes = Vec::new(); . // If any of the arguments are referenced by an index number, . // and that argument is not a simple variable and cannot be inlined, . // we cannot remove any other arguments in the format string, . // because the index numbers might be wrong after inlining. . // Example of an un-inlinable format: print!("{}{1}", foo, 2) 506 ( 0.00%) for (pos, usage) in self.format_arg_positions() { 24 ( 0.00%) if !self.check_one_arg(pos, usage, &mut fixes) { . return; . } . } . 34 ( 0.00%) if fixes.is_empty() { . return; . } . . // multiline span display suggestion is sometimes broken: https://github.com/rust-lang/rust/pull/102729#discussion_r988704308 . // in those cases, make the code suggestion hidden 15 ( 0.00%) let multiline_fix = fixes . .iter() 45 ( 0.00%) .any(|(span, _)| self.cx.sess().source_map().is_multiline(*span)); 15,698 ( 0.00%) => ???:::is_multiline (30x) . . // Suggest removing each argument only once, for example in `format!("{0} {0}", arg)`. . fixes.sort_unstable_by_key(|(span, _)| *span); . fixes.dedup_by_key(|(span, _)| *span); . 150 ( 0.00%) span_lint_and_then( 21,995 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_uninlined_args::{closure#3}> (15x) . self.cx, . UNINLINED_FORMAT_ARGS, 15 ( 0.00%) self.macro_call.span, . "variables can be used directly in the `format!` string", 90 ( 0.00%) |diag| { . diag.multipart_suggestion_with_style( . "change this to", . fixes, . Applicability::MachineApplicable, . if multiline_fix { CompletelyHidden } else { ShowCode }, . ); . }, . ); 15 ( 0.00%) } . . fn check_one_arg(&self, pos: &FormatArgPosition, usage: FormatParamUsage, fixes: &mut Vec<(Span, String)>) -> bool { 27 ( 0.00%) let index = pos.index.unwrap(); 108 ( 0.00%) let arg = &self.format_args.arguments.all_args()[index]; . 54 ( 0.00%) if !matches!(arg.kind, FormatArgumentKind::Captured(_)) 111 ( 0.00%) && let rustc_ast::ExprKind::Path(None, path) = &arg.expr.kind 30 ( 0.00%) && let [segment] = path.segments.as_slice() 15 ( 0.00%) && segment.args.is_none() 60 ( 0.00%) && let Some(arg_span) = format_arg_removal_span(self.format_args, index) 2,205 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::format_arg_removal_span (15x) 45 ( 0.00%) && let Some(pos_span) = pos.span . { 30 ( 0.00%) let replacement = match usage { . FormatParamUsage::Argument => segment.ident.name.to_string(), . FormatParamUsage::Width => format!("{}$", segment.ident.name), . FormatParamUsage::Precision => format!(".{}$", segment.ident.name), . }; 90 ( 0.00%) fixes.push((pos_span, replacement)); 60 ( 0.00%) fixes.push((arg_span, String::new())); . true // successful inlining, continue checking . } else { . // Do not continue inlining (return false) in case . // * if we can't inline a numbered argument, e.g. `print!("{0} ...", foo.bar, ...)` . // * if allow_mixed_uninlined_format_args is false and this arg hasn't been inlined already . pos.kind != FormatArgPositionKind::Number 60 ( 0.00%) && (!self.ignore_mixed || matches!(arg.kind, FormatArgumentKind::Captured(_))) . } . } . . fn check_format_in_format_args(&self, name: Symbol, arg: &Expr<'_>) { . let expn_data = arg.span.ctxt().outer_expn_data(); 54 ( 0.00%) if expn_data.call_site.from_expansion() { . return; . } 108 ( 0.00%) let Some(mac_id) = expn_data.macro_def_id else { return }; 135 ( 0.00%) if !self.cx.tcx.is_diagnostic_item(sym::format_macro, mac_id) { 1,458 ( 0.00%) => ???:::is_diagnostic_item (27x) . return; . } . span_lint_and_then( . self.cx, . FORMAT_IN_FORMAT_ARGS, . self.macro_call.span, . format!("`format!` in `{name}!` args"), . |diag| { -- line 674 ---------------------------------------- -- line 677 ---------------------------------------- . )); . diag.help("or consider changing `format!` to `format_args!`"); . }, . ); . } . . fn check_to_string_in_format_args(&self, name: Symbol, value: &Expr<'_>) { . let cx = self.cx; 54 ( 0.00%) if !value.span.from_expansion() . && let ExprKind::MethodCall(_, receiver, [], to_string_span) = value.kind . && cx . .typeck_results() . .type_dependent_def_id(value.hir_id) . .opt_parent(cx) . .is_diag_item(cx, sym::ToString) . && let receiver_ty = cx.typeck_results().expr_ty(receiver) . && let Some(display_trait_id) = cx.tcx.get_diagnostic_item(sym::Display) -- line 693 ---------------------------------------- -- line 722 ---------------------------------------- . ), . Applicability::MachineApplicable, . ); . } . } . } . . fn check_unnecessary_debug_formatting(&self, name: Symbol, value: &Expr<'tcx>) { 2 ( 0.00%) let cx = self.cx; 18 ( 0.00%) if !is_in_test(cx.tcx, value.hir_id) 8,214 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test (2x) 4 ( 0.00%) && !value.span.from_expansion() 4 ( 0.00%) && !is_from_proc_macro(cx, value) 4 ( 0.00%) && let ty = cx.typeck_results().expr_ty(value) 80 ( 0.00%) => ???:::expr_ty (2x) . && self.can_display_format(ty) . { . // If the parent function is a method of `Debug`, we don't want to lint . // because it is likely that the user wants to use `Debug` formatting. . let parent_fn = cx.tcx.hir_get_parent_item(value.hir_id); . if let Some(trait_ref) = trait_ref_of_method(cx, parent_fn) . && let Some(trait_def_id) = trait_ref.trait_def_id() . && cx.tcx.is_diagnostic_item(sym::Debug, trait_def_id) -- line 742 ---------------------------------------- -- line 760 ---------------------------------------- . be removed", . ); . }, . ); . } . } . . fn format_arg_positions(&self) -> impl Iterator { 419 ( 0.00%) self.format_args.template.iter().flat_map(|piece| match piece { . FormatArgsPiece::Placeholder(placeholder) => { . let mut positions = ArrayVec::<_, 3>::new(); . . positions.push((&placeholder.argument, FormatParamUsage::Argument)); 356 ( 0.00%) if let Some(FormatCount::Argument(position)) = &placeholder.format_options.width { . positions.push((position, FormatParamUsage::Width)); . } 180 ( 0.00%) if let Some(FormatCount::Argument(position)) = &placeholder.format_options.precision { . positions.push((position, FormatParamUsage::Precision)); . } . 480 ( 0.00%) positions . }, . FormatArgsPiece::Literal(_) => ArrayVec::new(), . }) . } . . /// Returns true if the format argument at `index` is referred to by multiple format params . fn is_aliased(&self, index: usize) -> bool { . self.format_arg_positions() -- line 788 ---------------------------------------- -- line 789 ---------------------------------------- . .filter(|(position, _)| position.index == Ok(index)) . .at_most_one() . .is_err() . } . . fn can_display_format(&self, ty: Ty<'tcx>) -> bool { . let ty = ty.peel_refs(); . 2 ( 0.00%) if let Some(msrv) = self.ty_msrv_map.get(&ty) . && msrv.is_none_or(|msrv| self.msrv.meets(self.cx, msrv)) . { . return true; . } . . // Even if `ty` is not in `self.ty_msrv_map`, check whether `ty` implements `Deref` with . // a `Target` that is in `self.ty_msrv_map`. 8 ( 0.00%) if let Some(deref_trait_id) = self.cx.tcx.lang_items().deref_trait() 80 ( 0.00%) => ???:::lang_items (2x) 18 ( 0.00%) && implements_trait(self.cx, ty, deref_trait_id, &[]) 7,702 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (2x) . && let Some(target_ty) = self.cx.get_associated_type(ty, deref_trait_id, sym::Target) . && let Some(msrv) = self.ty_msrv_map.get(&target_ty) . && msrv.is_none_or(|msrv| self.msrv.meets(self.cx, msrv)) . { . return true; . } . . false . } . 40 ( 0.00%) fn has_pointer_debug(&mut self, ty: Ty<'tcx>, depth: usize) -> bool { 4 ( 0.00%) let cx = self.cx; 8 ( 0.00%) let tcx = cx.tcx; 8 ( 0.00%) if !tcx.recursion_limit().value_within_limit(depth) { 80 ( 0.00%) => ???:::recursion_limit (2x) . return false; . } 12 ( 0.00%) let depth = depth + 1; 12 ( 0.00%) let typing_env = cx.typing_env(); 60 ( 0.00%) => ???:::typing_env (2x) 4 ( 0.00%) let ty = tcx.normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)); 32 ( 0.00%) match ty.kind() { . ty::RawPtr(..) | ty::FnPtr(..) | ty::FnDef(..) => true, 8 ( 0.00%) ty::Ref(_, t, _) | ty::Slice(t) | ty::Array(t, _) => self.has_pointer_debug(*t, depth), 230 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::has_pointer_debug'2 (2x) . ty::Tuple(ts) => ts.iter().any(|t| self.has_pointer_debug(t, depth)), . ty::Adt(adt, args) => { . match self.has_pointer_format.entry(ty) { . Entry::Occupied(o) => return *o.get(), . Entry::Vacant(v) => v.insert(false), . }; . let derived_debug = if let Some(&known) = self.has_derived_debug.get(&ty) { . known -- line 836 ---------------------------------------- -- line 859 ---------------------------------------- . && adt.all_fields().any(|f| { . self.has_pointer_debug(tcx.normalize_erasing_regions(typing_env, f.ty(tcx, args)), depth) . }); . self.has_pointer_format.insert(ty, pointer_debug); . pointer_debug . }, . _ => false, . } 32 ( 0.00%) } . } . . fn make_ty_msrv_map(tcx: TyCtxt<'_>) -> FxHashMap, Option> { . [(sym::OsStr, Some(msrvs::OS_STR_DISPLAY)), (sym::Path, None)] . .into_iter() . .filter_map(|(name, feature)| { 6 ( 0.00%) tcx.get_diagnostic_item(name).map(|def_id| { 636,798 ( 0.04%) => ???:::get_diagnostic_item (2x) . let ty = Ty::new_adt(tcx, tcx.adt_def(def_id), List::empty()); . (ty, feature) . }) . }) . .collect() . } . . fn count_needed_derefs<'tcx, I>(mut ty: Ty<'tcx>, mut iter: I) -> (usize, Ty<'tcx>) -- line 882 ---------------------------------------- 1,048 ( 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 2414 ---------------------------------------- . // tidy-alphabetical-end . } . } . . /// Symbols for crates that are part of the stable standard library: `std`, `core`, `alloc`, and . /// `proc_macro`. . pub const STDLIB_STABLE_CRATES: &[Symbol] = &[sym::std, sym::core, sym::alloc, sym::proc_macro]; . 4 ( 0.00%) #[derive(Copy, Clone, Eq, StableHash, Encodable, Decodable)] . pub struct Ident { . /// `name` should never be the empty symbol. If you are considering that, . /// you are probably conflating "empty identifier with "no identifier" and . /// you should use `Option` instead. . /// Trying to construct an `Ident` with an empty name will trigger debug assertions. . pub name: Symbol, . pub span: Span, . } . . impl Ident { . #[inline] . /// Constructs a new identifier from a symbol and a span. . pub fn new(name: Symbol, span: Span) -> Ident { . debug_assert_ne!(name, sym::empty); 219 ( 0.00%) Ident { name, span } . } . . /// Constructs a new identifier with a dummy span. . #[inline] . pub fn with_dummy_span(name: Symbol) -> Ident { . Ident::new(name, DUMMY_SP) . } . -- line 2445 ---------------------------------------- -- line 2502 ---------------------------------------- . pub fn as_str(&self) -> &str { . self.name.as_str() . } . } . . impl PartialEq for Ident { . #[inline] . fn eq(&self, rhs: &Self) -> bool { 69 ( 0.00%) self.name == rhs.name && self.span.eq_ctxt(rhs.span) . } . } . . impl Hash for Ident { . fn hash(&self, state: &mut H) { . self.name.hash(state); 80 ( 0.00%) self.span.ctxt().hash(state); . } . } . . impl fmt::Debug for Ident { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . fmt::Display::fmt(self, f)?; . fmt::Debug::fmt(&self.span.ctxt(), f) . } -- line 2525 ---------------------------------------- -- line 2654 ---------------------------------------- . /// because `rustc_index::newtype_index!` reserves the last 256 values for tagging purposes. . /// . /// Note that `Symbol` cannot directly be a `rustc_index::newtype_index!` because it . /// implements `fmt::Debug`, `Encodable`, and `Decodable` in special ways. . #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] . pub struct Symbol(SymbolIndex); . . // Used within both `Symbol` and `ByteSymbol`. 4,216 ( 0.00%) rustc_index::newtype_index! { . #[orderable] . struct SymbolIndex {} . } . . impl Symbol { . /// Avoid this except for things like deserialization of previously . /// serialized symbols, and testing. Use `intern` instead. . 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 { 413 ( 0.00%) with_session_globals(|session_globals| session_globals.symbol_interner.intern_str(str)) 361 ( 0.00%) => ???:::intern_str (3x) . } . . /// 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 { 109,992 ( 0.01%) std::mem::transmute::<&str, &str>(session_globals.symbol_interner.get_str(*self)) 102,004 ( 0.01%) => ???:::get_str (3,643x) . }) . } . . pub fn as_u32(self) -> u32 { . self.0.as_u32() . } . . pub fn is_empty(self) -> bool { -- line 2700 ---------------------------------------- 4,497 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_rem_euclid.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl ManualRemEuclid { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualRemEuclid { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // (x % c + c) % c 54,388 ( 0.00%) if let ExprKind::Binary(rem_op, rem_lhs, rem_rhs) = expr.kind 382 ( 0.00%) && rem_op.node == BinOpKind::Rem 4 ( 0.00%) && let ExprKind::Binary(add_op, add_lhs, add_rhs) = rem_lhs.kind . && add_op.node == BinOpKind::Add . && let ctxt = expr.span.ctxt() . && rem_lhs.span.ctxt() == ctxt . && rem_rhs.span.ctxt() == ctxt . && add_lhs.span.ctxt() == ctxt . && add_rhs.span.ctxt() == ctxt . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(const1) = check_for_unsigned_int_constant(cx, ctxt, rem_rhs) -- line 63 ---------------------------------------- -- line 93 ---------------------------------------- . MANUAL_REM_EUCLID, . expr.span, . "manual `rem_euclid` implementation", . "consider using", . format!("{rem_of}.rem_euclid({const1})"), . app, . ); . } 217,552 ( 0.01%) } . } . . // Checks if either the left or right expressions can be an unsigned int constant and returns that . // constant along with the other expression unchanged if so . fn check_for_either_unsigned_int_constant<'a>( . cx: &'a LateContext<'_>, . ctxt: SyntaxContext, . left: &'a Expr<'_>, -- line 109 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/token.rs -------------------------------------------------------------------------------- Ir -- line 25 ---------------------------------------- . impl DocFragmentKind { . pub fn is_sugared(self) -> bool { . matches!(self, Self::Sugared(_)) . } . . /// If it is `Sugared`, it will return its associated `CommentKind`, otherwise it will return . /// `CommentKind::Line`. . pub fn comment_kind(self) -> CommentKind { 15,402 ( 0.00%) match self { . Self::Sugared(kind) => kind, . Self::Raw(_) => CommentKind::Line, . } . } . } . . #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub enum CommentKind { -- line 41 ---------------------------------------- -- line 180 ---------------------------------------- . } . } . } . . // Note that the suffix is *not* considered when deciding the `LitKind` in this . // type. This means that float literals like `1f32` are classified by this type . // as `Int`. Only upon conversion to `ast::LitKind` will such a literal be . // given the `Float` kind. 4,576 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub enum LitKind { . Bool, // AST only, must never appear in a `Token` . Byte, . Char, . Integer, // e.g. `1`, `1u8`, `1f32` . Float, // e.g. `1.`, `1.0`, `1e3f32` . Str, . StrRaw(u8), // raw string delimited by `n` hash symbols -- line 196 ---------------------------------------- -- line 197 ---------------------------------------- . ByteStr, . ByteStrRaw(u8), // raw byte string delimited by `n` hash symbols . CStr, . CStrRaw(u8), . Err(ErrorGuaranteed), . } . . /// A literal token. 12 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub struct Lit { . pub kind: LitKind, . pub symbol: Symbol, . pub suffix: Option, . } . . impl Lit { . pub fn new(kind: LitKind, symbol: Symbol, suffix: Option) -> Lit { -- line 213 ---------------------------------------- -- line 370 ---------------------------------------- . } . . impl From for IdentIsRaw { . fn from(b: bool) -> Self { . if b { Self::Yes } else { Self::No } . } . } . 9,096 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub enum TokenKind { . /* Expression-operator symbols. */ . /// `=` . Eq, . /// `<` . Lt, . /// `<=` . Le, -- line 386 ---------------------------------------- 4,745 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/to_string_trait_impl.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . style, . "check for direct implementations of `ToString`" . } . . declare_lint_pass!(ToStringTraitImpl => [TO_STRING_TRAIT_IMPL]); . . impl<'tcx> LateLintPass<'tcx> for ToStringTraitImpl { . fn check_item(&mut self, cx: &LateContext<'tcx>, it: &'tcx Item<'tcx>) { 7,789 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. 2,810 ( 0.00%) }) = it.kind 4,050 ( 0.00%) && let Some(trait_did) = of_trait.trait_ref.trait_def_id() 17,550 ( 0.00%) => ???:::trait_def_id (1,350x) 8,100 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::ToString, trait_did) 91,744 ( 0.01%) => ???:::is_diagnostic_item (1,350x) . { . span_lint_and_help( . cx, . TO_STRING_TRAIT_IMPL, . it.span, . "direct implementation of `ToString`", . None, . "prefer implementing `Display` instead", -- line 63 ---------------------------------------- 1,350 ( 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 { 247,528 ( 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 { 152,888 ( 0.01%) 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 988 ---------------------------------------- . /// Takes amortized *O*(1) time. If the vector's length would exceed its . /// 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 = "rust1", since = "1.0.0")] . #[rustc_confusables("push_back", "put", "append")] . pub fn push(&mut self, value: T) { 94 ( 0.00%) let _ = self.push_mut(value); 2,343 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::push_mut (30x) . } . . /// Appends an element to the back of a collection, returning a reference to it. . /// . /// # Panics . /// . /// Panics if the new capacity exceeds `isize::MAX` _bytes_. . /// -- line 1004 ---------------------------------------- -- line 1019 ---------------------------------------- . /// . /// Takes amortized *O*(1) time. If the vector's length would exceed its . /// 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"] 160 ( 0.00%) pub fn push_mut(&mut self, value: T) -> &mut T { . // Inform codegen that the length does not change across grow_one(). 39,106 ( 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. 90,147 ( 0.01%) if len == self.buf.capacity() { 13,463 ( 0.00%) self.buf.grow_one(); 73,084 ( 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:>::grow_one (242x) . } . unsafe { . let end = self.as_mut_ptr().add(len); . ptr::write(end, value); 85,091 ( 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 . } 128 ( 0.00%) } . } . . impl Vec { . /// Constructs a new, empty `Vec`. . /// . /// The vector will not allocate until elements are pushed onto it. . /// . /// # Examples -- line 1050 ---------------------------------------- -- 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 . ); 1,486 ( 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 1303 ---------------------------------------- . capacity: usize, . alloc: A, . ) -> Self { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::from_parts_in requires that length <= capacity", . (length: usize = length, capacity: usize = capacity) => length <= capacity . ); 87 ( 0.00%) unsafe { Vec { buf: RawVec::from_nonnull_in(ptr, capacity, alloc), len: length } } . } . . /// Decomposes a `Vec` into its raw components: `(pointer, length, capacity, allocator)`. . /// . /// Returns the raw pointer to the underlying data, the length of the vector (in elements), . /// the allocated capacity of the data (in elements), and the allocator. These are the same . /// arguments in the same order as the arguments to [`from_raw_parts_in`]. . /// -- line 1319 ---------------------------------------- -- 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) { 3,602 ( 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. 7,781 ( 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 1815 ---------------------------------------- . // case avoids creating an invalid slice, and . // * the `len` of the vector is shrunk before calling `drop_in_place`, . // such that no value will be dropped twice in case `drop_in_place` . // were to panic once (if it panics twice, the program aborts). . unsafe { . // Note: It's intentional that this is `>` and not `>=`. . // Changing it to `>=` has negative performance . // implications in some cases. See #78884 for more. 19,005 ( 0.00%) if len > self.len { . return; . } . let remaining_len = self.len - len; . let s = self.as_mut_ptr().add(len).cast_slice(remaining_len); 7,679 ( 0.00%) self.len = len; . ptr::drop_in_place(s); . } . } . . /// Extracts a slice containing the entire vector. . /// . /// Equivalent to `&s[..]`. . /// -- line 1836 ---------------------------------------- -- 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 384,558 ( 0.02%) &*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 62,271 ( 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 . ); . 11,368 ( 0.00%) self.len = new_len; . } . . /// Removes an element from the vector and returns it. . /// . /// The removed element is replaced by the last element of the vector. . /// . /// This does not preserve ordering of the remaining elements, but is *O*(1). . /// If you need to preserve the element order, use [`remove`] instead. -- line 2232 ---------------------------------------- -- line 2254 ---------------------------------------- . #[cold] . #[cfg_attr(not(panic = "immediate-abort"), inline(never))] . #[optimize(size)] . fn assert_failed(index: usize, len: usize) -> ! { . panic!("swap_remove index (is {index}) should be < len (is {len})"); . } . . let len = self.len(); 372 ( 0.00%) if index >= len { . assert_failed(index, len); . } . unsafe { . // We replace self[index] with the last element. Note that if the . // bounds check above succeeds there must be a last element (which . // can be self[index] itself). . let value = ptr::read(self.as_ptr().add(index)); . let base_ptr = self.as_mut_ptr(); 186 ( 0.00%) ptr::copy(base_ptr.add(len - 1), base_ptr.add(index), 1); . self.set_len(len - 1); . value . } . } . . /// Inserts an element at position `index` within the vector, shifting all . /// elements after it to the right. . /// -- line 2279 ---------------------------------------- -- line 2340 ---------------------------------------- . } . . let len = self.len(); . if index > len { . assert_failed(index, len); . } . . // space for the new element 4 ( 0.00%) if len == self.buf.capacity() { 2 ( 0.00%) self.buf.grow_one(); 604 ( 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:>::grow_one (2x) . } . . unsafe { . // infallible . // The spot to put the new value . let p = self.as_mut_ptr().add(index); . { 4 ( 0.00%) if index < len { . // Shift everything over to make space. (Duplicating the . // `index`th element into two consecutive places.) . ptr::copy(p, p.add(1), len - index); . } . // Write it in, overwriting the first copy of the `index`th . // element. . ptr::write(p, element); . } 2 ( 0.00%) self.set_len(len + 1); . &mut *p . } . } . . /// Removes and returns the element at position `index` within the vector, . /// shifting all elements after it to the left. . /// . /// Note: Because this shifts over the remaining elements, it has a -- line 2374 ---------------------------------------- -- line 2473 ---------------------------------------- . /// ``` . /// let mut vec = vec![1, 2, 3, 4, 5]; . /// let keep = [false, true, true, false, true]; . /// let mut iter = keep.iter(); . /// vec.retain(|_| *iter.next().unwrap()); . /// assert_eq!(vec, [2, 3, 5]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] 9 ( 0.00%) pub fn retain(&mut self, mut f: F) . where . F: FnMut(&T) -> bool, . { 34 ( 0.00%) self.retain_mut(|elem| f(elem)); 22 ( 0.00%) } . . /// Retains only the elements specified by the predicate, passing a mutable reference to it. . /// . /// In other words, remove all elements `e` such that `f(&mut e)` returns `false`. . /// This method operates in place, visiting each element exactly once in the . /// original order, and preserves the order of the retained elements. . /// . /// # Examples -- line 2494 ---------------------------------------- -- line 2505 ---------------------------------------- . /// ``` . #[stable(feature = "vec_retain_mut", since = "1.61.0")] . pub fn retain_mut(&mut self, mut f: F) . where . F: FnMut(&mut T) -> bool, . { . let original_len = self.len(); . 278 ( 0.00%) if original_len == 0 { . // Empty case: explicit return allows better optimization, vs letting compiler infer it . return; . } . . // Vec: [Kept, Kept, Hole, Hole, Hole, Hole, Unchecked, Unchecked] . // | ^- write ^- read | . // |<- original_len ->| . // Kept: Elements which predicate returns true on. -- line 2521 ---------------------------------------- -- line 2550 ---------------------------------------- . } . } . } . . let mut read = 0; . loop { . // SAFETY: read < original_len . let cur = unsafe { self.get_unchecked_mut(read) }; 65 ( 0.00%) if hint::unlikely(!f(cur)) { 1,846 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::retain::<>::multipart_suggestion_with_style<&str>::{closure#0}>::{closure#0} (2x) . break; . } 22 ( 0.00%) read += 1; 48 ( 0.00%) if read == original_len { . // All elements are kept, return early. . return; . } . } . . // Critical section starts here and at least one element is going to be removed. . // Advance `g.read` early to avoid double drop if `drop_in_place` panicked. . let mut g = PanicGuard { v: self, read: read + 1, write: read, original_len }; . // SAFETY: previous `read` is always less than original_len. . unsafe { ptr::drop_in_place(&mut *g.v.as_mut_ptr().add(read)) }; . 178 ( 0.00%) while g.read < g.original_len { . // SAFETY: `read` is always less than original_len. . let cur = unsafe { &mut *g.v.as_mut_ptr().add(g.read) }; 75 ( 0.00%) if !f(cur) { . // Advance `read` early to avoid double drop if `drop_in_place` panicked. . g.read += 1; . // SAFETY: We never touch this element again after dropped. . unsafe { ptr::drop_in_place(cur) }; . } else { . // SAFETY: `read` > `write`, so the slots don't overlap. . // We use copy for move, and never touch the source element again. . unsafe { . let hole = g.v.as_mut_ptr().add(g.write); . ptr::copy_nonoverlapping(cur, hole, 1); . } 75 ( 0.00%) g.write += 1; . g.read += 1; . } . } . . // We are leaving the critical section and no panic happened, . // Commit the length change and forget the guard. . // SAFETY: `write` is always less than or equal to original_len. . unsafe { g.v.set_len(g.write) }; -- line 2597 ---------------------------------------- -- line 2614 ---------------------------------------- . /// ``` . #[stable(feature = "dedup_by", since = "1.16.0")] . #[inline] . pub fn dedup_by_key(&mut self, mut key: F) . where . F: FnMut(&mut T) -> K, . K: PartialEq, . { 15 ( 0.00%) self.dedup_by(|a, b| key(a) == key(b)) 525 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::dedup_by::<>::dedup_by_key<::check_uninlined_args::{closure#2}, rustc_span::span_encoding::Span>::{closure#0}> (15x) . } . . /// Removes all but the first of consecutive elements in the vector that are . /// "equal" according to the given predicate function. . /// . /// The predicate `same_bucket(x, p)` is passed references to two elements. . /// If it returns `true`, the element `x` is removed from the vector. . /// -- line 2630 ---------------------------------------- -- line 2662 ---------------------------------------- . /// } else { . /// false . /// } . /// }); . /// . /// assert_eq!(ranges, [1..5, 8..9]); . /// ``` . #[stable(feature = "dedup_by", since = "1.16.0")] 105 ( 0.00%) pub fn dedup_by(&mut self, mut same_bucket: F) . where . F: FnMut(&mut T, &mut T) -> bool, . { . let len = self.len(); 30 ( 0.00%) if len <= 1 { . return; . } . . // Check if we ever want to remove anything. . // This allows to use copy_non_overlapping in next cycle. . // And avoids any memory writes if we don't need to remove anything. . let mut first_duplicate_idx: usize = 1; . let start = self.as_mut_ptr(); 165 ( 0.00%) while first_duplicate_idx != len { . let found_duplicate = unsafe { . // SAFETY: first_duplicate always in range [1..len) . // Note that we start iteration from 1 so we never overflow. . let prev = start.add(first_duplicate_idx.wrapping_sub(1)); . let current = start.add(first_duplicate_idx); . // We explicitly say in docs that references are reversed. 15 ( 0.00%) same_bucket(&mut *current, &mut *prev) . }; 15 ( 0.00%) if found_duplicate { . break; . } . first_duplicate_idx += 1; . } . // Don't need to remove anything. . // We cannot get bigger than len. . if first_duplicate_idx == len { . return; -- line 2701 ---------------------------------------- -- line 2788 ---------------------------------------- . } . . /* Technically we could let `gap` clean up with its Drop, but . * when `same_bucket` is guaranteed to not panic, this bloats a little . * the codegen, so we just do it manually */ . gap.vec.set_len(gap.write); . mem::forget(gap); . } 120 ( 0.00%) } . . /// Appends an element and returns a reference to it if there is sufficient spare capacity, . /// otherwise an error is returned with the element. . /// . /// Unlike [`push`] this method will not reallocate when there's insufficient capacity. . /// The caller should use [`reserve`] or [`try_reserve`] to ensure that there is enough capacity. . /// . /// [`push`]: Vec::push -- line 2804 ---------------------------------------- -- 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 { 39,076 ( 0.00%) if self.len == 0 { . None . } else { . unsafe { 26,437 ( 0.00%) self.len -= 1; . core::hint::assert_unchecked(self.len < self.capacity()); 179 ( 0.00%) 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 . /// is empty (the predicate will not be called in that case). . /// -- line 2887 ---------------------------------------- -- line 2893 ---------------------------------------- . /// . /// assert_eq!(vec.pop_if(pred), Some(4)); . /// assert_eq!(vec, [1, 2, 3]); . /// assert_eq!(vec.pop_if(pred), None); . /// ``` . #[stable(feature = "vec_pop_if", since = "1.86.0")] . pub fn pop_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option { . let last = self.last_mut()?; 12 ( 0.00%) if predicate(last) { self.pop() } else { None } . } . . /// Returns a mutable reference to the last item in the vector, or . /// `None` if it is empty. . /// . /// # Examples . /// . /// Basic usage: -- line 2909 ---------------------------------------- -- 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,173 ( 0.00%) if count > 0 { . unsafe { . ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) . }; . } 6,825 ( 0.00%) self.len += count; . } . . /// Removes the subslice indicated by the given range from the vector, . /// returning a double-ended iterator over the removed subslice. . /// . /// If the iterator is dropped before being fully consumed, . /// it drops the remaining removed elements. . /// -- line 2994 ---------------------------------------- -- line 3074 ---------------------------------------- . . // SAFETY: . // - `elems` comes directly from `as_mut_slice` and is therefore valid. . // - Setting `self.len` before calling `drop_in_place` means that, . // if an element's `Drop` impl panics, the vector's `Drop` impl will . // do nothing (leaking the rest of the elements) instead of dropping . // some twice. . unsafe { 2,200 ( 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 { 29,695 ( 0.00%) let len = self.len; . . // SAFETY: The maximum capacity of `Vec` is `isize::MAX` bytes, so the maximum value can . // be returned is `usize::checked_div(size_of::()).unwrap_or(usize::MAX)`, which . // matches the definition of `T::MAX_SLICE_LEN`. . unsafe { intrinsics::assume(len <= T::MAX_SLICE_LEN) }; . . len . } -- line 3109 ---------------------------------------- -- line 3118 ---------------------------------------- . /// . /// v.push(1); . /// assert!(!v.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_is_empty"] . #[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")] . pub const fn is_empty(&self) -> bool { 26,004 ( 0.00%) self.len() == 0 . } . . /// Splits the collection into two at the given index. . /// . /// Returns a newly allocated vector containing the elements in the range . /// `[at, len)`. After the call, the original vector will be left containing . /// the elements `[0, at)` with its previous capacity unchanged. . /// -- line 3134 ---------------------------------------- -- line 3868 ---------------------------------------- . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl Clone for Vec { . /// Creates a new `Vec` by deep-copying the contents of an existing `Vec`. . /// . /// This method will allocate a new `Vec` and `clone` all of `self`'s contents . /// into it. The capacity of the duplicate `Vec` is not forced to match the . /// capacity of the original. 6,162 ( 0.00%) fn clone(&self) -> Self { . let alloc = self.allocator().clone(); 29 ( 0.00%) <[T]>::to_vec_in(&**self, alloc) 7,878 ( 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 3915 ---------------------------------------- . /// let v: Vec = vec![0xa8, 0x3c, 0x09]; . /// let s: &[u8] = &[0xa8, 0x3c, 0x09]; . /// assert_eq!(b.hash_one(v), b.hash_one(s)); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . impl Hash for Vec { . #[inline] . fn hash(&self, state: &mut H) { 96 ( 0.00%) Hash::hash(&**self, state) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const impl, A: Allocator> Index for Vec { . type Output = I::Output; . -- line 3931 ---------------------------------------- -- 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 { 4,221 ( 0.00%) >::from_iter(iter.into_iter()) 3,061 ( 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.rs: as alloc::vec::spec_from_iter::SpecFromIter, alloc::vec::Vec<(&rustc_hir::hir::Lifetime, core::option::Option, rustc_span::span_encoding::Span)>, clippy_lints::ptr::mut_from_ref::get_lifetimes>, clippy_lints::ptr::mut_from_ref::check::{closure#0}>, clippy_lints::ptr::mut_from_ref::check::{closure#1}>, core::option::Option>>>::from_iter (6x) . } . } . . #[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()) 555 ( 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); . // } 32,050 ( 0.00%) while let Some(element) = iterator.next() { 1,434,013 ( 0.08%) => /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 (3,816x) . let len = self.len(); 10,027 ( 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 4,983 ( 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 4124 ---------------------------------------- . additional, . "TrustedLen iterator's size hint is not exact: {:?}", . (low, high) . ); . self.reserve(additional); . unsafe { . let ptr = self.as_mut_ptr(); . let mut local_len = SetLenOnDrop::new(&mut self.len); 61 ( 0.00%) iterator.for_each(move |element| { . ptr::write(ptr.add(local_len.current_len()), element); . // Since the loop executes user code which can panic we have to update . // the length every step to correctly drop what we've written. . // NB can't overflow since we would have had to alloc the address space . local_len.increment_len(1); . }); . } . } else { -- line 4140 ---------------------------------------- -- 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 . { 4,904 ( 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 11,880 ( 0.00%) self.as_mut_ptr().cast_slice(self.len).drop_in_place() . } . // RawVec handles deallocation 6,136 ( 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 ---------------------------------------- 124,484 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml_parser-1.1.2+spec-1.1.0/src/lexer/mod.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub struct Lexer<'i> { . stream: Stream<'i>, . eof: bool, . } . . impl<'i> Lexer<'i> { . pub(crate) fn new(input: &'i str) -> Self { . let mut stream = Stream::new(input); 1 ( 0.00%) if input.as_bytes().starts_with(BOM) { . let offset = BOM.len(); . #[cfg(feature = "unsafe")] // SAFETY: only called when next character is ASCII . unsafe { . stream.next_slice_unchecked(offset) . }; . #[cfg(not(feature = "unsafe"))] . stream.next_slice(offset); . } 5 ( 0.00%) Lexer { stream, eof: false } . } . . #[cfg(feature = "alloc")] 7 ( 0.00%) pub fn into_vec(self) -> Vec { . #![allow(unused_qualifications)] // due to MSRV of 1.66 . let capacity = core::cmp::min( 1 ( 0.00%) self.stream.len(), . usize::MAX / core::mem::size_of::(), . ); . let mut vec = Vec::with_capacity(capacity); . vec.extend(self); 5 ( 0.00%) vec 8 ( 0.00%) } . } . . impl Iterator for Lexer<'_> { . type Item = Token; . 8,953 ( 0.00%) fn next(&mut self) -> Option { . let Some(peek_byte) = self.stream.as_bstr().first() else { 5 ( 0.00%) if self.eof { . return None; . } else { 1 ( 0.00%) self.eof = true; . let start = self.stream.current_token_start(); . let span = Span::new_unchecked(start, start); . return Some(Token::new(TokenKind::Eof, span)); . } . }; 1,277 ( 0.00%) Some(process_token(*peek_byte, &mut self.stream)) 11,640 ( 0.00%) } . } . . const BOM: &[u8] = b"\xEF\xBB\xBF"; . . pub(crate) type Stream<'i> = winnow::stream::LocatingSlice<&'i str>; . . fn process_token(peek_byte: u8, stream: &mut Stream<'_>) -> Token { 7,662 ( 0.00%) let token = match peek_byte { . b'.' => lex_ascii_char(stream, TokenKind::Dot), . b'=' => lex_ascii_char(stream, TokenKind::Equals), . b',' => lex_ascii_char(stream, TokenKind::Comma), . b'[' => lex_ascii_char(stream, TokenKind::LeftSquareBracket), . b']' => lex_ascii_char(stream, TokenKind::RightSquareBracket), . b'{' => lex_ascii_char(stream, TokenKind::LeftCurlyBracket), . b'}' => lex_ascii_char(stream, TokenKind::RightCurlyBracket), . b' ' => lex_whitespace(stream), -- line 91 ---------------------------------------- -- line 96 ---------------------------------------- . b'\'' => { . if stream.starts_with(ML_LITERAL_STRING_DELIM) { . lex_ml_literal_string(stream) . } else { . lex_literal_string(stream) . } . } . b'"' => { 129 ( 0.00%) if stream.starts_with(ML_BASIC_STRING_DELIM) { . lex_ml_basic_string(stream) . } else { . lex_basic_string(stream) . } . } . _ => lex_atom(stream), . }; . token -- line 112 ---------------------------------------- -- line 419 ---------------------------------------- . }; . #[cfg(not(feature = "unsafe"))] . stream.next_slice(offset); . . loop { . // newline is present for error recovery . match stream.as_bstr().find_slice((QUOTATION_MARK, ESCAPE, b'\n')) { . Some(span) => { 516 ( 0.00%) let found = stream.as_bstr()[span.start]; 129 ( 0.00%) if found == QUOTATION_MARK { . let offset = span.end; . #[cfg(feature = "unsafe")] . // SAFETY: `QUOTATION_MARK` ensure `offset` is along UTF-8 boundary . unsafe { . stream.next_slice_unchecked(offset) . }; . #[cfg(not(feature = "unsafe"))] . stream.next_slice(offset); -- line 436 ---------------------------------------- 7,203 ( 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 { 28,728 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 6,384 ( 0.00%) if item.span.from_expansion() { . return; . } . let sm = cx.sess().source_map(); . let mut span = cx . .tcx 7,784 ( 0.00%) .hir_attrs(item.hir_id()) 110,234 ( 0.01%) => ???:::hir_attrs (1,946x) . .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| { 8,446 ( 0.00%) matches!( . i, . Attribute::Parsed(AttributeKind::DocComment { . style: AttrStyle::Outer, . .. . }) . ) . }) 5,723 ( 0.00%) .fold(item.span.shrink_to_lo(), |span, attr| span.to(attr.span())); 173,742 ( 0.01%) => ???:::to (1,259x) 15,568 ( 0.00%) let (Some(file), _, _, end_line, _) = sm.span_to_location_info(span) else { 3,374,299 ( 0.19%) => ???:::span_to_location_info (1,946x) . return; . }; . let mut bad_comments = vec![]; . for line in (0..end_line.saturating_sub(1)).rev() { 15,546 ( 0.00%) let Some(contents) = file.get_line(line).map(|c| c.trim().to_owned()) else { 736,846 ( 0.04%) => ???:::get_line (5,182x) . return; . }; . // Keep searching until we find the next item 10,942 ( 0.00%) if !contents.is_empty() && !contents.starts_with("//") && !contents.starts_with("#[") { . break; . } . 2,192 ( 0.00%) 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)); . } . } . 1,924 ( 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, . ); . }, . ); . } 25,536 ( 0.00%) } . } . . /// 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') . } 10,989 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/mod.rs -------------------------------------------------------------------------------- Ir -- line 883 ---------------------------------------- . . impl Casts { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Casts { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,502 ( 0.00%) if let ExprKind::Cast(cast_from_expr, cast_to_hir) = expr.kind { 171 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } 285 ( 0.00%) if is_hir_ty_cfg_dependant(cx, cast_to_hir) { 332 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_hir_ty_cfg_dependant (57x) . return; . } . let (cast_from, cast_to) = ( 285 ( 0.00%) cx.typeck_results().expr_ty(cast_from_expr), 2,292 ( 0.00%) => ???:::expr_ty (57x) 228 ( 0.00%) cx.typeck_results().expr_ty(expr), 2,280 ( 0.00%) => ???:::expr_ty (57x) . ); . 104 ( 0.00%) if !expr.span.from_expansion() && unnecessary_cast::check(cx, expr, cast_from_expr, cast_from, cast_to) { 14,804 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::check (13x) . return; . } 342 ( 0.00%) char_lit_as_u8::check(cx, expr, cast_from_expr, cast_to); 741 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/char_lit_as_u8.rs:clippy_lints::casts::char_lit_as_u8::check (57x) 399 ( 0.00%) cast_slice_from_raw_parts::check(cx, expr, cast_from_expr, cast_to, self.msrv); 1,158 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check (57x) . cast_ptr_alignment::check(cx, expr, cast_from, cast_to); 399 ( 0.00%) ptr_cast_constness::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 969 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs:clippy_lints::casts::ptr_cast_constness::check (57x) 684 ( 0.00%) ptr_as_ptr::check(cx, expr, cast_from_expr, cast_from, cast_to_hir, cast_to, self.msrv); 969 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/ptr_as_ptr.rs:clippy_lints::casts::ptr_as_ptr::check (57x) . as_ptr_cast_mut::check(cx, expr, cast_from_expr, cast_to); 456 ( 0.00%) confusing_method_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 1,482 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/confusing_method_to_numeric_cast.rs:clippy_lints::casts::confusing_method_to_numeric_cast::check (57x) . zero_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); . 342 ( 0.00%) if self.msrv.meets(cx, msrvs::MANUAL_DANGLING_PTR) { 1,539 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (57x) . manual_dangling_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . . if cast_to.is_numeric() { 84 ( 0.00%) cast_possible_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir.span); 6,573 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_possible_truncation.rs:clippy_lints::casts::cast_possible_truncation::check (12x) . if cast_from.is_numeric() { 40 ( 0.00%) cast_possible_wrap::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 10,492 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_possible_wrap.rs:clippy_lints::casts::cast_possible_wrap::check (5x) 45 ( 0.00%) cast_precision_loss::check(cx, expr, cast_from, cast_to); 137 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_precision_loss.rs:clippy_lints::casts::cast_precision_loss::check (5x) . cast_sign_loss::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 35 ( 0.00%) cast_abs_to_unsigned::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 95 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_abs_to_unsigned.rs:clippy_lints::casts::cast_abs_to_unsigned::check (5x) 30 ( 0.00%) cast_nan_to_int::check(cx, expr, cast_from_expr, cast_from, cast_to); 100 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_nan_to_int.rs:clippy_lints::casts::cast_nan_to_int::check (5x) . } 120 ( 0.00%) cast_lossless::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir, self.msrv); 13,883 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_lossless.rs:clippy_lints::casts::cast_lossless::check (12x) . cast_enum_constructor::check(cx, expr, cast_from_expr, cast_from); 72 ( 0.00%) fn_to_numeric_cast_any::check(cx, expr, cast_from_expr, cast_from, cast_to); 240 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/fn_to_numeric_cast_any.rs:clippy_lints::casts::fn_to_numeric_cast_any::check (12x) 72 ( 0.00%) fn_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 355 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/fn_to_numeric_cast.rs:clippy_lints::casts::fn_to_numeric_cast::check (12x) 72 ( 0.00%) fn_to_numeric_cast_with_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to); 359 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/fn_to_numeric_cast_with_truncation.rs:clippy_lints::casts::fn_to_numeric_cast_with_truncation::check (12x) . } . . as_underscore::check(cx, expr, cast_to_hir); 228 ( 0.00%) as_pointer_underscore::check(cx, cast_to, cast_to_hir); 702 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/as_pointer_underscore.rs:clippy_lints::casts::as_pointer_underscore::check (57x) . 399 ( 0.00%) let was_borrow_as_ptr_emitted = self.msrv.meets(cx, msrvs::BORROW_AS_PTR) 1,539 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (57x) 399 ( 0.00%) && borrow_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); 1,246 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs:clippy_lints::casts::borrow_as_ptr::check (57x) 513 ( 0.00%) if !was_borrow_as_ptr_emitted && self.msrv.meets(cx, msrvs::PTR_FROM_REF) { 1,539 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (57x) . ref_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . } . 190,358 ( 0.01%) if self.msrv.meets(cx, msrvs::RAW_REF_OP) { 734,238 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (27,194x) . borrow_as_ptr::check_implicit_cast(cx, expr); . } 163,164 ( 0.01%) if self.msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) { 734,238 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (27,194x) 81,582 ( 0.00%) cast_slice_from_raw_parts::check_implicit_cast(cx, expr); 710,169 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast (27,194x) . } 81,582 ( 0.00%) cast_ptr_alignment::check_cast_method(cx, expr); 1,297,999 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method (27,194x) 108,776 ( 0.01%) cast_slice_different_sizes::check(cx, expr, self.msrv); 4,758,952 ( 0.27%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::check (27,194x) 81,582 ( 0.00%) ptr_cast_constness::check_null_ptr_cast_method(cx, expr); 418,160 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/ptr_cast_constness.rs:clippy_lints::casts::ptr_cast_constness::check_null_ptr_cast_method (27,194x) 217,552 ( 0.01%) } . . fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 5,940 ( 0.00%) needless_type_cast::check(cx, body); 1,582,805 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check (1,980x) . } . } 518 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/box_default.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub BOX_DEFAULT, . style, . "Using Box::new(T::default()) instead of Box::default()" . } . . declare_lint_pass!(BoxDefault => [BOX_DEFAULT]); . . impl LateLintPass<'_> for BoxDefault { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // If the expression is a call (`Box::new(...)`) 63,325 ( 0.00%) if let ExprKind::Call(box_new, [arg]) = expr.kind . // And call is of the form `::something` . // Here, it would be `::new` 9,704 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_new.kind . // And that method is `new` 182 ( 0.00%) && seg.ident.name == sym::new . // And the call is that of a `Box` method 338 ( 0.00%) && ty.basic_res().is_lang_item(cx, LangItem::OwnedBox) . // And the single argument to the call is another function call . // This is the `T::default()` (or default equivalent) of `Box::new(T::default())` 112 ( 0.00%) && let ExprKind::Call(arg_path, _) = arg.kind . // And we are not in a foreign crate's macro 40 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 936 ( 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 (8x) . // And the argument expression has the same context as the outer call expression . // or that we are inside a `vec!` macro expansion 40 ( 0.00%) && (expr.span.eq_ctxt(arg.span) || is_local_vec_expn(cx, arg, expr)) 240 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::eq_ctxt (8x) . // And the argument is `Default::default()` or the type is specified 64 ( 0.00%) && (is_plain_default(cx, arg_path) || (given_type(cx, expr) && is_default_equivalent(cx, arg))) 1,128 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/box_default.rs:clippy_lints::box_default::given_type (8x) 184 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/box_default.rs:clippy_lints::box_default::is_plain_default (8x) . { . span_lint_and_sugg( . cx, . BOX_DEFAULT, . expr.span, . "`Box::new(_)` of default value", . "try", . "Box::default()".into(), . Applicability::MachineApplicable, . ); . } 217,552 ( 0.01%) } . } . 8 ( 0.00%) fn is_plain_default(cx: &LateContext<'_>, arg_path: &Expr<'_>) -> bool { . // we need to match the actual path so we don't match e.g. "u8::default" 36 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, path)) = &arg_path.kind 10 ( 0.00%) && let Res::Def(_, def_id) = path.res . { . // avoid generic parameters 8 ( 0.00%) cx.tcx.is_diagnostic_item(sym::default_fn, def_id) && path.segments.iter().all(|seg| seg.args.is_none()) 108 ( 0.00%) => ???:::is_diagnostic_item (2x) . } else { . false . } 8 ( 0.00%) } . . fn is_local_vec_expn(cx: &LateContext<'_>, expr: &Expr<'_>, ref_expr: &Expr<'_>) -> bool { . macro_backtrace(expr.span) . .next() . .is_some_and(|call| cx.tcx.is_diagnostic_item(sym::vec_macro, call.def_id) && call.span.eq_ctxt(ref_expr.span)) . } . . #[derive(Default)] -- line 91 ---------------------------------------- -- line 100 ---------------------------------------- . fn visit_ty(&mut self, t: &Ty<'_, AmbigArg>) { . self.0 |= matches!(t.kind, TyKind::OpaqueDef(..) | TyKind::TraitObject(..)); . if !self.0 { . walk_ty(self, t); . } . } . } . 64 ( 0.00%) fn given_type(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 120 ( 0.00%) match cx.tcx.parent_hir_node(expr.hir_id) { 864 ( 0.00%) => ???:::parent_hir_node (8x) . Node::LetStmt(LetStmt { ty: Some(ty), .. }) => { . let mut v = InferVisitor::default(); . v.visit_ty_unambig(ty); . !v.0 . }, . Node::Expr(Expr { . kind: ExprKind::Call(path, args), . .. -- line 117 ---------------------------------------- -- line 118 ---------------------------------------- . }) . | Node::Block(Block { . expr: Some(Expr { . kind: ExprKind::Call(path, args), . .. . }), . .. . }) => { 1 ( 0.00%) if let Some(index) = args.iter().position(|arg| arg.hir_id == expr.hir_id) . && let Some(sig) = expr_sig(cx, path) . && let Some(input) = sig.input(index) . && let Some(input_ty) = input.no_bound_vars() . { . input_ty == cx.typeck_results().expr_ty_adjusted(expr) . } else { . false . } . }, . _ => false, . } 56 ( 0.00%) } 104 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs -------------------------------------------------------------------------------- Ir -- line 493 ---------------------------------------- . RESULT_LARGE_ERR, . RESULT_UNIT_ERR, . TOO_MANY_ARGUMENTS, . TOO_MANY_LINES, . ]); . . impl EarlyLintPass for EarlyFunctions { . fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: visit::FnKind<'_>, _: Span, _: ast::NodeId) { 5,367 ( 0.00%) duplicate_underscore_argument::check(cx, fn_kind); 1,343,309 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs:clippy_lints::functions::duplicate_underscore_argument::check (1,789x) . } . } . . 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 { 21,288 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: intravisit::FnKind<'tcx>, . decl: &'tcx hir::FnDecl<'_>, . body: &'tcx hir::Body<'_>, . span: Span, . def_id: LocalDefId, . ) { 1,774 ( 0.00%) let hir_id = cx.tcx.local_def_id_to_hir_id(def_id); 17,740 ( 0.00%) too_many_arguments::check_fn(cx, kind, decl, hir_id, def_id, self.too_many_arguments_threshold); 7,096 ( 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); 23,062 ( 0.00%) misnamed_getters::check_fn(cx, kind, decl, body, span); 103,734 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs:clippy_lints::functions::misnamed_getters::check_fn (1,774x) 248 ( 0.00%) impl_trait_in_params::check_fn(cx, &kind, body, hir_id); 23,062 ( 0.00%) ref_option::check_fn( 385,991 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn (1,774x) . cx, . kind, . decl, . span, . hir_id, . def_id, . body, 3,548 ( 0.00%) self.avoid_breaking_exported_api, . ); 12,418 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 9,576 ( 0.00%) must_use::check_item(cx, item); 4,241,439 ( 0.24%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item (3,192x) 9,576 ( 0.00%) result::check_item( 1,777,124 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item (3,192x) . cx, . item, 3,192 ( 0.00%) self.large_error_threshold, 3,192 ( 0.00%) &self.large_error_ignored, 3,192 ( 0.00%) self.msrv, . ); . } . 15,040 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 4,512 ( 0.00%) must_use::check_impl_item(cx, item); 17,180,320 ( 0.97%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item (1,504x) 4,512 ( 0.00%) result::check_impl_item( 1,800,417 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item (1,504x) . cx, . item, 1,504 ( 0.00%) self.large_error_threshold, 1,504 ( 0.00%) &self.large_error_ignored, 1,504 ( 0.00%) self.msrv, . ); . impl_trait_in_params::check_impl_item(cx, item); 7,520 ( 0.00%) renamed_function_params::check_impl_item(cx, item, &self.trait_ids); 645,526 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:clippy_lints::functions::renamed_function_params::check_impl_item (1,504x) 12,032 ( 0.00%) } . 220 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 18 ( 0.00%) too_many_arguments::check_trait_item(cx, item, self.too_many_arguments_threshold); . not_unsafe_ptr_arg_deref::check_trait_item(cx, item); 66 ( 0.00%) must_use::check_trait_item(cx, item); 71,696 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_trait_item (22x) 66 ( 0.00%) result::check_trait_item( 384,478 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_trait_item (22x) . cx, . item, 22 ( 0.00%) self.large_error_threshold, 22 ( 0.00%) &self.large_error_ignored, 22 ( 0.00%) self.msrv, . ); 22 ( 0.00%) impl_trait_in_params::check_trait_item(cx, item, self.avoid_breaking_exported_api); 88 ( 0.00%) ref_option::check_trait_item(cx, item, self.avoid_breaking_exported_api); 6,399 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_trait_item (22x) 176 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 135,970 ( 0.01%) result::check_expr(cx, expr, self.large_error_threshold, &self.large_error_ignored); 556,541 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr (27,194x) . } . } 25,332 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/try_err.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::LangItem::ResultErr; . use rustc_hir::{Expr, ExprKind, LangItem, MatchSource}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . use rustc_span::{hygiene, sym}; . . use super::TRY_ERR; . 3,568 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, scrutinee: &'tcx Expr<'_>) { . // Looks for a structure like this: . // match ::std::ops::Try::into_result(Err(5)) { . // ::std::result::Result::Err(err) => . // #[allow(unreachable_code)] . // return ::std::ops::Try::from_error(::std::convert::From::from(err)), . // ::std::result::Result::Ok(val) => . // #[allow(unreachable_code)] . // val, . // }; 2,230 ( 0.00%) if let ExprKind::Call(match_fun, [try_arg]) = scrutinee.kind 3,122 ( 0.00%) && let ExprKind::Path(match_fun_path) = match_fun.kind 3,122 ( 0.00%) && cx.tcx.qpath_is_lang_item(match_fun_path, LangItem::TryTraitBranch) 57,534 ( 0.00%) => ???:::qpath_is_lang_item (446x) 1,267 ( 0.00%) && let ExprKind::Call(err_fun, [err_arg]) = try_arg.kind 35 ( 0.00%) && err_fun.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . && let Some(return_ty) = find_return_type(cx, &expr.kind) . { . let (prefix, suffix, err_ty) = if let Some(ty) = result_error_type(cx, return_ty) { . ("Err(", ")", ty) . } else if let Some(ty) = poll_result_error_type(cx, return_ty) { . ("Poll::Ready(Err(", "))", ty) . } else if let Some(ty) = poll_option_result_error_type(cx, return_ty) { . ("Poll::Ready(Some(Err(", ")))", ty) -- line 37 ---------------------------------------- -- line 58 ---------------------------------------- . format!("{ret_prefix}{prefix}{origin_snippet}{suffix}") . } else { . format!("{ret_prefix}{prefix}{origin_snippet}.into(){suffix}") . }; . diag.span_suggestion(expr.span, "try", suggestion, applicability); . }, . ); . } 3,568 ( 0.00%) } . . /// Finds function return type by examining return expressions in match arms. . fn find_return_type<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx ExprKind<'_>) -> Option> { . if let ExprKind::Match(_, arms, MatchSource::TryDesugar(_)) = expr { . for arm in *arms { . if let ExprKind::Ret(Some(ret)) = arm.body.kind { . return Some(cx.typeck_results().expr_ty(ret)); . } -- line 74 ---------------------------------------- 927 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . /// query cache, returning that value if present. . /// . /// (Also performs some associated bookkeeping, if a value was found.) . #[inline(always)] . fn try_get_cached<'tcx, C>(tcx: TyCtxt<'tcx>, cache: &C, key: C::Key) -> Option . where . C: QueryCache, . { 20,179 ( 0.00%) match cache.lookup(&key) { 4,506 ( 0.00%) Some((value, index)) => { . tcx.prof.query_cache_hit(index.into()); . tcx.dep_graph.read_index(index); 11,904 ( 0.00%) Some(value) . } . None => None, . } 10,434 ( 0.00%) } . . /// Shared implementation of `tcx.$query(..)` and `tcx.at(span).$query(..)` . /// for all queries. . #[inline(always)] . pub(crate) fn query_get_at<'tcx, C>( . tcx: TyCtxt<'tcx>, . span: Span, . query: &'tcx QueryVTable<'tcx, C>, . key: C::Key, . ) -> C::Value . where . C: QueryCache, . { 1,534 ( 0.00%) match try_get_cached(tcx, &query.cache, key) { 114 ( 0.00%) Some(value) => value, 10,052 ( 0.00%) None => (query.execute_query_fn)(tcx, span, key, QueryMode::Get).unwrap(), 3,702,273 ( 0.21%) => ???:rustc_query_impl::query_impl::layout_of::execute_query_incr::__rust_end_short_backtrace (50x) . } . } . . /// Implementation of `tcx.ensure_ok().$query(..)` for all queries. . #[inline] . pub(crate) fn query_ensure_ok<'tcx, C>( . tcx: TyCtxt<'tcx>, . query: &'tcx QueryVTable<'tcx, C>, -- line 53 ---------------------------------------- 88,437 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/avx2/memchr.rs -------------------------------------------------------------------------------- Ir -- line 176 ---------------------------------------- . /// Note that callers may pass a pair of pointers such that `start >= end`. . /// In that case, `None` will always be returned. . #[inline] . pub unsafe fn find_raw( . &self, . start: *const u8, . end: *const u8, . ) -> Option<*const u8> { 8,608 ( 0.00%) if start >= end { . return None; . } . let len = end.distance(start); 6,810 ( 0.00%) if len < __m256i::BYTES { 3,424 ( 0.00%) return if len < __m128i::BYTES { . // SAFETY: We require the caller to pass valid start/end . // pointers. . generic::fwd_byte_by_byte(start, end, |b| { 17,220 ( 0.00%) b == self.sse2.needle1() . }) . } else { . // SAFETY: We require the caller to pass valid start/end . // pointers. . self.find_raw_sse2(start, end) . }; . } . // SAFETY: Building a `One` means it's safe to call both 'sse2' and -- line 201 ---------------------------------------- 12,642 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::{qpath_generic_tys, sym}; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::Symbol; . . use super::BOX_COLLECTION; . 7,128 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 1,818 ( 0.00%) if Some(def_id) == cx.tcx.lang_items().owned_box() 23,760 ( 0.00%) => ???:::lang_items (594x) . && let Some(item_type) = get_std_collection(cx, qpath) . { . let generic = match item_type { . sym::String => "", . _ => "<..>", . }; . . let box_content = format!("{item_type}{generic}"); -- line 20 ---------------------------------------- -- line 25 ---------------------------------------- . format!("you seem to be trying to use `Box<{box_content}>`. Consider using just `{box_content}`"), . None, . format!("`{box_content}` is already on the heap, `Box<{box_content}>` makes an extra allocation"), . ); . true . } else { . false . } 4,752 ( 0.00%) } . . fn get_std_collection(cx: &LateContext<'_>, qpath: &QPath<'_>) -> Option { 72 ( 0.00%) let param = qpath_generic_tys(qpath).next()?; 684 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (36x) . let id = param.basic_res().opt_def_id()?; . cx.tcx 48 ( 0.00%) .get_diagnostic_name(id) 636 ( 0.00%) => ???:::get_diagnostic_name (12x) . .filter(|&name| { . matches!( . name, . sym::HashMap . | sym::Vec . | sym::HashSet . | sym::VecDeque . | sym::LinkedList . | sym::BTreeMap . | sym::BTreeSet . | sym::BinaryHeap . ) . }) . .or_else(|| { . cx.tcx 24 ( 0.00%) .lang_items() 480 ( 0.00%) => ???:::lang_items (12x) . .string() . .filter(|did| id == *did) . .map(|_| sym::String) . }) . } 630 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/unnecessary_clippy_cfg.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint_and_note, span_lint_and_sugg}; . use clippy_utils::source::SpanExt as _; . use itertools::Itertools as _; . use rustc_ast::AttrStyle; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, Level}; . use rustc_span::sym; . 5,643 ( 0.00%) pub(super) fn check( . cx: &EarlyContext<'_>, . cfg_attr: &rustc_ast::MetaItem, . behind_cfg_attr: &rustc_ast::MetaItem, . attr: &Attribute, . ) { 2,565 ( 0.00%) if cfg_attr.has_name(sym::clippy) 4,104 ( 0.00%) => ???:::has_name (513x) . && let Some(ident) = behind_cfg_attr.ident() . && Level::from_symbol(ident.name).is_some() . && let Some(items) = behind_cfg_attr.meta_item_list() . { . let nb_items = items.len(); . let mut clippy_lints = Vec::with_capacity(items.len()); . for item in items { . if let Some(meta_item) = item.meta_item() -- line 24 ---------------------------------------- -- line 59 ---------------------------------------- . "write instead: `#{}[{}({})]`", . if attr.style == AttrStyle::Inner { "!" } else { "" }, . ident.name, . snippet . ), . ); . } . } 4,104 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs -------------------------------------------------------------------------------- Ir -- line 20 ---------------------------------------- . #[derive(Clone)] . pub struct Filter { . // Used for `SplitWhitespace` and `SplitAsciiWhitespace` `as_str` methods . pub(crate) iter: I, . predicate: P, . } . impl Filter { . pub(in crate::iter) const fn new(iter: I, predicate: P) -> Filter { 113,215 ( 0.01%) Filter { iter, predicate } . } . } . . impl Filter . where . I: Iterator, . P: FnMut(&I::Item) -> bool, . { -- line 36 ---------------------------------------- -- line 71 ---------------------------------------- . f.debug_struct("Filter").field("iter", &self.iter).finish() . } . } . . fn filter_fold( . mut predicate: impl FnMut(&T) -> bool, . mut fold: impl FnMut(Acc, T) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { 521 ( 0.00%) move |acc, item| if predicate(&item) { fold(acc, item) } else { acc } . } . . fn filter_try_fold<'a, T, Acc, R: Try>( . predicate: &'a mut impl FnMut(&T) -> bool, . mut fold: impl FnMut(Acc, T) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { 78,686 ( 0.00%) move |acc, item| if predicate(&item) { fold(acc, item) } else { try { acc } } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Filter . where . P: FnMut(&I::Item) -> bool, . { . type Item = I::Item; . . #[inline] 4,206 ( 0.00%) fn next(&mut self) -> Option { 54 ( 0.00%) self.iter.find(&mut self.predicate) 4,178 ( 0.00%) } . . #[inline] . fn next_chunk( . &mut self, . ) -> Result<[Self::Item; N], array::IntoIter> { . // avoid codegen for the dead branch . let fun = const { . if crate::mem::needs_drop::() { -- line 107 ---------------------------------------- -- line 130 ---------------------------------------- . // less readable and also less backwards-compatible to Rust before 1.10. . // . // Using the branchless version will also simplify the LLVM byte code, thus . // leaving more budget for LLVM optimizations. . #[inline] . fn count(self) -> usize { . #[inline] . fn to_usize(mut predicate: impl FnMut(&T) -> bool) -> impl FnMut(T) -> usize { 448 ( 0.00%) move |x| predicate(&x) as usize . } . . let before = self.iter.size_hint().1.unwrap_or(usize::MAX); . let total = self.iter.map(to_usize(self.predicate)).sum(); . // SAFETY: `total` and `before` came from the same iterator of type `I` . unsafe { . ::assume_count_le_upper_bound(total, before); . } -- line 146 ---------------------------------------- -- line 149 ---------------------------------------- . . #[inline] . fn try_fold(&mut self, init: Acc, fold: Fold) -> R . where . Self: Sized, . Fold: FnMut(Acc, Self::Item) -> R, . R: Try, . { 32 ( 0.00%) self.iter.try_fold(init, filter_try_fold(&mut self.predicate, fold)) 6,016 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, ::block::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::adapters::filter::filter_try_fold>, ::block::{closure#1}, core::iter::traits::iterator::Iterator::try_for_each::call>, core::iter::traits::iterator::iter_compare::compare, rustc_lexer::TokenKind, (), core::iter::traits::iterator::Iterator::eq_by::compare, ::block::{closure#0}>, ::block::{closure#1}> as core::iter::traits::iterator::Iterator>::eq<[rustc_lexer::TokenKind; 1]>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow>> (16x) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 7,382 ( 0.00%) self.iter.fold(init, filter_fold(self.predicate, fold)) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl DoubleEndedIterator for Filter . where . P: FnMut(&I::Item) -> bool, . { -- line 173 ---------------------------------------- 55,849 ( 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, . ) { 24,040 ( 0.00%) if !check_private_items && !cx.effective_visibilities.is_exported(item.owner_id.def_id) { 162,960 ( 0.01%) => ???:::is_exported (3,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/strings.rs -------------------------------------------------------------------------------- Ir -- line 278 ---------------------------------------- . } . } . } . . // Max length a b"foo" string can take . const MAX_LENGTH_BYTE_STRING_LIT: usize = 32; . . impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use rustc_ast::LitKind; . 219,913 ( 0.01%) if let ExprKind::Call(fun, [bytes_arg]) = e.kind . // Find `std::str::converts::from_utf8` or `std::primitive::str::from_utf8` 7,035 ( 0.00%) && let Some(sym::str_from_utf8 | sym::str_inherent_from_utf8) = 2,361 ( 0.00%) fun.res(cx).opt_diag_name(cx) . . // Find string::as_bytes . && let ExprKind::AddrOf(BorrowKind::Ref, _, args) = bytes_arg.kind . && let ExprKind::Index(left, right, _) = args.kind . && let (method_names, expressions, _) = method_calls(left, 1) . && method_names == [sym::as_bytes] . && expressions.len() == 1 . && expressions[0].1.is_empty() -- line 300 ---------------------------------------- -- line 315 ---------------------------------------- . e.span, . "calling a slice of `as_bytes()` with `from_utf8` should be not necessary", . "try", . format!("Some(&{snippet_app}[{right_snip}])"), . applicability, . ); . } . 59,748 ( 0.00%) if !e.span.in_external_macro(cx.sess().source_map()) . && let ExprKind::MethodCall(path, receiver, ..) = &e.kind 5,358 ( 0.00%) && path.ident.name == sym::as_bytes 8 ( 0.00%) && let ExprKind::Lit(lit) = &receiver.kind . && let LitKind::Str(lit_content, _) = &lit.node . { . let callsite = snippet(cx, receiver.span.source_callsite(), r#""foo""#); . let mut applicability = Applicability::MachineApplicable; . if callsite.starts_with("include_str!") { . span_lint_and_sugg( . cx, . STRING_LIT_AS_BYTES, -- line 334 ---------------------------------------- -- line 362 ---------------------------------------- . snippet_with_applicability(cx, receiver.span, r#""foo""#, &mut applicability) . ), . applicability, . ); . } . } . } . 32,554 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = &e.kind 3,094 ( 0.00%) && path.ident.name == sym::into_bytes 6 ( 0.00%) && let ExprKind::MethodCall(path, recv, [], _) = &recv.kind 4 ( 0.00%) && matches!(path.ident.name, sym::to_owned | sym::to_string) 3 ( 0.00%) && let ExprKind::Lit(lit) = &recv.kind . && let LitKind::Str(lit_content, _) = &lit.node . && lit_content.as_str().is_ascii() . && lit_content.as_str().len() <= MAX_LENGTH_BYTE_STRING_LIT . && !recv.span.from_expansion() . { . let mut applicability = Applicability::MachineApplicable; . . span_lint_and_sugg( -- line 382 ---------------------------------------- -- line 387 ---------------------------------------- . "consider using a byte string literal instead", . format!( . "b{}.to_vec()", . snippet_with_applicability(cx, recv.span, r#""..""#, &mut applicability) . ), . applicability, . ); . } 217,552 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for StrToString { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . if expr.span.from_expansion() { . return; . } . -- line 403 ---------------------------------------- -- line 438 ---------------------------------------- . "str::to_owned".to_string(), . Applicability::MachineApplicable, . ); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for TrimSplitWhitespace { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . let tyckres = cx.typeck_results(); 61,295 ( 0.00%) if let ExprKind::MethodCall(path, split_recv, [], split_ws_span) = expr.kind 1,547 ( 0.00%) && path.ident.name == sym::split_whitespace . && let Some(split_ws_def_id) = tyckres.type_dependent_def_id(expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::str_split_whitespace, split_ws_def_id) . && let ExprKind::MethodCall(path, _trim_recv, [], trim_span) = split_recv.kind . && let trim_fn_name @ (sym::trim | sym::trim_start | sym::trim_end) = path.ident.name . && let Some(trim_def_id) = tyckres.type_dependent_def_id(split_recv.hir_id) . && is_one_of_trim_diagnostic_items(cx, trim_def_id) . { . span_lint_and_sugg( -- line 457 ---------------------------------------- -- line 459 ---------------------------------------- . TRIM_SPLIT_WHITESPACE, . trim_span.with_hi(split_ws_span.lo()), . format!("found call to `str::{trim_fn_name}` before `str::split_whitespace`"), . format!("remove `{trim_fn_name}()`"), . String::new(), . Applicability::MachineApplicable, . ); . } 217,552 ( 0.01%) } . } . . fn is_one_of_trim_diagnostic_items(cx: &LateContext<'_>, trim_def_id: DefId) -> bool { . matches!( . cx.tcx.get_diagnostic_name(trim_def_id), . Some(sym::str_trim | sym::str_trim_start | sym::str_trim_end) . ) . } -- line 475 ---------------------------------------- 29,555 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{Expr, ExprKind, GenericArg}; . use rustc_lint::LateContext; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_middle::ty::{self, Ty}; . . use super::CAST_PTR_ALIGNMENT; . . pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { 342 ( 0.00%) lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); 969 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::lint_cast_ptr_alignment (57x) . } . 135,970 ( 0.01%) pub(super) fn check_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 59,748 ( 0.00%) if let ExprKind::MethodCall(method_path, self_arg, [], _) = &expr.kind 3,094 ( 0.00%) && method_path.ident.name == sym::cast 132 ( 0.00%) && let Some(generic_args) = method_path.args 220 ( 0.00%) && let [GenericArg::Type(cast_to)] = generic_args.args . // There probably is no obvious reason to do this, just to be consistent with `as` cases. 220 ( 0.00%) && !is_hir_ty_cfg_dependant(cx, cast_to.as_unambig_ty()) 7,172 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_hir_ty_cfg_dependant (44x) . { 352 ( 0.00%) let (cast_from, cast_to) = (cx.typeck_results().expr_ty(self_arg), cx.typeck_results().expr_ty(expr)); 3,520 ( 0.00%) => ???:::expr_ty (88x) 440 ( 0.00%) lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); 922,464 ( 0.05%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::lint_cast_ptr_alignment (44x) . } 162,900 ( 0.01%) } . 808 ( 0.00%) fn lint_cast_ptr_alignment<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { 202 ( 0.00%) if let ty::RawPtr(from_ptr_ty, _) = *cast_from.kind() 132 ( 0.00%) && let ty::RawPtr(to_ptr_ty, _) = *cast_to.kind() 132 ( 0.00%) && let Ok(from_layout) = cx.layout_of(from_ptr_ty) 132 ( 0.00%) && let Ok(to_layout) = cx.layout_of(to_ptr_ty) 44 ( 0.00%) && from_layout.align.abi < to_layout.align.abi . // with c_void, we inherently need to trust the user . && !is_c_void(cx, from_ptr_ty) . // when casting from a ZST, we don't know enough to properly lint . && !from_layout.is_zst() . && !is_used_as_unaligned(cx, expr) . && !expr.span.in_external_macro(cx.tcx.sess.source_map()) . { . span_lint( -- line 41 ---------------------------------------- -- line 44 ---------------------------------------- . expr.span, . format!( . "casting from `{cast_from}` to a more-strictly-aligned pointer (`{cast_to}`) ({} < {} bytes)", . from_layout.align.bytes(), . to_layout.align.bytes(), . ), . ); . } 707 ( 0.00%) } . . fn is_used_as_unaligned(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . let Some(parent) = get_parent_expr(cx, e) else { . return false; . }; . match parent.kind { . ExprKind::MethodCall(name, self_arg, ..) if self_arg.hir_id == e.hir_id => { . if matches!(name.ident.name, sym::read_unaligned | sym::write_unaligned) -- line 60 ---------------------------------------- 308 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . . pub struct NeedlessLateInit<'tcx> { . check_grouped_late_init: bool, . grouped_late_inits: Vec<(HirId, HirIdMap>)>, . } . . impl<'tcx> NeedlessLateInit<'tcx> { . pub fn new(conf: &'static Conf) -> Self { 4 ( 0.00%) Self { . check_grouped_late_init: conf.check_grouped_late_init, . grouped_late_inits: Vec::default(), . } . } . 99 ( 0.00%) fn check_if_or_match( . &mut self, . cx: &LateContext<'tcx>, . local_stmt: &'tcx LetStmt<'tcx>, . block: &'tcx Block<'tcx>, . binding_id: HirId, . usage: Usage<'tcx>, . exprs: impl IntoIterator>, . ) { . let mut assigns: Vec> = Vec::new(); . for expr in exprs { 21 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 160 ( 0.00%) => ???:::expr_ty (4x) 21 ( 0.00%) if ty.is_never() { . continue; . } 3 ( 0.00%) if !ty.is_unit() { . return; . } . 25 ( 0.00%) let Some(assign_group) = LocalAssignGroup::new(cx, expr) else { 4,478 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::new (3x) . return; . }; . . if let Some(last_group) = assigns.last() . && !assign_group.is_parallel(last_group) . { . return; . } -- line 109 ---------------------------------------- -- line 110 ---------------------------------------- . . assigns.push(assign_group); . } . . let Some(first_group) = assigns.first() else { . return; . }; . // If there are multiple assignments grouped together, lazyly check them after processing the block. 2 ( 0.00%) if first_group.0.len() > 1 { 2 ( 0.00%) if self.check_grouped_late_init { . let late_inits = if let Some((hir_id, late_inits)) = self.grouped_late_inits.last_mut() . && *hir_id == block.hir_id . { . late_inits . } else { 11 ( 0.00%) &mut self.grouped_late_inits.push_mut((block.hir_id, HirIdMap::default())).1 . }; . . let mut decls = HirIdMap::default(); . decls.insert(binding_id, local_stmt); 21 ( 0.00%) late_inits.insert(usage.expr.hir_id, GroupedLateInit { usage, assigns, decls }); . } . . return; . } . . if first_group.0[0].lhs_id == binding_id { . span_lint_and_then( . cx, -- line 138 ---------------------------------------- -- line 178 ---------------------------------------- . "move the declaration `{binding_name}` here and remove the assignments from the {descriptor}", . ), . suggestions, . applicability, . ); . }, . ); . } 48 ( 0.00%) } . } . . fn contains_let(cond: &Expr<'_>) -> bool { . for_each_expr_without_closures(cond, |e| { 21 ( 0.00%) if matches!(e.kind, ExprKind::Let(_)) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . fn stmt_needs_ordered_drop(cx: &LateContext<'_>, stmt: &Stmt<'_>) -> bool { 30 ( 0.00%) let StmtKind::Let(local) = stmt.kind else { . return false; . }; 18 ( 0.00%) !local.pat.walk_short(|pat| { 66 ( 0.00%) if let PatKind::Binding(.., None) = pat.kind { 70 ( 0.00%) !needs_ordered_drop(cx, cx.typeck_results().pat_ty(pat)) 335,178 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::needs_ordered_drop (8x) 320 ( 0.00%) => ???:::pat_ty (8x) . } else { . true . } . }) . } . . #[derive(Debug)] . struct LocalAssign<'tcx> { . lhs_id: HirId, . rhs: &'tcx Expr<'tcx>, . span: Span, . } . . impl<'tcx> LocalAssign<'tcx> { . fn new(expr: &'tcx Expr<'tcx>, span: Span) -> Option { 18 ( 0.00%) if expr.span.from_expansion() { . return None; . } . 30 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = expr.kind 14 ( 0.00%) && !lhs.span.from_expansion() . { 9 ( 0.00%) return Some(Self { . lhs_id: lhs.res_local_id()?, . rhs, . span, . }); . } . . None 3 ( 0.00%) } . } . . #[derive(Debug)] . struct Usage<'tcx> { . span: Span, . expr: &'tcx Expr<'tcx>, . needs_semi: bool, . } . 216 ( 0.00%) fn first_usage<'tcx>( . cx: &LateContext<'tcx>, . binding_id: HirId, . local_stmt_id: HirId, . block: &'tcx Block<'tcx>, . ) -> Option> { 162 ( 0.00%) let significant_drop = needs_ordered_drop(cx, cx.typeck_results().node_type(binding_id)); 711,622 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::needs_ordered_drop (27x) 1,107 ( 0.00%) => ???:::node_type (27x) . 27 ( 0.00%) block . .stmts . .iter() . .skip_while(|stmt| stmt.hir_id != local_stmt_id) . .skip(1) 9 ( 0.00%) .take_while(|stmt| !significant_drop || !stmt_needs_ordered_drop(cx, stmt)) 57 ( 0.00%) .find(|&stmt| is_local_used(cx, stmt, binding_id)) 68 ( 0.00%) .and_then(|stmt| match stmt.kind { . StmtKind::Expr(expr) => Some(Usage { . span: stmt.span, . expr, . needs_semi: true, . }), . StmtKind::Semi(expr) => Some(Usage { . span: stmt.span, . expr, . needs_semi: false, . }), . _ => None, . }) . .or_else(|| { 38 ( 0.00%) block . .expr 76 ( 0.00%) .filter(|expr| is_local_used(cx, *expr, binding_id)) . .map(|expr| Usage { 28 ( 0.00%) span: expr.span, . expr, . needs_semi: true, . }) . }) 216 ( 0.00%) } . . fn local_snippet_without_semicolon<'a>( . cx: &LateContext<'_>, . local: &LetStmt<'_>, . applicability: &mut Applicability, . ) -> Cow<'a, str> { . let span = local.span.with_hi(match local.ty { . // let : ; -- line 293 ---------------------------------------- -- line 300 ---------------------------------------- . . snippet_with_applicability(cx, span, "..", applicability) . } . . #[derive(Debug)] . struct LocalAssignGroup<'tcx>(Vec>); . . impl<'tcx> LocalAssignGroup<'tcx> { 24 ( 0.00%) fn new(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option { 21 ( 0.00%) match expr.kind { . ExprKind::Block(Block { expr: Some(expr), .. }, _) 1 ( 0.00%) if let Some(assign) = LocalAssign::new(expr, expr.span) => . { . Some(LocalAssignGroup(vec![assign])) . }, . ExprKind::Block(Block { expr: None, stmts, .. }, _) => { . let mut assign_group = Vec::new(); . // Avoid cases when the assignee is used or reassigned in the subsequent assignments . let mut used_locals = HirIdSet::default(); 4 ( 0.00%) for stmt in stmts.iter().rev() { 12 ( 0.00%) if let StmtKind::Semi(expr) | StmtKind::Expr(expr) = stmt.kind 4 ( 0.00%) && let Some(assign) = LocalAssign::new(expr, stmt.span) 3 ( 0.00%) && !used_locals.contains(&assign.lhs_id) . { . used_locals.insert(assign.lhs_id); . for_each_expr(cx.tcx, assign.rhs, |e| { . if let Some(id) = e.res_local_id() { . used_locals.insert(id); . } . ControlFlow::<()>::Continue(()) . }); . assign_group.push(assign); . continue; . } . . break; . } 2 ( 0.00%) if assign_group.is_empty() { . None . } else { 8 ( 0.00%) Some(LocalAssignGroup(assign_group)) . } 6 ( 0.00%) }, 76 ( 0.00%) => ???:__rustc::__rdl_dealloc (2x) . ExprKind::Assign(..) if let Some(assign) = LocalAssign::new(expr, expr.span) => { . Some(LocalAssignGroup(vec![assign])) . }, 1 ( 0.00%) _ => None, . } 24 ( 0.00%) } . . /// Checks if the assignments in `self` and `other` are parallel, i.e. they have the same number . /// of assignments and the same assignees in the same order. . fn is_parallel(&self, other: &Self) -> bool { 2 ( 0.00%) self.0.len() == other.0.len() && self.0.iter().zip(other.0.iter()).all(|(a, b)| a.lhs_id == b.lhs_id) . } . } . . #[derive(Debug)] . struct GroupedLateInit<'tcx> { . usage: Usage<'tcx>, . assigns: Vec>, . decls: HirIdMap<&'tcx LetStmt<'tcx>>, . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessLateInit<'tcx> { 5,648 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 1,412 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(local.hir_id); 922 ( 0.00%) if let LetStmt { . init: None, . pat: . Pat { . kind: PatKind::Binding(BindingMode::NONE, binding_id, _, None), . .. . }, . source: LocalSource::Normal, . .. 787 ( 0.00%) } = local 54 ( 0.00%) && let Some((_, Node::Stmt(local_stmt))) = parents.next() 54 ( 0.00%) && let Some((_, Node::Block(block))) = parents.next() 434 ( 0.00%) && let Some(usage) = first_usage(cx, *binding_id, local_stmt.hir_id, block) 1,108,310 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:clippy_lints::needless_late_init::first_usage (27x) . { 44 ( 0.00%) if self.check_grouped_late_init . && let Some((hir_id, late_inits)) = self.grouped_late_inits.last_mut() 1 ( 0.00%) && *hir_id == block.hir_id 4 ( 0.00%) && let Some(late_init) = late_inits.get_mut(&usage.expr.hir_id) 27 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (1x) . { 3 ( 0.00%) late_init.decls.insert(*binding_id, local); . return; . } . 162 ( 0.00%) match usage.expr.kind { . ExprKind::Assign(..) 27 ( 0.00%) if let Some(assign) = LocalAssign::new(usage.expr, usage.expr.span) 108 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::new (3x) . && assign.lhs_id == *binding_id => . { . let mut applicability = Applicability::MachineApplicable; . let let_snippet = local_snippet_without_semicolon(cx, local, &mut applicability); . let binding_name = cx.tcx.hir_name(*binding_id); . let mut msg_span = MultiSpan::from_spans(vec![local_stmt.span, assign.span]); . msg_span.push_span_label(local_stmt.span, "created here"); . msg_span.push_span_label(assign.span, "initialised here"); -- line 400 ---------------------------------------- -- line 418 ---------------------------------------- . (local_stmt.span, String::new()), . (assign.span, format!("{let_snippet} = {rhs_snippet}")), . ], . applicability, . ); . }, . ); . }, 15 ( 0.00%) ExprKind::If(cond, then_expr, Some(mut else_expr)) if !contains_let(cond) => { . // Flatten multiple if branches 3 ( 0.00%) let mut exprs = vec![then_expr]; 9 ( 0.00%) while let ExprKind::If(cond, then, Some(else_)) = else_expr.kind { . if contains_let(cond) { . return; . } . exprs.push(then); . else_expr = else_; . } . exprs.push(else_expr); 54 ( 0.00%) self.check_if_or_match(cx, local, block, *binding_id, usage, exprs); 6,175 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::check_if_or_match::> (3x) . }, 6 ( 0.00%) ExprKind::Match(_, arms, MatchSource::Normal) => { 39 ( 0.00%) self.check_if_or_match(cx, local, block, *binding_id, usage, arms.iter().map(|arm| arm.body)); 282 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::check_if_or_match::, ::check_local::{closure#1}>> (3x) 6 ( 0.00%) }, . _ => {}, . } . } 5,648 ( 0.00%) } . 22,720 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 5,680 ( 0.00%) if self.check_grouped_late_init 2 ( 0.00%) && let Some((_, late_inits)) = self.grouped_late_inits.pop_if(|(hir_id, _)| *hir_id == block.hir_id) . { 7 ( 0.00%) 'outer: for (_, late_init) in late_inits { 2 ( 0.00%) if late_init.decls.len() < late_init.assigns[0].0.len() { . continue; . } . . let mut suggestions = vec![]; 3 ( 0.00%) for assign in &late_init.assigns[0].0 { 5 ( 0.00%) if let Some(local) = late_init.decls.get(&assign.lhs_id) 61 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (1x) . // If the local has a type annotation, skip it since removing the annotation might cause type . // inference issues while annotating the tuple makes the suggestion harder to read. 2 ( 0.00%) && local.ty.is_none() . { . suggestions.push((local.span, String::new())); . } else { . continue 'outer; . } . } . . span_lint_and_then( -- line 469 ---------------------------------------- -- line 511 ---------------------------------------- . }; . diag.multipart_suggestion( . format!("move the declarations here and remove the assignments from the {descriptor}"), . suggestions, . applicability, . ); . }, . ); 2 ( 0.00%) } 261 ( 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:: (1x) . } 22,720 ( 0.00%) } . } 427 ( 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/unicode/unicode_data.rs -------------------------------------------------------------------------------- Ir -- line 913 ---------------------------------------- . 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, . 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, . 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, . 0, 0, 0, 0, 0, 0, 0, 0, 0, . ]; . #[inline] . pub const fn lookup(c: char) -> bool { . debug_assert!(!c.is_ascii()); 894 ( 0.00%) match c as u32 >> 8 { . 0 => WHITESPACE_MAP[c as usize & 0xff] & 1 != 0, . 22 => c as u32 == 0x1680, 447 ( 0.00%) 32 => WHITESPACE_MAP[c as usize & 0xff] & 2 != 0, . 48 => c as u32 == 0x3000, . _ => false, . } . } . } . . #[rustfmt::skip] . pub mod conversions { -- line 932 ---------------------------------------- 34,024 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs -------------------------------------------------------------------------------- Ir -- line 2128 ---------------------------------------- . // `ArcInner` structure itself is `Sync` because the inner data is . // `Sync` as well, so we're ok loaning out an immutable pointer to these . // contents. . unsafe { self.ptr.as_ref() } . } . . // Non-inlined part of `drop`. . #[inline(never)] 2 ( 0.00%) unsafe fn drop_slow(&mut self) { . // Drop the weak ref collectively held by all strong references when this . // variable goes out of scope. This ensures that the memory is deallocated . // even if the destructor of `T` panics. . // Take a reference to `self.alloc` instead of cloning because 1. it'll last long . // enough, and 2. you should be able to drop `Arc`s with unclonable allocators 2 ( 0.00%) let _weak = Weak { ptr: self.ptr, alloc: &self.alloc }; . . // Destroy the data at this time, even though we must not free the box . // allocation itself (there might still be weak pointers lying around). . // We cannot use `get_mut_unchecked` here, because `self.alloc` is borrowed. . unsafe { ptr::drop_in_place(&mut (*self.ptr.as_ptr()).data) }; . } . . /// Returns `true` if the two `Arc`s point to the same allocation in a vein similar to -- line 2150 ---------------------------------------- -- line 2424 ---------------------------------------- . // the worst already happened and we actually do overflow the `usize` counter. However, that . // requires the counter to grow from `isize::MAX` to `usize::MAX` between the increment . // above and the `abort` below, which seems exceedingly unlikely. . // . // This is a global invariant, and also applies when using a compare-exchange loop to increment . // counters in other methods. . // Otherwise, the counter could be brought to an almost-overflow using a compare-exchange loop, . // and then overflow using a few `fetch_add`s. 22,240 ( 0.00%) if old_size > MAX_REFCOUNT { . abort(); . } . 44,458 ( 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 { 221,044 ( 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. 45,848 ( 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(); 669,418 ( 0.04%) => /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) 4,569 ( 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 ---------------------------------------- 742,596 ( 0.04%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::Span; . . use std::iter; . . use super::MISNAMED_GETTERS; . 12,418 ( 0.00%) pub fn check_fn(cx: &LateContext<'_>, kind: FnKind<'_>, decl: &FnDecl<'_>, body: &Body<'_>, span: Span) { 3,548 ( 0.00%) let FnKind::Method(ref ident, sig) = kind else { . return; . }; . . // Takes only &(mut) self 2,882 ( 0.00%) if decl.inputs.len() != 1 { . return; . } . . let name = ident.name.as_str(); . 4,947 ( 0.00%) let name = match decl.implicit_self() { 7,008 ( 0.00%) => ???:::implicit_self (876x) . ImplicitSelfKind::RefMut => { . let Some(name) = name.strip_suffix("_mut") else { . return; . }; . name . }, . ImplicitSelfKind::Imm | ImplicitSelfKind::Mut | ImplicitSelfKind::RefImm => name, . ImplicitSelfKind::None => return, -- line 34 ---------------------------------------- -- line 38 ---------------------------------------- . name.strip_suffix("_unchecked").unwrap_or(name) . } else { . name . }; . . // Body must be `&(mut) .name`, potentially in an `unsafe` block . // self_data is not necessarily self, to also lint sub-getters, etc… . 1,712 ( 0.00%) let block_expr = if let ExprKind::Block(block, _) = body.value.kind 428 ( 0.00%) && block.stmts.is_empty() 1,197 ( 0.00%) && let Some(block_expr) = block.expr . { 1,243 ( 0.00%) if let ExprKind::Block(unsafe_block, _) = block_expr.kind 46 ( 0.00%) && unsafe_block.stmts.is_empty() 92 ( 0.00%) && matches!( . unsafe_block.rules, . BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) . ) 138 ( 0.00%) && let Some(unsafe_block_expr) = unsafe_block.expr . { . unsafe_block_expr . } else { . block_expr . } . } else { . return; . }; 1,197 ( 0.00%) let expr_span = block_expr.span; . . // Accept &, &mut and 901 ( 0.00%) let expr = if let ExprKind::AddrOf(_, _, tmp) = block_expr.kind { . tmp . } else { . block_expr . }; 925 ( 0.00%) let (self_data, used_ident) = if let ExprKind::Field(self_data, ident) = expr.kind 9 ( 0.00%) && ident.name.as_str() != name . { . (self_data, ident) . } else { . return; . }; . . let mut used_field = None; . let mut correct_field = None; . let typeck_results = cx.typeck_results(); 20 ( 0.00%) for adjusted_type in iter::once(typeck_results.expr_ty(self_data)) 200 ( 0.00%) => ???:::expr_ty (5x) 20 ( 0.00%) .chain(typeck_results.expr_adjustments(self_data).iter().map(|adj| adj.target)) 215 ( 0.00%) => ???:::expr_adjustments (5x) . { 30 ( 0.00%) let ty::Adt(def, _) = adjusted_type.kind() else { . continue; . }; . 7 ( 0.00%) for f in def.all_fields() { 17 ( 0.00%) if f.name.as_str() == name { . correct_field = Some(f); . } 15 ( 0.00%) if f.name == used_ident.name { . used_field = Some(f); . } . } . } . 25 ( 0.00%) let Some(used_field) = used_field else { . // Can happen if the field access is a tuple. We don't lint those because the getter name could not . // start with a number. . return; . }; . . let Some(correct_field) = correct_field else { . // There is no field corresponding to the getter name. . // FIXME: This can be a false positive if the correct field is reachable through deeper -- line 109 ---------------------------------------- -- line 120 ---------------------------------------- . MISNAMED_GETTERS, . span, . "getter function appears to return the wrong field", . |diag| { . diag.span_suggestion(expr_span, "consider using", sugg, Applicability::MaybeIncorrect); . }, . ); . } 14,192 ( 0.00%) } 6,976 ( 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 587 ---------------------------------------- . /// let x: Result = Err("Some error message"); . /// assert_eq!(x.is_ok(), false); . /// ``` . #[must_use = "if you intended to assert that this is ok, consider `.unwrap()` instead"] . #[rustc_const_stable(feature = "const_result_basics", since = "1.48.0")] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub const fn is_ok(&self) -> bool { 27 ( 0.00%) matches!(*self, Ok(_)) . } . . /// Returns `true` if the result is [`Ok`] and the value inside of it matches a predicate. . /// . /// # Examples . /// . /// ``` . /// let x: Result = Ok(2); -- line 603 ---------------------------------------- -- line 618 ---------------------------------------- . #[stable(feature = "is_some_and", since = "1.70.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn is_ok_and(self, f: F) -> bool . where . F: [const] FnOnce(T) -> bool + [const] Destruct, . T: [const] Destruct, . E: [const] Destruct, . { 1,782 ( 0.00%) match self { . Err(_) => false, . Ok(x) => f(x), . } . } . . /// Returns `true` if the result is [`Err`]. . /// . /// # Examples -- line 634 ---------------------------------------- -- 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, . { 3,883 ( 0.00%) match self { 4,531 ( 0.00%) Ok(x) => Some(x), . Err(_) => None, . } . } . . /// Converts from `Result` to [`Option`]. . /// . /// Converts `self` into an [`Option`], consuming `self`, . /// and discarding the success value, if any. -- line 723 ---------------------------------------- -- 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, . { 242 ( 0.00%) match self { 120 ( 0.00%) 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`]). . /// . /// Arguments passed to `map_or` are eagerly evaluated; if you are passing -- line 845 ---------------------------------------- -- 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, . { 20,080 ( 0.00%) match self { 18,998 ( 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 1174 ---------------------------------------- . /// [`std::error`](../../std/error/index.html) module docs. . #[inline] . #[track_caller] . #[stable(feature = "result_expect", since = "1.4.0")] . pub fn expect(self, msg: &str) -> T . where . E: fmt::Debug, . { 4,122 ( 0.00%) match self { . Ok(t) => t, . Err(e) => unwrap_failed(msg, &e), . } . } . . /// Returns the contained [`Ok`] value, consuming the `self` value. . /// . /// Because this function may panic, its use is generally discouraged. -- line 1190 ---------------------------------------- -- line 1222 ---------------------------------------- . /// ``` . #[inline(always)] . #[track_caller] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn unwrap(self) -> T . where . E: fmt::Debug, . { 547 ( 0.00%) match self { 20 ( 0.00%) 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 . /// value, otherwise if [`Err`], returns the default value for that -- line 1239 ---------------------------------------- -- line 1586 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn unwrap_or(self, default: T) -> T . where . T: [const] Destruct, . E: [const] Destruct, . { 142 ( 0.00%) match self { . Ok(t) => t, . Err(_) => default, . } . } . . /// Returns the contained [`Ok`] value or computes it from a closure. . /// . /// -- line 1602 ---------------------------------------- -- 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 { 22,026 ( 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 { 5,396 ( 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 { 19,283 ( 0.00%) match self { 9,620 ( 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 ---------------------------------------- 33,197 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs -------------------------------------------------------------------------------- Ir -- line 731 ---------------------------------------- . valid_idents: &'static FxHashSet, . check_private_items: bool, . } . . impl Documentation { . pub fn new(conf: &'static Conf) -> Self { . Self { . valid_idents: &conf.doc_valid_idents, 3 ( 0.00%) check_private_items: conf.check_private_items, . } . } . } . . impl EarlyLintPass for Documentation { 252,763 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[rustc_ast::Attribute]) { . include_in_doc_without_cfg::check(cx, attrs); 288,872 ( 0.02%) } . } . . impl<'tcx> LateLintPass<'tcx> for Documentation { 403,300 ( 0.02%) fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { 402,605 ( 0.02%) let Some(headers) = check_attrs(cx, self.valid_idents, attrs) else { . return; . }; . 654,684 ( 0.04%) match cx.tcx.hir_node(cx.last_node_with_lint_attrs) { 2,542,106 ( 0.14%) => ???:::hir_node (40,131x) 3,462 ( 0.00%) Node::Field(FieldDef { span, safety, .. }) => match (headers.safety, safety) { . (false, Safety::Unsafe) => span_lint( . cx, . MISSING_SAFETY_DOC, . *span, . "docs for unsafe field missing `# Safety` section", . ), . (true, Safety::Safe) if cx.tcx.features().unsafe_fields() => span_lint_and_help( . cx, -- line 765 ---------------------------------------- -- line 766 ---------------------------------------- . UNNECESSARY_SAFETY_DOC, . *span, . "field with `# Safety` documentation is not marked unsafe", . None, . "if the field has safety invariants, mark it `unsafe`", . ), . _ => (), . }, 3,005 ( 0.00%) Node::Item(item) => { . too_long_first_doc_paragraph::check( . cx, . item, . attrs, 6,010 ( 0.00%) headers.first_paragraph_text_len, 3,005 ( 0.00%) headers.first_paragraph_md_len, 3,005 ( 0.00%) self.check_private_items, . ); 14,773 ( 0.00%) match item.kind { 252 ( 0.00%) ItemKind::Fn { sig, body, .. } 756 ( 0.00%) if !(is_entrypoint_fn(cx, item.owner_id.to_def_id()) 8,953 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn (126x) 756 ( 0.00%) || item.span.in_external_macro(cx.tcx.sess.source_map())) => 16,227 ( 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 (126x) . { 882 ( 0.00%) missing_headers::check(cx, item.owner_id, sig, headers, Some(body), self.check_private_items); 165,724 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (126x) . }, 80 ( 0.00%) 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", . ), . (true, Safety::Safe) => span_lint( . cx, -- line 798 ---------------------------------------- -- line 800 ---------------------------------------- . cx.tcx.def_span(item.owner_id), . "docs for safe trait have unnecessary `# Safety` section", . ), . _ => (), . }, . _ => (), . } . }, 18 ( 0.00%) Node::TraitItem(trait_item) => { 51 ( 0.00%) if let TraitItemKind::Fn(sig, ..) = trait_item.kind 75 ( 0.00%) && !trait_item.span.in_external_macro(cx.tcx.sess.source_map()) . { 135 ( 0.00%) missing_headers::check(cx, trait_item.owner_id, sig, headers, None, self.check_private_items); 47,438 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (15x) . } . }, 1,504 ( 0.00%) Node::ImplItem(impl_item) => { 7,684 ( 0.00%) if let ImplItemKind::Fn(sig, body_id) = impl_item.kind 7,190 ( 0.00%) && !impl_item.span.in_external_macro(cx.tcx.sess.source_map()) 7,190 ( 0.00%) && !is_trait_impl_item(cx, impl_item.hir_id()) 1,170,613 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (1,438x) . { 1,547 ( 0.00%) missing_headers::check( 12,687,342 ( 0.72%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (221x) . cx, 442 ( 0.00%) impl_item.owner_id, . sig, . headers, . Some(body_id), 221 ( 0.00%) self.check_private_items, . ); . } . }, . _ => {}, . } 322,640 ( 0.02%) } . } . . #[derive(Copy, Clone)] . struct Fragments<'a> { . doc: &'a str, . fragments: &'a [DocFragment], . } . -- line 840 ---------------------------------------- -- line 842 ---------------------------------------- . /// get the span for the markdown range. Note that this function is not cheap, use it with . /// caution. . #[must_use] . fn span(self, cx: &LateContext<'_>, range: Range) -> Option { . source_span_for_markdown_range(cx.tcx, self.doc, &range, self.fragments).map(|(sp, _)| sp) . } . } . 2,192 ( 0.00%) #[derive(Copy, Clone, Default)] . struct DocHeaders { . safety: bool, . errors: bool, . panics: bool, . first_paragraph_md_len: usize, . first_paragraph_text_len: usize, . } . -- line 858 ---------------------------------------- -- 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())) . } . 241,980 ( 0.01%) if suspicious_doc_comments::check(cx, attrs) || is_doc_hidden(attrs) { 2,780,966 ( 0.16%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check (40,330x) . return None; . } . 80,262 ( 0.00%) let (fragments, _) = attrs_to_doc_fragments( . attrs.iter().filter_map(|attr| { 25,576 ( 0.00%) if attr.doc_str_and_fragment_kind().is_none() || attr.span().in_external_macro(cx.sess().source_map()) { . None . } else { . Some((attr, None)) . } . }), . true, . ); . 548 ( 0.00%) let mut doc = String::with_capacity(fragments.iter().map(|frag| frag.doc.as_str().len() + 1).sum()); . . for fragment in &fragments { 15,402 ( 0.00%) add_doc_fragment(&mut doc, fragment); 1,263,866 ( 0.07%) => ???:rustc_resolve::rustdoc::add_doc_fragment (5,134x) . } . doc.pop(); . 40,131 ( 0.00%) if doc.trim().is_empty() { 118,749 ( 0.01%) if let Some(span) = span_of_fragments(&fragments) { 474,996 ( 0.03%) => ???:rustc_resolve::rustdoc::span_of_fragments (39,583x) . span_lint_and_help( . cx, . EMPTY_DOCS, . span, . "empty doc comment", . None, . "consider removing or filling it", . ); . } 118,749 ( 0.01%) return Some(DocHeaders::default()); . } . . // Only emits the allow-by-default `DOC_LINK_CODE`; skip its extra markdown reparse when it's off. 4,932 ( 0.00%) if !clippy_utils::is_lint_allowed(cx, DOC_LINK_CODE, cx.last_node_with_lint_attrs) { 529,301 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (548x) . check_for_code_clusters( . cx, . pulldown_cmark::Parser::new_with_broken_link_callback( . &doc, . main_body_opts() - Options::ENABLE_SMART_PUNCTUATION, . Some(&mut fake_broken_link_callback), . ) . .into_offset_iter(), -- line 920 ---------------------------------------- -- line 922 ---------------------------------------- . Fragments { . doc: &doc, . fragments: &fragments, . }, . ); . } . . // Same for the allow-by-default `DOC_PARAGRAPHS_MISSING_PUNCTUATION`, which also reparses. 3,836 ( 0.00%) if !clippy_utils::is_lint_allowed(cx, DOC_PARAGRAPHS_MISSING_PUNCTUATION, cx.last_node_with_lint_attrs) { 225,677 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (548x) . doc_paragraphs_missing_punctuation::check( . cx, . &doc, . Fragments { . doc: &doc, . fragments: &fragments, . }, . ); . } . . // NOTE: check_doc uses it own cb function, . // to avoid causing duplicated diagnostics for the broken link checker. 2,740 ( 0.00%) let mut full_fake_broken_link_callback = |bl: BrokenLink<'_>| -> Option<(CowStr<'_>, CowStr<'_>)> { 112 ( 0.00%) broken_link::check(cx, &bl, &doc, &fragments); 15,897 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/broken_link.rs:clippy_lints::doc::broken_link::check (28x) 196 ( 0.00%) Some(("fake".into(), "fake".into())) . }; . . // disable smart punctuation to pick up ['link'] more easily . let opts = main_body_opts() - Options::ENABLE_SMART_PUNCTUATION; . let parser = . pulldown_cmark::Parser::new_with_broken_link_callback(&doc, opts, Some(&mut full_fake_broken_link_callback)); . 10,412 ( 0.00%) Some(check_doc( 5,134,752 ( 0.29%) => site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:clippy_lints::doc::check_doc::> (548x) . cx, . valid_idents, . parser.into_offset_iter(), . &doc, 2,192 ( 0.00%) Fragments { . doc: &doc, . fragments: &fragments, . }, . attrs, . )) . } . . enum Container { -- line 966 ---------------------------------------- -- line 1053 ---------------------------------------- . . impl CodeTags { . /// Based on . fn parse(lang: &str) -> Self { . let mut tags = Self::default(); . . let mut seen_rust_tags = false; . let mut seen_other_tags = false; 386 ( 0.00%) for item in lang.split([',', ' ', '\t']) { . match item.trim() { . "" => {}, 12 ( 0.00%) "rust" => { . tags.rust = true; . seen_rust_tags = true; . }, 1 ( 0.00%) "ignore" => { . tags.ignore = true; . seen_rust_tags = !seen_other_tags; . }, 2 ( 0.00%) "no_run" => { . tags.no_run = true; 1 ( 0.00%) seen_rust_tags = !seen_other_tags; . }, 1 ( 0.00%) "should_panic" => seen_rust_tags = !seen_other_tags, 1 ( 0.00%) "compile_fail" => { . tags.compile_fail = true; 6 ( 0.00%) seen_rust_tags = !seen_other_tags || seen_rust_tags; . }, . "test_harness" => { . tags.test_harness = true; . seen_rust_tags = !seen_other_tags || seen_rust_tags; . }, . "standalone_crate" => { . seen_rust_tags = !seen_other_tags || seen_rust_tags; . }, 4 ( 0.00%) _ if item.starts_with("ignore-") => seen_rust_tags = true, 20 ( 0.00%) _ if item.starts_with("edition") => {}, . _ => seen_other_tags = true, . } . } . 198 ( 0.00%) tags.rust &= seen_rust_tags || !seen_other_tags; . . tags . } . } . . /// Checks parsed documentation. . /// This walks the "events" (think sections of markdown) produced by `pulldown_cmark`, . /// so lints here will generally access that information. . /// Returns documentation headers -- whether a "Safety", "Errors", "Panic" section was found . #[expect(clippy::too_many_lines, reason = "big match statement")] 6,576 ( 0.00%) fn check_doc<'a, Events: Iterator, Range)>>( . cx: &LateContext<'_>, . valid_idents: &FxHashSet, . events: Events, . doc: &str, . fragments: Fragments<'_>, . attrs: &[Attribute], . ) -> DocHeaders { . // true if a safety header was found . let mut headers = DocHeaders::default(); . let mut code = None; 548 ( 0.00%) let mut in_link = None; . let mut in_heading = false; . let mut in_footnote_definition = false; . let mut ticks_unbalanced = false; . let mut text_to_check: Vec<(CowStr<'_>, Range, isize)> = Vec::new(); . let mut paragraph_range = 0..0; . let mut code_level = 0; . let mut blockquote_level = 0; . let mut collected_breaks: Vec = Vec::new(); . let mut is_first_paragraph = true; . . let mut containers = Vec::new(); . . // Skip collecting text and the per-word scan when `DOC_MARKDOWN` (pedantic) is allowed. 3,836 ( 0.00%) let check_doc_markdown = !clippy_utils::is_lint_allowed(cx, DOC_MARKDOWN, cx.last_node_with_lint_attrs); 228,422 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (548x) . 1,644 ( 0.00%) let mut events = events.peekable(); 42,196 ( 0.00%) => ???:0x0000000000173dc0 (548x) . 117,653 ( 0.01%) while let Some((event, range)) = events.next() { 91,426 ( 0.01%) match event { 110 ( 0.00%) Html(tag) | InlineHtml(tag) => { 64 ( 0.00%) if tag.starts_with(" ???:::deref (22x) 1 ( 0.00%) code_level += 1; 48 ( 0.00%) } else if tag.starts_with(" ???:::deref (21x) 1 ( 0.00%) code_level -= 1; 105 ( 0.00%) } else if tag.starts_with(" ???:::deref (40x) . blockquote_level += 1; 105 ( 0.00%) } else if tag.starts_with(" ???:::deref (40x) . blockquote_level -= 1; . } . }, . Start(BlockQuote(_)) => { . blockquote_level += 1; . containers.push(Container::Blockquote); . if let Some((next_event, next_range)) = events.peek() { . let next_start = match next_event { -- line 1151 ---------------------------------------- -- line 1173 ---------------------------------------- . } . } . }, . End(TagEnd::BlockQuote) => { . blockquote_level -= 1; . containers.pop(); . }, . Start(CodeBlock(ref kind)) => { 198 ( 0.00%) code = Some(match kind { . CodeBlockKind::Indented => CodeTags::default(), 594 ( 0.00%) CodeBlockKind::Fenced(lang) => CodeTags::parse(lang), 1,089 ( 0.00%) => ???:::deref (99x) . }); . }, 99 ( 0.00%) End(TagEnd::CodeBlock) => code = None, 1,230 ( 0.00%) Start(Link { dest_url, .. }) => in_link = Some(dest_url), 492 ( 0.00%) End(TagEnd::Link) => in_link = None, . Start(Heading { .. } | Paragraph | Item) => { 2,352 ( 0.00%) if let Start(Heading { .. }) = event { . in_heading = true; . } 2,352 ( 0.00%) if let Start(Item) = event { . let indent = if let Some((next_event, next_range)) = events.peek() { . let next_start = match next_event { . End(TagEnd::Item) => next_range.end, . _ => next_range.start, . }; . if let Some(refdefrange) = looks_like_refdef(doc, range.start..next_start) && . let Some(refdefspan) = fragments.span(cx, refdefrange.clone()) . { -- line 1201 ---------------------------------------- -- line 1211 ---------------------------------------- . "[]", . Applicability::MaybeIncorrect, . ); . diag.help("link definitions are not shown in rendered documentation"); . } . ); . refdefrange.start - range.start . } else { 309 ( 0.00%) let mut start = next_range.start; 309 ( 0.00%) if start > 0 && doc.as_bytes().get(start - 1) == Some(&b'\\') { . // backslashes aren't in the event stream... . start -= 1; . } . . start.saturating_sub(range.start) . } . } else { . 0 . }; . containers.push(Container::List(indent)); . } . ticks_unbalanced = false; . paragraph_range = range; 4,704 ( 0.00%) if is_first_paragraph { 2,740 ( 0.00%) headers.first_paragraph_md_len = doc[paragraph_range.clone()].chars().count(); . } . }, . End(TagEnd::Heading(_) | TagEnd::Paragraph | TagEnd::Item) => { . if is_first_paragraph { . is_first_paragraph = false; . } 5,880 ( 0.00%) if let End(TagEnd::Heading(_)) = event { . in_heading = false; . } 7,056 ( 0.00%) if let End(TagEnd::Item) = event { . containers.pop(); . } 2,352 ( 0.00%) if check_doc_markdown { . if ticks_unbalanced && let Some(span) = fragments.span(cx, paragraph_range.clone()) . .or_else(|| span_of_fragments(fragments.fragments)) { . span_lint_and_help( . cx, . DOC_MARKDOWN, . span, . "backticks are unbalanced", . None, -- line 1256 ---------------------------------------- -- line 1266 ---------------------------------------- . } . } . }, . Start(FootnoteDefinition(..)) => in_footnote_definition = true, . End(TagEnd::FootnoteDefinition) => in_footnote_definition = false, . Start(_) | End(_) // We don't care about other tags . | TaskListMarker(_) | Rule => (), . SoftBreak | HardBreak => { 1,324 ( 0.00%) if is_first_paragraph { 393 ( 0.00%) headers.first_paragraph_text_len += 1; . } 2,648 ( 0.00%) if !containers.is_empty() . && !in_footnote_definition . // Tabs aren't handled correctly vvvv . && !doc[range.clone()].contains('\t') . && let Some((next_event, next_range)) = events.peek() . && !matches!(next_event, End(_)) . { . lazy_continuation::check( . cx, . doc, 48 ( 0.00%) range.end..next_range.start, . &fragments, . &containers[..], . ); . } . . 48 ( 0.00%) if event == HardBreak . && !doc[range.clone()].trim().starts_with('\\') . && let Some(span) = fragments.span(cx, range.clone()) . && !span.from_expansion() . { . collected_breaks.push(span); . } . }, 4,284 ( 0.00%) Code(code) | InlineMath(code) | DisplayMath(code) => { 3,213 ( 0.00%) if is_first_paragraph { 2,068 ( 0.00%) headers.first_paragraph_text_len += code.chars().count(); 5,709 ( 0.00%) => ???:::deref (517x) . } . } 11,164 ( 0.00%) Text(text) => { 5,582 ( 0.00%) if is_first_paragraph { 11,190 ( 0.00%) headers.first_paragraph_text_len += text.chars().count(); 10,659 ( 0.00%) => ???:::deref (969x) . } . paragraph_range.end = range.end; . let range_ = range.clone(); 14,196 ( 0.00%) ticks_unbalanced |= text.contains('`') 30,701 ( 0.00%) => ???:::deref (2,791x) . && code.is_none() . && doc[range.clone()].bytes().enumerate().any(|(i, c)| { . // scan the markdown source code bytes for backquotes that aren't preceded by backslashes . // - use bytes, instead of chars, to avoid utf8 decoding overhead (special chars are ascii) . // - relevant backquotes are within doc[range], but backslashes are not, because they're not . // actually part of the rendered text (pulldown-cmark doesn't emit any events for escapes) . // - if `range_.start + i == 0`, then `range_.start + i - 1 == -1`, and since we're working in . // usize, that would underflow and maybe panic . c == b'`' && (range_.start + i == 0 || doc.as_bytes().get(range_.start + i - 1) != Some(&b'\\')) . }); 5,628 ( 0.00%) if Some(&text) == in_link.as_ref() || ticks_unbalanced { . // Probably a link of the form `` . // Which are represented as a link to "http://example.com" with . // text "http://example.com" by pulldown-cmark . continue; . } 5,582 ( 0.00%) let trimmed_text = text.trim(); 30,701 ( 0.00%) => ???:::deref (2,791x) 5,582 ( 0.00%) headers.safety |= in_heading && trimmed_text == "Safety"; 18 ( 0.00%) headers.safety |= in_heading && trimmed_text == "SAFETY"; . headers.safety |= in_heading && trimmed_text == "Implementation safety"; . headers.safety |= in_heading && trimmed_text == "Implementation Safety"; 16,575 ( 0.00%) headers.errors |= in_heading && trimmed_text == "Errors"; 9,385 ( 0.00%) headers.panics |= in_heading && trimmed_text == "Panics"; . 5,582 ( 0.00%) if let Some(tags) = code { 594 ( 0.00%) if tags.rust && !tags.compile_fail && !tags.ignore { 328 ( 0.00%) needless_doctest_main::check(cx, &text, range.start, fragments); 902 ( 0.00%) => ???:::deref (82x) . 410 ( 0.00%) if !tags.no_run && !tags.test_harness { 324 ( 0.00%) test_attr_in_doctest::check(cx, &text, range.start, fragments); 891 ( 0.00%) => ???:::deref (81x) . } . } . } else { 2,692 ( 0.00%) if in_link.is_some() { . link_with_quotes::check(cx, trimmed_text, range.clone(), fragments); . } . if let Some(link) = in_link.as_ref() 357 ( 0.00%) && let Ok(url) = Url::parse(link) 506 ( 0.00%) => ???:::deref (46x) 27 ( 0.00%) && (url.scheme() == "https" || url.scheme() == "http") . { . // Don't check the text associated with external URLs . continue; . } 5,366 ( 0.00%) if check_doc_markdown { . text_to_check.push((text, range.clone(), code_level)); . } 29,513 ( 0.00%) doc_suspicious_footnotes::check(cx, doc, range, &fragments, attrs); 815,945 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/doc_suspicious_footnotes.rs:clippy_lints::doc::doc_suspicious_footnotes::check (2,683x) . } 2,782 ( 0.00%) } . FootnoteReference(_) => {} . } 83,712 ( 0.00%) } 24,484 ( 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:: (2,261x) 24,452 ( 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:: (1,353x) . 548 ( 0.00%) doc_comment_double_space_linebreaks::check(cx, &collected_breaks); 8,220 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/doc_comment_double_space_linebreaks.rs:clippy_lints::doc::doc_comment_double_space_linebreaks::check (548x) . . headers 4,384 ( 0.00%) } . . fn looks_like_refdef(doc: &str, range: Range) -> Option> { 206 ( 0.00%) if range.end < range.start { . return None; . } . . let offset = range.start; . let mut iterator = doc.as_bytes()[range].iter().copied().enumerate(); . let mut start = None; . while let Some((i, byte)) = iterator.next() { 1,060 ( 0.00%) match byte { . b'\\' => { . iterator.next(); . }, . b'[' => { . start = Some(i + offset); . }, . b']' if let Some(start) = start . && doc.as_bytes().get(i + offset + 1) == Some(&b':') => -- line 1389 ---------------------------------------- 261,423 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::sym; . use rustc_data_structures::smallvec::SmallVec; . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind, QPath, TyKind}; . use rustc_lint::LateContext; . . use super::IP_CONSTANT; . 10,248 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>]) { 6,182 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, p)) = func.kind 1,499 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, func_path)) = ty.kind 325 ( 0.00%) && p.ident.name == sym::new . && let Some(func_def_id) = func_path.res.opt_def_id() 195 ( 0.00%) && matches!( 780 ( 0.00%) cx.tcx.get_diagnostic_name(func_def_id), 13,527 ( 0.00%) => ???:::get_diagnostic_name (195x) . Some(sym::Ipv4Addr | sym::Ipv6Addr) . ) . && let ecx = ConstEvalCtxt::new(cx) . && let ctxt = expr.span.ctxt() . && let Some(args) = args . .iter() . .map(|arg| { . if let Some(Constant::Int(constant @ (0 | 1 | 127 | 255))) = ecx.eval_local(arg, ctxt) { -- line 25 ---------------------------------------- -- line 43 ---------------------------------------- . // Remove everything before the type name . sugg.push((before_span, String::new())); . } . . span_lint_and_then(cx, IP_CONSTANT, expr.span, "hand-coded well-known IP address", |diag| { . diag.multipart_suggestion("use", sugg, Applicability::MachineApplicable); . }); . } 11,712 ( 0.00%) } 1,105 ( 0.00%) -------------------------------------------------------------------------------- -- 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. 14,116 ( 0.00%) if let ItemKind::Use(path, kind @ (UseKind::Single(_) | UseKind::Glob)) = item.kind 3,708 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) . // use `present_items` because it could be in either type_ns or value_ns 12,952 ( 0.00%) && let Some(res) = path.res.present_items().next() 1,852 ( 0.00%) && let Some(def_id) = res.opt_def_id() 4,630 ( 0.00%) && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) 25,002 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (926x) . { . let module = if is_integer_module(cx, def_id) { . true 5,556 ( 0.00%) } else if is_numeric_const(cx, def_id) { 62,920 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (926x) . 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") . ); . } . }, . ); . } 3,192 ( 0.00%) } . 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { . // `std::::` check 123,988 ( 0.01%) let (sugg, msg) = if let ExprKind::Path(qpath) = &expr.kind . && let QPath::Resolved(None, path) = qpath 10,292 ( 0.00%) && let Some(def_id) = path.res.opt_def_id() 24,696 ( 0.00%) && is_numeric_const(cx, def_id) 276,473 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (3,528x) . && 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 40,380 ( 0.00%) } else if let ExprKind::Call(func, []) = &expr.kind 466 ( 0.00%) && let ExprKind::Path(qpath) = &func.kind 466 ( 0.00%) && let QPath::TypeRelative(ty, last_segment) = qpath 1,100 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, func.hir_id).opt_def_id() 17,160 ( 0.00%) => ???:::qpath_res (220x) 220 ( 0.00%) && 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(); . (format!("{mod_name}::{name}"), "usage of a legacy numeric method") . } else { . return; . }; -- line 131 ---------------------------------------- -- line 138 ---------------------------------------- . diag.span_suggestion_verbose( . expr.span, . "use the associated constant instead", . sugg, . Applicability::MaybeIncorrect, . ); . }); . } 217,552 ( 0.01%) } . } . . fn is_integer_module(cx: &LateContext<'_>, did: DefId) -> bool { 4,630 ( 0.00%) matches!( 4,630 ( 0.00%) cx.tcx.get_diagnostic_name(did), 51,804 ( 0.00%) => ???:::get_diagnostic_name (926x) . 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 . ) . ) . } . 4,454 ( 0.00%) fn is_numeric_const(cx: &LateContext<'_>, did: DefId) -> bool { 26,727 ( 0.00%) matches!( 13,362 ( 0.00%) cx.tcx.get_diagnostic_name(did), 285,941 ( 0.02%) => ???:::get_diagnostic_name (4,454x) . 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 . ) . ) 8,908 ( 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 ---------------------------------------- -- line 239 ---------------------------------------- . else { . return false; . }; . . one.name == mod_name && two.name == name . } . . fn is_integer_method(cx: &LateContext<'_>, did: DefId) -> bool { 660 ( 0.00%) matches!( 440 ( 0.00%) cx.tcx.get_diagnostic_name(did), 13,699 ( 0.00%) => ???:::get_diagnostic_name (220x) . Some( . sym::isize_legacy_fn_max_value . | sym::isize_legacy_fn_min_value . | sym::i128_legacy_fn_max_value . | sym::i128_legacy_fn_min_value . | sym::i16_legacy_fn_max_value . | sym::i16_legacy_fn_min_value . | sym::i32_legacy_fn_max_value -- line 256 ---------------------------------------- 46,383 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs -------------------------------------------------------------------------------- Ir -- line 85 ---------------------------------------- . /// 'A..=F' . UpperHexLetter, . /// '0..=9' | 'a..=f' | 'A..=F' . HexDigit, . Otherwise, . } . . impl<'tcx> LateLintPass<'tcx> for ManualIsAsciiCheck { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 85,100 ( 0.00%) if !matches!( 54,388 ( 0.00%) expr.kind, 3,433 ( 0.00%) ExprKind::Match(_, [_, ..], _) | ExprKind::MethodCall(_, _, [_], _) . ) { . return; . } . 12,810 ( 0.00%) if !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT) { 49,410 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,830x) . return; . } . 7,320 ( 0.00%) if is_in_const_context(cx) && !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT_CONST) { 605,498 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (1,830x) . return; . } . 14,292 ( 0.00%) let (arg, span, range) = if let ExprKind::Match(recv, [arm, ..], _) = expr.kind 5,190 ( 0.00%) && let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::matches_macro) 119,989 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (741x) . { 12 ( 0.00%) let recv = peel_ref_operators(cx, recv); 57 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_ref_operators (3x) 6 ( 0.00%) let range = check_pat(&arm.pat.kind); 472 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:clippy_lints::manual_is_ascii_check::check_pat (3x) . (recv, macro_call.span, range) 5,445 ( 0.00%) } else if let ExprKind::MethodCall(path, receiver, [arg], ..) = expr.kind 1,089 ( 0.00%) && path.ident.name == sym::contains . && let Some(higher::Range { . start: Some(start), . end: Some(end), . ty: range_ty, . span: _, . }) = higher::Range::hir(cx, receiver) . && let RangeLimits::Closed = range_ty.limits() . && !matches!(cx.typeck_results().expr_ty(arg).peel_refs().kind(), ty::Param(_)) -- line 124 ---------------------------------------- -- line 125 ---------------------------------------- . { . let arg = peel_ref_operators(cx, arg); . let range = check_expr_range(start, end); . (arg, expr.span, range) . } else { . return; . }; . 3 ( 0.00%) let ty_sugg = get_ty_sugg(cx, arg); . check_is_ascii(cx, span, arg, &range, ty_sugg); 217,552 ( 0.01%) } . } . . fn get_ty_sugg<'tcx>(cx: &LateContext<'tcx>, arg: &Expr<'_>) -> Option<(Span, Ty<'tcx>)> { . let local_hid = arg.res_local_id()?; 6 ( 0.00%) if let Node::Param(Param { ty_span, span, .. }) = cx.tcx.parent_hir_node(local_hid) 216 ( 0.00%) => ???:::parent_hir_node (2x) . // `ty_span` and `span` are the same for inferred type, thus a type suggestion must be given . && ty_span == span . { . let arg_type = cx.typeck_results().expr_ty(arg); . return Some((*ty_span, arg_type)); . } . None . } -- line 148 ---------------------------------------- -- line 149 ---------------------------------------- . . fn check_is_ascii( . cx: &LateContext<'_>, . span: Span, . recv: &Expr<'_>, . range: &CharRange, . ty_sugg: Option<(Span, Ty<'_>)>, . ) { 15 ( 0.00%) let sugg = match range { . CharRange::UpperChar => "is_ascii_uppercase", . CharRange::LowerChar => "is_ascii_lowercase", . CharRange::FullChar => "is_ascii_alphabetic", . CharRange::Digit => "is_ascii_digit", . CharRange::HexDigit => "is_ascii_hexdigit", . CharRange::Otherwise | CharRange::LowerHexLetter | CharRange::UpperHexLetter => return, . }; . let mut app = Applicability::MachineApplicable; -- line 165 ---------------------------------------- -- line 175 ---------------------------------------- . span, . "manual check for common ascii range", . |diag| { . diag.multipart_suggestion("try", suggestion, app); . }, . ); . } . 55 ( 0.00%) fn check_pat(pat_kind: &PatKind<'_>) -> CharRange { 99 ( 0.00%) match pat_kind { . PatKind::Or(pats) => { 20 ( 0.00%) let ranges = pats.iter().map(|p| check_pat(&p.kind)).collect::>(); 160 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:clippy_lints::manual_is_ascii_check::check_pat'2 (8x) . 8 ( 0.00%) if ranges.len() == 2 && ranges.contains(&CharRange::UpperChar) && ranges.contains(&CharRange::LowerChar) { . CharRange::FullChar . } else if ranges.len() == 3 . && ranges.contains(&CharRange::Digit) . && ranges.contains(&CharRange::LowerHexLetter) . && ranges.contains(&CharRange::UpperHexLetter) . { . CharRange::HexDigit . } else { . CharRange::Otherwise . } . }, . PatKind::Range(Some(start), Some(end), RangeEnd::Included) => check_range(start, end), . _ => CharRange::Otherwise, . } 66 ( 0.00%) } . . fn check_expr_range(start: &Expr<'_>, end: &Expr<'_>) -> CharRange { . if let ExprKind::Lit(start_lit) = &start.kind . && let ExprKind::Lit(end_lit) = &end.kind . { . check_lit_range(start_lit, end_lit) . } else { . CharRange::Otherwise -- line 211 ---------------------------------------- 12 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/sugg.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . use rustc_middle::mir::{FakeReadCause, Mutability}; . use rustc_middle::ty; . use rustc_span::{BytePos, CharPos, Pos as _, Span, SyntaxContext}; . use std::borrow::Cow; . use std::fmt::{self, Display, Write as _}; . use std::ops::{Add, Neg, Not, Sub}; . . /// A helper type to build suggestion correctly handling parentheses. 87 ( 0.00%) #[derive(Clone, Debug, PartialEq)] . pub enum Sugg<'a> { . /// An expression that never needs parentheses such as `1337` or `[0; 42]`. . NonParen(Cow<'a, str>), . /// An expression that does not fit in other variants. . MaybeParen(Cow<'a, str>), . /// A binary operator expression, including `as`-casts and explicit type . /// coercion. . BinOp(AssocOp, Cow<'a, str>, Cow<'a, str>), -- line 31 ---------------------------------------- -- line 93 ---------------------------------------- . . /// Same as `hir`, but first walks the span up to the given context. This will result in the . /// macro call, rather than the expansion, if the span is from a child context. If the span is . /// not from a child context, it will be used directly instead. . /// . /// e.g. Given the expression `&vec![]`, getting a snippet from the span for `vec![]` as a HIR . /// node would result in `box []`. If given the context of the address of expression, this . /// function will correctly get a snippet of `vec![]`. 36 ( 0.00%) pub fn hir_with_context( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . ctxt: SyntaxContext, . default: &'a str, . applicability: &mut Applicability, . ) -> Self { 6 ( 0.00%) if expr.span.ctxt() == ctxt { 9 ( 0.00%) if let ExprKind::Unary(op, inner) = expr.kind . && matches!(op, UnOp::Neg | UnOp::Not) . && cx.typeck_results().expr_ty(expr) == cx.typeck_results().expr_ty(inner) . { . Sugg::UnOp( . op, . Box::new(Self::hir_with_context(cx, inner, ctxt, default, applicability)), . ) . } else { 21 ( 0.00%) Self::hir_from_snippet(cx, expr, |span| { 6 ( 0.00%) snippet_with_context(cx, span, ctxt, default, applicability).0 . }) . } . } else { . let (snip, _) = snippet_with_context(cx, expr.span, ctxt, default, applicability); . Sugg::NonParen(snip) . } 27 ( 0.00%) } . . /// Generate a suggestion for an expression with the given snippet. This is used by the `hir_*` . /// function variants of `Sugg`, since these use different snippet functions. . pub fn hir_from_snippet( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . mut get_snippet: impl FnMut(Span) -> Cow<'a, str>, . ) -> Self { 18 ( 0.00%) if let Some(range) = higher::Range::hir(cx, expr) { 135 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (3x) . let op = AssocOp::Range(range.ty.limits()); . let start = range.start.map_or("".into(), |expr| get_snippet(expr.span)); . let end = range.end.map_or("".into(), |expr| get_snippet(expr.span)); . . return Sugg::BinOp(op, start, end); . } . 12 ( 0.00%) match expr.kind { . ExprKind::AddrOf(..) . | ExprKind::If(..) . | ExprKind::Let(..) . | ExprKind::Closure { .. } . | ExprKind::Unary(..) . | ExprKind::Match(_, _, . MatchSource::Normal | MatchSource::Postfix | MatchSource::ForLoopDesugar . ) => Sugg::MaybeParen(get_snippet(expr.span)), -- line 151 ---------------------------------------- -- line 169 ---------------------------------------- . | ExprKind::Become(..) . | ExprKind::Struct(..) . | ExprKind::Tup(..) . | ExprKind::Use(..) . | ExprKind::Err(_) . | ExprKind::UnsafeBinderCast(..) . | ExprKind::Match(_, _, . MatchSource::AwaitDesugar | MatchSource::TryDesugar(_) | MatchSource::FormatArgs 15 ( 0.00%) ) => Sugg::NonParen(get_snippet(expr.span)), . ExprKind::DropTemps(inner) => Self::hir_from_snippet(cx, inner, get_snippet), . ExprKind::Assign(lhs, rhs, _) => { . Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span)) . }, . ExprKind::AssignOp(op, lhs, rhs) => { . Sugg::BinOp(AssocOp::AssignOp(op.node), get_snippet(lhs.span), get_snippet(rhs.span)) . }, . ExprKind::Binary(op, lhs, rhs) => Sugg::BinOp( -- line 185 ---------------------------------------- -- line 426 ---------------------------------------- . AssocOp::Assign => format!("{lhs} = {rhs}"), . AssocOp::AssignOp(op) => format!("{lhs} {} {rhs}", op.as_str()), . AssocOp::Cast => format!("{lhs} as {rhs}"), . AssocOp::Range(limits) => format!("{lhs}{}{rhs}", limits.as_str()), . } . } . . /// Returns `true` if `sugg` is enclosed in parenthesis. 1,432 ( 0.00%) pub fn has_enclosing_paren(sugg: impl AsRef) -> bool { 358 ( 0.00%) let mut chars = sugg.as_ref().chars(); 8,950 ( 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:::deref (358x) 694 ( 0.00%) if chars.next() == Some('(') { . let mut depth = 1; . for c in &mut chars { 7,067 ( 0.00%) if c == '(' { 45 ( 0.00%) depth += 1; 67 ( 0.00%) } else if c == ')' { 67 ( 0.00%) depth -= 1; . } 3,556 ( 0.00%) if depth == 0 { . break; . } . } . chars.next().is_none() . } else { . false . } 1,790 ( 0.00%) } . . /// Strip enclosing parentheses from a snippet if present. . fn strip_enclosing_paren(snippet: Cow<'_, str>) -> Cow<'_, str> { . if has_enclosing_paren(&snippet) { . match snippet { . Cow::Borrowed(s) => Cow::Borrowed(&s[1..s.len() - 1]), . Cow::Owned(mut s) => { . s.pop(); -- line 460 ---------------------------------------- 1,883 ( 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/mut_visit.rs -------------------------------------------------------------------------------- Ir -- line 40 ---------------------------------------- . } . . impl MutVisitable for Box . where . T: MutVisitable, . { . type Extra = T::Extra; . fn visit_mut(&mut self, visitor: &mut V, extra: Self::Extra) { 201 ( 0.00%) (**self).visit_mut(visitor, extra) . } . } . . impl MutVisitable for Option . where . T: MutVisitable, . { . type Extra = T::Extra; . fn visit_mut(&mut self, visitor: &mut V, extra: Self::Extra) { 17,656 ( 0.00%) if let Some(this) = self { . this.visit_mut(visitor, extra) . } . } . } . . impl MutVisitable for Spanned . where . T: MutVisitable, -- line 66 ---------------------------------------- -- line 162 ---------------------------------------- . macro_rules! visit_visitable_with { . (mut $visitor:expr, $expr:expr, $extra:expr $(,)?) => { . MutVisitable::visit_mut($expr, $visitor, $extra) . }; . } . . macro_rules! walk_walkable { . ($visitor:expr, $expr:expr, mut) => { 8,208 ( 0.00%) MutWalkable::walk_mut($expr, $visitor) 336 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut (6x) . }; . } . . macro_rules! impl_visitable { . (|&mut $self:ident: $self_ty:ty, . $vis:ident: &mut $vis_ty:ident, . $extra:ident: $extra_ty:ty| $block:block) => { . #[allow(unused_parens, non_local_definitions)] -- line 178 ---------------------------------------- -- line 185 ---------------------------------------- . }; . } . . macro_rules! impl_walkable { . ($(<$K:ident: $Kb:ident>)? |&mut $self:ident: $self_ty:ty, . $vis:ident: &mut $vis_ty:ident| $block:block) => { . #[allow(unused_parens, non_local_definitions)] . impl<$($K: $Kb,)? $vis_ty: MutVisitor> MutWalkable<$vis_ty> for $self_ty { 2,000 ( 0.00%) fn walk_mut(&mut $self, $vis: &mut $vis_ty) -> V::Result { . $block 1,600 ( 0.00%) } . } . }; . } . . macro_rules! impl_visitable_noop { . ( $($ty:ty,)*) => { . $( . impl_visitable!(|&mut self: $ty, _vis: &mut V, _extra: ()| {}); -- line 203 ---------------------------------------- -- line 236 ---------------------------------------- . . macro_rules! impl_visitable_calling_walkable { . ( . $( fn $method:ident($ty:ty $(, $extra_name:ident: $extra_ty:ty)?); )* . ) => { . $(fn $method(&mut self, node: &mut $ty $(, $extra_name:$extra_ty)?) { . impl_visitable!(|&mut self: $ty, visitor: &mut V, extra: ($($extra_ty)?)| { . let ($($extra_name)?) = extra; 2,400 ( 0.00%) visitor.$method(self $(, $extra_name)?); 282 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat'2 (6x) . }); . walk_walkable!(self, node, mut) . })* . } . } . . macro_rules! define_named_walk { . ((mut) $Visitor:ident -- line 252 ---------------------------------------- -- line 279 ---------------------------------------- . . fn $name( . vis: &mut V, . values: &mut ThinVec<$Ty>, . $( . $param: $ParamTy, . )* . ) { 54 ( 0.00%) values.flat_map_in_place(|value| vis.$flat_map_fn(value$(,$param)*)); 383 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/flat_map_in_place.rs: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::PatField; 1]>> (1x) . } . )+ . } . } . . generate_flat_map_visitor_fns! { . visit_items, Box, flat_map_item; . visit_foreign_items, Box, flat_map_foreign_item; -- line 295 ---------------------------------------- -- line 301 ---------------------------------------- . visit_variants, Variant, flat_map_variant; . visit_assoc_items, Box, flat_map_assoc_item, ctxt: AssocCtxt; . visit_where_predicates, WherePredicate, flat_map_where_predicate; . visit_params, Param, flat_map_param; . visit_field_defs, FieldDef, flat_map_field_def; . visit_arms, Arm, flat_map_arm; . } . 60 ( 0.00%) pub fn walk_flat_map_pat_field( . vis: &mut T, . mut fp: PatField, . ) -> SmallVec<[PatField; 1]> { . vis.visit_pat_field(&mut fp); 84 ( 0.00%) smallvec![fp] 48 ( 0.00%) } . . macro_rules! generate_walk_flat_map_fns { . ($($fn_name:ident($Ty:ty$(,$extra_name:ident: $ExtraTy:ty)*) => $visit_fn_name:ident;)+) => {$( . pub fn $fn_name(vis: &mut V, mut value: $Ty$(,$extra_name: $ExtraTy)*) -> SmallVec<[$Ty; 1]> { . vis.$visit_fn_name(&mut value$(,$extra_name)*); . smallvec![value] . } . )+}; -- line 323 ---------------------------------------- 6,050 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs -------------------------------------------------------------------------------- Ir -- line 493 ---------------------------------------- . } . impl Transmute { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . . /// When transmuting, a struct containing a single field works like the field. . /// This function extracts the field type and the expression to get the field. 33 ( 0.00%) fn extract_struct_field<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . outer_type: Ty<'tcx>, . outer: &'tcx Expr<'tcx>, . ) -> (Ty<'tcx>, Sugg<'tcx>) { 3 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 21 ( 0.00%) let outer_sugg = Sugg::hir_with_context(cx, outer, e.span.ctxt(), "..", &mut applicability); 2,575 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir_with_context (3x) 9 ( 0.00%) if let ty::Adt(struct_def, struct_args) = *outer_type.kind() 3 ( 0.00%) && struct_def.is_struct() . && let mut fields = struct_def.all_fields() . && let Some(first) = fields.next() . && fields.next().is_none() . && first.vis.is_accessible_from(cx.tcx.parent_module(outer.hir_id), cx.tcx) . { . ( . first.ty(cx.tcx, struct_args).skip_norm_wip(), . Sugg::NonParen(format!("{}.{}", outer_sugg.maybe_paren(), first.name).into()), . ) . } else { 27 ( 0.00%) (outer_type, outer_sugg) . } 24 ( 0.00%) } . } . impl<'tcx> LateLintPass<'tcx> for Transmute { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 63,325 ( 0.00%) if let ExprKind::Call(path_expr, [arg]) = e.kind 15,970 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = path_expr.kind . && let Some(def_id) = path.res.opt_def_id() 15,064 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::transmute, def_id) 186,493 ( 0.01%) => ???:::is_diagnostic_item (2,152x) . { . // Avoid suggesting non-const operations in const contexts: . // - from/to bits (https://github.com/rust-lang/rust/issues/73736) . // - dereferencing raw pointers (https://github.com/rust-lang/rust/issues/51911) . // - char conversions (https://github.com/rust-lang/rust/issues/89259) 3 ( 0.00%) let const_context = is_in_const_context(cx); 988 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (3x) . 9 ( 0.00%) let (from_ty, from_ty_adjusted) = match cx.typeck_results().expr_adjustments(arg) { 58 ( 0.00%) => ???:::expr_adjustments (3x) 33 ( 0.00%) [] => (cx.typeck_results().expr_ty(arg), false), 120 ( 0.00%) => ???:::expr_ty (3x) . [.., a] => (a.target, true), . }; . // Adjustments for `to_ty` happen after the call to `transmute`, so don't use them. 15 ( 0.00%) let to_ty = cx.typeck_results().expr_ty(e); 120 ( 0.00%) => ???:::expr_ty (3x) . . // If useless_transmute is triggered, the other lints can be skipped. 24 ( 0.00%) if useless_transmute::check(cx, e, from_ty, to_ty, arg) { 90 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/useless_transmute.rs:clippy_lints::transmute::useless_transmute::check (3x) . return; . } . . // A struct having a single pointer can be treated like a pointer. 30 ( 0.00%) let (from_field_ty, from_field_expr) = Self::extract_struct_field(cx, e, from_ty, arg); 2,776 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs:::extract_struct_field (3x) . 39 ( 0.00%) let linted = wrong_transmute::check(cx, e, from_ty, to_ty) 48 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/wrong_transmute.rs:clippy_lints::transmute::wrong_transmute::check (3x) 12 ( 0.00%) | crosspointer_transmute::check(cx, e, from_ty, to_ty) 51 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/crosspointer_transmute.rs:clippy_lints::transmute::crosspointer_transmute::check (3x) 12 ( 0.00%) | transmuting_null::check(cx, e, arg, to_ty) 54 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmuting_null.rs:clippy_lints::transmute::transmuting_null::check (3x) 12 ( 0.00%) | transmute_null_to_fn::check(cx, e, arg, to_ty) 18 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs:clippy_lints::transmute::transmute_null_to_fn::check (3x) 39 ( 0.00%) | transmute_ptr_to_ref::check(cx, e, from_field_ty, to_ty, from_field_expr.clone(), path, self.msrv) 310 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::clone (3x) 279 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_ptr_to_ref.rs:clippy_lints::transmute::transmute_ptr_to_ref::check (3x) 27 ( 0.00%) | missing_transmute_annotations::check(cx, path, arg, from_ty, to_ty, e.hir_id) 513 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/missing_transmute_annotations.rs:clippy_lints::transmute::missing_transmute_annotations::check (3x) 27 ( 0.00%) | transmute_ref_to_ref::check(cx, e, from_ty, to_ty, arg, const_context) 69 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_ref_to_ref.rs:clippy_lints::transmute::transmute_ref_to_ref::check (3x) 54 ( 0.00%) | transmute_ptr_to_ptr::check(cx, e, from_field_ty, to_ty, from_field_expr, self.msrv) 240 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_ptr_to_ptr.rs:clippy_lints::transmute::transmute_ptr_to_ptr::check (3x) 21 ( 0.00%) | transmute_int_to_bool::check(cx, e, from_ty, to_ty, arg) 51 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_int_to_bool.rs:clippy_lints::transmute::transmute_int_to_bool::check (3x) 21 ( 0.00%) | transmute_int_to_non_zero::check(cx, e, from_ty, to_ty, arg) 63 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_int_to_non_zero.rs:clippy_lints::transmute::transmute_int_to_non_zero::check (3x) 24 ( 0.00%) | (unsound_collection_transmute::check(cx, e, from_ty, to_ty) 294 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/unsound_collection_transmute.rs:clippy_lints::transmute::unsound_collection_transmute::check (3x) 24 ( 0.00%) || transmute_undefined_repr::check(cx, e, from_ty, to_ty)) 102 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmute_undefined_repr.rs:clippy_lints::transmute::transmute_undefined_repr::check (3x) 18 ( 0.00%) | (eager_transmute::check(cx, e, arg, from_ty, to_ty)); 1,517 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/eager_transmute.rs:clippy_lints::transmute::eager_transmute::check (3x) . 18 ( 0.00%) if !linted { 18 ( 0.00%) transmutes_expressible_as_ptr_casts::check(cx, e, from_ty, from_ty_adjusted, to_ty, arg, const_context); 327,230 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs:clippy_lints::transmute::transmutes_expressible_as_ptr_casts::check (3x) . } . } 217,552 ( 0.01%) } . } 4,385 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint; . use clippy_utils::macros::{find_assert_eq_args, root_macro_call_first_node}; . use clippy_utils::{is_unit_expr, sym}; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . . use super::UNIT_CMP; . 244,746 ( 0.01%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) { 54,388 ( 0.00%) if expr.span.from_expansion() { 2,562 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 2,562 ( 0.00%) && let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) 22,845 ( 0.00%) => ???:::get_diagnostic_name (366x) . { . let result = match diag_name { 558 ( 0.00%) sym::assert_eq_macro | sym::debug_assert_eq_macro => "succeed", . sym::assert_ne_macro | sym::debug_assert_ne_macro => "fail", . _ => return, . }; 216 ( 0.00%) let Some((lhs, rhs, _)) = find_assert_eq_args(cx, expr, macro_call.expn) else { 59,937 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_eq_args (24x) . return; . }; . if is_unit_expr(lhs) || is_unit_expr(rhs) { . return; . } 24 ( 0.00%) if !cx.typeck_results().expr_ty(lhs).is_unit() { 960 ( 0.00%) => ???:::expr_ty (24x) . return; . } . span_lint( . cx, . UNIT_CMP, . macro_call.span, . format!( . "`{}` of unit values detected. This will always {result}", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } . return; . } . 35,236 ( 0.00%) if let ExprKind::Binary(ref cmp, left, _) = expr.kind { 358 ( 0.00%) let op = cmp.node; 108 ( 0.00%) if op.is_comparison() && cx.typeck_results().expr_ty(left).is_unit() { 4,332 ( 0.00%) => ???:::expr_ty (108x) . let result = match op { . BinOpKind::Eq | BinOpKind::Le | BinOpKind::Ge => "true", . _ => "false", . }; . span_lint( . cx, . UNIT_CMP, . expr.span, . format!( . "{}-comparison of unit values detected. This will always be {result}", . op.as_str() . ), . ); . } . } 217,552 ( 0.01%) } 792 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp_with_unwrap.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use rustc_ast::ast; . use rustc_errors::Applicability; . use rustc_hir as hir; . use rustc_lint::{LateContext, Lint}; . use rustc_span::Symbol; . . /// Wrapper fn for `CHARS_NEXT_CMP` and `CHARS_LAST_CMP` lints with `unwrap()`. 6,084 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 2,808 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 66,130 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (468x) . && let hir::ExprKind::Lit(lit) = info.other.kind . && let ast::LitKind::Char(c) = lit.node . { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . lint, . info.expr.span, -- line 26 ---------------------------------------- -- line 34 ---------------------------------------- . ), . applicability, . ); . . true . } else { . false . } 4,212 ( 0.00%) } 468 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reference.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub DEREF_ADDROF, . complexity, . "use of `*&` or `*&mut` in an expression" . } . . declare_lint_pass!(DerefAddrOf => [DEREF_ADDROF]); . . impl LateLintPass<'_> for DerefAddrOf { 163,164 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 63,964 ( 0.00%) if !e.span.from_expansion() 421 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, deref_target) = e.kind 154 ( 0.00%) && !deref_target.span.from_expansion() 154 ( 0.00%) && let ExprKind::AddrOf(_, _, addrof_target) = deref_target.kind . // NOTE(tesuji): `*&` forces rustc to const-promote the array to `.rodata` section. . // See #12854 for details. . && !matches!(addrof_target.kind, ExprKind::Array(_)) . && deref_target.span.eq_ctxt(e.span) . && !addrof_target.span.from_expansion() . { . let mut applicability = Applicability::MachineApplicable; . let mut sugg = || Sugg::hir_with_applicability(cx, addrof_target, "_", &mut applicability); -- line 54 ---------------------------------------- -- line 73 ---------------------------------------- . DEREF_ADDROF, . e.span, . "immediately dereferencing a reference", . "try", . sugg.to_string(), . applicability, . ); . } 163,164 ( 0.01%) } . } . . /// Is this a `ManuallyDrop` reached through a union, and when is `DerefMut` called on it? . enum ManuallyDropThroughUnion { . /// `ManuallyDrop` reached through a union and immediately explicitely dereferenced . Directly, . /// `ManuallyDrop` reached through a union, and dereferenced later on . Indirect, -- line 89 ---------------------------------------- 35,236 ( 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/cell.rs -------------------------------------------------------------------------------- Ir -- line 550 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_cell", since = "1.88.0")] . #[rustc_should_not_be_called_on_const_items] . pub const fn get(&self) -> T { . // SAFETY: This can cause data races if called from a separate thread, . // but `Cell` is `!Sync` so this won't happen. 100,040 ( 0.01%) unsafe { *self.value.get() } . } . . /// Updates the contained value using a function. . /// . /// # Examples . /// . /// ``` . /// use std::cell::Cell; -- line 566 ---------------------------------------- -- line 2050 ---------------------------------------- . } . . #[rustc_const_unstable(feature = "const_ref_cell", issue = "137844")] . const impl Drop for BorrowRefMut<'_> { . #[inline] . fn drop(&mut self) { . let borrow = self.borrow.get(); . debug_assert!(is_writing(borrow)); 119 ( 0.00%) self.borrow.replace(borrow + 1); . } . } . . impl<'b> BorrowRefMut<'b> { . #[inline] . const fn new(borrow: &'b Cell) -> Option> { . // NOTE: Unlike BorrowRefMut::clone, new is called to create the initial . // mutable reference, and so there must currently be no existing . // references. Thus, while clone increments the mutable refcount, here . // we explicitly only allow going from UNUSED to UNUSED - 1. 4,036 ( 0.00%) match borrow.get() { . UNUSED => { . borrow.replace(UNUSED - 1); . Some(BorrowRefMut { borrow }) . } . _ => None, . } . } . -- line 2077 ---------------------------------------- 14,482 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unicode.rs -------------------------------------------------------------------------------- Ir -- line 74 ---------------------------------------- . . declare_lint_pass!(Unicode => [ . INVISIBLE_CHARACTERS, . NON_ASCII_LITERAL, . UNICODE_NOT_NFC, . ]); . . impl LateLintPass<'_> for Unicode { 108,776 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 55,066 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 3,885 ( 0.00%) && let LitKind::Str(_, _) | LitKind::Char(_) = lit.node . { 1,356 ( 0.00%) check_str(cx, lit.span, expr.hir_id); . } 135,970 ( 0.01%) } . } . . fn escape>(s: T) -> String { . let mut result = String::new(); . for c in s { . if c as u32 > 0x7F { . for d in c.escape_unicode() { . result.push(d); -- line 96 ---------------------------------------- -- line 98 ---------------------------------------- . } else { . result.push(c); . } . } . result . } . . fn check_str(cx: &LateContext<'_>, span: Span, id: HirId) { 2,712 ( 0.00%) if !span_is_local(span) { 42,559 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (678x) . return; . } . . let string = snippet(cx, span, ""); . // All three lints here can only fire when the snippet contains a non-ASCII character. Note . // that the snippet can contain non-ASCII characters even when the literal's value does not, . // e.g. the literal produced by `file!()` inside a macro spans the whole macro invocation. . if string.is_ascii() { -- line 114 ---------------------------------------- 1,356 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/let_unit_value.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty; . use rustc_span::Span; . . use super::LET_UNIT_VALUE; . . pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, format_args: &FormatArgsStorage, local: &'tcx LetStmt<'_>) { . // skip `let () = { ... }` 2,118 ( 0.00%) if let PatKind::Tuple(fields, ..) = local.pat.kind 57 ( 0.00%) && fields.is_empty() . { . return; . } . 2,118 ( 0.00%) if let Some(init) = local.init 1,358 ( 0.00%) && !local.pat.span.from_expansion() 1,794 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 1,794 ( 0.00%) && !local.span.is_from_async_await() 60,996 ( 0.00%) => ???:::is_from_async_await (598x) 1,254 ( 0.00%) && cx.typeck_results().pat_ty(local.pat).is_unit() 24,000 ( 0.00%) => ???:::pat_ty (598x) . { . // skip `let awa = ()` . if let ExprKind::Tup([]) = init.kind { . return; . } . . // skip `let _: () = { ... }` . if let Some(ty) = local.ty -- line 37 ---------------------------------------- 598 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/arc_with_non_send_sync.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub ARC_WITH_NON_SEND_SYNC, . suspicious, . "using `Arc` with a type that does not implement `Send` and `Sync`" . } . . declare_lint_pass!(ArcWithNonSendSync => [ARC_WITH_NON_SEND_SYNC]); . . impl<'tcx> LateLintPass<'tcx> for ArcWithNonSendSync { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 63,325 ( 0.00%) if let ExprKind::Call(func, [arg]) = expr.kind 9,626 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(func_ty, func_name)) = func.kind 182 ( 0.00%) && func_name.ident.name == sym::new 156 ( 0.00%) && !expr.span.from_expansion() 468 ( 0.00%) && cx.typeck_results().node_type(func_ty.hir_id).is_diag_item(cx, sym::Arc) 3,198 ( 0.00%) => ???:::node_type (78x) . && let arg_ty = cx.typeck_results().expr_ty(arg) . // make sure that the type is not and does not contain any type parameters . && arg_ty.walk().all(|arg| { . !matches!(arg.kind(), GenericArgKind::Type(ty) if matches!(ty.kind(), ty::Param(_))) . }) . && let Some(send) = cx.tcx.get_diagnostic_item(sym::Send) . && let Some(sync) = cx.tcx.lang_items().sync_trait() . && let [is_send, is_sync] = [send, sync].map(|id| implements_trait(cx, arg_ty, id, &[])) -- line 59 ---------------------------------------- -- line 78 ---------------------------------------- . diag.help("if the `Arc` will not be used across threads replace it with an `Rc`"); . diag.help(format!( . "otherwise make `{arg_ty}` `Send` and `Sync` or consider a wrapper type such as `Mutex`" . )); . }); . }, . ); . } 217,552 ( 0.01%) } . } 156 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/too_many_lines.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . kind: FnKind<'_>, . body: &hir::Body<'_>, . span: Span, . def_id: LocalDefId, . too_many_lines_threshold: u64, . ) { . // Closures must be contained in a parent body, which will be checked for `too_many_lines`. . // Don't check closures for `too_many_lines` to avoid duplicated lints. 5,398 ( 0.00%) if matches!(kind, FnKind::Closure) || (span.from_expansion() && span.in_external_macro(cx.sess().source_map())) { . return; . } . 3,378 ( 0.00%) let mut line_count: u64 = 0; 1,689 ( 0.00%) let too_many = body.value.span.check_text(cx, |src| { . let mut in_comment = false; . let mut code_in_line; . 5,067 ( 0.00%) let function_lines = if matches!(body.value.kind, hir::ExprKind::Block(..)) 1,689 ( 0.00%) && src.as_bytes().first().copied() == Some(b'{') 1,689 ( 0.00%) && src.as_bytes().last().copied() == Some(b'}') . { . // Removing the braces from the enclosing block . &src[1..src.len() - 1] . } else { . src . } . .trim() // Remove leading and trailing blank lines . .lines(); . . for mut line in function_lines { . code_in_line = false; . loop { . line = line.trim_start(); 8,247 ( 0.00%) if line.is_empty() { . break; . } 16,028 ( 0.00%) if in_comment { 2 ( 0.00%) if let Some(i) = line.find("*/") { . line = &line[i + 2..]; . in_comment = false; . continue; . } . } else { . let multi_idx = line.find("/*").unwrap_or(line.len()); . let single_idx = line.find("//").unwrap_or(line.len()); 48,078 ( 0.00%) code_in_line |= multi_idx > 0 && single_idx > 0; . // Implies multi_idx is below line.len() 16,026 ( 0.00%) if multi_idx < single_idx { . line = &line[multi_idx + 2..]; . in_comment = true; . continue; . } . } . break; . } 16,024 ( 0.00%) if code_in_line { 31,544 ( 0.00%) line_count += 1; . } . } 6,756 ( 0.00%) line_count > too_many_lines_threshold . }); . . if too_many { . span_lint( . cx, . TOO_MANY_LINES, . cx.tcx.def_span(def_id), 6 ( 0.00%) format!("this function has too many lines ({line_count}/{too_many_lines_threshold})"), . ); . } . } 88,124 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/let_with_type_underscore.rs -------------------------------------------------------------------------------- Ir -- line 23 ---------------------------------------- . pub LET_WITH_TYPE_UNDERSCORE, . complexity, . "unneeded underscore type (`_`) in a variable declaration" . } . . declare_lint_pass!(UnderscoreTyped => [LET_WITH_TYPE_UNDERSCORE]); . . impl EarlyLintPass for UnderscoreTyped { 4,557 ( 0.00%) fn check_local(&mut self, cx: &EarlyContext<'_>, local: &Local) { 1,953 ( 0.00%) if let Some(ty) = &local.ty // Ensure that it has a type defined 148 ( 0.00%) && let TyKind::Infer = ty.kind // that type is '_' . && local.span.eq_ctxt(ty.span) . && let sm = cx.sess().source_map() . && !local.span.in_external_macro(sm) . && !is_from_proc_macro(cx, &**ty) . { . let span_to_remove = sm . .span_extend_to_prev_char_before(ty.span, ':', true) . .with_leading_whitespace(cx) -- line 41 ---------------------------------------- -- line 51 ---------------------------------------- . span_to_remove, . "remove the explicit type `_` declaration", . "", . Applicability::MachineApplicable, . ); . }, . ); . } 5,208 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/entry.rs -------------------------------------------------------------------------------- Ir -- line 58 ---------------------------------------- . perf, . "use of `contains_key` followed by `insert` on a `HashMap` or `BTreeMap`" . } . . declare_lint_pass!(HashMapPass => [MAP_ENTRY]); . . impl<'tcx> LateLintPass<'tcx> for HashMapPass { . #[expect(clippy::too_many_lines)] 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,388 ( 0.00%) if expr.span.from_expansion() { . return; . } . . let Some(higher::If { . cond: cond_expr, . then: then_expr, . r#else: else_expr, . }) = higher::If::hir(expr) -- line 75 ---------------------------------------- -- line 123 ---------------------------------------- . ), . }; . Some(format!( . "if let {}::{entry_kind} = {map_str}.entry({key_str}) {then_str} else {else_str}", . map_ty.entry_path(), . )) . } else { . // if .. { insert } else { insert } 105 ( 0.00%) let ((then_str, then_entry), (else_str, else_entry)) = if contains_expr.negated { . ( . then_search.snippet_vacant(cx, then_expr.span, &mut app), . else_search.snippet_occupied(cx, else_expr.span, &mut app), . ) . } else { . ( . then_search.snippet_occupied(cx, then_expr.span, &mut app), . else_search.snippet_vacant(cx, else_expr.span, &mut app), -- line 139 ---------------------------------------- -- line 205 ---------------------------------------- . lint_msg, . None, . format!( . "consider using the `Entry` API: https://doc.rust-lang.org/std/collections/struct.{}.html#entry-api", . map_ty.name() . ), . ); . } 217,552 ( 0.01%) } . } . . #[derive(Clone, Copy)] . enum MapType { . Hash, . BTree, . } . impl MapType { -- line 221 ---------------------------------------- -- line 255 ---------------------------------------- . } . . /// Inspect the given expression and return details about the `contains_key` check. . /// . /// If the given expression is not a `contains_key` check against a `BTreeMap` or a `HashMap`, . /// return `None`. . fn try_parse_contains<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(MapType, ContainsExpr<'tcx>)> { . let mut negated = false; 1,126 ( 0.00%) let expr = peel_hir_expr_while(expr, |e| match e.kind { 35 ( 0.00%) ExprKind::Unary(UnOp::Not, e) => { . negated = !negated; . Some(e) . }, . _ => None, . }); . 1,112 ( 0.00%) if let ExprKind::MethodCall(_, map, [arg], _) = expr.kind 238 ( 0.00%) && let Expr { . kind: ExprKind::AddrOf(_, _, key), . span: key_span, . .. . } = arg . && key_span.eq_ctxt(expr.span) . { . let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?; . let expr = ContainsExpr { -- line 280 ---------------------------------------- 387 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub INEFFECTIVE_OPEN_OPTIONS, . suspicious, . "usage of both `write(true)` and `append(true)` on same `OpenOptions`" . } . . declare_lint_pass!(IneffectiveOpenOptions => [INEFFECTIVE_OPEN_OPTIONS]); . . impl<'tcx> LateLintPass<'tcx> for IneffectiveOpenOptions { 108,776 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 60,837 ( 0.00%) if let ExprKind::MethodCall(name, recv, [_], _) = expr.kind 1,089 ( 0.00%) && name.ident.name == sym::open . && !expr.span.from_expansion() . && cx . .typeck_results() . .expr_ty(recv) . .peel_refs() . .is_diag_item(cx, sym::FsOpenOptions) . { . let mut append = false; -- line 56 ---------------------------------------- -- line 94 ---------------------------------------- . write_span, . "unnecessary use of `.write(true)` because there is `.append(true)`", . "remove `.write(true)`", . String::new(), . Applicability::MachineApplicable, . ); . } . } 108,776 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/str_utils.rs -------------------------------------------------------------------------------- Ir -- line 63 ---------------------------------------- . /// assert_eq!(camel_case_start("AbcDef"), StrIndex::new(0, 0)); . /// assert_eq!(camel_case_start("abcDef"), StrIndex::new(3, 3)); . /// assert_eq!(camel_case_start("ABCD"), StrIndex::new(4, 4)); . /// assert_eq!(camel_case_start("abcd"), StrIndex::new(4, 4)); . /// assert_eq!(camel_case_start("\u{f6}\u{f6}cd"), StrIndex::new(4, 6)); . /// ``` . #[must_use] . pub fn camel_case_start(s: &str) -> StrIndex { 60 ( 0.00%) camel_case_start_from_idx(s, 0) 2,932 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_start_from_idx (15x) . } . . /// Returns `StrIndex` of the last camel-case component of `s[idx..]`. . /// . /// ```no_run . /// # use clippy_utils::str_utils::{camel_case_start_from_idx, StrIndex}; . /// assert_eq!(camel_case_start_from_idx("AbcDef", 0), StrIndex::new(0, 0)); . /// assert_eq!(camel_case_start_from_idx("AbcDef", 1), StrIndex::new(3, 3)); . /// assert_eq!(camel_case_start_from_idx("AbcDefGhi", 0), StrIndex::new(0, 0)); . /// assert_eq!(camel_case_start_from_idx("AbcDefGhi", 1), StrIndex::new(3, 3)); . /// assert_eq!(camel_case_start_from_idx("Abcdefg", 1), StrIndex::new(7, 7)); . /// ``` 340 ( 0.00%) pub fn camel_case_start_from_idx(s: &str, start_idx: usize) -> StrIndex { . let char_count = s.chars().count(); . let range = 0..char_count; . let mut iter = range.rev().zip(s.char_indices().rev()); . if let Some((_, (_, first))) = iter.next() { . if !first.is_lowercase() { . return StrIndex::new(char_count, s.len()); . } . } else { . return StrIndex::new(char_count, s.len()); . } . . let mut down = true; . let mut last_index = StrIndex::new(char_count, s.len()); . for (char_index, (byte_index, c)) in iter { 335 ( 0.00%) if byte_index < start_idx { . break; . } 278 ( 0.00%) if down { . if c.is_uppercase() { . down = false; . last_index.byte_index = byte_index; . last_index.char_index = char_index; . } else if !c.is_lowercase() { . return last_index; . } . } else if c.is_lowercase() { -- line 110 ---------------------------------------- -- line 113 ---------------------------------------- . last_index.byte_index = byte_index; . last_index.char_index = char_index; . } else { . return last_index; . } . } . . last_index 272 ( 0.00%) } . . /// Get the indexes of camel case components of a string `s` . /// . /// ```no_run . /// # use clippy_utils::str_utils::{camel_case_indices, StrIndex}; . /// assert_eq!( . /// camel_case_indices("AbcDef"), . /// vec![StrIndex::new(0, 0), StrIndex::new(3, 3), StrIndex::new(6, 6)] . /// ); . /// assert_eq!( . /// camel_case_indices("abcDef"), . /// vec![StrIndex::new(3, 3), StrIndex::new(6, 6)] . /// ); . /// ``` 150 ( 0.00%) pub fn camel_case_indices(s: &str) -> Vec { . let mut result = Vec::new(); . let mut str_idx = camel_case_start(s); . 68 ( 0.00%) while str_idx.byte_index < s.len() { 19 ( 0.00%) let next_idx = str_idx.byte_index + 1; . result.push(str_idx); 114 ( 0.00%) str_idx = camel_case_start_from_idx(s, next_idx); 3,521 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_start_from_idx (19x) . } . result.push(str_idx); . 45 ( 0.00%) result 120 ( 0.00%) } . . /// Split camel case string into a vector of its components . /// . /// ```no_run . /// # use clippy_utils::str_utils::{camel_case_split, StrIndex}; . /// assert_eq!(camel_case_split("AbcDef"), vec!["Abc", "Def"]); . /// ``` 165 ( 0.00%) pub fn camel_case_split(s: &str) -> Vec<&str> { 15 ( 0.00%) let mut offsets = camel_case_indices(s) 9,068 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_indices (15x) . .iter() . .map(|e| e.byte_index) . .collect::>(); 30 ( 0.00%) if offsets[0] != 0 { . offsets.insert(0, 0); . } . 53 ( 0.00%) offsets.windows(2).map(|w| &s[w[0]..w[1]]).collect() 135 ( 0.00%) } . . /// Dealing with string comparison can be complicated, this struct ensures that both the . /// character and byte count are provided for correct indexing. . #[derive(Debug, Default, PartialEq, Eq)] . pub struct StrCount { . pub char_count: usize, . pub byte_count: usize, . } -- line 174 ---------------------------------------- -- line 184 ---------------------------------------- . /// ```no_run . /// # use clippy_utils::str_utils::{count_match_start, StrCount}; . /// assert_eq!(count_match_start("hello_mouse", "hello_penguin"), StrCount::new(6, 6)); . /// assert_eq!(count_match_start("hello_clippy", "bye_bugs"), StrCount::new(0, 0)); . /// assert_eq!(count_match_start("hello_world", "hello_world"), StrCount::new(11, 11)); . /// assert_eq!(count_match_start("T\u{f6}ffT\u{f6}ff", "T\u{f6}ff"), StrCount::new(4, 5)); . /// ``` . #[must_use] 517 ( 0.00%) pub fn count_match_start(str1: &str, str2: &str) -> StrCount { . // (char_index, char1) . let char_count = str1.chars().count(); . let iter1 = (0..=char_count).zip(str1.chars()); . // (byte_index, char2) . let iter2 = str2.char_indices(); . . iter1 . .zip(iter2) . .take_while(|((_, c1), (_, c2))| c1 == c2) . .last() . .map_or_else(StrCount::default, |((char_index, _), (byte_index, character))| { 9 ( 0.00%) StrCount::new(char_index + 1, byte_index + character.len_utf8()) . }) 423 ( 0.00%) } . . /// Returns the number of chars and bytes that match from the end . /// . /// ```no_run . /// # use clippy_utils::str_utils::{count_match_end, StrCount}; . /// assert_eq!(count_match_end("hello_cat", "bye_cat"), StrCount::new(4, 4)); . /// assert_eq!(count_match_end("if_item_thing", "enum_value"), StrCount::new(0, 0)); . /// assert_eq!(count_match_end("Clippy", "Clippy"), StrCount::new(6, 6)); . /// assert_eq!(count_match_end("MyT\u{f6}ff", "YourT\u{f6}ff"), StrCount::new(4, 5)); . /// ``` . #[must_use] 517 ( 0.00%) pub fn count_match_end(str1: &str, str2: &str) -> StrCount { . let char_count = str1.chars().count(); 94 ( 0.00%) if char_count == 0 { . return StrCount::default(); . } . . // (char_index, char1) . let iter1 = (0..char_count).rev().zip(str1.chars().rev()); . // (byte_index, char2) . let byte_count = str2.len(); . let iter2 = str2.char_indices().rev(); -- line 228 ---------------------------------------- -- line 229 ---------------------------------------- . . iter1 . .zip(iter2) . .take_while(|((_, c1), (_, c2))| c1 == c2) . .last() . .map_or_else(StrCount::default, |((char_index, _), (byte_index, _))| { . StrCount::new(char_count - char_index, byte_count - byte_index) . }) 423 ( 0.00%) } . . /// Returns a `snake_case` version of the input . /// ```no_run . /// use clippy_utils::str_utils::to_snake_case; . /// assert_eq!(to_snake_case("AbcDef"), "abc_def"); . /// assert_eq!(to_snake_case("ABCD"), "a_b_c_d"); . /// assert_eq!(to_snake_case("AbcDD"), "abc_d_d"); . /// assert_eq!(to_snake_case("Abc1DD"), "abc1_d_d"); . /// ``` 400 ( 0.00%) pub fn to_snake_case(name: &str) -> String { . let mut s = String::new(); . for (i, c) in name.chars().enumerate() { . if c.is_uppercase() { . // characters without capitalization are considered lowercase 202 ( 0.00%) if i != 0 { . s.push('_'); . } . s.extend(c.to_lowercase()); . } else { . s.push(c); . } . } 350 ( 0.00%) s 400 ( 0.00%) } . /// 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"); . /// ``` 14,688 ( 0.00%) 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(); . } 11,069 ( 0.00%) if c == '_' { . up = true; . continue; . } 6,938 ( 0.00%) if up { . up = false; . s.extend(c.to_uppercase()); . } else { . s.push(c); . } . } 2,196 ( 0.00%) s 14,688 ( 0.00%) } . . #[cfg(test)] . mod test { . use super::*; . . #[test] . fn camel_case_start_full() { . assert_eq!(camel_case_start("AbcDef"), StrIndex::new(0, 0)); -- line 298 ---------------------------------------- 1,481 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/macros.rs -------------------------------------------------------------------------------- Ir -- line 33 ---------------------------------------- . sym::std_panic_macro, . sym::todo_macro, . sym::unimplemented_macro, . sym::write_macro, . sym::writeln_macro, . ]; . . /// Returns true if a given Macro `DefId` is a format macro (e.g. `println!`) 2,569 ( 0.00%) pub fn is_format_macro(cx: &LateContext<'_>, macro_def_id: DefId) -> bool { 4,163 ( 0.00%) if let Some(name) = cx.tcx.get_diagnostic_name(macro_def_id) { 22,932 ( 0.00%) => ???:::get_diagnostic_name (367x) . FORMAT_MACRO_DIAG_ITEMS.contains(&name) . } else { . // Allow users to tag any macro as being format!-like . // TODO: consider deleting FORMAT_MACRO_DIAG_ITEMS and using just this method 1,068 ( 0.00%) get_unique_builtin_attr( 95,825 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::get_unique_builtin_attr:: (267x) . cx.sess(), . #[allow(deprecated)] 1,068 ( 0.00%) cx.tcx.get_all_attrs(macro_def_id), 70,111 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::get_all_attrs:: (267x) . sym::format_args, . ) . .is_some() . } 2,202 ( 0.00%) } . . /// A macro call, like `vec![1, 2, 3]`. . /// . /// Use `tcx.item_name(macro_call.def_id)` to get the macro name. . /// Even better is to check if it is a diagnostic item. . /// . /// This structure is similar to `ExpnData` but it precludes desugaring expansions. . #[derive(Debug)] -- line 63 ---------------------------------------- -- line 77 ---------------------------------------- . span_is_local(self.span) . } . } . . /// Returns an iterator of expansions that created the given span . pub fn expn_backtrace(mut span: Span) -> impl Iterator { . std::iter::from_fn(move || { . let ctxt = span.ctxt(); 47,699 ( 0.00%) if ctxt == SyntaxContext::root() { . return None; . } 84,640 ( 0.00%) let expn = ctxt.outer_expn(); 86,062 ( 0.00%) let data = expn.expn_data(); 64,165 ( 0.00%) span = data.call_site; 430,814 ( 0.02%) Some((expn, data)) . }) . } . . /// Checks whether the span is from the root expansion or a locally defined macro 3,930 ( 0.00%) pub fn span_is_local(span: Span) -> bool { 884 ( 0.00%) !span.from_expansion() || expn_is_local(span.ctxt().outer_expn()) 38,037 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::expn_is_local (221x) 1,695 ( 0.00%) } . . /// Checks whether the expansion is the root expansion or a locally defined macro 663 ( 0.00%) pub fn expn_is_local(expn: ExpnId) -> bool { . if expn == ExpnId::root() { . return true; . } 442 ( 0.00%) let data = expn.expn_data(); 221 ( 0.00%) let backtrace = expn_backtrace(data.call_site); . std::iter::once((expn, data)) . .chain(backtrace) 2,652 ( 0.00%) .find_map(|(_, data)| data.macro_def_id) . .is_none_or(DefId::is_local) 884 ( 0.00%) } . . /// Returns an iterator of macro expansions that created the given span. . /// Note that desugaring expansions are skipped. . pub fn macro_backtrace(span: Span) -> impl Iterator { 186,781 ( 0.01%) expn_backtrace(span).filter_map(|(expn, data)| match data { . ExpnData { 48,112 ( 0.00%) kind: ExpnKind::Macro(kind, _), 49,195 ( 0.00%) macro_def_id: Some(def_id), 112,881 ( 0.01%) call_site: span, . .. . } => Some(MacroCall { . def_id, . kind, . expn, . span, . }), . _ => None, -- line 128 ---------------------------------------- -- line 129 ---------------------------------------- . }) . } . . /// If the macro backtrace of `span` has a macro call at the root expansion . /// (i.e. not a nested macro call), returns `Some` with the `MacroCall` . /// . /// If you only want to check whether the root macro has a specific name, . /// consider using [`matching_root_macro_call`] instead. 336,314 ( 0.02%) pub fn root_macro_call(span: Span) -> Option { . macro_backtrace(span).last() 244,592 ( 0.01%) } . . /// A combination of [`root_macro_call`] and . /// [`is_diagnostic_item`](rustc_middle::ty::TyCtxt::is_diagnostic_item) that returns a `MacroCall` . /// at the root expansion if only it matches the given name. 251,649 ( 0.01%) pub fn matching_root_macro_call(cx: &LateContext<'_>, span: Span, name: Symbol) -> Option { 92,072 ( 0.01%) root_macro_call(span).filter(|mc| cx.tcx.is_diagnostic_item(name, mc.def_id)) 4,651,751 ( 0.26%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (27,961x) 434,120 ( 0.02%) => ???:::is_diagnostic_item (7,230x) 195,727 ( 0.01%) } . . /// Like [`root_macro_call`], but only returns `Some` if `node` is the "first node" . /// produced by the macro call, as in [`first_node_in_macro`]. . pub fn root_macro_call_first_node(cx: &LateContext<'_>, node: &impl HirNode) -> Option { 532,755 ( 0.03%) if first_node_in_macro(cx, node) != Some(ExpnId::root()) { 1,002,441 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (27,185x) . return None; . } 7,840 ( 0.00%) root_macro_call(node.span()) 98,132 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (366x) . } . . /// Like [`macro_backtrace`], but only returns macro calls where `node` is the "first node" of the . /// macro call, as in [`first_node_in_macro`]. . pub fn first_node_macro_backtrace(cx: &LateContext<'_>, node: &impl HirNode) -> impl Iterator { 54,388 ( 0.00%) let span = node.span(); 54,388 ( 0.00%) first_node_in_macro(cx, node) 1,002,738 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (27,194x) . .into_iter() . .flat_map(move |expn| macro_backtrace(span).take_while(move |macro_call| macro_call.expn != expn)) . } . . /// If `node` is the "first node" in a macro expansion, returns `Some` with the `ExpnId` of the . /// macro call site (i.e. the parent of the macro expansion). . /// . /// This generally means that `node` is the outermost node of an entire macro expansion, but there -- line 169 ---------------------------------------- -- line 174 ---------------------------------------- . /// just check the context of that span directly (e.g. `parent.span.from_expansion()`). . /// . /// If a macro call is in statement position, it expands to one or more statements. . /// In that case, each statement *and* their immediate descendants will all yield `Some` . /// with the `ExpnId` of the containing block. . /// . /// A node may be the "first node" of multiple macro calls in a macro backtrace. . /// The expansion of the outermost macro call site is returned in such cases. 2,078,064 ( 0.12%) pub fn first_node_in_macro(cx: &LateContext<'_>, node: &impl HirNode) -> Option { . // A node that is not from an expansion can never be the first node in a macro. This is the . // common case, so return before touching the cache. 1,154,480 ( 0.07%) if !node.span().from_expansion() { . return None; . } . . // The macro lints each query this for the node currently being visited, and the combined late . // pass runs all their `check_*` callbacks on that node back to back, so the redundant queries . // are consecutive. A single-slot memo of the last node collapses them to one backtrace walk in . // O(1) memory. The result is a pure function of the `HirId` (the HIR is frozen during lint . // passes), so returning the stored value on a key match is always correct. . let hir_id = node.hir_id(); 174,264 ( 0.01%) if let Some((cached_id, cached)) = LAST_FIRST_NODE_IN_MACRO.get() . && cached_id == hir_id . { . return cached; . } 10,223 ( 0.00%) let result = first_node_in_macro_uncached(cx, node); . LAST_FIRST_NODE_IN_MACRO.set(Some((hir_id, result))); . result 2,078,064 ( 0.12%) } . . thread_local! { . static LAST_FIRST_NODE_IN_MACRO: Cell)>> = const { Cell::new(None) }; . } . . fn first_node_in_macro_uncached(cx: &LateContext<'_>, node: &impl HirNode) -> Option { . // get the macro expansion or return `None` if not found . // `macro_backtrace` importantly ignores desugaring expansions . let expn = macro_backtrace(node.span()).next()?.expn; . . // get the parent node, possibly skipping over a statement . // if the parent is not found, it is sensible to return `Some(root)` . let mut parent_iter = cx.tcx.hir_parent_iter(node.hir_id()); 14,778 ( 0.00%) let (parent_id, _) = match parent_iter.next() { . None => return Some(ExpnId::root()), . Some((_, Node::Stmt(_))) => match parent_iter.next() { . None => return Some(ExpnId::root()), . Some(next) => next, . }, . Some(next) => next, . }; . . // get the macro expansion of the parent node 29,556 ( 0.00%) let parent_span = cx.tcx.hir_span(parent_id); 1,064,491 ( 0.06%) => ???:::hir_span (7,389x) . let Some(parent_macro_call) = macro_backtrace(parent_span).next() else { . // the parent node is not in a macro . return Some(ExpnId::root()); . }; . 400 ( 0.00%) if parent_macro_call.expn.is_descendant_of(expn) { . // `node` is input to a macro call . return None; . } . . Some(parent_macro_call.expn) . } . . /* Specific Macro Utils */ . . /// Is `def_id` of `std::panic`, `core::panic` or any inner implementation macros 40 ( 0.00%) pub fn is_panic(cx: &LateContext<'_>, def_id: DefId) -> bool { 394 ( 0.00%) let Some(name) = cx.tcx.get_diagnostic_name(def_id) else { 2,521 ( 0.00%) => ???:::get_diagnostic_name (40x) . return false; . }; . matches!( . name, . sym::core_panic_macro . | sym::std_panic_macro . | sym::core_panic_2015_macro . | sym::std_panic_2015_macro . | sym::core_panic_2021_macro . ) 80 ( 0.00%) } . . /// Is `def_id` of `assert!` or `debug_assert!` . pub fn is_assert_macro(cx: &LateContext<'_>, def_id: DefId) -> bool { . let Some(name) = cx.tcx.get_diagnostic_name(def_id) else { . return false; . }; . matches!(name, sym::assert_macro | sym::debug_assert_macro) . } -- line 264 ---------------------------------------- -- line 282 ---------------------------------------- . Display(&'a Expr<'a>), . /// Anything else - `panic!("error {}: {}", a, b)`, `panic!("on edition 2021+")`. . /// . /// See [`FormatArgsStorage::get`] to examine the contents of the formatting. . Format(&'a Expr<'a>), . } . . impl<'a> PanicCall<'a> { 3,261 ( 0.00%) pub fn parse(expr: &'a Expr<'a>) -> Option { 2,174 ( 0.00%) let ExprKind::Call(callee, args) = &expr.kind else { . return None; . }; 540 ( 0.00%) let ExprKind::Path(QPath::Resolved(_, path)) = &callee.kind else { . return None; . }; 432 ( 0.00%) let name = path.segments.last().unwrap().ident.name; . 432 ( 0.00%) let [arg, rest @ ..] = args else { . return None; . }; . let result = match name { 634 ( 0.00%) sym::panic | sym::begin_panic | sym::panic_str_2015 => { 10 ( 0.00%) if arg.span.eq_ctxt(expr.span) || arg.span.is_dummy() { . Self::DefaultMessage . } else { . Self::Str2015(arg) . } . }, . sym::panic_display => { . let ExprKind::AddrOf(_, _, e) = &arg.kind else { . return None; -- line 312 ---------------------------------------- -- line 314 ---------------------------------------- . Self::Display(e) . }, . sym::panic_fmt => Self::Format(arg), . // Since Rust 1.52, `assert_{eq,ne}` macros expand to use: . // `core::panicking::assert_failed(.., left_val, right_val, None | Some(format_args!(..)));` . sym::assert_failed => { . // It should have 4 arguments in total (we already matched with the first argument, . // so we're just checking for 3) 192 ( 0.00%) if rest.len() != 3 { . return None; . } . // `msg_arg` is either `None` (no custom message) or `Some(format_args!(..))` (custom message) . let msg_arg = &rest[2]; 192 ( 0.00%) match msg_arg.kind { 36 ( 0.00%) ExprKind::Call(_, [fmt_arg]) => Self::Format(fmt_arg), . _ => Self::DefaultMessage, . } . }, . _ => return None, . }; . Some(result) 4,348 ( 0.00%) } . . pub fn is_default_message(&self) -> bool { . matches!(self, Self::DefaultMessage) . } . } . . /// Finds the arguments of an `assert!` or `debug_assert!` macro call within the macro expansion 144 ( 0.00%) pub fn find_assert_args<'a>( . cx: &LateContext<'_>, . expr: &'a Expr<'a>, . expn: ExpnId, . ) -> Option<(&'a Expr<'a>, PanicCall<'a>)> { . find_assert_args_inner(cx, expr, expn).map(|([e], p)| (e, p)) 108 ( 0.00%) } . . /// Finds the arguments of an `assert_eq!` or `debug_assert_eq!` macro call within the macro . /// expansion 1,152 ( 0.00%) pub fn find_assert_eq_args<'a>( . cx: &LateContext<'_>, . expr: &'a Expr<'a>, . expn: ExpnId, . ) -> Option<(&'a Expr<'a>, &'a Expr<'a>, PanicCall<'a>)> { . find_assert_args_inner(cx, expr, expn).map(|([a, b], p)| (a, b, p)) 864 ( 0.00%) } . . fn find_assert_args_inner<'a, const N: usize>( . cx: &LateContext<'_>, . expr: &'a Expr<'a>, . expn: ExpnId, . ) -> Option<([&'a Expr<'a>; N], PanicCall<'a>)> { 432 ( 0.00%) let macro_id = expn.expn_data().macro_def_id?; 432 ( 0.00%) let (expr, expn) = match cx.tcx.item_name(macro_id).as_str().strip_prefix("debug_") { . None => (expr, expn), . Some(inner_name) => find_assert_within_debug_assert(cx, expr, expn, Symbol::intern(inner_name))?, . }; . let mut args = ArrayVec::new(); 756 ( 0.00%) let panic_expn = for_each_expr_without_closures(expr, |e| { 9,547 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_expr_without_closures::::{closure#0}> (12x) 3,590 ( 0.00%) if args.is_full() { 5,327 ( 0.00%) match PanicCall::parse(e) { 5,316 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:::parse (288x) . Some(expn) => ControlFlow::Break(expn), . None => ControlFlow::Continue(Descend::Yes), . } 5,664 ( 0.00%) } else if is_assert_arg(cx, e, expn) { 2,772 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_assert_arg (12x) . args.push(e); . ControlFlow::Continue(Descend::No) . } else { . ControlFlow::Continue(Descend::Yes) . } . }); 12 ( 0.00%) let args = args.into_inner().ok()?; . Some((args, panic_expn?)) . } . . fn find_assert_within_debug_assert<'a>( . cx: &LateContext<'_>, . expr: &'a Expr<'a>, . expn: ExpnId, . assert_name: Symbol, -- line 393 ---------------------------------------- -- line 402 ---------------------------------------- . } else if e_expn.expn_data().macro_def_id.map(|id| cx.tcx.item_name(id)) == Some(assert_name) { . ControlFlow::Break((e, e_expn)) . } else { . ControlFlow::Continue(Descend::No) . } . }) . } . 6,372 ( 0.00%) fn is_assert_arg(cx: &LateContext<'_>, expr: &Expr<'_>, assert_expn: ExpnId) -> bool { 1,416 ( 0.00%) if !expr.span.from_expansion() { . return true; . } 1,512 ( 0.00%) let result = macro_backtrace(expr.span).try_for_each(|macro_call| { . if macro_call.expn == assert_expn { . ControlFlow::Break(false) . } else { . match cx.tcx.item_name(macro_call.def_id) { . // `cfg!(debug_assertions)` in `debug_assert!` . sym::cfg => ControlFlow::Continue(()), . // assert!(other_macro!(..)) . _ => ControlFlow::Break(true), . } . } . }); . match result { . ControlFlow::Break(is_assert_arg) => is_assert_arg, . ControlFlow::Continue(()) => true, . } 6,372 ( 0.00%) } . . /// Stores AST [`FormatArgs`] nodes for use in late lint passes, as they are in a desugared form in . /// the HIR 1 ( 0.00%) #[derive(Default, Clone)] . pub struct FormatArgsStorage(Arc>>); . . impl FormatArgsStorage { . /// Returns an AST [`FormatArgs`] node if a `format_args` expansion is found as a descendant of . /// `expn_id` . /// . /// See also [`find_format_arg_expr`] 609 ( 0.00%) pub fn get(&self, cx: &LateContext<'_>, start: &Expr<'_>, expn_id: ExpnId) -> Option<&FormatArgs> { . let format_args_expr = for_each_expr_without_closures(start, |expr| { 986 ( 0.00%) let ctxt = expr.span.ctxt(); 7,346 ( 0.00%) if ctxt.outer_expn().is_descendant_of(expn_id) { . if macro_backtrace(expr.span) 1,011 ( 0.00%) .map(|macro_call| cx.tcx.item_name(macro_call.def_id)) . .any(|name| matches!(name, sym::const_format_args | sym::format_args | sym::format_args_nl)) . { . ControlFlow::Break(expr) . } else { . ControlFlow::Continue(Descend::Yes) . } . } else { . ControlFlow::Continue(Descend::No) . } . })?; . . debug_assert!(self.0.get().is_some(), "`FormatArgsStorage` not yet populated"); . 118 ( 0.00%) self.0.get()?.get(&format_args_expr.span.with_parent(None)) 348 ( 0.00%) } . . /// Should only be called by `FormatArgsCollector` 2 ( 0.00%) pub fn set(&self, format_args: FxHashMap) { . self.0 . .set(format_args) . .expect("`FormatArgsStorage::set` should only be called once"); 3 ( 0.00%) } . } . . /// Attempt to find the [`rustc_hir::Expr`] that corresponds to the [`FormatArgument`]'s value 124 ( 0.00%) pub fn find_format_arg_expr<'hir>(start: &'hir Expr<'hir>, target: &FormatArgument) -> Option<&'hir Expr<'hir>> { . let SpanData { 62 ( 0.00%) lo, 62 ( 0.00%) hi, 62 ( 0.00%) ctxt, . parent: _, 62 ( 0.00%) } = target.expr.span.data(); . . for_each_expr_without_closures(start, |expr| { . // When incremental compilation is enabled spans gain a parent during AST to HIR lowering, . // since we're comparing an AST span to a HIR one we need to ignore the parent field 248 ( 0.00%) let data = expr.span.data(); 744 ( 0.00%) if data.lo == lo && data.hi == hi && data.ctxt == ctxt { . ControlFlow::Break(expr) . } else { . ControlFlow::Continue(()) . } . }) 124 ( 0.00%) } . . /// Span of the `:` and format specifiers . /// . /// ```ignore . /// format!("{:.}"), format!("{foo:.}") . /// ^^ ^^ . /// ``` . pub fn format_placeholder_format_span(placeholder: &FormatPlaceholder) -> Option { -- line 499 ---------------------------------------- -- line 526 ---------------------------------------- . . /// Returns the [`Span`] of the value at `index` extended to the previous comma, e.g. for the value . /// `10` . /// . /// ```ignore . /// format("{}.{}", 10, 11) . /// // ^^^^ . /// ``` 135 ( 0.00%) pub fn format_arg_removal_span(format_args: &FormatArgs, index: usize) -> Option { 15 ( 0.00%) let ctxt = format_args.span.ctxt(); . 75 ( 0.00%) let current = hygiene::walk_chain(format_args.arguments.by_index(index)?.expr.span, ctxt); 810 ( 0.00%) => ???:rustc_span::hygiene::walk_chain (15x) . 30 ( 0.00%) let prev = if index == 0 { . format_args.span . } else { . hygiene::walk_chain(format_args.arguments.by_index(index - 1)?.expr.span, ctxt) . }; . 30 ( 0.00%) Some(current.with_lo(prev.hi())) 135 ( 0.00%) } . . /// Where a format parameter is being used in the format string . #[derive(Debug, Copy, Clone, PartialEq, Eq)] . pub enum FormatParamUsage { . /// Appears as an argument, e.g. `format!("{}", foo)` . Argument, . /// Appears as a width, e.g. `format!("{:width$}", foo, width = 1)` . Width, -- line 554 ---------------------------------------- 359,998 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/structural_impls.rs -------------------------------------------------------------------------------- Ir -- line 326 ---------------------------------------- . } . } . . impl<'tcx> TypeFoldable> for Ty<'tcx> { . fn try_fold_with>>( . self, . folder: &mut F, . ) -> Result { 358 ( 0.00%) folder.try_fold_ty(self) 269,204 ( 0.02%) => ???:>::try_fold_ty (7x) . } . . fn fold_with>>(self, folder: &mut F) -> Self { 10,729 ( 0.00%) folder.fold_ty(self) 42 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty (3x) . } . } . . impl<'tcx> TypeVisitable> for Ty<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 1,685 ( 0.00%) visitor.visit_ty(*self) 425 ( 0.00%) => ???:>::visit_ty (8x) . } . } . . impl<'tcx> TypeSuperFoldable> for Ty<'tcx> { . fn try_super_fold_with>>( . self, . folder: &mut F, . ) -> Result { -- line 352 ---------------------------------------- -- line 389 ---------------------------------------- . | ty::Placeholder(..) . | ty::Never . | ty::Foreign(..) => return Ok(self), . }; . . Ok(if *self.kind() == kind { self } else { folder.cx().mk_ty_from_kind(kind) }) . } . 20,412 ( 0.00%) fn super_fold_with>>(self, folder: &mut F) -> Self { 13,608 ( 0.00%) let kind = match *self.kind() { . ty::RawPtr(ty, mutbl) => ty::RawPtr(ty.fold_with(folder), mutbl), 568 ( 0.00%) ty::Array(typ, sz) => ty::Array(typ.fold_with(folder), sz.fold_with(folder)), . ty::Slice(typ) => ty::Slice(typ.fold_with(folder)), 2,370 ( 0.00%) ty::Adt(tid, args) => ty::Adt(tid, args.fold_with(folder)), 201,358 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> (280x) 4 ( 0.00%) ty::Dynamic(trait_ty, region) => { . ty::Dynamic(trait_ty.fold_with(folder), region.fold_with(folder)) 2 ( 0.00%) } 330 ( 0.00%) ty::Tuple(ts) => ty::Tuple(ts.fold_with(folder)), 65,824 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> (56x) 1,984 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::>'2 (1x) . ty::FnDef(def_id, args) => ty::FnDef(def_id, args.fold_with(folder)), 18 ( 0.00%) ty::FnPtr(sig_tys, hdr) => ty::FnPtr(sig_tys.fold_with(folder), hdr), . ty::UnsafeBinder(f) => ty::UnsafeBinder(f.fold_with(folder)), 11,410 ( 0.00%) ty::Ref(r, ty, mutbl) => ty::Ref(r.fold_with(folder), ty.fold_with(folder), mutbl), . ty::Coroutine(did, args) => ty::Coroutine(did, args.fold_with(folder)), . ty::CoroutineWitness(did, args) => ty::CoroutineWitness(did, args.fold_with(folder)), . ty::Closure(did, args) => ty::Closure(did, args.fold_with(folder)), . ty::CoroutineClosure(did, args) => ty::CoroutineClosure(did, args.fold_with(folder)), . ty::Alias(is_rigid, data) => ty::Alias(is_rigid, data.fold_with(folder)), . ty::Pat(ty, pat) => ty::Pat(ty.fold_with(folder), pat.fold_with(folder)), . . ty::Bool -- line 418 ---------------------------------------- -- line 425 ---------------------------------------- . | ty::Infer(_) . | ty::Param(..) . | ty::Bound(..) . | ty::Placeholder(..) . | ty::Never . | ty::Foreign(..) => return self, . }; . 20,412 ( 0.00%) if *self.kind() == kind { self } else { folder.cx().mk_ty_from_kind(kind) } 30,632 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs: as core::cmp::PartialEq>::eq (1,862x) 20,412 ( 0.00%) } . } . . impl<'tcx> TypeSuperVisitable> for Ty<'tcx> { . fn super_visit_with>>(&self, visitor: &mut V) -> V::Result { 40 ( 0.00%) match self.kind() { . ty::RawPtr(ty, _mutbl) => ty.visit_with(visitor), . ty::Array(typ, sz) => { . try_visit!(typ.visit_with(visitor)); . sz.visit_with(visitor) . } . ty::Slice(typ) => typ.visit_with(visitor), 10 ( 0.00%) ty::Adt(_, args) => args.visit_with(visitor), . ty::Dynamic(trait_ty, reg) => { . try_visit!(trait_ty.visit_with(visitor)); . reg.visit_with(visitor) . } . ty::Tuple(ts) => ts.visit_with(visitor), . ty::FnDef(_, args) => args.visit_with(visitor), . ty::FnPtr(sig_tys, _) => sig_tys.visit_with(visitor), . ty::UnsafeBinder(f) => f.visit_with(visitor), -- line 454 ---------------------------------------- -- line 771 ---------------------------------------- . ) -> Result { . ty::util::try_fold_list(self, folder, |tcx, v| tcx.$mk(v)) . } . . fn fold_with>>( . self, . folder: &mut F, . ) -> Self { 4 ( 0.00%) ty::util::fold_list(self, folder, |tcx, v| tcx.$mk(v)) 304 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/util.rs:rustc_middle::ty::util::fold_list::, &rustc_middle::ty::list::RawList<(), rustc_type_ir::binder::Binder>>, rustc_type_ir::binder::Binder>, <&rustc_middle::ty::list::RawList<(), rustc_type_ir::binder::Binder>> as rustc_type_ir::fold::TypeFoldable>::fold_with>::{closure#0}> (2x) . } . } . )* . } . } . . list_fold! { . &'tcx ty::List> : mk_poly_existential_predicates, -- line 787 ---------------------------------------- 6,151 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/replace_box.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . #[clippy::version = "1.92.0"] . pub REPLACE_BOX, . perf, . "assigning a newly created box to `Box` is inefficient" . } . . impl_lint_pass!(ReplaceBox => [REPLACE_BOX]); . 5 ( 0.00%) #[derive(Default)] . pub struct ReplaceBox { . consumed_locals: FxHashSet, . loaded_bodies: SmallVec<[BodyId; 2]>, . } . . impl ReplaceBox { . fn get_consumed_locals(&mut self, cx: &LateContext<'_>) -> &FxHashSet { 3 ( 0.00%) if let Some(body_id) = cx.enclosing_body 3 ( 0.00%) && !self.loaded_bodies.contains(&body_id) . { . self.loaded_bodies.push(body_id); . ExprUseVisitor::for_clippy( . cx, 5 ( 0.00%) cx.tcx.hir_body_owner_def_id(body_id), 124 ( 0.00%) => ???:::hir_body_owner_def_id (1x) . MovedVariablesCtxt { . consumed_locals: &mut self.consumed_locals, . }, . ) 5 ( 0.00%) .consume_body(cx.tcx.hir_body(body_id)) 1,603,541 ( 0.09%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_body (1x) 62 ( 0.00%) => ???:::hir_body (1x) . .into_ok(); . } . . &self.consumed_locals . } . } . . impl LateLintPass<'_> for ReplaceBox { . fn check_body_post(&mut self, _: &LateContext<'_>, body: &Body<'_>) { 3,963 ( 0.00%) if self.loaded_bodies.first().is_some_and(|&x| x == body.id()) { . self.consumed_locals.clear(); . self.loaded_bodies.clear(); . } . } . 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 54,388 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = &expr.kind 489 ( 0.00%) && !lhs.span.from_expansion() 420 ( 0.00%) && !rhs.span.from_expansion() 280 ( 0.00%) && let lhs_ty = cx.typeck_results().expr_ty(lhs) 5,612 ( 0.00%) => ???:::expr_ty (140x) 560 ( 0.00%) && let Some(inner_ty) = lhs_ty.boxed_ty() 1,025 ( 0.00%) => ???:::boxed_ty (140x) . // No diagnostic for late-initialized locals . && lhs.res_local_id().is_none_or(|local| local_is_initialized(cx, local)) . // No diagnostic if this is a local that has been moved, or the field . // of a local that has been moved, or several chained field accesses of a local 4 ( 0.00%) && local_base(lhs).is_none_or(|(base_id, _)| { 125 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/replace_box.rs:clippy_lints::replace_box::local_base (1x) . !self.get_consumed_locals(cx).contains(&base_id) . }) . { . if let Some(default_trait_id) = cx.tcx.get_diagnostic_item(sym::Default) . && implements_trait(cx, inner_ty, default_trait_id, &[]) . && is_default_call(cx, rhs) . { . span_lint_and_then( -- line 98 ---------------------------------------- -- line 132 ---------------------------------------- . expr.span, . "replace existing content with inner value instead", . suggestion, . app, . ); . }); . } . } 217,552 ( 0.01%) } . } . . fn is_default_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . matches!(expr.kind, ExprKind::Call(func, _args) if is_default_equivalent_call(cx, func, Some(expr))) . } . . fn get_box_new_payload<'tcx>(cx: &LateContext<'_>, expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::Call(box_new, [arg]) = expr.kind -- line 148 ---------------------------------------- -- line 157 ---------------------------------------- . } . . struct MovedVariablesCtxt<'a> { . consumed_locals: &'a mut FxHashSet, . } . . impl<'tcx> Delegate<'tcx> for MovedVariablesCtxt<'_> { . fn consume(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) { 968 ( 0.00%) if let PlaceBase::Local(id) = cmt.place.base . && let mut projections = cmt . .place . .projections . .iter() 17 ( 0.00%) .filter(|x| matches!(x.kind, ProjectionKind::Deref)) . // Either no deref or multiple derefs . && (projections.next().is_none() || projections.next().is_some()) . { 85 ( 0.00%) self.consumed_locals.insert(id); . } . } . . fn use_cloned(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} . . fn borrow(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) {} . . fn mutate(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} -- line 182 ---------------------------------------- -- line 183 ---------------------------------------- . . fn fake_read(&mut self, _: &PlaceWithHirId<'tcx>, _: FakeReadCause, _: HirId) {} . } . . /// A local place followed by optional fields . type IdFields = (HirId, Vec); . . /// If `expr` is a local variable with optional field accesses, return it. 10 ( 0.00%) fn local_base(expr: &Expr<'_>) -> Option { 8 ( 0.00%) match expr.kind { 1 ( 0.00%) ExprKind::Path(qpath) => qpath.res_local_id().map(|id| (id, Vec::new())), 4 ( 0.00%) ExprKind::Field(expr, field) => local_base(expr).map(|(id, mut fields)| { 26 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/replace_box.rs:clippy_lints::replace_box::local_base'2 (1x) . fields.push(field.name); 4 ( 0.00%) (id, fields) . }), . _ => None, . } 10 ( 0.00%) } 494 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . use parking_lot::RwLock; . use smallvec::SmallVec; . use tracing::warn; . . use crate::fx::FxHashMap; . use crate::outline; . use crate::sync::AtomicU64; . 103,012 ( 0.01%) bitflags::bitflags! { . #[derive(Clone, Copy)] . struct EventFilter: u16 { . const GENERIC_ACTIVITIES = 1 << 0; . const QUERY_PROVIDERS = 1 << 1; . /// Store detailed instant events, including timestamp and thread ID, . /// per each query cache hit. Note that this is quite expensive. . const QUERY_CACHE_HITS = 1 << 2; . const QUERY_BLOCKED = 1 << 3; -- line 112 ---------------------------------------- -- line 432 ---------------------------------------- . |profiler| profiler.query_cache_hit_event_kind, . query_invocation_id, . ); . } . } . . // We check both kinds of query cache hit events at once, to reduce overhead in the . // common case (with self-profile disabled). 51,506 ( 0.00%) if self.event_filter_mask.intersects(EventFilter::QUERY_CACHE_HIT_COMBINED) { . hint::cold_path(); . cold_call(self, query_invocation_id); . } . } . . /// Start profiling a query being blocked on a concurrent execution. . /// Profiling continues until the TimingGuard returned from this call is . /// dropped. -- line 448 ---------------------------------------- 990 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl UselessFormat { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for UselessFormat { 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Loosened from `root_macro_call_first_node` so the lint also fires when `format!` is . // the tail of a block emitted by another macro. The `!= macro_call.expn` check filters . // HIR nodes inside `format!`'s own expansion (its outer block's tail, its nested . // `format_args!`), which would otherwise also pass `first_node_in_macro` and cause the . // lint to fire multiple times per call. 136,627 ( 0.01%) if let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::format_macro) 5,631,668 ( 0.32%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (27,194x) 679 ( 0.00%) && first_node_in_macro(cx, expr).is_some_and(|p_expn| p_expn != macro_call.expn) 9,636 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (219x) 88 ( 0.00%) && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) 33,462 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (11x) . { 11 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . let call_site = macro_call.span; . . match (format_args.arguments.all_args(), &format_args.template[..]) { 26 ( 0.00%) ([], []) => span_useless_format_empty(cx, call_site, "String::new()".to_owned(), applicability), . ([], [_]) => { . // Simulate macro expansion, converting {{ and }} to { and }. . let Some(snippet) = format_args.span.get_text(cx) else { . return; . }; . let s_expand = snippet.replace("{{", "{").replace("}}", "}"); . let sugg = format!("{s_expand}.to_string()"); . span_useless_format(cx, call_site, sugg, applicability); . }, 18 ( 0.00%) ([arg], [piece]) => { . if let Some(value) = find_format_arg_expr(expr, arg) . && let FormatArgsPiece::Placeholder(placeholder) = piece . && placeholder.format_trait == FormatTrait::Display . && placeholder.format_options == FormatOptions::default() . && match cx.typeck_results().expr_ty(value).peel_refs().kind() { . ty::Adt(adt, _) => Some(adt.did()) == cx.tcx.lang_items().string(), . ty::Str => true, . _ => false, -- line 87 ---------------------------------------- -- line 101 ---------------------------------------- . format!("{}.to_string()", sugg.maybe_paren()) . }; . span_useless_format(cx, call_site, sugg, applicability); . } . }, . _ => {}, . } . } 217,552 ( 0.01%) } . } . . fn span_useless_format_empty(cx: &LateContext<'_>, span: Span, sugg: String, applicability: Applicability) { . span_lint_and_sugg( . cx, . USELESS_FORMAT, . span, . "useless use of `format!`", -- line 117 ---------------------------------------- 27,194 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/from_raw_with_void_ptr.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub FROM_RAW_WITH_VOID_PTR, . suspicious, . "creating a `Box` from a void raw pointer" . } . . declare_lint_pass!(FromRawWithVoidPtr => [FROM_RAW_WITH_VOID_PTR]); . . impl LateLintPass<'_> for FromRawWithVoidPtr { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 63,325 ( 0.00%) if let ExprKind::Call(box_from_raw, [arg]) = expr.kind 9,626 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_from_raw.kind 182 ( 0.00%) && seg.ident.name == sym::from_raw . && let Some(type_str) = ty.basic_res().opt_def_id().and_then(|id| def_id_matches_type(cx, id)) . && let arg_kind = cx.typeck_results().expr_ty(arg).kind() . && let ty::RawPtr(ty, _) = arg_kind . && is_c_void(cx, *ty) . { . let msg = format!("creating a `{type_str}` from a void raw pointer"); . span_lint_and_help( . cx, . FROM_RAW_WITH_VOID_PTR, . expr.span, . msg, . Some(arg.span), . "cast this to a pointer of the appropriate type", . ); . } 217,552 ( 0.01%) } . } . . /// Checks whether a `DefId` matches `Box`, `Rc`, `Arc`, or one of the `Weak` types. . /// Returns a static string slice with the name of the type, if one was found. . fn def_id_matches_type(cx: &LateContext<'_>, def_id: DefId) -> Option<&'static str> { . // Box . if Some(def_id) == cx.tcx.lang_items().owned_box() { . return Some("Box"); -- line 69 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs -------------------------------------------------------------------------------- Ir -- line 213 ---------------------------------------- . impl Usage { . fn new(span: Span, idx: usize) -> Self { . Self { span, idx } . } . } . . /// The parameters being checked by the lint, indexed by both the parameter's `HirId` and the . /// `DefId` of the function paired with the parameter's index. 2 ( 0.00%) #[derive(Default)] . #[expect(clippy::struct_field_names)] . struct Params { . params: Vec, . by_id: HirIdMap, . by_fn: FxHashMap<(DefId, usize), usize>, . } . impl Params { . fn insert(&mut self, param: Param, id: HirId) { -- line 229 ---------------------------------------- -- line 230 ---------------------------------------- . let idx = self.params.len(); . self.by_id.insert(id, idx); . self.by_fn.insert((param.fn_id, param.idx), idx); . self.params.push(param); . } . . fn remove_by_id(&mut self, id: HirId) { . if let Some(param) = self.get_by_id_mut(id) { 2,262 ( 0.00%) param.uses = Vec::new(); 3,016 ( 0.00%) let key = (param.fn_id, param.idx); . self.by_fn.remove(&key); . // FIXME(rust/#120456) - is `swap_remove` correct? 1,508 ( 0.00%) self.by_id.swap_remove(&id); 73,842 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (754x) . } . } . . fn get_by_id_mut(&mut self, id: HirId) -> Option<&mut Param> { 30,074 ( 0.00%) self.params.get_mut(*self.by_id.get(&id)?) 133,752 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (7,518x) . } . . fn get_by_fn(&self, id: DefId, idx: usize) -> Option<&Param> { . self.params.get(*self.by_fn.get(&(id, idx))?) . } . . fn clear(&mut self) { . self.params.clear(); -- line 255 ---------------------------------------- -- line 257 ---------------------------------------- . self.by_fn.clear(); . } . . /// Sets the `apply_lint` flag on each parameter. . fn flag_for_linting(&self) { . // Stores the list of parameters currently being resolved. Needed to avoid cycles. . let mut eval_stack = Vec::new(); . for param in &self.params { 2,265 ( 0.00%) self.try_disable_lint_for_param(param, &mut eval_stack); 5,285 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::try_disable_lint_for_param (755x) . } . } . . // Use by calling `flag_for_linting`. . fn try_disable_lint_for_param(&self, param: &Param, eval_stack: &mut Vec) -> bool { 1,510 ( 0.00%) if !param.apply_lint.get() { . true 755 ( 0.00%) } else if param.uses.is_empty() { . // Don't lint on unused parameters. . param.apply_lint.set(false); . true . } else if eval_stack.contains(¶m.idx) { . // Already on the evaluation stack. Returning false will continue to evaluate other dependencies. . false . } else { . eval_stack.push(param.idx); -- line 281 ---------------------------------------- -- line 290 ---------------------------------------- . param.apply_lint.set(false); . eval_stack.pop(); . return true; . } . } . eval_stack.pop(); . false . } 755 ( 0.00%) } . } . 11 ( 0.00%) #[derive(Default)] . pub struct OnlyUsedInRecursion { . /// Track the top-level body entered. Needed to delay reporting when entering nested bodies. . entered_body: Option, . params: Params, . } . . impl<'tcx> LateLintPass<'tcx> for OnlyUsedInRecursion { 15,840 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 5,940 ( 0.00%) if body.value.span.from_expansion() { . return; . } . // `skip_params` is either `0` or `1` to skip the `self` parameter in trait functions. . // It can't be renamed, and it can't be removed without removing it from multiple functions. 16,258 ( 0.00%) let (fn_id, fn_kind, skip_params) = match cx.tcx.parent_hir_node(body.value.hir_id) { 118,404 ( 0.01%) => ???:::parent_hir_node (1,066x) 304 ( 0.00%) Node::Item(i) => (i.owner_id.to_def_id(), FnKind::Fn, 0), . Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(ref sig, _), 12 ( 0.00%) owner_id, . .. . }) => ( . owner_id.to_def_id(), . FnKind::TraitFn, . usize::from(sig.decl.implicit_self().has_implicit_self()), 3 ( 0.00%) ), . Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(ref sig, _), 643 ( 0.00%) owner_id, 643 ( 0.00%) impl_kind, . .. . }) => { 2,147 ( 0.00%) if let ImplItemImplKind::Trait { trait_item_def_id, .. } = impl_kind . && let Ok(trait_item_id) = trait_item_def_id . { . let impl_id = cx.tcx.local_parent(owner_id.def_id); 850 ( 0.00%) let trait_ref = cx.tcx.impl_trait_ref(impl_id).instantiate_identity().skip_norm_wip(); 30,685 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: (425x) . ( . trait_item_id, . FnKind::ImplTraitFn( . std::ptr::from_ref(cx.tcx.erase_and_anonymize_regions(trait_ref.args)) as usize . ), . usize::from(sig.decl.implicit_self().has_implicit_self()), . ) . } else { . (owner_id.to_def_id(), FnKind::Fn, 0) . } . }, . _ => return, . }; 1,596 ( 0.00%) body.params . .iter() . .enumerate() . .skip(skip_params) 3,032 ( 0.00%) .filter_map(|(idx, p)| match p.pat.kind { 7,562 ( 0.00%) PatKind::Binding(_, id, ident, None) if !ident.as_str().starts_with('_') => { 24,256 ( 0.00%) => ???:::as_str (758x) . Some((id, Param::new(fn_id, fn_kind, idx, ident))) . }, . _ => None, . }) . .for_each(|(id, param)| self.params.insert(param, id)); 798 ( 0.00%) if self.entered_body.is_none() { 1,572 ( 0.00%) self.entered_body = Some(body.value.hir_id); . } 15,840 ( 0.00%) } . 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) { . if let Some(id) = e.res_local_id() . && let Some(param) = self.params.get_by_id_mut(id) . { . let typeck = cx.typeck_results(); 756 ( 0.00%) let span = e.span; . let mut e = e; . loop { 4,968 ( 0.00%) match get_expr_use_or_unification_node(cx.tcx, e) { 158,543 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (806x) . None | Some((Node::Stmt(_), _)) => return, 9,267 ( 0.00%) Some((Node::Expr(parent), child_id)) => match parent.kind { . // Recursive call. Track which index the parameter is used in. . ExprKind::Call(callee, args) 3,407 ( 0.00%) if callee.res(cx).opt_def_id().is_some_and(|id| { 1,135 ( 0.00%) id == param.fn_id && has_matching_args(param.fn_kind, typeck.node_args(callee.hir_id)) 1,989 ( 0.00%) => ???:::node_args (51x) 2,092 ( 0.00%) }) => . { . if let Some(idx) = args.iter().position(|arg| arg.hir_id == child_id) { . param.uses.push(Usage::new(span, idx)); . } . return; . }, . ExprKind::MethodCall(_, receiver, args, _) 4,160 ( 0.00%) if typeck.type_dependent_def_id(parent.hir_id).is_some_and(|id| { 16,320 ( 0.00%) => ???:::type_dependent_def_id (320x) . id == param.fn_id && has_matching_args(param.fn_kind, typeck.node_args(parent.hir_id)) . }) => . { . if let Some(idx) = iter::once(receiver).chain(args).position(|arg| arg.hir_id == child_id) { . param.uses.push(Usage::new(span, idx)); . } . return; . }, . // Assignment to a parameter is fine. 8 ( 0.00%) ExprKind::Assign(lhs, _, _) | ExprKind::AssignOp(_, lhs, _) if lhs.hir_id == child_id => { . return; . }, . // Parameter update e.g. `x = x + 1` . ExprKind::Assign(lhs, rhs, _) | ExprKind::AssignOp(_, lhs, rhs) 4 ( 0.00%) if rhs.hir_id == child_id && lhs.res_local_id() == Some(id) => . { . return; . }, . // Side-effect free expressions. Walk to the parent expression. . ExprKind::Binary(_, lhs, rhs) 168 ( 0.00%) if typeck.expr_ty(lhs).is_primitive() && typeck.expr_ty(rhs).is_primitive() => 1,680 ( 0.00%) => ???:::expr_ty (42x) . { . e = parent; . continue; . }, 60 ( 0.00%) ExprKind::Unary(_, arg) if typeck.expr_ty(arg).is_primitive() => { 480 ( 0.00%) => ???:::expr_ty (12x) . e = parent; . continue; . }, . ExprKind::AddrOf(..) | ExprKind::Cast(..) => { . e = parent; . continue; . }, . // Only allow field accesses without auto-deref -- line 423 ---------------------------------------- -- line 428 ---------------------------------------- . _ => (), . }, . _ => (), . } . self.params.remove_by_id(id); . return; . } . } 217,552 ( 0.01%) } . 13,860 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 884 ( 0.00%) if self.entered_body == Some(body.value.hir_id) { 786 ( 0.00%) self.entered_body = None; . self.params.flag_for_linting(); . for param in &self.params.params { 1,510 ( 0.00%) if param.apply_lint.get() { . if param.ident.name == kw::SelfLower { . span_lint_and_then( . cx, . SELF_ONLY_USED_IN_RECURSION, . param.ident.span, . "`self` is only used in recursion", . |diag| { . diag.span_note( -- line 451 ---------------------------------------- -- line 473 ---------------------------------------- . ); . }, . ); . } . } . } . self.params.clear(); . } 15,840 ( 0.00%) } . } . . fn has_matching_args(kind: FnKind, args: GenericArgsRef<'_>) -> bool { 204 ( 0.00%) match kind { . FnKind::Fn => true, . FnKind::TraitFn => args.iter().enumerate().all(|(idx, subst)| match subst.kind() { . GenericArgKind::Lifetime(_) => true, . GenericArgKind::Type(ty) => matches!(*ty.kind(), ty::Param(ty) if ty.index as usize == idx), . GenericArgKind::Const(c) => matches!(c.kind(), ConstKind::Param(c) if c.index as usize == idx), . }), 102 ( 0.00%) FnKind::ImplTraitFn(expected_args) => std::ptr::from_ref(args) as usize == expected_args, . } . } 17,371 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/escape.rs -------------------------------------------------------------------------------- Ir -- line 50 ---------------------------------------- . "using `Box` where unnecessary" . } . . impl_lint_pass!(BoxedLocal => [BOXED_LOCAL]); . . /// Whether `ty` is a `Box` where `T` is not a trait object and is small enough to live on the . /// stack (large types are boxed to avoid stack overflows). . fn is_small_non_trait_box<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, too_large_for_stack: u64) -> bool { 1,316 ( 0.00%) ty.boxed_ty().is_some_and(|boxed| { 4,404 ( 0.00%) => ???:::boxed_ty (658x) . !boxed.is_trait() && cx.layout_of(boxed).map_or(0, |l| l.size.bytes()) <= too_large_for_stack . }) . } . . struct EscapeDelegate { . set: HirIdSet, . } . . impl<'tcx> LateLintPass<'tcx> for BoxedLocal { 17,740 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: intravisit::FnKind<'tcx>, . _: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . _: Span, . fn_def_id: LocalDefId, . ) { . // Skip closures 8,374 ( 0.00%) if matches!(fn_kind, intravisit::FnKind::Closure) { . return; . } . . if let Some(header) = fn_kind.header() 5,067 ( 0.00%) && header.abi != ExternAbi::Rust . { . return; . } . 1,689 ( 0.00%) let parent_id = cx . .tcx 1,689 ( 0.00%) .hir_get_parent_item(cx.tcx.local_def_id_to_hir_id(fn_def_id)) 232,357 ( 0.01%) => ???:::hir_get_parent_item (1,689x) . .def_id; . 1,689 ( 0.00%) let mut trait_self_ty = None; 19,285 ( 0.00%) match cx.tcx.def_kind(parent_id) { . // If the method is an impl for a trait, don't warn. . DefKind::Impl { of_trait: true } => return, . . // find `self` ty for this trait if relevant . DefKind::Trait => { 3 ( 0.00%) trait_self_ty = Some(TraitRef::identity(cx.tcx, parent_id.to_def_id()).self_ty()); . }, . . _ => {}, . } . 944 ( 0.00%) let typeck_results = cx.tcx.typeck_body(body.id()); 100,418 ( 0.01%) => ???:::typeck_body (472x) . . // Seed the set with the `Box` parameters that could be unboxed. The `ExprUseVisitor` walk . // below then removes any that escape by being moved or borrowed. 944 ( 0.00%) let set: HirIdSet = body . .params . .iter() . .filter_map(|param| { . // Only simple bindings (`x: Box<_>`) bind a local that the walk can track and report. 1,316 ( 0.00%) if !matches!(param.pat.kind, PatKind::Binding(..)) { . return None; . } . 1,974 ( 0.00%) let ty = typeck_results.pat_ty(param.pat); 26,320 ( 0.00%) => ???:::pat_ty (658x) 658 ( 0.00%) if !is_small_non_trait_box(cx, ty, self.too_large_for_stack) { . return None; . } . . // skip `self` parameters whose type contains `Self` (i.e.: `self: Box`), see #4804 . if let Some(trait_self_ty) = trait_self_ty . && cx.tcx.hir_name(param.pat.hir_id) == kw::SelfLower . && ty.contains(trait_self_ty) . { -- line 128 ---------------------------------------- -- line 129 ---------------------------------------- . return None; . } . . Some(param.pat.hir_id) . }) . .collect(); . . // Without any candidate parameter, the expensive `ExprUseVisitor` walk can never lint. 472 ( 0.00%) if set.is_empty() { . return; . } . . let mut v = EscapeDelegate { set }; . . ExprUseVisitor::for_clippy(cx, fn_def_id, &mut v) . .consume_body(body) . .into_ok(); -- line 145 ---------------------------------------- -- line 148 ---------------------------------------- . span_lint_hir( . cx, . BOXED_LOCAL, . node, . cx.tcx.hir_span(node), . "local variable doesn't need to be boxed here", . ); . } 14,192 ( 0.00%) } . } . . impl<'tcx> Delegate<'tcx> for EscapeDelegate { . fn consume(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) { . if cmt.place.projections.is_empty() . && let PlaceBase::Local(lid) = cmt.place.base . { . // FIXME(rust/#120456) - is `swap_remove` correct? -- line 164 ---------------------------------------- 6,197 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 7,789 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 1,350 ( 0.00%) self_ty, . .. 2,810 ( 0.00%) }) = item.kind 2,700 ( 0.00%) && let Res::Def(_, def_id) = *self_ty.basic_res() . && let Some(local_def_id) = def_id.as_local() . { 1,300 ( 0.00%) let adt_hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id); . let trait_ref = &of_trait.trait_ref; 2,600 ( 0.00%) let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 6,500 ( 0.00%) let is_automatically_derived = cx.tcx.is_automatically_derived(item.owner_id.to_def_id()); 171,429 ( 0.01%) => ???:::is_automatically_derived (1,300x) . 10,400 ( 0.00%) derived_hash_with_manual_eq::check(cx, item.span, trait_ref, ty, adt_hir_id, is_automatically_derived); 13,000 ( 0.00%) derive_ord_xor_partial_ord::check(cx, item, trait_ref, ty, adt_hir_id, is_automatically_derived); 500,542 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/derive/derive_ord_xor_partial_ord.rs:clippy_lints::derive::derive_ord_xor_partial_ord::check (1,300x) . 2,600 ( 0.00%) 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 { 6,500 ( 0.00%) expl_impl_clone_on_copy::check(cx, item, trait_ref, ty, adt_hir_id); 4,073,084 ( 0.23%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/derive/expl_impl_clone_on_copy.rs:clippy_lints::derive::expl_impl_clone_on_copy::check (1,300x) . } . } 25,536 ( 0.00%) } . } 3,900 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_async_fn.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub MANUAL_ASYNC_FN, . style, . "manual implementations of `async` functions can be simplified using the dedicated syntax" . } . . declare_lint_pass!(ManualAsyncFn => [MANUAL_ASYNC_FN]); . . impl<'tcx> LateLintPass<'tcx> for ManualAsyncFn { 14,192 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . span: Span, . fn_def_id: LocalDefId, . ) { . if let Some(header) = kind.header() 5,067 ( 0.00%) && !header.asyncness.is_async() . // Check that this function returns `impl Future` 1,413 ( 0.00%) && let FnRetTy::Return(ret_ty) = decl.output 2,827 ( 0.00%) && let TyKind::OpaqueDef(opaque) = ret_ty.kind 3 ( 0.00%) && let Some(trait_ref) = future_trait_ref(cx, opaque) . && let Some(output) = future_output_ty(trait_ref) . && captures_all_lifetimes(cx, fn_def_id, opaque.def_id) . // Check that the body of the function consists of one async block . && let ExprKind::Block(block, _) = body.value.kind . && block.stmts.is_empty() . && let Some(closure_body) = desugared_async_block(cx, block) . && let Some(vis_span_opt) = match cx.tcx.hir_node_by_def_id(fn_def_id) { . Node::Item(item) => Some(Some(item.vis_span)), -- line 64 ---------------------------------------- -- line 96 ---------------------------------------- . (block.span, body_snip), . ], . Applicability::MachineApplicable, . ); . } . }, . ); . } 14,192 ( 0.00%) } . } . . fn future_trait_ref<'tcx>(cx: &LateContext<'tcx>, opaque: &'tcx OpaqueTy<'tcx>) -> Option<&'tcx TraitRef<'tcx>> { 1 ( 0.00%) if let Some(trait_ref) = opaque.bounds.iter().find_map(|bound| { 1 ( 0.00%) if let GenericBound::Trait(poly) = bound { . Some(&poly.trait_ref) . } else { . None . } 5 ( 0.00%) }) && trait_ref.trait_def_id() == cx.tcx.lang_items().future_trait() 40 ( 0.00%) => ???:::lang_items (1x) 13 ( 0.00%) => ???:::trait_def_id (1x) . { . return Some(trait_ref); . } . . None . } . . fn future_output_ty<'tcx>(trait_ref: &'tcx TraitRef<'tcx>) -> Option<&'tcx Ty<'tcx>> { -- line 122 ---------------------------------------- 4 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs -------------------------------------------------------------------------------- Ir -- line 9 ---------------------------------------- . pub struct Context { . expr_id: Option, . /// This field is used to check whether expressions are constants, such as in enum discriminants . /// and consts . const_span: Option, . } . impl Context { . fn skip_expr(&self, e: &hir::Expr<'_>) -> bool { 571 ( 0.00%) self.expr_id.is_some() || self.const_span.is_some_and(|span| span.contains(e.span)) 2,758 ( 0.00%) => ???:::contains (28x) . } . 2,793 ( 0.00%) pub fn check_binary<'tcx>( . &mut self, . cx: &LateContext<'tcx>, . expr: &'tcx hir::Expr<'_>, . op: hir::BinOpKind, . l: &'tcx hir::Expr<'_>, . r: &'tcx hir::Expr<'_>, . ) { 455 ( 0.00%) if self.skip_expr(expr) { . return; . } 798 ( 0.00%) match op { . hir::BinOpKind::And . | hir::BinOpKind::Or . | hir::BinOpKind::BitAnd . | hir::BinOpKind::BitOr . | hir::BinOpKind::BitXor . | hir::BinOpKind::Eq . | hir::BinOpKind::Lt . | hir::BinOpKind::Le . | hir::BinOpKind::Ne . | hir::BinOpKind::Ge . | hir::BinOpKind::Gt => return, . _ => (), . } . 711 ( 0.00%) let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); 6,348 ( 0.00%) => ???:::expr_ty (158x) . if l_ty.peel_refs().is_floating_point() && r_ty.peel_refs().is_floating_point() { . span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); . self.expr_id = Some(expr.hir_id); . } 3,192 ( 0.00%) } . 24 ( 0.00%) pub fn check_negate<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, arg: &'tcx hir::Expr<'_>) { 4 ( 0.00%) if self.skip_expr(expr) { . return; . } 12 ( 0.00%) let ty = cx.typeck_results().expr_ty(arg); 160 ( 0.00%) => ???:::expr_ty (4x) 20 ( 0.00%) if ConstEvalCtxt::new(cx).eval_local(expr, expr.span.ctxt()).is_none() && ty.is_floating_point() { 746 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (4x) 224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (4x) . span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); . self.expr_id = Some(expr.hir_id); . } 28 ( 0.00%) } . . pub fn expr_post(&mut self, id: hir::HirId) { . if Some(id) == self.expr_id { . self.expr_id = None; . } . } . . pub fn enter_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) { 9,900 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 364,085 ( 0.02%) => ???:::hir_body_owner (1,980x) 3,960 ( 0.00%) let body_owner_def_id = cx.tcx.hir_body_owner_def_id(body.id()); 251,398 ( 0.01%) => ???:::hir_body_owner_def_id (1,980x) . 11,880 ( 0.00%) match cx.tcx.hir_body_owner_kind(body_owner_def_id) { 191,850 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: (1,980x) . hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const { .. } => { 1,030 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 15,591 ( 0.00%) => ???:::hir_span_with_body (206x) . 511 ( 0.00%) if let Some(span) = self.const_span 396 ( 0.00%) && span.contains(body_span) 9,603 ( 0.00%) => ???:::contains (99x) . { . return; . } 412 ( 0.00%) self.const_span = Some(body_span); . }, . hir::BodyOwnerKind::Fn | hir::BodyOwnerKind::Closure | hir::BodyOwnerKind::GlobalAsm => (), . } . } . . pub fn body_post(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) { 5,940 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 364,085 ( 0.02%) => ???:::hir_body_owner (1,980x) 5,940 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 145,790 ( 0.01%) => ???:::hir_span_with_body (1,980x) . 4,273 ( 0.00%) if let Some(span) = self.const_span 1,252 ( 0.00%) && span.contains(body_span) 32,335 ( 0.00%) => ???:::contains (313x) . { . return; . } 1,774 ( 0.00%) self.const_span = None; . } . } 2,146 ( 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`. 12,012 ( 0.00%) 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) }; 229 ( 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: site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs -------------------------------------------------------------------------------- Ir -- line 57 ---------------------------------------- . lhs_is_let: bool, . let_ty_span: Option, . name: Symbol, . err_span: Span, . found: u128, . last_push_expr: HirId, . } . impl VecPushSearcher { 49 ( 0.00%) fn display_err(&self, cx: &LateContext<'_>) { . let required_pushes_before_extension = match self.init { 35 ( 0.00%) _ if self.found == 0 => return, . VecInitKind::WithConstCapacity(x) if x > self.found => return, . VecInitKind::WithConstCapacity(x) => x, . VecInitKind::WithExprCapacity(_) => return, . _ => 3, . }; . . let mut needs_mut = false; . let res = for_each_local_use_after_expr(cx, self.local_id, self.last_push_expr, |e| { -- line 75 ---------------------------------------- -- line 142 ---------------------------------------- . cx, . VEC_INIT_THEN_PUSH, . self.err_span, . "calls to `push` immediately after creation", . "consider using the `vec![]` macro", . s, . Applicability::HasPlaceholders, . ); 56 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for VecInitThenPush { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 2,840 ( 0.00%) self.searcher = None; . } . 4,942 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 2,118 ( 0.00%) if let Some(init_expr) = local.init 5,021 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, name, None) = local.pat.kind 402 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 670 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, init_expr) 10,695 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (134x) 16 ( 0.00%) && !matches!(init, VecInitKind::WithExprCapacity(_)) . { 105 ( 0.00%) self.searcher = Some(VecPushSearcher { . local_id: id, . init, . lhs_is_let: true, 7 ( 0.00%) let_ty_span: local.ty.map(|ty| ty.span), . name: name.name, . err_span: local.span, . found: 0, 7 ( 0.00%) last_push_expr: init_expr.hir_id, . }); . } 5,648 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,554 ( 0.00%) if self.searcher.is_none() 163 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 1,001 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 270 ( 0.00%) && let [name] = &path.segments 405 ( 0.00%) && let Res::Local(id) = path.res 1,080 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 19,560 ( 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 (135x) 675 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, right) 4,404 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (135x) . && !matches!(init, VecInitKind::WithExprCapacity(_)) . { . self.searcher = Some(VecPushSearcher { . local_id: id, . init, . lhs_is_let: false, . let_ty_span: None, . name: name.ident.name, . err_span: expr.span, . found: 0, . last_push_expr: expr.hir_id, . }); . } 27,194 ( 0.00%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 4,201 ( 0.00%) if let Some(searcher) = self.searcher.take() { 20 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind 12 ( 0.00%) && !stmt.span.from_expansion() 12 ( 0.00%) && let ExprKind::MethodCall(name, self_arg, [_], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::push . { . self.searcher = Some(VecPushSearcher { . err_span: searcher.err_span.to(stmt.span), . found: searcher.found + 1, . last_push_expr: expr.hir_id, . ..searcher . }); . } else { 7 ( 0.00%) searcher.display_err(cx); 140 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::display_err (7x) . } . } 2,055 ( 0.00%) } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 5,680 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } . } . } 3,478 ( 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/thread/local.rs -------------------------------------------------------------------------------- Ir -- line 420 ---------------------------------------- . /// "I am initialized", . /// ); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . pub fn with(&'static self, f: F) -> R . where . F: FnOnce(&T) -> R, . { 174,264 ( 0.01%) match self.try_with(f) { . Ok(r) => r, . Err(err) => panic_access_error(err), . } . } . . /// Acquires a reference to the value in this TLS key. . /// . /// This will lazily initialize the value if this thread has not referenced -- line 436 ---------------------------------------- -- 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, . { 286,894 ( 0.02%) let thread_local = unsafe { (self.inner)(None).as_ref().ok_or(AccessError)? }; 10,929 ( 0.00%) => ???:>>,)>>::call_once (3,643x) 194,676 ( 0.01%) 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 ---------------------------------------- 2,192 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mut_key.rs -------------------------------------------------------------------------------- Ir -- line 70 ---------------------------------------- . impl_lint_pass!(MutableKeyType<'_> => [MUTABLE_KEY_TYPE]); . . pub struct MutableKeyType<'tcx> { . interior_mut: InteriorMut<'tcx>, . } . . impl<'tcx> LateLintPass<'tcx> for MutableKeyType<'tcx> { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { 6,384 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind { 992 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 144,759 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (248x) . } . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'tcx>) { 3,008 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, ..) = item.kind 7,190 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 215,604 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1,438x) . { 884 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 120,851 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (221x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'tcx>) { 44 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, ..) = item.kind { 72 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 7,104 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (18x) . } . } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &hir::LetStmt<'tcx>) { 2,118 ( 0.00%) if let hir::PatKind::Wild = local.pat.kind { . return; . } 4,879 ( 0.00%) self.check_ty_(cx, local.span, cx.typeck_results().pat_ty(local.pat)); 45,643 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (697x) 27,960 ( 0.00%) => ???:::pat_ty (697x) . } . } . . impl<'tcx> MutableKeyType<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf) -> Self { . Self { 1 ( 0.00%) interior_mut: InteriorMut::without_pointers(tcx, &conf.ignore_interior_mutability), 1,137 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::without_pointers (1x) . } . } . 5,357 ( 0.00%) fn check_sig(&mut self, cx: &LateContext<'tcx>, fn_def_id: LocalDefId, decl: &hir::FnDecl<'tcx>) { 487 ( 0.00%) let fn_sig = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip(); 2,428 ( 0.00%) for (hir_ty, ty) in iter::zip(decl.inputs, fn_sig.inputs().skip_binder()) { 3,365 ( 0.00%) self.check_ty_(cx, hir_ty.span, *ty); 44,628 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (673x) . } 2,435 ( 0.00%) self.check_ty_( 37,180 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (487x) . cx, . decl.output.span(), 1,461 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(fn_sig.output()), 77,081 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (487x) . ); 3,896 ( 0.00%) } . . // We want to lint 1. sets or maps with 2. not immutable key types and 3. no unerased . // generics (because the compiler cannot ensure immutability for unknown types). 14,856 ( 0.00%) fn check_ty_(&mut self, cx: &LateContext<'tcx>, span: Span, ty: Ty<'tcx>) { . let ty = ty.peel_refs(); . if let ty::Adt(def, args) = ty.kind() 6,190 ( 0.00%) && matches!( 4,952 ( 0.00%) cx.tcx.get_diagnostic_name(def.did()), 74,196 ( 0.00%) => ???:::get_diagnostic_name (1,238x) . Some(sym::HashMap | sym::BTreeMap | sym::HashSet | sym::BTreeSet) . ) . { . let subst_ty = args.type_at(0); . if let Some(chain) = self.interior_mut.interior_mut_ty_chain(cx, subst_ty) { . span_lint_and_then(cx, MUTABLE_KEY_TYPE, span, "mutable key type", |diag| { . for ty in chain.iter().rev() { . diag.note(with_forced_trimmed_paths!(format!( . "... because it contains `{ty}`, which has interior mutability" . ))); . } . }); . } . } 11,142 ( 0.00%) } . } 1,247 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/should_implement_trait.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_lint::LateContext; . use rustc_middle::ty::Ty; . use rustc_span::edition::Edition::{self, Edition2015, Edition2021}; . use rustc_span::{Symbol, kw}; . . use super::SHOULD_IMPLEMENT_TRAIT; . use super::lib::SelfKind; . 10,066 ( 0.00%) pub(super) fn check_impl_item<'tcx>( . cx: &LateContext<'tcx>, . impl_item: &'tcx ImplItem<'_>, . self_ty: Ty<'tcx>, . impl_implements_trait: bool, . first_arg_ty_opt: Option>, . sig: &FnSig<'_>, . ) { . // if this impl block implements a trait, lint in trait definition instead 3,981 ( 0.00%) if !impl_implements_trait && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id) 12,387 ( 0.00%) => ???:::is_exported (221x) . // check missing trait implementations . && let Some(method_config) = TRAIT_METHODS.iter().find(|case| case.method_name == impl_item.ident.name) . && sig.decl.inputs.len() == method_config.param_count . && method_config.output_type.matches(&sig.decl.output) . // in case there is no first arg, since we already have checked the number of arguments . // it's should be always true . && first_arg_ty_opt . .is_none_or(|first_arg_ty| method_config.self_kind.matches(cx, self_ty, first_arg_ty)) -- line 30 ---------------------------------------- -- line 45 ---------------------------------------- . ), . None, . format!( . "consider implementing the trait `{}` or choosing a less ambiguous method name", . method_config.trait_name . ), . ); . } 11,504 ( 0.00%) } . . struct ShouldImplTraitCase { . trait_name: &'static str, . method_name: Symbol, . param_count: usize, . // implicit self kind expected (none, self, &self, ...) . self_kind: SelfKind, . // checks against the output type -- line 61 ---------------------------------------- 1,285 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . . impl ManualAbsDiff { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualAbsDiff { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,388 ( 0.00%) if !expr.span.from_expansion() . && let Some(if_expr) = If::hir(expr) . && let Some(r#else) = if_expr.r#else 471 ( 0.00%) && let ExprKind::Binary(op, rhs, lhs) = if_expr.cond.kind 286 ( 0.00%) && let (BinOpKind::Gt | BinOpKind::Ge, mut a, mut b) | (BinOpKind::Lt | BinOpKind::Le, mut b, mut a) = . (op.node, rhs, lhs) 2 ( 0.00%) && let Some((ty, b_n_refs)) = self.are_ty_eligible(cx, a, b) 20 ( 0.00%) && is_sub_expr(cx, if_expr.then, a, b, ty) 129 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:clippy_lints::manual_abs_diff::is_sub_expr (2x) . && is_sub_expr(cx, r#else, b, a, ty) . { . span_lint_and_then( . cx, . MANUAL_ABS_DIFF, . expr.span, . "manual absolute difference pattern without using `abs_diff`", . |diag| { -- line 73 ---------------------------------------- -- line 86 ---------------------------------------- . Sugg::hir(cx, a, "..").maybe_paren(), . "*".repeat(b_n_refs), . Sugg::hir(cx, b, "..") . ); . diag.span_suggestion(expr.span, "replace with `abs_diff`", sugg, applicability); . }, . ); . } 217,552 ( 0.01%) } . } . . impl ManualAbsDiff { . /// Returns a type if `a` and `b` are both of it, and this lint can be applied to that . /// type (currently, any primitive int, or a `Duration`) . fn are_ty_eligible<'tcx>(&self, cx: &LateContext<'tcx>, a: &Expr<'_>, b: &Expr<'_>) -> Option<(Ty<'tcx>, usize)> { 18 ( 0.00%) let is_int = |ty: Ty<'_>| matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) && self.msrv.meets(cx, msrvs::ABS_DIFF); 54 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2x) . let is_duration = . |ty: Ty<'_>| ty.is_diag_item(cx, sym::Duration) && self.msrv.meets(cx, msrvs::DURATION_ABS_DIFF); . 8 ( 0.00%) let a_ty = cx.typeck_results().expr_ty(a).peel_refs(); 80 ( 0.00%) => ???:::expr_ty (2x) 12 ( 0.00%) let (b_ty, b_n_refs, _) = peel_and_count_ty_refs(cx.typeck_results().expr_ty(b)); 80 ( 0.00%) => ???:::expr_ty (2x) 18 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::peel_and_count_ty_refs (2x) . 6 ( 0.00%) (a_ty == b_ty && (is_int(a_ty) || is_duration(a_ty))).then_some((a_ty, b_n_refs)) . } . } . . /// Checks if the given expression is a subtraction operation between two expected expressions, . /// i.e. if `expr` is `{expected_a} - {expected_b}`. . /// . /// If `expected_ty` is a signed primitive integer, this function will only return `Some` if the . /// subtraction expr is wrapped in a cast to the equivalent unsigned int. 54 ( 0.00%) fn is_sub_expr( . cx: &LateContext<'_>, . expr: &Expr<'_>, . expected_a: &Expr<'_>, . expected_b: &Expr<'_>, . expected_ty: Ty<'_>, . ) -> bool { . let expr = peel_blocks(expr); . 4 ( 0.00%) if let ty::Int(ty) = expected_ty.kind() { . let unsigned = Ty::new_uint(cx.tcx, ty.to_unsigned()); . . return if let ExprKind::Cast(expr, cast_ty) = expr.kind . && cx.typeck_results().node_type(cast_ty.hir_id) == unsigned . { . is_sub_expr(cx, expr, expected_a, expected_b, unsigned) . } else { . false . }; . } . 2 ( 0.00%) let ctxt = expr.span.ctxt(); 4 ( 0.00%) if let ExprKind::Binary(op, a, b) = expr.kind . && let BinOpKind::Sub = op.node . && eq_expr_value(cx, ctxt, a, expected_a) . && eq_expr_value(cx, ctxt, b, expected_b) . { . true . } else { . false . } 18 ( 0.00%) } . . fn is_unsuffixed_numeral_lit(expr: &Expr<'_>) -> bool { . matches!(expr.kind, ExprKind::Lit(lit) if lit.node.is_numeric() && lit.node.is_unsuffixed()) . } 67 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/no_effect.rs -------------------------------------------------------------------------------- Ir -- line 74 ---------------------------------------- . } . . impl_lint_pass!(NoEffect => [ . NO_EFFECT, . NO_EFFECT_UNDERSCORE_BINDING, . UNNECESSARY_OPERATION, . ]); . 10 ( 0.00%) #[derive(Default)] . pub struct NoEffect { . underscore_bindings: HirIdMap, . local_bindings: Vec>, . } . . impl<'tcx> LateLintPass<'tcx> for NoEffect { 18,495 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . if self.check_no_effect(cx, stmt) { . return; . } . check_unnecessary_operation(cx, stmt); 16,440 ( 0.00%) } . . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx rustc_hir::Block<'tcx>) { 2 ( 0.00%) self.local_bindings.push(Vec::default()); . } . 19,880 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx rustc_hir::Block<'tcx>) { . for hir_id in self.local_bindings.pop().unwrap() { . if let Some(span) = self.underscore_bindings.swap_remove(&hir_id) { . span_lint_hir( . cx, . NO_EFFECT_UNDERSCORE_BINDING, . hir_id, . span, . "binding to `_` prefixed variable with no side-effect", . ); . } . } 22,720 ( 0.00%) } . . fn check_expr(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 20,292 ( 0.00%) if let Some(def_id) = expr.res_local_id() { 6,764 ( 0.00%) self.underscore_bindings.swap_remove(&def_id); 142,044 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (6,764x) . } . } . } . . impl NoEffect { . fn check_no_effect<'tcx>(&mut self, cx: &LateContext<'tcx>, stmt: &Stmt<'tcx>) -> bool { 9,912 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind { . // Covered by rustc `path_statements` lint 2,098 ( 0.00%) if matches!(expr.kind, ExprKind::Path(_)) { . return true; . } . 4,196 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 26,248 ( 0.00%) => ???:::range_span (1,049x) . return false; . } . let expr = peel_blocks(expr); . . if is_operator_overridden(cx, expr) { . // Return `true`, to prevent `check_unnecessary_operation` from . // linting on this statement as well. . return true; . } 3,955 ( 0.00%) if has_no_effect(cx, expr) { 30,127 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::has_no_effect (791x) . span_lint_hir_and_then( . cx, . NO_EFFECT, . expr.hir_id, . stmt.span, . "statement with no effect", . |diag| { . for parent in cx.tcx.hir_parent_iter(stmt.hir_id) { -- line 147 ---------------------------------------- -- line 176 ---------------------------------------- . ); . } . } . } . }, . ); . return true; . } 706 ( 0.00%) } else if let StmtKind::Let(local) = stmt.kind 4,942 ( 0.00%) && !is_lint_allowed(cx, NO_EFFECT_UNDERSCORE_BINDING, local.hir_id) 677,156 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (706x) . && !matches!(local.source, LocalSource::AsyncFn) . && let Some(init) = local.init . && local.els.is_none() . && !local.span.from_expansion() . && has_no_effect(cx, init) . && let PatKind::Binding(_, hir_id, ident, _) = local.pat.kind . && ident.name.to_ident_string().starts_with('_') . && !in_automatically_derived(cx.tcx, local.hir_id) -- line 193 ---------------------------------------- -- line 203 ---------------------------------------- . } . } . . fn is_operator_overridden(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . // It's very hard or impossible to check whether overridden operator have side-effect this lint. . // So, this function assume user-defined operator is overridden with an side-effect. . // The definition of user-defined structure here is ADT-type, . // Althrough this will weaken the ability of this lint, less error lint-fix happen. 2,367 ( 0.00%) match expr.kind { . ExprKind::Binary(..) | ExprKind::Unary(..) => { . // No need to check type of `lhs` and `rhs` . // because if the operator is overridden, at least one operand is ADT type . . // reference: rust/compiler/rustc_middle/src/ty/typeck_results.rs: `is_method_call`. . // use this function to check whether operator is overridden in `ExprKind::{Binary, Unary}`. . cx.typeck_results().is_method_call(expr) . }, -- line 219 ---------------------------------------- -- line 222 ---------------------------------------- . } . . /// Checks if dropping `expr` might have a visible side effect. . fn expr_ty_has_significant_drop(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . let ty = cx.typeck_results().expr_ty(expr); . ty.has_significant_drop(cx.tcx, cx.typing_env()) . } . 8,701 ( 0.00%) fn has_no_effect(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 6,328 ( 0.00%) match expr.kind { . ExprKind::Lit(..) | ExprKind::Closure { .. } => true, . ExprKind::Path(..) => !expr_ty_has_significant_drop(cx, expr), . ExprKind::Index(a, b, _) | ExprKind::Binary(_, a, b) => has_no_effect(cx, a) && has_no_effect(cx, b), . ExprKind::Array(v) | ExprKind::Tup(v) => v.iter().all(|val| has_no_effect(cx, val)), . ExprKind::Repeat(inner, _) . | ExprKind::Cast(inner, _) . | ExprKind::Type(inner, _) . | ExprKind::Unary(_, inner) -- line 239 ---------------------------------------- -- line 242 ---------------------------------------- . ExprKind::Struct(_, fields, base) => { . !expr_ty_has_significant_drop(cx, expr) . && fields.iter().all(|field| has_no_effect(cx, field.expr)) . && match &base { . StructTailExpr::None | StructTailExpr::NoneWithError(_) | StructTailExpr::DefaultFields(_) => true, . StructTailExpr::Base(base) => has_no_effect(cx, base), . } . }, 67 ( 0.00%) ExprKind::Call(callee, args) => { 134 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind { 335 ( 0.00%) if cx.typeck_results().type_dependent_def(expr.hir_id).is_some() { 2,539 ( 0.00%) => ???:::type_dependent_def (67x) . // type-dependent function call like `impl FnOnce for X` . return false; . } 256 ( 0.00%) let def_matched = matches!( 640 ( 0.00%) cx.qpath_res(qpath, callee.hir_id), 1,582 ( 0.00%) => ???:::qpath_res (64x) . Res::Def(DefKind::Struct | DefKind::Variant | DefKind::Ctor(..), ..) . ); 256 ( 0.00%) if def_matched || is_range_literal(expr) { 1,322 ( 0.00%) => ???:rustc_hir::hir::is_range_literal (64x) . !expr_ty_has_significant_drop(cx, expr) && args.iter().all(|arg| has_no_effect(cx, arg)) . } else { . false . } . } else { . false . } . }, . _ => false, . } 6,328 ( 0.00%) } . . fn check_unnecessary_operation(cx: &LateContext<'_>, stmt: &Stmt<'_>) { 2,973 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 3,147 ( 0.00%) && !stmt.span.in_external_macro(cx.sess().source_map()) . && let ctxt = stmt.span.ctxt() 3,780 ( 0.00%) && expr.range_span().unwrap_or(expr.span).ctxt() == ctxt 23,176 ( 0.00%) => ???:::range_span (945x) 5,670 ( 0.00%) && let Some(reduced) = reduce_expression(cx, expr) 72,308 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression (945x) . && reduced.iter().all(|e| e.span.ctxt() == ctxt) . { . if let ExprKind::Index(..) = &expr.kind { . if !is_inside_always_const_context(cx.tcx, expr.hir_id) . && let [arr, func] = &*reduced . && let Some(arr) = arr.span.get_text(cx) . && let Some(func) = func.span.get_text(cx) . { -- line 286 ---------------------------------------- -- line 325 ---------------------------------------- . Applicability::MachineApplicable, . ); . }, . ); . } . } . } . 10,395 ( 0.00%) fn reduce_expression<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option>> { 3,780 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 23,176 ( 0.00%) => ???:::range_span (945x) . return None; . } 5,537 ( 0.00%) match expr.kind { . ExprKind::Index(a, b, _) => Some(vec![a, b]), . ExprKind::Binary(ref binop, a, b) if binop.node != BinOpKind::And && binop.node != BinOpKind::Or => { . Some(vec![a, b]) . }, . ExprKind::Array(v) | ExprKind::Tup(v) => Some(v.iter().collect()), . ExprKind::Repeat(inner, _) . | ExprKind::Type(inner, _) . | ExprKind::Unary(_, inner) -- line 345 ---------------------------------------- -- line 359 ---------------------------------------- . } else { . let base = match base { . StructTailExpr::Base(base) => Some(base), . StructTailExpr::None | StructTailExpr::NoneWithError(_) | StructTailExpr::DefaultFields(_) => None, . }; . Some(fields.iter().map(|f| &f.expr).chain(base).map(Deref::deref).collect()) . } . }, 67 ( 0.00%) ExprKind::Call(callee, args) => { 134 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind { 402 ( 0.00%) if cx.typeck_results().type_dependent_def(expr.hir_id).is_some() { 2,539 ( 0.00%) => ???:::type_dependent_def (67x) . // type-dependent function call like `impl FnOnce for X` . return None; . } 320 ( 0.00%) let res = cx.qpath_res(qpath, callee.hir_id); 1,582 ( 0.00%) => ???:::qpath_res (64x) 896 ( 0.00%) match res { . Res::Def(DefKind::Struct | DefKind::Variant | DefKind::Ctor(..), ..) . if !has_drop(cx, cx.typeck_results().expr_ty(expr)) => . { . Some(args.iter().collect()) . }, . _ => None, . } . } else { . None . } . }, 2 ( 0.00%) ExprKind::Block(block, _) => { 4 ( 0.00%) if block.stmts.is_empty() && !block.targeted_by_break { 4 ( 0.00%) block.expr.as_ref().and_then(|e| { 5 ( 0.00%) match block.rules { 1 ( 0.00%) BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) => None, . BlockCheckMode::DefaultBlock => Some(vec![&**e]), . // in case of compiler-inserted signaling blocks . BlockCheckMode::UnsafeBlock(_) => reduce_expression(cx, e), . } 4 ( 0.00%) }) . } else { . None . } . }, . _ => None, . } 7,560 ( 0.00%) } 6,307 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . . /// Checks: . /// - `b"...".as_ptr()` . /// - `b"...".as_ptr().cast()` . /// - `"...".as_ptr()` . /// - `"...".as_ptr().cast()` . /// . /// Iff the parent call of `.cast()` isn't `CStr::from_ptr`, to avoid linting twice. 7 ( 0.00%) pub(super) fn check_as_ptr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . receiver: &'tcx Expr<'tcx>, . msrv: Msrv, . ) { 2 ( 0.00%) if let ExprKind::Lit(lit) = receiver.kind . && let LitKind::ByteStr(_, StrStyle::Cooked) | LitKind::Str(_, StrStyle::Cooked) = lit.node . && cx.tcx.sess.edition() >= Edition2021 . && let casts_removed = peel_ptr_cast_ancestors(cx, expr) . && !get_parent_expr(cx, casts_removed).is_some_and( . |parent| matches!(parent.kind, ExprKind::Call(func, _) if is_c_str_function(cx, func).is_some()), . ) . && let Some(sugg) = rewrite_as_cstr(cx, lit.span, lit.node) . && msrv.meets(cx, msrvs::C_STR_LITERALS) -- line 35 ---------------------------------------- -- line 50 ---------------------------------------- . diag.note( . "an additional cast may be needed, since the type of `c\"\".as_ptr()` \ . and `b\"\".as_ptr()` can differ and is platform dependent", . ); . } . }, . ); . } 8 ( 0.00%) } . . /// Checks if the callee is a "relevant" `CStr` function considered by this lint. . /// Returns the function name. . fn is_c_str_function(cx: &LateContext<'_>, func: &Expr<'_>) -> Option { 5,856 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(cstr, fn_name)) = &func.kind 1,630 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, ty_path)) = &cstr.kind 650 ( 0.00%) && cx.tcx.lang_items().c_str() == ty_path.res.opt_def_id() 13,000 ( 0.00%) => ???:::lang_items (325x) . { . Some(fn_name.ident.name) . } else { . None . } . } . . /// Checks calls to the `CStr` constructor functions: . /// - `CStr::from_bytes_with_nul(..)` . /// - `CStr::from_bytes_with_nul_unchecked(..)` . /// - `CStr::from_ptr(..)` 10,248 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>], msrv: Msrv) { . if let Some(fn_name) = is_c_str_function(cx, func) . && let [arg] = args . && cx.tcx.sess.edition() >= Edition2021 . && msrv.meets(cx, msrvs::C_STR_LITERALS) . { . match fn_name { . sym::from_bytes_with_nul | sym::from_bytes_with_nul_unchecked . if !arg.span.from_expansion() -- line 85 ---------------------------------------- -- line 87 ---------------------------------------- . && let LitKind::ByteStr(_, StrStyle::Cooked) | LitKind::Str(_, StrStyle::Cooked) = lit.node => . { . check_from_bytes(cx, expr, arg, lit.node, fn_name); . }, . sym::from_ptr => check_from_ptr(cx, expr, arg), . _ => {}, . } . } 11,712 ( 0.00%) } . . /// Checks `CStr::from_ptr(b"foo\0".as_ptr().cast())` . fn check_from_ptr(cx: &LateContext<'_>, expr: &Expr<'_>, arg: &Expr<'_>) { . if let ExprKind::MethodCall(method, lit, [], _) = peel_ptr_cast(arg).kind . && method.ident.name == sym::as_ptr . && !lit.span.from_expansion() . && let ExprKind::Lit(lit) = lit.kind . && let LitKind::ByteStr(_, StrStyle::Cooked) = lit.node -- line 103 ---------------------------------------- 2,600 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/minmax.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub MIN_MAX, . correctness, . "`min(_, max(_, _))` (or vice versa) with bounds clamping the result to a constant" . } . . declare_lint_pass!(MinMaxPass => [MIN_MAX]); . . impl<'tcx> LateLintPass<'tcx> for MinMaxPass { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,582 ( 0.00%) if let Some((outer_max, outer_c, oe)) = min_max(cx, expr) 967,461 ( 0.05%) => site/frontend/rust-clippy/clippy_lints/src/minmax.rs:clippy_lints::minmax::min_max (27,194x) . && let Some((inner_max, inner_c, ie)) = min_max(cx, oe) . && outer_max != inner_max . && let Some(ord) = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(ie), &outer_c, &inner_c) . && matches!( . (outer_max, ord), . (MinMax::Max, Equal | Greater) | (MinMax::Min, Equal | Less) . ) . { . span_lint( . cx, . MIN_MAX, . expr.span, . "this `min`/`max` combination leads to constant result", . ); . } 163,164 ( 0.01%) } . } . . #[derive(PartialEq, Eq, Debug, Clone, Copy)] . enum MinMax { . Min, . Max, . } . 190,358 ( 0.01%) fn min_max<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option<(MinMax, Constant, &'a Expr<'a>)> { 129,394 ( 0.01%) match expr.kind { 3,288 ( 0.00%) ExprKind::Call(path, args) => { 9,864 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind { . cx.typeck_results() 13,152 ( 0.00%) .qpath_res(qpath, path.hir_id) 76,344 ( 0.00%) => ???:::qpath_res (3,288x) . .opt_def_id() 19,626 ( 0.00%) .and_then(|def_id| match cx.tcx.get_diagnostic_name(def_id) { 223,546 ( 0.01%) => ???:::get_diagnostic_name (3,271x) 3 ( 0.00%) Some(sym::cmp_min) => fetch_const(cx, expr.span.ctxt(), None, args, MinMax::Min), . Some(sym::cmp_max) => fetch_const(cx, expr.span.ctxt(), None, args, MinMax::Max), . _ => None, . }) . } else { . None . } . }, 8,627 ( 0.00%) ExprKind::MethodCall(path, receiver, args @ [_], _) => { 1,089 ( 0.00%) let m = match path.ident.name { 4,356 ( 0.00%) sym::max => MinMax::Max, . sym::min => MinMax::Min, . _ => return None, . }; . if cx.typeck_results().expr_ty(receiver).is_floating_point() . || cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::Ord) . { . fetch_const(cx, expr.span.ctxt(), Some(receiver), args, m) . } else { . None . } . }, . _ => None, . } 217,552 ( 0.01%) } . 8 ( 0.00%) fn fetch_const<'a>( . cx: &LateContext<'_>, . ctxt: SyntaxContext, . receiver: Option<&'a Expr<'a>>, . args: &'a [Expr<'a>], . m: MinMax, . ) -> Option<(MinMax, Constant, &'a Expr<'a>)> { . let mut args = receiver.into_iter().chain(args); . let first_arg = args.next()?; . let second_arg = args.next()?; . if args.next().is_some() { . return None; . } 4 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 56 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (1x) 26 ( 0.00%) match (ecx.eval_local(first_arg, ctxt), ecx.eval_local(second_arg, ctxt)) { 222 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (2x) . (Some(c), None) => Some((m, c, second_arg)), . (None, Some(c)) => Some((m, c, first_arg)), . // otherwise ignore 1 ( 0.00%) _ => None, . } 9 ( 0.00%) } 3,300 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs -------------------------------------------------------------------------------- Ir -- line 80 ---------------------------------------- . Since(RustcVersion), . } . . /// All known std crates containing a stability attribute. . struct StdCrates([Option; 6]); . impl StdCrates { . fn new(tcx: TyCtxt<'_>) -> Self { . let mut res = Self([None; _]); 48 ( 0.00%) for &krate in tcx.crates(()) { . // FIXME(@Jarcho): We should have an internal lint to detect when this list is out of date. . match tcx.crate_name(krate) { 182 ( 0.00%) sym::alloc => res.0[0] = Some(krate), . sym::core => res.0[1] = Some(krate), . sym::core_arch => res.0[2] = Some(krate), . sym::proc_macro => res.0[3] = Some(krate), . sym::std => res.0[4] = Some(krate), . sym::std_detect => res.0[5] = Some(krate), . _ => {}, . } . } -- line 99 ---------------------------------------- -- line 112 ---------------------------------------- . std_crates: StdCrates, . . // The most recently called path. Used to skip checking the path after it's . // been checked when visiting the call expression. . called_path: Option, . } . . impl IncompatibleMsrv { 9 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 19 ( 0.00%) Self { 2 ( 0.00%) msrv: conf.msrv.into(), . availability_cache: FxHashMap::default(), 1 ( 0.00%) check_in_tests: conf.check_incompatible_msrv_in_tests, . std_crates: StdCrates::new(tcx), . called_path: None, . } 8 ( 0.00%) } . . /// Returns the availability of `def_id`, whether it is enabled through a feature or . /// available since a given version (the default being Rust 1.0.0). `needs_const` requires . /// the `const`-stability to be looked up instead of the stability in non-`const` contexts. 23,991 ( 0.00%) fn get_def_id_availability(&mut self, tcx: TyCtxt<'_>, def_id: DefId, needs_const: bool) -> Availability { . if let Some(availability) = self.availability_cache.get(&(def_id, needs_const)) { 4,036 ( 0.00%) return *availability; . } 489 ( 0.00%) let (feature, stability_level) = if needs_const { . tcx.lookup_const_stability(def_id) . .map(|stability| (stability.feature, stability.level)) . .unzip() . } else { . tcx.lookup_stability(def_id) . .map(|stability| (stability.feature, stability.level)) . .unzip() . }; 1,141 ( 0.00%) let version = if feature.is_some_and(|feature| tcx.features().enabled(feature)) { 6,520 ( 0.00%) => ???:::features (163x) 652 ( 0.00%) => ???:::enabled (163x) . Availability::FeatureEnabled . } else if let Some(StableSince::Version(version)) = . stability_level.as_ref().and_then(StabilityLevel::stable_since) . { . Availability::Since(version) . } else if needs_const { . // Fallback to regular stability . self.get_def_id_availability(tcx, def_id, false) -- line 154 ---------------------------------------- -- line 158 ---------------------------------------- . Availability::Since(RustcVersion { . major: 1, . minor: 0, . patch: 0, . }) . }; . self.availability_cache.insert((def_id, needs_const), version); . version 19,629 ( 0.00%) } . . /// Emit lint if `def_id`, associated with `node` and `span`, is below the current MSRV. 187,035 ( 0.01%) fn emit_lint_if_under_msrv( . &mut self, . cx: &LateContext<'_>, . needs_const: bool, . def_id: DefId, . node: HirId, . span: Span, . ) { . if !self.std_crates.contains(def_id.krate) { . // No stability attributes to lookup for these items. . return; . } . // Use `from_expansion` to fast-path the common case. . if span.from_expansion() { . let expn = span.ctxt().outer_expn_data(); 6,852 ( 0.00%) match expn.kind { . // FIXME(@Jarcho): Check that the actual desugaring or std macro is supported by the . // current MSRV. Note that nested expansions need to be handled as well. . ExpnKind::AstPass(_) | ExpnKind::Desugaring(_) => return, 406 ( 0.00%) ExpnKind::Macro(..) if expn.macro_def_id.is_some_and(|did| self.std_crates.contains(did.krate)) => { . return; . }, . // All other expansions share the target's MSRV. . // FIXME(@Jarcho): What should we do about version dependant macros from external crates? . _ => {}, . } . } . . // Check `is_in_test` last as it walks the HIR parent chain. 34,896 ( 0.00%) if let Some(current) = self.msrv.current(cx) 21,810 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::current (2,181x) 32,715 ( 0.00%) && let Availability::Since(version) = self.get_def_id_availability(cx.tcx, def_id, needs_const) 592,230 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::get_def_id_availability (2,181x) 8,722 ( 0.00%) && version > current . && (self.check_in_tests || !is_in_test(cx.tcx, node)) . { . span_lint_and_then( . cx, . INCOMPATIBLE_MSRV, . span, . format!( . "current MSRV (Minimum Supported Rust Version) is `{current}` but this item is stable{} since `{version}`", -- line 208 ---------------------------------------- -- line 210 ---------------------------------------- . ), . |diag| { . if is_under_cfg_attribute(cx, node) { . diag.note_once("you may want to conditionally increase the MSRV considered by Clippy using the `clippy::msrv` attribute"); . } . }, . ); . } 99,752 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 171,846 ( 0.01%) match expr.kind { . ExprKind::MethodCall(_, _, _, span) => { 18,760 ( 0.00%) if let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 138,640 ( 0.01%) => ???:::type_dependent_def_id (2,680x) 32,160 ( 0.00%) self.emit_lint_if_under_msrv(cx, is_in_const_context(cx), method_did, expr.hir_id, span); 898,158 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (2,680x) 564,545 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (2,680x) . } . }, 23,016 ( 0.00%) ExprKind::Call(callee, _) if let ExprKind::Path(qpath) = callee.kind => { 6,576 ( 0.00%) self.called_path = Some(callee.hir_id); 9,864 ( 0.00%) let needs_const = is_in_const_context(cx); 1,080,270 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (3,288x) 19,728 ( 0.00%) let def_id = if let Some(def_id) = cx.qpath_res(&qpath, callee.hir_id).opt_def_id() { 104,205 ( 0.01%) => ???:::qpath_res (3,288x) . def_id 34 ( 0.00%) } else if needs_const && let ty::FnDef(def_id, _) = *cx.typeck_results().expr_ty(callee).kind() { . // Edge case where a function is first assigned then called. . // We previously would have warned for the non-const MSRV, when . // checking the path, but now that it's called the const MSRV . // must also be met. . def_id . } else { . return; . }; 22,897 ( 0.00%) self.emit_lint_if_under_msrv(cx, needs_const, def_id, expr.hir_id, callee.span); . }, . // Desugaring into function calls by the compiler will use `QPath::LangItem` variants. Those should . // not be linted as they will not be generated in older compilers if the function is not available, . // and the compiler is allowed to call unstable functions. 10,899 ( 0.00%) ExprKind::Path(qpath) 98,091 ( 0.01%) if let Some(path_def_id) = cx.qpath_res(&qpath, expr.hir_id).opt_def_id() 283,438 ( 0.02%) => ???:::qpath_res (10,899x) . && self.called_path != Some(expr.hir_id) => . { 6,048 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, path_def_id, expr.hir_id, expr.span); . }, . _ => {}, . } 217,552 ( 0.01%) } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, hir_ty: &'tcx hir::Ty<'tcx, AmbigArg>) { 49,908 ( 0.00%) if let hir::TyKind::Path(qpath) = hir_ty.kind 62,080 ( 0.00%) && let Some(ty_def_id) = cx.qpath_res(&qpath, hir_ty.hir_id).opt_def_id() 183,861 ( 0.01%) => ???:::qpath_res (7,760x) . // `CStr` and `CString` have been moved around but have been available since Rust 1.0.0 39,627 ( 0.00%) && !matches!(cx.tcx.get_diagnostic_name(ty_def_id), Some(sym::cstr_type | sym::cstring_type)) 317,282 ( 0.02%) => ???:::get_diagnostic_name (5,661x) . { 50,886 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, ty_def_id, hir_ty.hir_id, hir_ty.span); 317,802 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (5,654x) . } . } . } . . /// Heuristic checking if the node `hir_id` is under a `#[cfg()]` or `#[cfg_attr()]` . /// attribute. . fn is_under_cfg_attribute(cx: &LateContext<'_>, hir_id: HirId) -> bool { . cx.tcx -- line 272 ---------------------------------------- 27,460 ( 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/ptr/mut_ptr.rs -------------------------------------------------------------------------------- Ir -- line 467 ---------------------------------------- . #[must_use = "returns a new pointer rather than modifying its argument"] . #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")] . #[inline(always)] . pub const fn wrapping_offset(self, count: isize) -> *mut T . where . T: Sized, . { . // SAFETY: the `arith_offset` intrinsic has no prerequisites to be called. 506 ( 0.00%) unsafe { intrinsics::arith_offset(self, count) as *mut T } . } . . /// Adds a signed offset in bytes to a pointer using wrapping arithmetic. . /// . /// `count` is in units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [wrapping_offset][pointer::wrapping_offset] on it. See that method -- line 483 ---------------------------------------- -- line 963 ---------------------------------------- . ( . this: *const () = self as *const (), . count: usize = count, . size: usize = size_of::(), . ) => runtime_add_nowrap(this, count, size) . ); . . // SAFETY: the caller must uphold the safety contract for `offset`. 494,647 ( 0.03%) unsafe { intrinsics::offset(self, count) } . } . . /// Adds an unsigned offset in bytes to a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [add][pointer::add] on it. See that method for documentation -- line 979 ---------------------------------------- -- line 1047 ---------------------------------------- . . if T::IS_ZST { . // Pointer arithmetic does nothing when the pointee is a ZST. . self . } else { . // SAFETY: the caller must uphold the safety contract for `offset`. . // Because the pointee is *not* a ZST, that means that `count` is . // at most `isize::MAX`, and thus the negation cannot overflow. 90,868 ( 0.01%) unsafe { intrinsics::offset(self, intrinsics::unchecked_sub(0, count as isize)) } . } . } . . /// Subtracts an unsigned offset in bytes from a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and -- line 1063 ---------------------------------------- 117,450 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . . #[derive(Default)] . pub struct Default { . // Spans linted by `field_reassign_with_default`. . reassigned_linted: FxHashSet, . } . . impl<'tcx> LateLintPass<'tcx> for Default { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,582 ( 0.00%) if !expr.span.from_expansion() . // Avoid cases already linted by `field_reassign_with_default` 20,546 ( 0.00%) && !self.reassigned_linted.contains(&expr.span) 121 ( 0.00%) && let ExprKind::Call(path, []) = expr.kind 1,331 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 87,608 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (121x) 363 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 605 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 8,723 ( 0.00%) => ???:::qpath_res (121x) 600 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 9,388 ( 0.00%) => ???:::is_diagnostic_item (120x) 120 ( 0.00%) && !is_update_syntax_base(cx, expr) 3,078 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/default.rs:clippy_lints::default::is_update_syntax_base (24x) . // Detect and ignore ::default() because these calls do explicitly name the type. 58 ( 0.00%) && let QPath::Resolved(None, _path) = qpath 10 ( 0.00%) && let expr_ty = cx.typeck_results().expr_ty(expr) 200 ( 0.00%) => ???:::expr_ty (5x) 10 ( 0.00%) && let ty::Adt(def, ..) = expr_ty.kind() 15 ( 0.00%) && !is_from_proc_macro(cx, expr) 2,060 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (3x) . { 18 ( 0.00%) let replacement = with_forced_trimmed_paths!(format!("{}::default()", cx.tcx.def_path_str(def.did()))); 12 ( 0.00%) => ???:::new (3x) 39 ( 0.00%) span_lint_and_sugg( 4,047 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (3x) . cx, . DEFAULT_TRAIT_ACCESS, 3 ( 0.00%) expr.span, 6 ( 0.00%) format!("calling `{replacement}` is more clear than this expression"), . "try", 12 ( 0.00%) replacement, . Applicability::Unspecified, // First resolve the TODO above . ); . } 217,552 ( 0.01%) } . . #[expect(clippy::too_many_lines)] 25,560 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &Block<'tcx>) { . // start from the `let mut _ = _::default();` and look at all the following . // statements, see if they re-assign the fields of the binding . let stmts_head = match block.stmts { 11,360 ( 0.00%) [] | [_] => return, . // Skip the last statement since there cannot possibly be any following statements that re-assign fields. . [head @ .., _] => head, . }; . for (stmt_idx, stmt) in stmts_head.iter().enumerate() { . // find all binding statements like `let mut _ = T::default()` where `T::default()` is the . // `default` method of the `Default` trait, and store statement index in current block being . // checked and the name of the bound variable 2,443 ( 0.00%) let (local, variant, binding_name, binding_type, span) = if let StmtKind::Let(local) = stmt.kind . // only take `let ...` statements 1,539 ( 0.00%) && let Some(expr) = local.init 3,472 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 359,540 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (496x) 992 ( 0.00%) && !expr.span.from_expansion() . // only take bindings to identifiers 2,502 ( 0.00%) && let PatKind::Binding(_, binding_id, ident, _) = local.pat.kind . // only when assigning `... = Default::default()` 1,990 ( 0.00%) && is_expr_default(cx, expr) 8,131 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_default (398x) . && let binding_type = cx.typeck_results().node_type(binding_id) . && let ty::Adt(adt, args) = *binding_type.kind() . && adt.is_struct() . && let variant = adt.non_enum_variant() . && !variant.field_list_has_applicable_non_exhaustive() . && let module_did = cx.tcx.parent_module(stmt.hir_id) . && variant . .fields -- line 139 ---------------------------------------- -- line 242 ---------------------------------------- . first_assign.unwrap().span, . "field assignment outside of initializer for an instance created with Default::default()", . Some(local.span), . format!("consider initializing the variable with `{sugg}` and removing relevant reassignments"), . ); . self.reassigned_linted.insert(span); . } . } 22,720 ( 0.00%) } . } . . /// Returns the reassigned field and the assigning expression (right-hand side of assign). . fn field_reassigned_by_stmt<'tcx>(this: &Stmt<'tcx>, binding_name: Symbol) -> Option<(Ident, &'tcx Expr<'tcx>)> { . if let StmtKind::Semi(later_expr) = this.kind . // only take assignments . && let ExprKind::Assign(assign_lhs, assign_rhs, _) = later_expr.kind . // only take assignments to fields where the left-hand side field is a field of -- line 258 ---------------------------------------- -- line 264 ---------------------------------------- . { . Some((field_ident, assign_rhs)) . } else { . None . } . } . . /// Returns whether `expr` is the update syntax base: `Foo { a: 1, .. base }` 48 ( 0.00%) fn is_update_syntax_base<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> bool { 72 ( 0.00%) if let Some(parent) = get_parent_expr(cx, expr) 2,856 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (24x) 30 ( 0.00%) && let ExprKind::Struct(_, _, StructTailExpr::Base(base)) = parent.kind . { . base.hir_id == expr.hir_id . } else { . false . } 48 ( 0.00%) } 5,687 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_main_separator_str.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . . impl ManualMainSeparatorStr { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualMainSeparatorStr { 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 54,388 ( 0.00%) let (target, _) = peel_hir_expr_refs(expr); 141,346 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (27,194x) 61,332 ( 0.00%) if let ExprKind::MethodCall(path, receiver, &[], _) = target.kind 1,554 ( 0.00%) && path.ident.name == sym::to_string 87 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = receiver.kind 22 ( 0.00%) && let Res::Def(DefKind::Const { .. }, receiver_def_id) = path.res . && cx.ty_based_def(target).opt_parent(cx).is_diag_item(cx, sym::ToString) . && cx.tcx.is_diagnostic_item(sym::path_main_separator, receiver_def_id) . && let ty::Ref(_, ty, Mutability::Not) = cx.typeck_results().expr_ty_adjusted(expr).kind() . && ty.is_str() . && self.msrv.meets(cx, msrvs::PATH_MAIN_SEPARATOR_STR) . { . span_lint_and_sugg( . cx, -- line 62 ---------------------------------------- -- line 63 ---------------------------------------- . MANUAL_MAIN_SEPARATOR_STR, . expr.span, . "taking a reference on `std::path::MAIN_SEPARATOR` conversion to `String`", . "replace with", . "std::path::MAIN_SEPARATOR_STR".to_owned(), . Applicability::MachineApplicable, . ); . } 217,552 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs -------------------------------------------------------------------------------- Ir -- line 14 ---------------------------------------- . /// . /// toml = expression *( newline expression ) . /// . /// expression = ( ( ws comment ) / . /// ( ws keyval ws [ comment ] ) / . /// ( ws table ws [ comment ] ) / . /// ws ) . /// ``` 13 ( 0.00%) pub(crate) fn document<'i>( . input: &mut Input<'_>, . source: toml_parser::Source<'i>, . errors: &mut dyn ErrorSink, . ) -> Spanned> { . #[cfg(feature = "debug")] . let _scope = TraceScope::new("document::document"); . let mut state = State::default(); . while let Some(event) = input.next_token() { -- line 30 ---------------------------------------- -- line 43 ---------------------------------------- . #[cfg(feature = "debug")] . trace( . &format!("unexpected {event:?}"), . anstyle::AnsiColor::Red.on_default(), . ); . continue; . } . EventKind::StdTableOpen | EventKind::ArrayTableOpen => { 204 ( 0.00%) state.finish_table(errors); 43,229 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:::finish_table (51x) . . let header = on_table(event, input, source, errors); . . state.start_table(header, errors); . } . EventKind::SimpleKey => { 1,547 ( 0.00%) let (path, key) = on_key(event, input, source, errors); 42,408 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/key.rs:toml::de::parser::key::on_key (119x) 238 ( 0.00%) let Some(key) = key else { . break; . }; . let Some(next_event) = input.next_token() else { . break; . }; . let keyval_event = if next_event.kind() == EventKind::Whitespace { . let Some(next_event) = input.next_token() else { . break; . }; . next_event . } else { . next_event . }; 119 ( 0.00%) if keyval_event.kind() != EventKind::KeyValSep { . break; . } . 119 ( 0.00%) if input . .first() . .map(|e| e.kind() == EventKind::Whitespace) . .unwrap_or(false) . { . let _ = input.next_token(); . } 833 ( 0.00%) let value = value(input, source, errors); 69,995 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/value.rs:toml::de::parser::value::value (119x) . 476 ( 0.00%) state.capture_key_value(path, key, value, errors); . } . EventKind::Whitespace | EventKind::Comment | EventKind::Newline => { . state.capture_trailing(event); . } . } . } . 2 ( 0.00%) state.finish_table(errors); 540 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:::finish_table (1x) . . let span = Default::default(); 10 ( 0.00%) Spanned::new(span, state.root) 9 ( 0.00%) } . . /// ```abnf . /// ;; Standard Table . /// . /// std-table = std-table-open key *( table-key-sep key) std-table-close . /// . /// ;; Array Table . /// -- line 106 ---------------------------------------- -- line 110 ---------------------------------------- . open_event: &toml_parser::parser::Event, . input: &mut Input<'_>, . source: toml_parser::Source<'i>, . errors: &mut dyn ErrorSink, . ) -> TableHeader<'i> { . #[cfg(feature = "debug")] . let _scope = TraceScope::new("document::on_table"); . let is_array = open_event.kind() == EventKind::ArrayTableOpen; 51 ( 0.00%) let mut current_path = None; . let mut current_key = None; . let mut current_span = open_event.span(); . let mut current_prefix = None; . let mut current_suffix = None; . . while let Some(event) = input.next_token() { 306 ( 0.00%) match event.kind() { . EventKind::InlineTableOpen . | EventKind::InlineTableClose . | EventKind::ArrayOpen . | EventKind::ArrayClose . | EventKind::Scalar . | EventKind::ValueSep . | EventKind::Error . | EventKind::KeySep -- line 133 ---------------------------------------- -- line 144 ---------------------------------------- . continue; . } . EventKind::ArrayTableClose | EventKind::StdTableClose => { . current_span = current_span.append(event.span()); . break; . } . EventKind::SimpleKey => { . current_prefix.get_or_insert_with(|| event.span().before()); 1,020 ( 0.00%) let (path, key) = on_key(event, input, source, errors); 33,023 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/key.rs:toml::de::parser::key::on_key (51x) 204 ( 0.00%) current_path = Some(path); 204 ( 0.00%) current_key = key; . current_suffix.get_or_insert_with(|| event.span().after()); . } . EventKind::Whitespace => { . if current_key.is_some() { . current_suffix = Some(event.span()); . } else { . current_prefix = Some(event.span()); . } . } . } . } . 306 ( 0.00%) TableHeader { 51 ( 0.00%) path: current_path.unwrap_or_default(), 408 ( 0.00%) key: current_key, . span: current_span, . is_array, . } . } . . struct TableHeader<'i> { . path: Vec>>, . key: Option>>, . span: toml_parser::Span, . is_array: bool, . } . 22 ( 0.00%) #[derive(Default)] . struct State<'i> { . root: DeTable<'i>, . current_table: DeTable<'i>, . current_header: Option>, . current_position: usize, . } . . impl<'i> State<'i> { -- line 190 ---------------------------------------- -- line 214 ---------------------------------------- . ); . #[cfg(feature = "debug")] . trace( . &format!("value={value:?}",), . anstyle::AnsiColor::Blue.on_default(), . ); . . let dotted = !path.is_empty(); 833 ( 0.00%) let Some(parent_table) = descend_path(&mut self.current_table, &path, dotted, errors) 2,261 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:toml::de::parser::document::descend_path (119x) . else { . return; . }; . // "Likewise, using dotted keys to redefine tables already defined in [table] form is not allowed" 119 ( 0.00%) let mixed_table_types = dotted && !parent_table.is_implicit(); . if mixed_table_types { . #[cfg(feature = "debug")] . trace( . &format!("dotted={dotted}"), . anstyle::AnsiColor::Red.on_default(), . ); . #[cfg(feature = "debug")] . trace( -- line 235 ---------------------------------------- -- line 236 ---------------------------------------- . &format!("parent_table.is_implicit={}", parent_table.is_implicit()), . anstyle::AnsiColor::Red.on_default(), . ); . let key_span = get_key_span(&key); . errors.report_error(ParseError::new("duplicate key").with_unexpected(key_span)); . return; . } . let key_span = get_key_span(&key); 1,666 ( 0.00%) match parent_table.entry(key) { 28,648 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/map.rs:>, serde_spanned::spanned::Spanned>>::entry::>> (119x) 952 ( 0.00%) Entry::Vacant(o) => { 1,428 ( 0.00%) o.insert(value); . } . Entry::Occupied(existing) => { . // "Since tables cannot be defined more than once, redefining such tables using a [table] header is not allowed" . let old_span = get_key_span(existing.key()); . errors.report_error( . ParseError::new("duplicate key") . .with_unexpected(key_span) . .with_context(old_span), . ); . } . } . } . 520 ( 0.00%) fn finish_table(&mut self, errors: &mut dyn ErrorSink) { . #[cfg(feature = "debug")] . let _scope = TraceScope::new("document::finish_table"); . let prev_table = core::mem::take(&mut self.current_table); 666 ( 0.00%) if let Some(header) = self.current_header.take() { 153 ( 0.00%) let Some(key) = &header.key else { . return; . }; . let header_span = header.span.start()..header.span.end(); 663 ( 0.00%) let prev_table = Spanned::new(header_span.clone(), DeValue::Table(prev_table)); . . let parent_key = &header.path; . let dotted = false; 408 ( 0.00%) let Some(parent_table) = descend_path(&mut self.root, parent_key, dotted, errors) 11,930 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:toml::de::parser::document::descend_path (51x) . else { . return; . }; . #[cfg(feature = "debug")] . trace( . &format!("key={key}",), . anstyle::AnsiColor::Blue.on_default(), . ); 102 ( 0.00%) if header.is_array { 60 ( 0.00%) let entry = parent_table.entry(key.clone()).or_insert_with(|| { 8,100 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/map.rs:>, serde_spanned::spanned::Spanned>>::entry::>> (30x) . let mut array = DeArray::new(); . array.set_array_of_tables(true); . Spanned::new(header_span, DeValue::Array(array)) . }); . let Some(array) = entry . .as_mut() . .as_array_mut() . .filter(|a| a.is_array_of_tables()) -- line 291 ---------------------------------------- -- line 300 ---------------------------------------- . let old_span = toml_parser::Span::new_unchecked(old_span.start, old_span.end); . errors.report_error( . ParseError::new("duplicate key") . .with_unexpected(key_span) . .with_context(old_span), . ); . return; . }; 360 ( 0.00%) array.push(prev_table); . } else { 252 ( 0.00%) let existing = parent_table.insert(key.clone(), prev_table); . debug_assert!(existing.is_none()); . } . } else { 13 ( 0.00%) self.root = prev_table; . } 416 ( 0.00%) } . . fn start_table(&mut self, header: TableHeader<'i>, errors: &mut dyn ErrorSink) { 51 ( 0.00%) if !header.is_array { . // 1. Look up the table on start to ensure the duplicate_key error points to the right line . // 2. Ensure any child tables from an implicit table are preserved . let root = &mut self.root; 42 ( 0.00%) if let (Some(parent_table), Some(key)) = 147 ( 0.00%) (descend_path(root, &header.path, false, errors), &header.key) 15,506 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/de/parser/document.rs:toml::de::parser::document::descend_path (21x) . { . if let Some((old_key, old_value)) = parent_table.remove_entry(key) { . match old_value.into_inner() { . DeValue::Table(t) if t.is_implicit() && !t.is_dotted() => { . self.current_table = t; . } . // Since tables cannot be defined more than once, redefining such tables using a [table] header is not allowed. Likewise, using dotted keys to redefine tables already defined in [table] form is not allowed. . old_value => { -- line 332 ---------------------------------------- -- line 358 ---------------------------------------- . self.current_table = t; . } . } . } . } . } . } . 51 ( 0.00%) self.current_position += 1; . self.current_table.set_implicit(false); . self.current_table.set_dotted(false); 1,785 ( 0.00%) self.current_header = Some(header); . } . } . 1,528 ( 0.00%) fn descend_path<'t, 'i>( . mut table: &'t mut DeTable<'i>, . path: &[Spanned>], . dotted: bool, . errors: &mut dyn ErrorSink, . ) -> Option<&'t mut DeTable<'i>> { . #[cfg(feature = "debug")] . let _scope = TraceScope::new("document::descend_path"); . #[cfg(feature = "debug")] -- line 381 ---------------------------------------- -- line 387 ---------------------------------------- . anstyle::AnsiColor::Blue.on_default(), . ); . for key in path.iter() { . #[cfg(feature = "debug")] . trace( . &format!("path[_]={:?}", key.get_ref()), . anstyle::AnsiColor::Blue.on_default(), . ); 420 ( 0.00%) table = match table.entry(key.clone()) { 17,995 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml-1.1.2+spec-1.1.0/src/map.rs:>, serde_spanned::spanned::Spanned>>::entry::>> (60x) 14 ( 0.00%) Entry::Vacant(entry) => { . let mut new_table = DeTable::new(); . new_table.set_implicit(true); . new_table.set_dotted(dotted); . . let value = DeValue::Table(new_table); 35 ( 0.00%) let value = Spanned::new(key.span(), value); 42 ( 0.00%) let value = entry.insert(value); . value.as_mut().as_table_mut().unwrap() . } 106 ( 0.00%) Entry::Occupied(entry) => { . let spanned = entry.into_mut(); . let old_span = spanned.span(); 530 ( 0.00%) match spanned.as_mut() { . DeValue::Array(array) => { . if !array.is_array_of_tables() { . let old_span = . toml_parser::Span::new_unchecked(old_span.start, old_span.end); . let key_span = get_key_span(key); . errors.report_error( . ParseError::new( . "cannot extend value of type array with a dotted key", -- line 417 ---------------------------------------- -- line 441 ---------------------------------------- . .with_unexpected(key_span) . .with_context(old_span), . ); . return None; . } . } . } . DeValue::Table(sweet_child_of_mine) => { 106 ( 0.00%) if sweet_child_of_mine.is_inline() { . let key_span = get_key_span(key); . errors.report_error( . ParseError::new( . "cannot extend value of type inline table with a dotted key", . ) . .with_unexpected(key_span), . ); . return None; . } 106 ( 0.00%) if dotted && sweet_child_of_mine.is_implicit() { . // Since tables cannot be defined more than once, redefining such tables using a . // [table] header is not allowed. Likewise, using dotted keys to redefine tables . // already defined in [table] form is not allowed. . sweet_child_of_mine.set_dotted(true); . } . // Since tables cannot be defined more than once, redefining such tables using a . // [table] header is not allowed. Likewise, using dotted keys to redefine tables . // already defined in [table] form is not allowed. -- line 467 ---------------------------------------- -- line 502 ---------------------------------------- . ); . return None; . } . } . } . }; . } . Some(table) 1,719 ( 0.00%) } . . fn get_key_span(key: &Spanned>) -> toml_parser::Span { . let key_span = key.span(); . toml_parser::Span::new_unchecked(key_span.start, key_span.end) . } 2,104 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_octal_unix_permissions.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub NON_OCTAL_UNIX_PERMISSIONS, . correctness, . "use of non-octal value to set unix file permissions, which will be translated into octal" . } . . declare_lint_pass!(NonOctalUnixPermissions => [NON_OCTAL_UNIX_PERMISSIONS]); . . impl<'tcx> LateLintPass<'tcx> for NonOctalUnixPermissions { 108,776 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 129,394 ( 0.01%) match &expr.kind { 5,360 ( 0.00%) ExprKind::MethodCall(path, func, [param], _) => { 2,178 ( 0.00%) if let Some(adt) = cx.typeck_results().expr_ty(func).peel_refs().ty_adt_def() 43,680 ( 0.00%) => ???:::expr_ty (1,089x) 1,057 ( 0.00%) && matches!( 3,529 ( 0.00%) (cx.tcx.get_diagnostic_name(adt.did()), path.ident.name), 62,809 ( 0.00%) => ???:::get_diagnostic_name (1,057x) 716 ( 0.00%) (Some(sym::FsOpenOptions | sym::DirBuilder), sym::mode) . | (Some(sym::FsPermissions), sym::set_mode) . ) . && let ExprKind::Lit(_) = param.kind . && param.span.eq_ctxt(expr.span) . && param . .span . .check_text(cx, |src| !matches!(src.as_bytes(), [b'0', b'o' | b'b', ..])) . { . show_error(cx, param); . } . }, 6,576 ( 0.00%) ExprKind::Call(func, [param]) => { 9,444 ( 0.00%) if let ExprKind::Path(ref path) = func.kind 9,444 ( 0.00%) && let Some(def_id) = cx.qpath_res(path, func.hir_id).opt_def_id() 64,325 ( 0.00%) => ???:::qpath_res (2,361x) 11,725 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::permissions_from_mode, def_id) 176,316 ( 0.01%) => ???:::is_diagnostic_item (2,345x) . && let ExprKind::Lit(_) = param.kind . && param.span.eq_ctxt(expr.span) . && param . .span . .check_text(cx, |src| !matches!(src.as_bytes(), [b'0', b'o' | b'b', ..])) . { . show_error(cx, param); . } . }, . _ => {}, . } 135,970 ( 0.01%) } . } . . fn show_error(cx: &LateContext<'_>, param: &Expr<'_>) { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . NON_OCTAL_UNIX_PERMISSIONS, . param.span, -- line 83 ---------------------------------------- 7,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/intrinsics/mod.rs -------------------------------------------------------------------------------- Ir -- line 447 ---------------------------------------- . /// Therefore, implementations must not require the user to uphold . /// any safety invariants. . /// . /// This intrinsic does not have a stable counterpart. . #[unstable(feature = "core_intrinsics", issue = "none")] . #[rustc_nounwind] . #[inline(always)] . pub const fn likely(b: bool) -> bool { 70,919 ( 0.00%) if b { . true . } else { . cold_path(); . false . } . } . . /// Hints to the compiler that branch condition is likely to be false. -- line 463 ---------------------------------------- -- line 470 ---------------------------------------- . /// Therefore, implementations must not require the user to uphold . /// any safety invariants. . /// . /// This intrinsic does not have a stable counterpart. . #[unstable(feature = "core_intrinsics", issue = "none")] . #[rustc_nounwind] . #[inline(always)] . pub const fn unlikely(b: bool) -> bool { 113,547 ( 0.01%) if b { . cold_path(); . true . } else { . false . } . } . . /// Returns either `true_val` or `false_val` depending on condition `b` with a -- line 486 ---------------------------------------- -- line 2207 ---------------------------------------- . #[rustc_nounwind] . #[rustc_intrinsic] . #[rustc_allow_const_fn_unstable(const_trait_impl, funnel_shifts)] . #[miri::intrinsic_fallback_is_spec] . pub const fn rotate_left(x: T, shift: u32) -> T { . // Make sure to call the intrinsic for `funnel_shl`, not the fallback impl. . // SAFETY: we modulo `shift` so that the result is definitely less than the size of . // `T` in bits. 33,650 ( 0.00%) unsafe { unchecked_funnel_shl(x, x, shift % (mem::size_of::() as u32 * 8)) } . } . . /// Performs rotate right. . /// . /// Note that, unlike most intrinsics, this is safe to call; . /// it does not require an `unsafe` block. . /// Therefore, implementations must not require the user to uphold . /// any safety invariants. -- line 2223 ---------------------------------------- -- line 2615 ---------------------------------------- . @capture$([$($binders:tt)*])? { $($arg:ident : $ty:ty = $val:expr),* $(,)? } $( -> $ret:ty )? : . if const . $(#[$compiletime_attr:meta])* $compiletime:block . else . $(#[$runtime_attr:meta])* $runtime:block . ) => {{ . #[inline] . $(#[$runtime_attr])* 1,062 ( 0.00%) fn runtime$(<$($binders)*>)?($($arg: $ty),*) $( -> $ret )? { . $runtime . } . . #[inline] . $(#[$compiletime_attr])* . const fn compiletime$(<$($binders)*>)?($($arg: $ty),*) $( -> $ret )? { . // Don't warn if one of the arguments is unused. . $(let _ = $arg;)* -- line 2631 ---------------------------------------- 54,160 ( 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; . 282,310 ( 0.02%) pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) -> bool { . let replacements: Vec<_> = collect_doc_replacements(attrs); . 80,660 ( 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 . } 322,640 ( 0.02%) } . . fn collect_doc_replacements(attrs: &[Attribute]) -> Vec<(Span, String)> { . attrs . .iter() . .filter_map(|attr| { 36,672 ( 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 { 8,688 ( 0.00%) None . } . }) . .collect() . } 5,136 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs -------------------------------------------------------------------------------- Ir -- line 52 ---------------------------------------- . . impl ManualRetain { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualRetain { 135,970 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 54,388 ( 0.00%) if let Assign(left_expr, collect_expr, _) = &expr.kind 515 ( 0.00%) && let hir::ExprKind::MethodCall(seg, target_expr, [], _) = &collect_expr.kind 22 ( 0.00%) && seg.args.is_none() 55 ( 0.00%) && let Some(collect_def_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id) 561 ( 0.00%) => ???:::type_dependent_def_id (11x) 66 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::iterator_collect_fn, collect_def_id) 919 ( 0.00%) => ???:::is_diagnostic_item (11x) . { . check_into_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_to_owned(cx, left_expr, target_expr, expr.span, self.msrv); . } 163,164 ( 0.01%) } . } . . fn check_into_iter( . cx: &LateContext<'_>, . left_expr: &hir::Expr<'_>, . target_expr: &hir::Expr<'_>, . parent_expr_span: Span, . msrv: Msrv, -- line 79 ---------------------------------------- 22 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 17,990 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 5,444 ( 0.00%) if let ItemKind::Mod(_, _, ModKind::Loaded(_, Inline::No { .. }, mod_spans)) = &item.kind 714 ( 0.00%) && let FileName::Real(real) = cx.sess().source_map().span_to_filename(mod_spans.inner_span) 41,487 ( 0.00%) => ???:::span_to_filename (42x) 84 ( 0.00%) && let Some(local_path) = real.into_local_path() 378 ( 0.00%) && let Ok(absolute_path) = local_path.canonicalize() . { 462 ( 0.00%) let modules = self.modules.entry(absolute_path).or_insert(Modules { 180,412 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs:>::entry (42x) 8,256 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map/entry.rs:>::or_insert (42x) 126 ( 0.00%) local_path, . spans: Vec::new(), . lint_level_specs: Vec::new(), . }); 126 ( 0.00%) modules.spans.push(item.span_with_attributes()); 176,571 ( 0.01%) => ???:::span_with_attributes (42x) 252 ( 0.00%) modules.lint_level_specs.push(cx.get_lint_level_spec(DUPLICATE_MOD)); 13,020 ( 0.00%) => ???:::get_lint_level_spec (42x) 42 ( 0.00%) } 20,560 ( 0.00%) } . 7 ( 0.00%) fn check_crate_post(&mut self, cx: &EarlyContext<'_>, _: &Crate) { . for Modules { . local_path, . spans, . lint_level_specs, . } in self.modules.values() . { 84 ( 0.00%) if spans.len() < 2 { . continue; . } . . // At this point the lint would be emitted . assert_eq!(spans.len(), lint_level_specs.len()); . let spans: Vec<_> = spans . .iter() . .zip(lint_level_specs) -- line 96 ---------------------------------------- -- 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%) } . } 379 ( 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 . } . }}; 194,895 ( 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 . 4,047 ( 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 24 ( 0.00%) let $end = unsafe { mem::transmute::<*const T, NonNull>($this.end_or_len) }; . $other_body . } . }}; . } . . // Inlining is_empty and len makes a huge performance difference . macro_rules! is_empty { . ($self: ident) => { -- line 41 ---------------------------------------- -- line 85 ---------------------------------------- . } . . // Helper function for creating a slice from the iterator. . #[inline(always)] . fn make_slice(&self) -> &'a [T] { . // SAFETY: the iterator was created from a slice with pointer . // `self.ptr` and length `len!(self)`. This guarantees that all . // the prerequisites for `from_raw_parts` are fulfilled. 22 ( 0.00%) unsafe { from_raw_parts(self.ptr.as_ptr(), len!(self)) } . } . . // Helper function for moving the start of the iterator forwards by `offset` elements, . // returning the old start. . // Unsafe because the offset must not exceed `self.len()`. . #[inline(always)] . unsafe fn post_inc_start(&mut self, offset: usize) -> NonNull { . let old = self.ptr; -- line 101 ---------------------------------------- -- 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. . 526 ( 0.00%) let ptr = self.ptr; 305 ( 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.) 2,261,382 ( 0.13%) 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. 16,492 ( 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()) . } 33 ( 0.00%) } . . fn next_chunk(&mut self) -> Result<[$elem; N], crate::array::IntoIter<$elem, N>> { . if T::IS_ZST || len!(self) < N { . return crate::array::iter_next_chunk(self); . } . . // SAFETY: the check above ensures len >= N . unsafe { -- line 200 ---------------------------------------- -- line 217 ---------------------------------------- . . #[inline] . fn count(self) -> usize { . len!(self) . } . . #[inline] . fn nth(&mut self, n: usize) -> Option<$elem> { 612 ( 0.00%) if n >= len!(self) { . // This iterator is now empty. . if_zst!(mut self, . len => *len = 0, . end => self.ptr = *end, . ); . return None; . } . // SAFETY: We are in bounds. `post_inc_start` does the right thing even for ZSTs. -- line 233 ---------------------------------------- -- 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 7,487 ( 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) }; 93,223 ( 0.01%) if i == len { . break; . } . } 1,184 ( 0.00%) acc . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. . #[inline] . fn for_each(mut self, mut f: F) . where . Self: Sized, . F: FnMut(Self::Item), . { . while let Some(x) = self.next() { 12 ( 0.00%) f(x); 849 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::check::{closure#2} (2x) . } . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. . #[inline] 12 ( 0.00%) fn all(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 15,357 ( 0.00%) if !f(x) { . return false; . } . } . true 8 ( 0.00%) } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. . #[inline] 56 ( 0.00%) fn any(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 208,348 ( 0.01%) if f(x) { . return true; . } . } . false 56 ( 0.00%) } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // 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() { 222,963 ( 0.01%) 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() { 66,028 ( 0.00%) if let Some(y) = f(x) { 41,005 ( 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::lifetimes::report_elidable_lifetimes::{closure#0} as core::ops::function::FnMut<(&rustc_span::def_id::LocalDefId,)>>::call_mut (42x) . 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() { 14,725 ( 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); . } 6,095 ( 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 ---------------------------------------- -- line 394 ---------------------------------------- . fn rposition

(&mut self, mut predicate: P) -> Option where . P: FnMut(Self::Item) -> bool, . Self: Sized + ExactSizeIterator + DoubleEndedIterator . { . let n = len!(self); . let mut i = n; . while let Some(x) = self.next_back() { . i -= 1; 482 ( 0.00%) if predicate(x) { . // SAFETY: `i` must be lower than `n` since it starts at `n` . // and is only decreasing. . unsafe { assert_unchecked(i < n) }; . return Some(i); . } . } . None . } -- line 410 ---------------------------------------- 2,427,474 ( 0.14%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/from_over_into.rs -------------------------------------------------------------------------------- Ir -- line 61 ---------------------------------------- . impl FromOverInto { . pub fn new(conf: &'static Conf) -> Self { . FromOverInto { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for FromOverInto { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 10,489 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . self_ty, . items: [impl_item_ref], . .. 2,810 ( 0.00%) }) = item.kind 2,727 ( 0.00%) && let Some(into_trait_seg) = of_trait.trait_ref.path.segments.last() . // `impl Into for self_ty` 3,269 ( 0.00%) && let Some(GenericArgs { args: [GenericArg::Type(target_ty)], .. }) = into_trait_seg.args 756 ( 0.00%) && span_is_local(item.span) 18,220 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (108x) 972 ( 0.00%) && let middle_trait_ref = cx.tcx.impl_trait_ref(item.owner_id).instantiate_identity().skip_norm_wip() 8,124 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: (108x) 540 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Into, middle_trait_ref.def_id) 10,340 ( 0.00%) => ???:::is_diagnostic_item (108x) . && !matches!( . middle_trait_ref.args.type_at(1).kind(), . ty::Alias(_, ty::AliasTy { kind: ty::Opaque{..} , .. }) . ) . && self.msrv.meets(cx, msrvs::RE_REBALANCING_COHERENCE) . // skip if there's a blanket From impl, the suggested impl would conflict . && !has_blanket_from_impl(cx, middle_trait_ref.self_ty()) . { -- line 88 ---------------------------------------- -- line 115 ---------------------------------------- . { . diag.multipart_suggestion(message, suggestions, Applicability::MachineApplicable); . } else { . diag.help(message); . } . }, . ); . } 3,192 ( 0.00%) } . } . . /// Finds the occurrences of `Self` and `self` . /// . /// Returns `ControlFlow::break` if any of the `self`/`Self` usages were from an expansion, or the . /// body contained a binding already named `val`. . struct SelfFinder<'a, 'tcx> { . cx: &'a LateContext<'tcx>, -- line 131 ---------------------------------------- 13,158 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . . pub(super) fn check_fn<'tcx>( . cx: &LateContext<'tcx>, . kind: intravisit::FnKind<'tcx>, . decl: &'tcx hir::FnDecl<'tcx>, . body: &'tcx hir::Body<'tcx>, . def_id: LocalDefId, . ) { 8,530 ( 0.00%) let safety = match kind { . intravisit::FnKind::ItemFn(_, _, header) => header.safety(), . intravisit::FnKind::Method(_, sig) => sig.header.safety(), . intravisit::FnKind::Closure => return, . }; . 11,823 ( 0.00%) check_raw_ptr(cx, safety, decl, body, def_id); 310,958 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr (1,689x) . } . . pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 24 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Provided(eid)) = item.kind { 6 ( 0.00%) let body = cx.tcx.hir_body(eid); 186 ( 0.00%) => ???:::hir_body (3x) 24 ( 0.00%) check_raw_ptr(cx, sig.header.safety(), sig.decl, body, item.owner_id.def_id); 490 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:clippy_lints::functions::not_unsafe_ptr_arg_deref::check_raw_ptr (3x) . } . } . 8,460 ( 0.00%) fn check_raw_ptr<'tcx>( . cx: &LateContext<'tcx>, . safety: hir::Safety, . decl: &'tcx hir::FnDecl<'tcx>, . body: &'tcx hir::Body<'tcx>, . def_id: LocalDefId, . ) { 11,834 ( 0.00%) if safety.is_safe() && cx.effective_visibilities.is_exported(def_id) { 95,070 ( 0.01%) => ???:::is_exported (1,690x) . let raw_ptrs = iter_input_pats(decl, body) . .filter_map(|arg| raw_ptr_arg(cx, arg)) . .collect::(); . 1,477 ( 0.00%) if !raw_ptrs.is_empty() { . let typeck = cx.tcx.typeck_body(body.id()); . let _: Option = for_each_expr(cx.tcx, body.value, |e| { . match e.kind { . hir::ExprKind::Call(f, args) if is_unsafe_fn(cx, typeck.expr_ty(f)) => { . for arg in args { . check_arg(cx, &raw_ptrs, arg); . } . }, -- line 59 ---------------------------------------- -- line 68 ---------------------------------------- . }, . hir::ExprKind::Unary(hir::UnOp::Deref, ptr) => check_arg(cx, &raw_ptrs, ptr), . _ => (), . } . ControlFlow::Continue(()) . }); . } . } 10,152 ( 0.00%) } . . fn raw_ptr_arg(cx: &LateContext<'_>, arg: &hir::Param<'_>) -> Option { 6,172 ( 0.00%) if let (&hir::PatKind::Binding(_, id, _, _), Some(&ty::RawPtr(_, _))) = ( . &arg.pat.kind, 1,562 ( 0.00%) cx.typeck_results 3,110 ( 0.00%) .map(|typeck_results| typeck_results.pat_ty(arg.pat).kind()), 62,200 ( 0.00%) => ???:::pat_ty (1,555x) . ) { . Some(id) . } else { . None . } . } . . fn check_arg(cx: &LateContext<'_>, raw_ptrs: &HirIdSet, arg: &hir::Expr<'_>) { -- line 90 ---------------------------------------- 16,759 ( 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/../../stdarch/crates/core_arch/src/x86/sse2.rs -------------------------------------------------------------------------------- Ir -- line 887 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_or_si128) . #[inline] . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(orps))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm_or_si128(a: __m128i, b: __m128i) -> __m128i { 6 ( 0.00%) unsafe { simd_or(a, b) } . } . . /// Computes the bitwise XOR of 128 bits (representing integer data) in `a` and . /// `b`. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_xor_si128) . #[inline] . #[target_feature(enable = "sse2")] -- line 903 ---------------------------------------- -- line 912 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_cmpeq_epi8) . #[inline] . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(pcmpeqb))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm_cmpeq_epi8(a: __m128i, b: __m128i) -> __m128i { 1,520 ( 0.00%) unsafe { transmute::(simd_eq(a.as_i8x16(), b.as_i8x16())) } . } . . /// Compares packed 16-bit integers in `a` and `b` for equality. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_cmpeq_epi16) . #[inline] . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(pcmpeqw))] -- line 928 ---------------------------------------- -- 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); 159,709 ( 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: site/frontend/rust-clippy/clippy_lints/src/large_include_file.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . . pub struct LargeIncludeFile { . max_file_size: u64, . } . . impl LargeIncludeFile { . pub fn new(conf: &'static Conf) -> Self { . Self { 1 ( 0.00%) max_file_size: conf.max_include_file_size, . } . } . } . . impl LateLintPass<'_> for LargeIncludeFile { . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { . if let ExprKind::Lit(lit) = &expr.kind . && let len = match &lit.node { -- line 58 ---------------------------------------- -- line 80 ---------------------------------------- . )); . }, . ); . } . } . } . . impl EarlyLintPass for LargeIncludeFile { 75,040 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 22,509 ( 0.00%) if !attr.span.from_expansion() . // Currently, rustc limits the usage of macro at the top-level of attributes, . // so we don't need to recurse into each level. . && let AttrKind::Normal(ref normal) = attr.kind 1,128 ( 0.00%) && let Some(doc) = attr.doc_str() 14,101 ( 0.00%) => ???:::doc_str (282x) 330 ( 0.00%) && doc.as_str().len() as u64 > self.max_file_size . && let AttrArgs::Eq { expr: meta, .. } = &normal.item.args . && !attr.span.contains(meta.span) . // Since the `include_str` is already expanded at this point, we can only take the . // whole attribute snippet and then modify for our suggestion. . && let Some(snippet) = snippet_opt(cx, attr.span) . // We cannot remove this because a `#[doc = include_str!("...")]` attribute can . // occupy several lines. . && let Some(start) = snippet.find('[') -- line 102 ---------------------------------------- -- line 118 ---------------------------------------- . |diag| { . diag.note(format!( . "the configuration allows a maximum size of {} bytes", . self.max_file_size . )); . }, . ); . } 60,032 ( 0.00%) } . } 9,453 ( 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 { 25,536 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 4,883 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 25,536 ( 0.00%) } . 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 82,480 ( 0.00%) if has_attr(cx, expr.hir_id) { . println!("{expr:#?}"); . } 217,552 ( 0.01%) } . 18,495 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 9,725 ( 0.00%) match stmt.kind { 5,298 ( 0.00%) hir::StmtKind::Expr(e) | hir::StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 4,847 ( 0.00%) if has_attr(cx, stmt.hir_id) { . println!("{stmt:#?}"); . } 16,440 ( 0.00%) } . 176 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { 35 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 176 ( 0.00%) } . 12,032 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) { 1,640 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 12,032 ( 0.00%) } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool { 76,624 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 1,892,273 ( 0.11%) => ???:::hir_attrs (27,194x) 2,747 ( 0.00%) get_builtin_attr(attrs, sym::dump).count() > 0 . } 5,488 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/swap.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . pub MANUAL_SWAP, . complexity, . "manual swap of two variables" . } . . declare_lint_pass!(Swap => [ALMOST_SWAPPED, MANUAL_SWAP]); . . impl<'tcx> LateLintPass<'tcx> for Swap { 28,400 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { . check_manual_swap(cx, block); . check_suspicious_swap(cx, block); . check_xor_swap(cx, block); 22,720 ( 0.00%) } . } . . #[expect(clippy::too_many_arguments)] . fn generate_swap_warning<'tcx>( . block: &'tcx Block<'tcx>, . cx: &LateContext<'tcx>, . e1: &'tcx Expr<'tcx>, . e2: &'tcx Expr<'tcx>, -- line 92 ---------------------------------------- -- line 163 ---------------------------------------- . diag.note(format!("or maybe you should use `{sugg}::mem::replace`?")); . } . }, . ); . } . . /// Implementation of the `MANUAL_SWAP` lint. . fn check_manual_swap<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 8,520 ( 0.00%) if is_in_const_context(cx) { 958,249 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (2,840x) . return; . } . . for [s1, s2, s3] in block.stmts.array_windows::<3>() { 2,460 ( 0.00%) if let StmtKind::Let(tmp) = s1.kind . // let t = foo(); 810 ( 0.00%) && let Some(tmp_init) = tmp.init 1,259 ( 0.00%) && let PatKind::Binding(.., ident, None) = tmp.pat.kind . . // foo() = bar(); 540 ( 0.00%) && let StmtKind::Semi(first) = s2.kind 116 ( 0.00%) && let ExprKind::Assign(lhs1, rhs1, _) = first.kind . . // bar() = t; 22 ( 0.00%) && let StmtKind::Semi(second) = s3.kind 11 ( 0.00%) && let ExprKind::Assign(lhs2, rhs2, _) = second.kind 6 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, rhs2_path)) = rhs2.kind . && rhs2_path.segments.len() == 1 . . && ident.name == rhs2_path.segments[0].ident.name . . && let ctxt = s1.span.ctxt() . && s2.span.ctxt() == ctxt . && s3.span.ctxt() == ctxt . && first.span.ctxt() == ctxt -- line 196 ---------------------------------------- -- line 203 ---------------------------------------- . generate_swap_warning(block, cx, lhs1, lhs2, rhs1, rhs2, span, false); . } . } . } . . /// Implementation of the `ALMOST_SWAPPED` lint. . fn check_suspicious_swap(cx: &LateContext<'_>, block: &Block<'_>) { . for [first, second] in block.stmts.array_windows() { 3,427 ( 0.00%) if let Some((lhs0, rhs0)) = parse(first) 1,712 ( 0.00%) && let Some((lhs1, rhs1)) = parse(second) 238 ( 0.00%) && let ctxt = first.span.ctxt() 476 ( 0.00%) && ctxt == second.span.ctxt() 952 ( 0.00%) && !ctxt.in_external_macro(cx.sess().source_map()) 24,362 ( 0.00%) => ???:::in_external_macro (238x) 1,266 ( 0.00%) && is_same(cx, ctxt, lhs0, rhs1) 8,312 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/swap.rs:clippy_lints::swap::is_same (211x) 12 ( 0.00%) && is_same(cx, ctxt, lhs1, rhs0) 588 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/swap.rs:clippy_lints::swap::is_same (2x) . && !is_same(cx, ctxt, lhs1, rhs1) // Ignore a = b; a = a (#10421) . && let Some(lhs_sugg) = match &lhs0 { . ExprOrIdent::Expr(expr) => Sugg::hir_opt(cx, expr), . ExprOrIdent::Ident(ident) => Some(Sugg::NonParen(ident.as_str().into())), . } . && let Some(rhs_sugg) = Sugg::hir_opt(cx, rhs0) . { . let span = first.span.to(rhs1.span); -- line 225 ---------------------------------------- -- line 239 ---------------------------------------- . diag.note(format!("or maybe you should use `{sugg}::mem::replace`?")); . }, . ); . } . } . } . . fn is_same(cx: &LateContext<'_>, ctxt: SyntaxContext, lhs: ExprOrIdent<'_>, rhs: &Expr<'_>) -> bool { 426 ( 0.00%) match lhs { 44 ( 0.00%) ExprOrIdent::Expr(expr) => eq_expr_value(cx, ctxt, expr, rhs), 7,498 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (22x) . ExprOrIdent::Ident(ident) => { 427 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, path)) = rhs.kind 27 ( 0.00%) && let [segment] = &path.segments . && segment.ident == ident . { . true . } else { . false . } . }, . } 191 ( 0.00%) } . . #[derive(Debug, Clone, Copy)] . enum ExprOrIdent<'a> { . Expr(&'a Expr<'a>), . Ident(Ident), . } . . fn parse<'a, 'hir>(stmt: &'a Stmt<'hir>) -> Option<(ExprOrIdent<'hir>, &'a Expr<'hir>)> { 4,372 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind { 1,151 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = expr.kind { . return Some((ExprOrIdent::Expr(lhs), rhs)); . } . } else if let StmtKind::Let(expr) = stmt.kind 2,226 ( 0.00%) && let Some(rhs) = expr.init 4,146 ( 0.00%) && let PatKind::Binding(_, _, ident_l, _) = expr.pat.kind . { . return Some((ExprOrIdent::Ident(ident_l), rhs)); . } . None . } . . /// Implementation of the xor case for `MANUAL_SWAP` lint. . fn check_xor_swap<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . for [s1, s2, s3] in block.stmts.array_windows::<3>() { 495 ( 0.00%) let ctxt = s1.span.ctxt(); 132 ( 0.00%) if let Some((lhs0, rhs0)) = extract_sides_of_xor_assign(s1, ctxt) . && let Some((lhs1, rhs1)) = extract_sides_of_xor_assign(s2, ctxt) . && let Some((lhs2, rhs2)) = extract_sides_of_xor_assign(s3, ctxt) . && eq_expr_value(cx, ctxt, lhs0, rhs1) . && eq_expr_value(cx, ctxt, lhs2, rhs1) . && eq_expr_value(cx, ctxt, lhs1, rhs0) . && eq_expr_value(cx, ctxt, lhs1, rhs2) . && s2.span.ctxt() == ctxt . && s3.span.ctxt() == ctxt -- line 294 ---------------------------------------- -- line 299 ---------------------------------------- . } . } . . /// Returns the lhs and rhs of an xor assignment statement. . fn extract_sides_of_xor_assign<'a, 'hir>( . stmt: &'a Stmt<'hir>, . ctxt: SyntaxContext, . ) -> Option<(&'a Expr<'hir>, &'a Expr<'hir>)> { 990 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 270 ( 0.00%) && let ExprKind::AssignOp( . Spanned { . node: AssignOpKind::BitXorAssign, . .. . }, . lhs, . rhs, . ) = expr.kind . && expr.span.ctxt() == ctxt -- line 316 ---------------------------------------- 21,497 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use rustc_errors::Applicability; . use rustc_hir::{Block, BlockCheckMode, Expr, ExprKind, Node, QPath, UnsafeSource}; . use rustc_lint::LateContext; . use rustc_span::sym; . . use super::USELESS_NONZERO_NEW_UNCHECKED; . 10,248 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'tcx>, args: &[Expr<'_>], msrv: Msrv) { 5,856 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, segment)) = func.kind 592 ( 0.00%) && segment.ident.name == sym::new_unchecked . && let [init_arg] = args . && is_inside_always_const_context(cx.tcx, expr.hir_id) . && cx.typeck_results().node_type(ty.hir_id).is_diag_item(cx, sym::NonZero) . && msrv.meets(cx, msrvs::CONST_UNWRAP) . { . let mut app = Applicability::MachineApplicable; . let ty_str = snippet_with_applicability(cx, ty.span, "_", &mut app); . let msg = format!("`{ty_str}::new()` and `Option::unwrap()` can be safely used in a `const` context"); -- line 23 ---------------------------------------- -- line 51 ---------------------------------------- . // this may no longer be needed for the fixed expression. . span_lint_and_then(cx, USELESS_NONZERO_NEW_UNCHECKED, expr.span, msg, |diagnostic| { . diagnostic . .span_suggestion(expr.span, "use instead", sugg, app) . .note("the fixed expression does not require an `unsafe` context"); . }); . } . } 11,712 ( 0.00%) } 459 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/block_scrutinee.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub BLOCK_SCRUTINEE, . suspicious, . "warns when the scrutinee is wrapped in a block in older editions" . } . . declare_lint_pass!(BlockScrutinee => [BLOCK_SCRUTINEE]); . . impl<'tcx> LateLintPass<'tcx> for BlockScrutinee { 135,970 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 81,582 ( 0.00%) if cx.tcx.sess.edition() >= Edition::Edition2024 { . return; . } . 136,122 ( 0.01%) let (scrutinee, keyword_fallback) = match expr.kind { 2,259 ( 0.00%) ExprKind::Match(scrutinee, _, _) => (scrutinee, "`match`"), 152 ( 0.00%) ExprKind::Let(let_expr) => (let_expr.init, "`if let` / `while let`"), . _ => return, . }; . 2,182 ( 0.00%) if scrutinee.span.from_expansion() || expr.span.from_expansion() { . return; . } . 522 ( 0.00%) if let ExprKind::Block(block, _) = scrutinee.kind 8 ( 0.00%) && matches!(block.rules, BlockCheckMode::DefaultBlock) . && block.stmts.is_empty() . && let Some(inner_expr) = block.expr . { . let inner_snippet = snippet(cx, inner_expr.span, ".."); . . let main_msg = "this scrutinee is wrapped in a block"; . . span_lint_and_then(cx, BLOCK_SCRUTINEE, scrutinee.span, main_msg, |diag| { -- line 59 ---------------------------------------- -- line 102 ---------------------------------------- . vec![ . (outer_span.shrink_to_lo(), format!("let res = {inner_snippet};\n{pad}")), . (scrutinee.span, "res".to_string()), . ], . Applicability::MaybeIncorrect, . ); . }); . } 135,970 ( 0.01%) } . } 1,057 ( 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 { 84 ( 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); 80 ( 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 { 16,047 ( 0.00%) 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: site/frontend/rust-clippy/clippy_lints/src/matches/overlapping_arms.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use core::cmp::Ordering; . use rustc_hir::{Arm, Expr, PatKind, RangeEnd}; . use rustc_lint::LateContext; . use rustc_middle::ty::Ty; . use rustc_span::Span; . . use super::MATCH_OVERLAPPING_ARM; . 1,246 ( 0.00%) pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &'tcx Expr<'_>, arms: &'tcx [Arm<'_>]) { 694 ( 0.00%) if arms.len() >= 2 && cx.typeck_results().expr_ty(ex).is_integral() { 6,760 ( 0.00%) => ???:::expr_ty (169x) 92 ( 0.00%) let ranges = all_ranges(cx, arms, cx.typeck_results().expr_ty(ex)); 920 ( 0.00%) => ???:::expr_ty (23x) 23 ( 0.00%) if !ranges.is_empty() 44 ( 0.00%) && let Some((start, end)) = overlapping(&ranges) . { . span_lint_and_note( . cx, . MATCH_OVERLAPPING_ARM, . start.span, . "some ranges overlap", . Some(end.span), . "overlaps with this", . ); . } . } 1,424 ( 0.00%) } . . /// Gets the ranges for each range pattern arm. Applies `ty` bounds for open ranges. . fn all_ranges<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>], ty: Ty<'tcx>) -> Vec> { . arms.iter() . .filter_map(|arm| { 248 ( 0.00%) if let Arm { pat, guard: None, .. } = *arm { 806 ( 0.00%) if let PatKind::Range(ref lhs, ref rhs, range_end) = pat.kind { 24 ( 0.00%) let lhs_const = if let Some(lhs) = lhs { 84 ( 0.00%) ConstEvalCtxt::new(cx).eval_pat_expr(lhs)? 1,212 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_pat_expr (12x) 672 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (12x) . } else { . Constant::new_numeric_min(cx.tcx, ty)? . }; 24 ( 0.00%) let rhs_const = if let Some(rhs) = rhs { 72 ( 0.00%) ConstEvalCtxt::new(cx).eval_pat_expr(rhs)? 1,212 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_pat_expr (12x) 672 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (12x) . } else { . Constant::new_numeric_max(cx.tcx, ty)? . }; 60 ( 0.00%) let lhs_val = lhs_const.int_value(cx.tcx, ty)?; 216 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::int_value (12x) 60 ( 0.00%) let rhs_val = rhs_const.int_value(cx.tcx, ty)?; 216 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::int_value (12x) . let rhs_bound = match range_end { . RangeEnd::Included => EndBound::Included(rhs_val), . RangeEnd::Excluded => EndBound::Excluded(rhs_val), . }; 156 ( 0.00%) return Some(SpannedRange { 12 ( 0.00%) span: pat.span, . node: (lhs_val, rhs_bound), . }); 12 ( 0.00%) } 300 ( 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:: (12x) . 71 ( 0.00%) if let PatKind::Expr(value) = pat.kind { 284 ( 0.00%) let value = ConstEvalCtxt::new(cx) 3,976 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (71x) 213 ( 0.00%) .eval_pat_expr(value)? 7,168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_pat_expr (71x) 568 ( 0.00%) .int_value(cx.tcx, cx.typeck_results().node_type(pat.hir_id))?; 2,911 ( 0.00%) => ???:::node_type (71x) 1,775 ( 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:: (71x) 1,278 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::int_value (71x) 852 ( 0.00%) return Some(SpannedRange { 71 ( 0.00%) span: pat.span, . node: (value, EndBound::Included(value)), . }); . } . } . None . }) . .collect() . } . 249 ( 0.00%) #[derive(Clone, Copy, Debug, Eq, PartialEq)] . pub enum EndBound { . Included(T), . Excluded(T), . } . . #[derive(Debug, Eq, PartialEq)] . struct SpannedRange { . pub span: Span, -- line 80 ---------------------------------------- -- line 98 ---------------------------------------- . impl PartialOrd for RangeBound<'_, T> { . fn partial_cmp(&self, other: &Self) -> Option { . Some(self.cmp(other)) . } . } . . impl Ord for RangeBound<'_, T> { . fn cmp(&self, RangeBound(other_value, other_kind, _): &Self) -> Ordering { 432 ( 0.00%) let RangeBound(self_value, self_kind, _) = *self; 12,492 ( 0.00%) (self_value, self_kind).cmp(&(*other_value, *other_kind)) . } . } . 22 ( 0.00%) let mut values = Vec::with_capacity(2 * ranges.len()); . . for r @ SpannedRange { node: (start, end), .. } in ranges { 415 ( 0.00%) values.push(RangeBound(*start, BoundKind::Start, r)); 83 ( 0.00%) values.push(match end { . EndBound::Excluded(val) => RangeBound(*val, BoundKind::EndExcluded, r), . EndBound::Included(val) => RangeBound(*val, BoundKind::EndIncluded, r), . }); . } . . values.sort(); . . let mut started = vec![]; . 774 ( 0.00%) for RangeBound(_, kind, range) in values { 332 ( 0.00%) match kind { . BoundKind::Start => started.push(range), . BoundKind::EndExcluded | BoundKind::EndIncluded => { . let mut overlap = None; . . while let Some(last_started) = started.pop() { 166 ( 0.00%) if last_started == range { . break; . } . overlap = Some(last_started); . } . 166 ( 0.00%) if let Some(first_overlapping) = overlap { . return Some((range, first_overlapping)); . } . }, . } . } . . None . } -- line 146 ---------------------------------------- 1,627 ( 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/memchr.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 . } . . /// Returns the first index matching the byte `x` in `text`. . #[inline] . #[must_use] . pub const fn memchr(x: u8, text: &[u8]) -> Option { . // Fast path for small slices. 26,984 ( 0.00%) if text.len() < 2 * USIZE_BYTES { . return memchr_naive(x, text); . } . 38,298 ( 0.00%) memchr_aligned(x, text) 5,247 ( 0.00%) => ???:core::slice::memchr::memchr_aligned (99x) . } . . #[inline] . const fn memchr_naive(x: u8, text: &[u8]) -> Option { . let mut i = 0; . . // FIXME(const-hack): Replace with `text.iter().pos(|c| *c == x)`. 47,734 ( 0.00%) while i < text.len() { 43,311 ( 0.00%) if text[i] == x { . return Some(i); . } . 16,616 ( 0.00%) i += 1; . } . . None . } . . #[rustc_allow_const_fn_unstable(const_eval_select)] // fallback impl has same behavior . const fn memchr_aligned(x: u8, text: &[u8]) -> Option { . // The runtime version behaves the same as the compiletime version, it's -- line 52 ---------------------------------------- 12,192 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/wild_in_or_pats.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_help; . use clippy_utils::{has_non_exhaustive_attr, is_wild}; . use rustc_hir::{Arm, Expr, PatKind}; . use rustc_lint::LateContext; . use rustc_middle::ty; . . use super::WILDCARD_IN_OR_PATTERNS; . 4,240 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, arms: &[Arm<'_>]) { . // first check if we are matching on an enum that has the non_exhaustive attribute 530 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr).peel_refs(); 21,224 ( 0.00%) => ???:::expr_ty (530x) . if let ty::Adt(adt_def, _) = ty.kind() 2,505 ( 0.00%) && has_non_exhaustive_attr(cx.tcx, *adt_def) 552,483 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::has_non_exhaustive_attr (501x) . { . return; . } . for arm in arms { 3,465 ( 0.00%) if let PatKind::Or(fields) = arm.pat.kind . // look for multiple fields in this arm that contains at least one Wild pattern 42 ( 0.00%) && fields.len() > 1 && fields.iter().any(is_wild) . { . span_lint_and_help( . cx, . WILDCARD_IN_OR_PATTERNS, . arm.pat.span, . "wildcard pattern covers any other pattern as it will match anyway", . None, . "consider handling `_` separately", . ); . } . } 4,240 ( 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/zip.rs -------------------------------------------------------------------------------- Ir -- line 62 ---------------------------------------- . /// assert!(iter.next().is_none()); . /// ``` . #[stable(feature = "iter_zip", since = "1.59.0")] . pub fn zip(a: A, b: B) -> Zip . where . A: IntoIterator, . B: IntoIterator, . { 944 ( 0.00%) ZipImpl::new(a.into_iter(), b.into_iter()) . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Zip . where . A: Iterator, . B: Iterator, . { -- line 78 ---------------------------------------- -- line 144 ---------------------------------------- . Self: Iterator + TrustedRandomAccessNoCoerce; . } . . // Work around limitations of specialization, requiring `default` impls to be repeated . // in intermediary impls. . macro_rules! zip_impl_general_defaults { . () => { . default fn new(a: A, b: B) -> Self { 9 ( 0.00%) Zip { . a, . b, . index: 0, // unused . len: 0, // unused . } . } . . #[inline] . default fn next(&mut self) -> Option<(A::Item, B::Item)> { 16 ( 0.00%) let x = self.a.next()?; . let y = self.b.next()?; 210 ( 0.00%) Some((x, y)) . } . . #[inline] . default fn nth(&mut self, n: usize) -> Option { . self.super_nth(n) . } . . #[inline] -- line 172 ---------------------------------------- -- line 287 ---------------------------------------- . . impl ZipImpl for Zip . where . A: TrustedRandomAccess + Iterator, . B: TrustedRandomAccess + Iterator, . { . fn new(a: A, b: B) -> Self { . let len = cmp::min(a.size(), b.size()); 156 ( 0.00%) Zip { a, b, index: 0, len } . } . . #[inline] . fn next(&mut self) -> Option<(A::Item, B::Item)> { 22,163 ( 0.00%) if self.index < self.len { . let i = self.index; . // since get_unchecked executes code which can panic we increment the counters beforehand . // so that the same index won't be accessed twice, as required by TrustedRandomAccess 1,671 ( 0.00%) self.index += 1; . // SAFETY: `i` is smaller than `self.len`, thus smaller than `self.a.len()` and `self.b.len()` . unsafe { 485 ( 0.00%) Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i))) . } . } else { . None . } . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { -- line 315 ---------------------------------------- 8,408 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::intravisit::FnKind; . use rustc_hir::{self as hir, FnDecl, HirId}; . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty::{self, Mutability, Ty}; . use rustc_span::Span; . use rustc_span::def_id::LocalDefId; . 2,982 ( 0.00%) fn check_ty<'a>(cx: &LateContext<'a>, param: &hir::Ty<'a>, param_ty: Ty<'a>, fixes: &mut Vec<(Span, String)>) { 1,176 ( 0.00%) if let ty::Ref(_, opt_ty, Mutability::Not) = param_ty.kind() 524 ( 0.00%) && let Some(gen_ty) = option_arg_ty(cx, *opt_ty) 1,662 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::option_arg_ty (131x) 6 ( 0.00%) && !gen_ty.is_ref() . // Need to gen the original spans, so first parsing mid, and hir parsing afterward 2 ( 0.00%) && let hir::TyKind::Ref(lifetime, hir::MutTy { ty, .. }) = param.kind 10 ( 0.00%) && let hir::TyKind::Path(hir::QPath::Resolved(_, path)) = ty.kind 4 ( 0.00%) && let (Some(first), Some(last)) = (path.segments.first(), path.segments.last()) 6 ( 0.00%) && let Some(hir::GenericArgs { 4 ( 0.00%) args: [hir::GenericArg::Type(opt_ty)], . .. 6 ( 0.00%) }) = last.args 8 ( 0.00%) && !param.span.in_external_macro(cx.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) 10 ( 0.00%) && !is_from_proc_macro(cx, param) 1,106 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (2x) . { 2 ( 0.00%) let lifetime = snippet(cx, lifetime.ident.span, ".."); 12 ( 0.00%) fixes.push(( . param.span, 26 ( 0.00%) format!( . "{}<&{lifetime}{}{}>", 6 ( 0.00%) snippet(cx, first.ident.span.to(last.ident.span), ".."), 276 ( 0.00%) => ???:::to (2x) 10 ( 0.00%) if lifetime.is_empty() { "" } else { " " }, 4 ( 0.00%) snippet(cx, opt_ty.span, "..") . ), . )); . } 3,408 ( 0.00%) } . 1,660 ( 0.00%) fn check_fn_sig<'a>(cx: &LateContext<'a>, decl: &FnDecl<'a>, span: Span, sig: ty::FnSig<'a>) { . let mut fixes = Vec::new(); . // Check function arguments' types 332 ( 0.00%) for (param, param_ty) in decl.inputs.iter().zip(sig.inputs()) { 1,430 ( 0.00%) check_ty(cx, param, *param_ty, &mut fixes); 15,525 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_ty (286x) . } . // Check return type 332 ( 0.00%) if let hir::FnRetTy::Return(ty) = &decl.output { 840 ( 0.00%) check_ty(cx, ty, sig.output(), &mut fixes); 2,398 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_ty (140x) . } 166 ( 0.00%) if !fixes.is_empty() { 20 ( 0.00%) span_lint_and_then( 2,274 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (2x) . cx, . REF_OPTION, . span, . "it is more idiomatic to use `Option<&T>` instead of `&Option`", 8 ( 0.00%) |diag| { . diag.multipart_suggestion("change this to", fixes, Applicability::Unspecified); . }, . ); . } 1,328 ( 0.00%) } . . #[expect(clippy::too_many_arguments)] 24,836 ( 0.00%) pub(crate) fn check_fn<'a>( . cx: &LateContext<'a>, . kind: FnKind<'a>, . decl: &FnDecl<'a>, . span: Span, . hir_id: HirId, . def_id: LocalDefId, . body: &hir::Body<'a>, . avoid_breaking_exported_api: bool, . ) { 12,418 ( 0.00%) if avoid_breaking_exported_api && cx.effective_visibilities.is_exported(def_id) { 98,568 ( 0.01%) => ???:::is_exported (1,774x) . return; . } 600 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) { . return; . } . 600 ( 0.00%) if let FnKind::Closure = kind { . // Compute the span of the closure parameters + return type if set 170 ( 0.00%) let inputs_output_span = if let hir::FnRetTy::Return(out_ty) = &decl.output { . if decl.inputs.is_empty() { . out_ty.span . } else { . span.with_hi(out_ty.span.hi()) . } 144 ( 0.00%) } else if let (Some(first), Some(last)) = (decl.inputs.first(), decl.inputs.last()) { 288 ( 0.00%) first.span.to(last.span) 9,936 ( 0.00%) => ???:::to (72x) . } else { . // No parameters - no point in checking . return; . }; . . // Figure out the signature of the closure 288 ( 0.00%) let ty::Closure(_, args) = cx.typeck_results().expr_ty(body.value).kind() else { 2,880 ( 0.00%) => ???:::expr_ty (72x) . return; . }; . let sig = args.as_closure().sig().skip_binder(); . . if is_from_proc_macro(cx, &(&kind, body, hir_id, span)) { . return; . } . . check_fn_sig(cx, decl, inputs_output_span, sig); 1,290 ( 0.00%) } else if !is_trait_impl_item(cx, hir_id) { 30,041 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (215x) . let sig = cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); . 1,467 ( 0.00%) if is_from_proc_macro(cx, &(&kind, body, hir_id, span)) { . return; . } . 815 ( 0.00%) check_fn_sig(cx, decl, span, sig); . } 14,192 ( 0.00%) } . 220 ( 0.00%) pub(super) fn check_trait_item<'a>( . cx: &LateContext<'a>, . trait_item: &hir::TraitItem<'a>, . avoid_breaking_exported_api: bool, . ) { 66 ( 0.00%) if !trait_item.span.in_external_macro(cx.sess().source_map()) 44 ( 0.00%) && let hir::TraitItemKind::Fn(ref sig, _) = trait_item.kind 126 ( 0.00%) && !(avoid_breaking_exported_api && cx.effective_visibilities.is_exported(trait_item.owner_id.def_id)) 1,011 ( 0.00%) => ???:::is_exported (18x) 6 ( 0.00%) && !is_from_proc_macro(cx, trait_item) . { 6 ( 0.00%) let def_id = trait_item.owner_id.def_id; . let ty_sig = cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); 12 ( 0.00%) check_fn_sig(cx, sig.decl, sig.span, ty_sig); 352 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn_sig (3x) . } 176 ( 0.00%) } 2,083 ( 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/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. 6,456 ( 0.00%) __rust_no_alloc_shim_is_unstable_v2(); 7 ( 0.00%) => ???:std::exception::~exception() (7x) . 109,724 ( 0.01%) __rust_alloc(layout.size(), layout.alignment()) 245 ( 0.00%) => ???:__rustc::__rust_alloc (7x) . } . } . . /// 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) { 119,219 ( 0.01%) unsafe { __rust_dealloc(ptr, layout.size(), layout.alignment()) } 190 ( 0.00%) => ???:__rustc::__rdl_dealloc (5x) . } . . /// 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 { 7,175 ( 0.00%) unsafe { __rust_realloc(ptr, layout.size(), layout.alignment(), new_size) } 58,633 ( 0.00%) => ???:__rustc::__rust_realloc (220x) . } . . /// 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 276 ---------------------------------------- . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 { . unsafe { . // Make sure we don't accidentally allow omitting the allocator shim in . // stable code until it is actually stabilized. . __rust_no_alloc_shim_is_unstable_v2(); . 4 ( 0.00%) __rust_alloc_zeroed(layout.size(), layout.alignment()) 90 ( 0.00%) => ???:__rustc::__rust_alloc_zeroed (1x) . } . } . . 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> { 16,482 ( 0.00%) match layout.size() { . 0 => Ok(layout.dangling_ptr().cast_slice(0)), . // SAFETY: `layout` is non-zero in size, . size => unsafe { 8,248 ( 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) { 12,761 ( 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 ---------------------------------------- 77,354 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs -------------------------------------------------------------------------------- Ir -- line 57 ---------------------------------------- . impl UnnestedOrPatterns { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for UnnestedOrPatterns { . fn check_arm(&mut self, cx: &EarlyContext<'_>, a: &ast::Arm) { 3,148 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 18,888 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (787x) 4,722 ( 0.00%) lint_unnested_or_patterns(cx, &a.pat); 619,178 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (787x) . } . } . . fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { 111,340 ( 0.01%) if self.msrv.meets(msrvs::OR_PATTERNS) 534,432 ( 0.03%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (22,268x) . && let ast::ExprKind::Let(pat, _, _, _) = &e.kind . { 228 ( 0.00%) lint_unnested_or_patterns(cx, pat); 74,056 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (76x) . } . } . . fn check_param(&mut self, cx: &EarlyContext<'_>, p: &ast::Param) { 7,984 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 47,904 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1,996x) 5,988 ( 0.00%) lint_unnested_or_patterns(cx, &p.pat); 58,236 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (1,996x) . } . } . . fn check_local(&mut self, cx: &EarlyContext<'_>, l: &ast::Local) { 2,604 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 15,624 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (651x) 1,953 ( 0.00%) lint_unnested_or_patterns(cx, &l.pat); 55,077 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (651x) . } . } . . extract_msrv_attr!(); . } . 17,550 ( 0.00%) fn lint_unnested_or_patterns(cx: &EarlyContext<'_>, pat: &Pat) { 29,712 ( 0.00%) if let Ident(.., None) | Expr(_) | Wild | Path(..) | Range(..) | Rest | MacCall(_) = pat.kind { . // This is a leaf pattern, so cloning is unprofitable. . return; . } . . let mut pat = pat.clone(); . . // Nix all the paren patterns everywhere so that they aren't in our way. . remove_all_parens(&mut pat); . . // Transform all unnested or-patterns into nested ones, and if there were none, quit. 1,398 ( 0.00%) if !unnest_or_patterns(&mut pat) { . return; . } . . span_lint_and_then(cx, UNNESTED_OR_PATTERNS, pat.span, "unnested or-patterns", |db| { . insert_necessary_parens(&mut pat); . db.span_suggestion_verbose( . pat.span, . "nest the patterns", . pprust::pat_to_string(&pat), . Applicability::MachineApplicable, . ); . }); 21,060 ( 0.00%) } . . /// Remove all `(p)` patterns in `pat`. . fn remove_all_parens(pat: &mut Pat) { . #[derive(Default)] . struct Visitor { . /// If is not in the outer most pattern. This is needed to avoid removing the outermost . /// parens because top-level or-patterns are not allowed in let statements. . is_inner: bool, . } . . impl MutVisitor for Visitor { . fn visit_pat(&mut self, pat: &mut Pat) { . let is_inner = mem::replace(&mut self.is_inner, true); . walk_pat(self, pat); 4,100 ( 0.00%) let inner = match &mut pat.kind { 1 ( 0.00%) Paren(i) if is_inner => mem::replace(&mut i.kind, Wild), . _ => return, . }; 2 ( 0.00%) pat.kind = inner; 86 ( 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:: (1x) . } . } . Visitor::default().visit_pat(pat); . } . . /// Insert parens where necessary according to Rust's precedence rules for patterns. . fn insert_necessary_parens(pat: &mut Pat) { . struct Visitor; -- line 145 ---------------------------------------- -- line 167 ---------------------------------------- . . /// Unnest or-patterns `p0 | ... | p1` in the pattern `pat`. . /// For example, this would transform `Some(0) | FOO | Some(2)` into `Some(0 | 2) | FOO`. . fn unnest_or_patterns(pat: &mut Pat) -> bool { . struct Visitor { . changed: bool, . } . impl MutVisitor for Visitor { 17,073 ( 0.00%) fn visit_pat(&mut self, p: &mut Pat) { . // This is a bottom up transformation, so recurse first. . walk_pat(self, p); . . // Don't have an or-pattern? Just quit early on. 3,794 ( 0.00%) let Or(alternatives) = &mut p.kind else { return }; . . // Collapse or-patterns directly nested in or-patterns. . let mut idx = 0; . let mut this_level_changed = false; 807 ( 0.00%) while idx < alternatives.len() { 382 ( 0.00%) let inner = if let Or(ps) = &mut alternatives[idx].kind { . mem::take(ps) . } else { 191 ( 0.00%) idx += 1; . continue; . }; . this_level_changed = true; . alternatives.splice(idx..=idx, inner); . } . . // Focus on `p_n` and then try to transform all `p_i` where `i > n`. . let mut focus_idx = 0; 421 ( 0.00%) while focus_idx < alternatives.len() { 191 ( 0.00%) this_level_changed |= transform_with_focus_on_idx(alternatives, focus_idx); . focus_idx += 1; . } 117 ( 0.00%) self.changed |= this_level_changed; . . // Deal with `Some(Some(0)) | Some(Some(1))`. 117 ( 0.00%) if this_level_changed { . walk_pat(self, p); . } 15,176 ( 0.00%) } . } . 2,097 ( 0.00%) let mut visitor = Visitor { changed: false }; 699 ( 0.00%) visitor.visit_pat(pat); 191,569 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat (699x) . visitor.changed . } . . /// Match `$scrutinee` against `$pat` and extract `$then` from it. . /// Panics if there is no match. . macro_rules! always_pat { . ($scrutinee:expr, $pat:pat => $then:expr) => { . match $scrutinee { -- line 220 ---------------------------------------- -- line 224 ---------------------------------------- . }; . } . . /// Focus on `focus_idx` in `alternatives`, . /// attempting to extend it with elements of the same constructor `C` . /// in `alternatives[focus_idx + 1..]`. . fn transform_with_focus_on_idx(alternatives: &mut ThinVec, focus_idx: usize) -> bool { . // Extract the kind; we'll need to make some changes in it. 764 ( 0.00%) let mut focus_kind = mem::replace(&mut alternatives[focus_idx].kind, Wild); . // We'll focus on `alternatives[focus_idx]`, . // so we're draining from `alternatives[focus_idx + 1..]`. 382 ( 0.00%) let start = focus_idx + 1; . . // We're trying to find whatever kind (~"constructor") we found in `alternatives[start..]`. 1,528 ( 0.00%) let changed = match &mut focus_kind { . Missing => unreachable!(), . // These pattern forms are "leafs" and do not have sub-patterns. . // Therefore they are not some form of constructor `C`, . // with which a pattern `C(p_0)` may be formed, . // which we would want to join with other `C(p_j)`s. . Ident(.., None) | Expr(_) | Wild | Err(_) | Never | Path(..) | Range(..) | Rest | MacCall(_) . // Skip immutable refs, as grouping them saves few characters, . // and almost always requires adding parens (increasing noisiness). -- line 246 ---------------------------------------- -- line 287 ---------------------------------------- . Tuple(ps1) => extend_with_matching_product( . ps1, start, alternatives, . |k, ps1, idx| matches!(k, Tuple(ps2) if eq_pre_post(ps1, ps2, idx)), . |k| always_pat!(k, Tuple(ps) => ps), . ), . // Transform `S(pre, x, post) | ... | S(pre, y, post)` into `S(pre, x | y, post)`. . TupleStruct(qself1, path1, ps1) => extend_with_matching_product( . ps1, start, alternatives, 996 ( 0.00%) |k, ps1, idx| matches!( . k, . TupleStruct(qself2, path2, ps2) 1,494 ( 0.00%) if eq_maybe_qself(qself1.as_deref(), qself2.as_deref()) 2,970 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/mod.rs:clippy_utils::ast_utils::eq_maybe_qself (495x) 1,992 ( 0.00%) && eq_path(path1, path2) && eq_pre_post(ps1, ps2, idx) 19,305 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/mod.rs:clippy_utils::ast_utils::eq_path (495x) . ), . |k| always_pat!(k, TupleStruct(_, _, ps) => ps), . ), . // Transform a record pattern `S { fp_0, ..., fp_n }`. . Struct(qself1, path1, fps1, rest1) => { . extend_with_struct_pat(qself1.as_deref(), path1, fps1, *rest1, start, alternatives) . }, . }; . 3,629 ( 0.00%) alternatives[focus_idx].kind = focus_kind; 3,384 ( 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:: (188x) . changed . } . . /// Here we focusing on a record pattern `S { fp_0, ..., fp_n }`. . /// In particular, for a record pattern, the order in which the field patterns is irrelevant. . /// So when we fixate on some `ident_k: pat_k`, we try to find `ident_k` in the other pattern . /// and check that all `fp_i` where `i ∈ ((0...n) \ k)` between two patterns are equal. . fn extend_with_struct_pat( -- line 317 ---------------------------------------- -- line 364 ---------------------------------------- . fn extend_with_matching_product( . targets: &mut [Pat], . start: usize, . alternatives: &mut ThinVec, . predicate: impl Fn(&PatKind, &[Pat], usize) -> bool, . extract: impl Fn(PatKind) -> ThinVec, . ) -> bool { . (0..targets.len()).any(|idx| { 102 ( 0.00%) let tail_or = drain_matching( . start, . alternatives, 2,604 ( 0.00%) |k| predicate(k, targets, idx), . |k| extract(k).swap_remove(idx), . ); 714 ( 0.00%) extend_with_tail_or(&mut targets[idx], tail_or) 1,881 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::extend_with_tail_or (99x) . }) . } . . /// Extract the pattern from the given one and replace it with `Wild`. . /// This is meant for temporarily swapping out the pattern for manipulation. . fn take_pat(from: &mut Pat) -> Pat { . let dummy = Pat { . id: DUMMY_NODE_ID, -- line 386 ---------------------------------------- -- line 387 ---------------------------------------- . kind: Wild, . span: DUMMY_SP, . }; . mem::replace(from, dummy) . } . . /// Extend `target` as an or-pattern with the alternatives . /// in `tail_or` if there are any and return if there were. 612 ( 0.00%) fn extend_with_tail_or(target: &mut Pat, tail_or: ThinVec) -> bool { . fn extend(target: &mut Pat, mut tail_or: ThinVec) { . // On an existing or-pattern in the target, append to it, . // otherwise convert the target to an or-pattern. . if let Or(ps) = &mut target.kind { . ps.append(&mut tail_or); . } else { . let mut init_or = thin_vec![take_pat(target)]; . init_or.append(&mut tail_or); . target.kind = Or(init_or); . } . } . . let changed = !tail_or.is_empty(); 102 ( 0.00%) if changed { . // Extend the target. . extend(target, tail_or); . } . changed 612 ( 0.00%) } . . // Extract all inner patterns in `alternatives` matching our `predicate`. . // Only elements beginning with `start` are considered for extraction. . fn drain_matching( . start: usize, . alternatives: &mut ThinVec, . predicate: impl Fn(&PatKind) -> bool, . extract: impl Fn(PatKind) -> Pat, . ) -> ThinVec { . let mut tail_or = ThinVec::new(); 102 ( 0.00%) let mut idx = 0; . 1,224 ( 0.00%) for pat in alternatives.extract_if(.., |p| { . // Check if we should extract, but only if `idx >= start`. 3,288 ( 0.00%) idx += 1; 2,690 ( 0.00%) idx > start && predicate(&p.kind) . }) { . tail_or.push(extract(pat.kind)); . } . 102 ( 0.00%) tail_or . } . . fn extend_with_matching( . target: &mut Pat, . start: usize, . alternatives: &mut ThinVec, . predicate: impl Fn(&PatKind) -> bool, . extract: impl Fn(PatKind) -> Pat, -- line 443 ---------------------------------------- 85,740 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/formatting.rs -------------------------------------------------------------------------------- Ir -- line 141 ---------------------------------------- . POSSIBLE_MISSING_COMMA, . POSSIBLE_MISSING_ELSE, . SUSPICIOUS_ASSIGNMENT_FORMATTING, . SUSPICIOUS_ELSE_FORMATTING, . SUSPICIOUS_UNARY_OP_FORMATTING, . ]); . . impl EarlyLintPass for Formatting { 21,688 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . for w in block.stmts.windows(2) { 3,526 ( 0.00%) if let (StmtKind::Expr(first), StmtKind::Expr(second) | StmtKind::Semi(second)) = (&w[0].kind, &w[1].kind) { 344 ( 0.00%) check_missing_else(cx, first, second); . } . } 21,688 ( 0.00%) } . 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . check_assign(cx, expr); . check_unop(cx, expr); . check_else(cx, expr); . check_array(cx, expr); 178,144 ( 0.01%) } . } . . /// Implementation of the `SUSPICIOUS_ASSIGNMENT_FORMATTING` lint. . fn check_assign(cx: &EarlyContext<'_>, expr: &Expr) { 66,804 ( 0.00%) if let ExprKind::Assign(ref lhs, ref rhs, _) = expr.kind 492 ( 0.00%) && !lhs.span.from_expansion() 423 ( 0.00%) && !rhs.span.from_expansion() . { 564 ( 0.00%) let eq_span = lhs.span.between(rhs.span); 15,087 ( 0.00%) => ???:::between (141x) 282 ( 0.00%) if let ExprKind::Unary(op, ref sub_rhs) = rhs.kind . && let Some(eq_snippet) = snippet_opt(cx, eq_span) . { . let op = op.as_str(); . let eqop_span = lhs.span.between(sub_rhs.span); . if eq_snippet.ends_with('=') { . span_lint_and_note( . cx, . SUSPICIOUS_ASSIGNMENT_FORMATTING, -- line 180 ---------------------------------------- -- line 188 ---------------------------------------- . ); . } . } . } . } . . /// Implementation of the `SUSPICIOUS_UNARY_OP_FORMATTING` lint. . fn check_unop(cx: &EarlyContext<'_>, expr: &Expr) { 44,208 ( 0.00%) if let ExprKind::Binary(ref binop, ref lhs, ref rhs) = expr.kind 2,208 ( 0.00%) && !lhs.span.from_expansion() && !rhs.span.from_expansion() . // span between BinOp LHS and RHS 1,416 ( 0.00%) && let binop_span = lhs.span.between(rhs.span) 37,878 ( 0.00%) => ???:::between (354x) . // if RHS is an UnOp 750 ( 0.00%) && let ExprKind::Unary(op, ref un_rhs) = rhs.kind . // from UnOp operator to UnOp operand 210 ( 0.00%) && let unop_operand_span = rhs.span.until(un_rhs.span) 4,368 ( 0.00%) => ???:::until (42x) 84 ( 0.00%) && let Some(binop_snippet) = snippet_opt(cx, binop_span) 84 ( 0.00%) && let Some(unop_operand_snippet) = snippet_opt(cx, unop_operand_span) 126 ( 0.00%) && let binop_str = binop.node.as_str() . // no space after BinOp operator and space after UnOp operator 42 ( 0.00%) && binop_snippet.ends_with(binop_str) && unop_operand_snippet.ends_with(' ') . { . let unop_str = op.as_str(); . let eqop_span = lhs.span.between(un_rhs.span); . span_lint_and_help( . cx, . SUSPICIOUS_UNARY_OP_FORMATTING, . eqop_span, . format!( -- line 216 ---------------------------------------- -- line 220 ---------------------------------------- . None, . format!("put a space between `{binop_str}` and `{unop_str}` and remove the space after `{unop_str}`"), . ); . } . } . . /// Implementation of the `SUSPICIOUS_ELSE_FORMATTING` lint for weird `else`. . fn check_else(cx: &EarlyContext<'_>, expr: &Expr) { 44,713 ( 0.00%) if let ExprKind::If(_, then, Some(else_)) = &expr.kind 360 ( 0.00%) && (is_block(else_) || is_if(else_)) 970 ( 0.00%) && !then.span.from_expansion() && !else_.span.from_expansion() 776 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . . // workaround for rust-lang/rust#43081 776 ( 0.00%) && expr.span.lo().0 != 0 && expr.span.hi().0 != 0 . . // this will be a span from the closing ‘}’ of the “then” block (excluding) to . // the “if” of the “else if” block (excluding) 776 ( 0.00%) && let else_span = then.span.between(else_.span) 20,758 ( 0.00%) => ???:::between (194x) . . // the snippet should look like " else \n " with maybe comments anywhere . // it’s bad when there is a ‘\n’ after the “else” 1,552 ( 0.00%) && let Some(else_snippet) = snippet_opt(cx, else_span) 83,032 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::snippet_opt::<&rustc_lint::context::EarlyContext> (194x) 1,552 ( 0.00%) && let Some((pre_else, post_else)) = else_snippet.split_once("else") 71,974 ( 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:::split_once::<&str> (194x) 388 ( 0.00%) && !else_snippet.contains('/') 1,164 ( 0.00%) && let Some((_, post_else_post_eol)) = post_else.split_once('\n') 8,536 ( 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:::split_once:: (194x) . { . // Allow allman style braces `} \n else \n {` . if is_block(else_) . && let Some((_, pre_else_post_eol)) = pre_else.split_once('\n') . // Exactly one eol before and after the else . && !pre_else_post_eol.contains('\n') . && !post_else_post_eol.contains('\n') . { -- line 253 ---------------------------------------- -- line 282 ---------------------------------------- . } . . fn indentation(cx: &EarlyContext<'_>, span: Span) -> usize { . cx.sess().source_map().lookup_char_pos(span.lo()).col.0 . } . . /// Implementation of the `POSSIBLE_MISSING_COMMA` lint for array . fn check_array(cx: &EarlyContext<'_>, expr: &Expr) { 42,598 ( 0.00%) if let ExprKind::Array(ref array) = expr.kind { . for element in array { 393 ( 0.00%) if let ExprKind::Binary(ref op, ref lhs, _) = element.kind . && has_unary_equivalent(op.node) . && lhs.span.eq_ctxt(op.span) . && let space_span = lhs.span.between(op.span) . && let Some(space_snippet) = snippet_opt(cx, space_span) . && let lint_span = lhs.span.with_lo(lhs.span.hi()) . && space_snippet.contains('\n') . && indentation(cx, op.span) <= indentation(cx, lhs.span) . { -- line 300 ---------------------------------------- -- line 307 ---------------------------------------- . "to remove this lint, add a comma or write the expr in a single line", . ); . } . } . } . } . . fn check_missing_else(cx: &EarlyContext<'_>, first: &Expr, second: &Expr) { 860 ( 0.00%) if !first.span.from_expansion() && !second.span.from_expansion() . && matches!(first.kind, ExprKind::If(..)) 321 ( 0.00%) && (is_block(second) || is_if(second)) . . // Proc-macros can give weird spans. Make sure this is actually an `if`. 75 ( 0.00%) && is_span_if(cx, first.span) . . // If there is a line break between the two expressions, don't lint. . // If there is a non-whitespace character, this span came from a proc-macro. 125 ( 0.00%) && let else_span = first.span.between(second.span) 2,675 ( 0.00%) => ???:::between (25x) 125 ( 0.00%) && let Some(else_snippet) = snippet_opt(cx, else_span) 100 ( 0.00%) && !else_snippet.chars().any(|c| c == '\n' || !c.is_whitespace()) . { . let (looks_like, next_thing) = if is_if(second) { . ("an `else if`", "the second `if`") . } else { . ("an `else {..}`", "the next block") . }; . . span_lint_and_note( -- line 334 ---------------------------------------- -- line 338 ---------------------------------------- . format!("this looks like {looks_like} but the `else` is missing"), . None, . format!("to remove this lint, add the missing `else` or add a new line before {next_thing}"), . ); . } . } . . fn is_block(expr: &Expr) -> bool { 602 ( 0.00%) matches!(expr.kind, ExprKind::Block(..)) . } . . /// Check if the expression is an `if` or `if let` . fn is_if(expr: &Expr) -> bool { . matches!(expr.kind, ExprKind::If(..)) . } 2,854 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unused_rounding.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . pub UNUSED_ROUNDING, . nursery, . "Uselessly rounding a whole number floating-point literal" . } . . declare_lint_pass!(UnusedRounding => [UNUSED_ROUNDING]); . . fn is_useless_rounding(cx: &EarlyContext<'_>, expr: &Expr) -> Option<(Symbol, String)> { 44,536 ( 0.00%) if let ExprKind::MethodCall(MethodCall { . seg: name_ident, . receiver, . .. . }) = &expr.kind 2,680 ( 0.00%) && let method_name = name_ident.ident.name 16,080 ( 0.00%) && matches!(method_name, sym::ceil | sym::floor | sym::round) . && let ExprKind::Lit(token_lit) = &receiver.kind . && token_lit.is_semantic_float() . && let Ok(f) = token_lit.symbol.as_str().replace('_', "").parse::() . && f.fract() == 0.0 . { . Some((method_name, snippet(cx, receiver.span, "..").into())) . } else { . None . } . } . . impl EarlyLintPass for UnusedRounding { 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 2,680 ( 0.00%) if let Some((method_name, float)) = is_useless_rounding(cx, expr) { . span_lint_and_sugg( . cx, . UNUSED_ROUNDING, . expr.span, . format!("used the `{method_name}` method with a whole number float"), . format!("remove the `{method_name}` method call"), . float, . Applicability::MachineApplicable, . ); . } 178,144 ( 0.01%) } . } 2,680 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs -------------------------------------------------------------------------------- Ir -- line 70 ---------------------------------------- . . // SAFETY: Buckets must be managed solely by functions here (i.e., get/put on SlotIndex) and . // `self` comes from SlotIndex::from_index . #[inline] . unsafe fn get(&self, buckets: &[AtomicPtr>; 21]) -> Option<(V, u32)> { . let bucket = &buckets[self.bucket_idx]; . let ptr = bucket.load(Ordering::Acquire); . // Bucket is not yet initialized: then we obviously won't find this entry in that bucket. 46,991 ( 0.00%) if ptr.is_null() { . return None; . } . debug_assert!(self.index_in_bucket < self.bucket_idx.capacity()); . // SAFETY: `bucket` was allocated (so <= isize in total bytes) to hold `entries`, so this . // must be inbounds. . let slot = unsafe { ptr.add(self.index_in_bucket) }; . . // SAFETY: initialized bucket has zeroed all memory within the bucket, so we are valid for . // AtomicU32 access. . let index_and_lock = unsafe { &(*slot).index_and_lock }; . let current = index_and_lock.load(Ordering::Acquire); 93,962 ( 0.01%) let index = match current { . 0 => return None, . // Treat "initializing" as actually just not initialized at all. . // The only reason this is a separate state is that `complete` calls could race and . // we can't allow that, but from load perspective there's no difference. . 1 => return None, 45,934 ( 0.00%) _ => current - 2, . }; . . // SAFETY: . // * slot is a valid pointer (buckets are always valid for the index we get). . // * value is initialized since we saw a >= 2 index above. . // * `V: Copy`, so safe to read. 32,608 ( 0.00%) let value = unsafe { (*slot).value }; . Some((value, index)) . } . . fn bucket_ptr(&self, bucket: &AtomicPtr>) -> *mut Slot { . let ptr = bucket.load(Ordering::Acquire); . if ptr.is_null() { Self::initialize_bucket(bucket, self.bucket_idx) } else { ptr } . } . -- line 111 ---------------------------------------- -- line 293 ---------------------------------------- . V: Copy, . I: Idx + Copy, . { . #[inline(always)] . pub fn lookup(&self, key: &K) -> Option<(V, I)> { . let key = u32::try_from(key.index()).unwrap(); . let slot_idx = SlotIndex::from_index(key); . match unsafe { slot_idx.get(&self.buckets) } { 23,874 ( 0.00%) Some((value, idx)) => Some((value, I::new(idx as usize))), 19 ( 0.00%) None => None, . } 385 ( 0.00%) } . . #[inline] . pub fn complete(&self, key: K, value: V, index: I) { . let key = u32::try_from(key.index()).unwrap(); . let slot_idx = SlotIndex::from_index(key); . if slot_idx.put(&self.buckets, value, index.index() as u32) { . let present_idx = self.len.fetch_add(1, Ordering::Relaxed); . let slot = SlotIndex::from_index(u32::try_from(present_idx).unwrap()); -- line 312 ---------------------------------------- -- line 444 ---------------------------------------- . #[inline(always)] . const fn from_flat_index(flat: usize) -> (Self, usize) { . if flat > u32::MAX as usize { . panic!(); . } . . // If the index is in bucket 0, the conversion is trivial. . // This also avoids calling `ilog2` when `flat == 0`. 94,251 ( 0.01%) if flat < Self::BUCKET_0_CAPACITY { . return (Self::Bucket00, flat); . } . . // General-case conversion for a non-zero bucket index. . // . // | bucket | slot . // flat | ilog2 | index | offset . // ------------------------------ . // 4096 | 12 | 1 | 0 . // 4097 | 12 | 1 | 1 . // ... . // 8191 | 12 | 1 | 4095 . // 8192 | 13 | 2 | 0 . let highest_bit_pos = flat.ilog2() as usize; . let bucket_index = 30,950 ( 0.00%) BucketIndex::from_raw(highest_bit_pos - Self::NONZERO_BUCKET_SHIFT_ADJUST); . . // Clear the highest-set bit (which selects the bucket) to get the . // slot offset within this bucket. 46,082 ( 0.00%) let slot_offset = flat - (1 << highest_bit_pos); . . (bucket_index, slot_offset) . } . . #[inline(always)] . fn iter_all() -> impl ExactSizeIterator { . (0usize..BUCKETS).map(BucketIndex::from_raw) . } -- line 480 ---------------------------------------- 87,228 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/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 { 42,416 ( 0.00%) 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 ---------------------------------------- 8 ( 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 144 ---------------------------------------- . pub(crate) struct GenericShunt<'a, I, R> { . iter: I, . residual: &'a mut Option, . } . . /// Process the given iterator as if it yielded the item's `Try::Output` . /// type instead. Any `Try::Residual`s encountered will stop the inner iterator . /// and be propagated back to the overall result. 306 ( 0.00%) pub(crate) fn try_process(iter: I, mut f: F) -> ChangeOutputType . 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 . 4,153 ( 0.00%) let mut residual = None; . let shunt = GenericShunt { iter, residual: &mut residual }; . let value = f(shunt); 8,306 ( 0.00%) match residual { . Some(r) => FromResidual::from_residual(r), 12,304 ( 0.00%) None => Try::from_output(value), . } 357 ( 0.00%) } . . impl Iterator for GenericShunt<'_, I, R> . where . I: Iterator>, . { . type Item = ::Output; . 79,174 ( 0.00%) fn next(&mut self) -> Option { . self.try_for_each(ControlFlow::Break).break_value() 71,262 ( 0.00%) } . . fn size_hint(&self) -> (usize, Option) { . if self.residual.is_some() { . (0, Some(0)) . } else { . let (_, upper) = self.iter.size_hint(); . (0, upper) . } -- line 186 ---------------------------------------- -- line 187 ---------------------------------------- . } . . fn try_fold(&mut self, init: B, mut f: F) -> T . where . F: FnMut(B, Self::Item) -> T, . T: Try, . { . self.iter 12 ( 0.00%) .try_fold(init, |acc, x| match Try::branch(x) { . ControlFlow::Continue(x) => ControlFlow::from_try(f(acc, x)), . ControlFlow::Break(r) => { 59 ( 0.00%) *self.residual = Some(r); . ControlFlow::Break(try { acc }) 6 ( 0.00%) } . }) . .into_try() . } . . impl_fold_via_try_fold! { fold -> try_fold } . } . . #[unstable(issue = "none", feature = "inplace_iteration")] -- line 208 ---------------------------------------- 57 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_field_names.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . impl RedundantFieldNames { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for RedundantFieldNames { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 44,536 ( 0.00%) if let ExprKind::Struct(ref se) = expr.kind 2,388 ( 0.00%) && self.msrv.meets(msrvs::FIELD_INIT_SHORTHAND) 14,328 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (597x) . { 597 ( 0.00%) for field in &se.fields { 2,178 ( 0.00%) if !field.is_shorthand 2,758 ( 0.00%) && let ExprKind::Path(None, path) = &field.expr.kind 100 ( 0.00%) && let [segment] = path.segments.as_slice() 43 ( 0.00%) && segment.args.is_none() . && segment.ident == field.ident . && field.span.eq_ctxt(field.ident.span) . && !field.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( . cx, . REDUNDANT_FIELD_NAMES, . field.span, -- line 67 ---------------------------------------- -- line 68 ---------------------------------------- . "redundant field names in struct initialization", . "replace it with", . field.ident.to_string(), . Applicability::MachineApplicable, . ); . } . } . } 22,268 ( 0.00%) } . . extract_msrv_attr!(); . } 9,552 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/panicking_overflow_checks.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . correctness, . "overflow checks which will panic in debug mode" . } . . declare_lint_pass!(PanickingOverflowChecks => [PANICKING_OVERFLOW_CHECKS]); . . impl<'tcx> LateLintPass<'tcx> for PanickingOverflowChecks { . // a + b < a, a > a + b, a < a - b, a - b > a 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 55,916 ( 0.00%) if let ExprKind::Binary(op, lhs, rhs) = expr.kind 1,120 ( 0.00%) && let (lt, gt) = match op.node { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . } 22 ( 0.00%) && let ctxt = expr.span.ctxt() 88 ( 0.00%) && let (op_lhs, op_rhs, other, commutative) = match (<.kind, >.kind) { . (&ExprKind::Binary(op, lhs, rhs), _) if op.node == BinOpKind::Add && ctxt == lt.span.ctxt() => { . (lhs, rhs, gt, true) . }, . (_, &ExprKind::Binary(op, lhs, rhs)) if op.node == BinOpKind::Sub && ctxt == gt.span.ctxt() => { . (lhs, rhs, lt, false) . }, . _ => return, . } -- line 68 ---------------------------------------- -- line 76 ---------------------------------------- . { . span_lint( . cx, . PANICKING_OVERFLOW_CHECKS, . expr.span, . "you are trying to use classic C overflow conditions that will fail in Rust", . ); . } 217,552 ( 0.01%) } . } 132 ( 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/num/uint_macros.rs -------------------------------------------------------------------------------- Ir -- line 146 ---------------------------------------- . /// ``` . #[doc = concat!("[`ilog2`]: ", stringify!($SelfT), "::ilog2")] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn leading_zeros(self) -> u32 { 4,588 ( 0.00%) return intrinsics::ctlz(self as $ActualT); . } . . /// Returns the number of trailing zeros in the binary representation . /// of `self`. . /// . /// # Examples . /// . /// ``` -- line 162 ---------------------------------------- -- line 170 ---------------------------------------- . #[doc = concat!("assert_eq!(max.trailing_zeros(), 0);")] . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_math", since = "1.32.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline(always)] . pub const fn trailing_zeros(self) -> u32 { 3,040 ( 0.00%) return intrinsics::cttz(self); . } . . /// Returns the number of leading ones in the binary representation of `self`. . /// . /// # Examples . /// . /// ``` . #[doc = concat!("let n = !(", stringify!($SelfT), "::MAX >> 2);")] -- line 186 ---------------------------------------- -- line 890 ---------------------------------------- . pub const fn checked_add(self, rhs: Self) -> Option { . // This used to use `overflowing_add`, but that means it ends up being . // a `wrapping_add`, losing some optimization opportunities. Notably, . // phrasing it this way helps `.checked_add(1)` optimize to a check . // against `MAX` and a `add nuw`. . // Per , . // LLVM is happy to re-form the intrinsic later if useful. . 17,983 ( 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 { 13,814 ( 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. . 22,078 ( 0.00%) if self < rhs { . None . } else { . // SAFETY: just checked this can't overflow 12,287 ( 0.00%) Some(unsafe { intrinsics::unchecked_sub(self, rhs) }) . } . } . . /// Strict integer subtraction. Computes `self - rhs`, panicking if . /// overflow occurred. . /// . /// # Panics . /// -- line 1064 ---------------------------------------- -- line 1144 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_sub(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 4 ( 0.00%) intrinsics::unchecked_sub(self, rhs) . } . } . . /// Checked subtraction with a signed integer. Computes `self - rhs`, . /// returning `None` if overflow occurred. . /// . /// # Examples . /// -- line 1160 ---------------------------------------- -- line 1353 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_mul(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 46,090 ( 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 { 3,651 ( 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 2492 ---------------------------------------- . #[doc = concat!("assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);")] . /// ``` . #[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_sub(self, rhs: Self) -> Self { 13,400 ( 0.00%) intrinsics::saturating_sub(self, rhs) . } . . /// Saturating integer subtraction. Computes `self` - `rhs`, saturating at . /// the numeric bounds instead of overflowing. . /// . /// # Examples . /// . /// ``` -- line 2508 ---------------------------------------- -- 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 { 42,125 ( 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 { 17,451 ( 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 { 73,877 ( 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 2942 ---------------------------------------- . #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, 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_add(self, rhs: Self) -> (Self, bool) { 29 ( 0.00%) let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); . (a as Self, b) . } . . /// Calculates `self` + `rhs` + `carry` and returns a tuple containing . /// the sum and the output carry (in that order). . /// . /// Performs "ternary addition" of two integer operands and a carry-in . /// bit, and returns an output integer and a carry-out bit. This allows -- line 2958 ---------------------------------------- -- 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) { 94,883 ( 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 3858 ---------------------------------------- . // 8u8.one_less_than_next_power_of_two() == 7 . // 6u8.one_less_than_next_power_of_two() == 7 . // . // 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 { 72 ( 0.00%) if self <= 1 { return 0; } . 42 ( 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. 21 ( 0.00%) let z = unsafe { intrinsics::ctlz_nonzero(p) }; 42 ( 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 3889 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_int_pow", since = "1.50.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline] . #[rustc_inherit_overflow_checks] . pub const fn next_power_of_two(self) -> Self { 4 ( 0.00%) self.one_less_than_next_power_of_two() + 1 . } . . /// Returns the smallest power of two greater than or equal to `self`. If . /// the next power of two is greater than the type's maximum value, . /// `None` is returned, otherwise the power of two is wrapped in `Some`. . /// . /// # Examples . /// -- line 3905 ---------------------------------------- -- 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,595 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/rest_pat_in_fully_bound_struct.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use rustc_hir::{Pat, PatKind, QPath}; . use rustc_lint::LateContext; . use rustc_middle::ty; . . use super::REST_PAT_IN_FULLY_BOUND_STRUCTS; . 46,571 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, pat: &Pat<'_>) { 13,306 ( 0.00%) if !pat.span.from_expansion() 7,790 ( 0.00%) && let PatKind::Struct(QPath::Resolved(_, path), fields, Some(dotdot)) = pat.kind . && let Some(def_id) = path.res.opt_def_id() . && let ty = cx.tcx.type_of(def_id).instantiate_identity().skip_norm_wip() . && let ty::Adt(def, _) = ty.kind() . && (def.is_struct() || def.is_union()) . && fields.len() == def.non_enum_variant().fields.len() . && !def.non_enum_variant().is_field_list_non_exhaustive() . { . span_lint_and_then( -- line 18 ---------------------------------------- -- line 25 ---------------------------------------- . dotdot, . "consider removing `..` from this binding", . "", . rustc_errors::Applicability::MachineApplicable, . ); . }, . ); . } 53,224 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_else.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . style, . "empty else branch" . } . . declare_lint_pass!(NeedlessElse => [NEEDLESS_ELSE]); . . impl EarlyLintPass for NeedlessElse { . fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 45,805 ( 0.00%) if let ExprKind::If(_, then_block, Some(else_clause)) = &expr.kind 388 ( 0.00%) && let ExprKind::Block(block, _) = &else_clause.kind 222 ( 0.00%) && !expr.span.from_expansion() 222 ( 0.00%) && !else_clause.span.from_expansion() 222 ( 0.00%) && block.stmts.is_empty() . && let range = (then_block.span.hi()..expr.span.hi()).trim_start(cx) . && range.clone().check_text(cx, |src| { . // Ignore else blocks that contain comments or #[cfg]s . !src.contains(['/', '#']) . }) . { . span_lint_and_sugg( . cx, -- line 52 ---------------------------------------- -- line 53 ---------------------------------------- . NEEDLESS_ELSE, . range.with_ctxt(expr.span.ctxt()), . "this `else` branch is empty", . "you can remove it", . String::new(), . Applicability::MachineApplicable, . ); . } 22,268 ( 0.00%) } . } 2,716 ( 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_lint/src/passes.rs -------------------------------------------------------------------------------- Ir -- line 169 ---------------------------------------- . fn check_where_predicate_post(a: &rustc_ast::WherePredicate); . ]); . ) . } . . macro_rules! declare_early_lint_pass { . ([], [$(fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( . pub trait EarlyLintPass: LintPass { 71,174 ( 0.00%) $(#[inline(always)] fn $name(&mut self, _: &EarlyContext<'_>, $(_: $arg),*) {})* . } . ) . } . . // Declare the `EarlyLintPass` trait, which contains empty default definitions . // for all the `check_*` methods. . early_lint_methods!(declare_early_lint_pass, []); . -- line 185 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/async_yields_async.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . pub ASYNC_YIELDS_ASYNC, . correctness, . "async blocks that return a type that can be awaited" . } . . declare_lint_pass!(AsyncYieldsAsync => [ASYNC_YIELDS_ASYNC]); . . impl<'tcx> LateLintPass<'tcx> for AsyncYieldsAsync { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,558 ( 0.00%) let ExprKind::Closure(Closure { . kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, kind)), . body: body_id, . .. 85 ( 0.00%) }) = expr.kind . else { . return; . }; . . let body_expr = match kind { . CoroutineSource::Fn => { . // For functions, with explicitly defined types, don't warn. . // XXXkhuey maybe we should? -- line 64 ---------------------------------------- -- line 118 ---------------------------------------- . return_expr_span, . "consider awaiting this value", . format!("{return_expr_snip}.await"), . applicability, . ); . }, . ); . } 217,552 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winnow-1.0.3/src/stream/mod.rs -------------------------------------------------------------------------------- Ir -- line 445 ---------------------------------------- . Ok(self.eof_offset()) . } else { . Err(Needed::Unknown) . } . } . #[inline(always)] . fn next_slice(&mut self, offset: usize) -> Self::Slice { . let (slice, next) = self.split_at(offset); 4,605 ( 0.00%) *self = next; . slice . } . #[inline(always)] . unsafe fn next_slice_unchecked(&mut self, offset: usize) -> Self::Slice { . #[cfg(debug_assertions)] . self.peek_slice(offset); . . // SAFETY: `Stream::next_slice_unchecked` requires `offset` to be in bounds and on a UTF-8 -- line 461 ---------------------------------------- -- line 643 ---------------------------------------- . fn offset_from(&self, start: &Self) -> usize { . let fst = (*start).as_ptr(); . let snd = (*self).as_ptr(); . . debug_assert!( . fst <= snd, . "`Offset::offset_from({snd:?}, {fst:?})` only accepts slices of `self`" . ); 1,278 ( 0.00%) (snd as usize - fst as usize) / core::mem::size_of::() . } . } . . impl<'a, T> Offset<<&'a [T] as Stream>::Checkpoint> for &'a [T] . where . T: Clone + core::fmt::Debug, . { . #[inline(always)] -- line 659 ---------------------------------------- -- line 660 ---------------------------------------- . fn offset_from(&self, other: &<&'a [T] as Stream>::Checkpoint) -> usize { . self.checkpoint().offset_from(other) . } . } . . impl Offset for &str { . #[inline(always)] . fn offset_from(&self, start: &Self) -> usize { 1,765 ( 0.00%) self.as_bytes().offset_from(&start.as_bytes()) . } . } . . impl<'a> Offset<<&'a str as Stream>::Checkpoint> for &'a str { . #[inline(always)] . fn offset_from(&self, other: &<&'a str as Stream>::Checkpoint) -> usize { . self.checkpoint().offset_from(other) . } -- line 676 ---------------------------------------- -- line 710 ---------------------------------------- . fn as_bstr(&self) -> &[u8] { . self . } . } . . impl AsBStr for &str { . #[inline(always)] . fn as_bstr(&self) -> &[u8] { 2,556 ( 0.00%) (*self).as_bytes() . } . } . . /// Result of [`Compare::compare`] . #[derive(Debug, Eq, PartialEq)] . pub enum CompareResult { . /// Comparison was successful . /// -- line 726 ---------------------------------------- -- line 1506 ---------------------------------------- . fn is_newline(self) -> bool { . self == b'\n' . } . } . . impl AsChar for &u8 { . #[inline(always)] . fn as_char(self) -> char { 1,299 ( 0.00%) (*self).as_char() . } . #[inline(always)] . fn is_alpha(self) -> bool { . (*self).is_alpha() . } . #[inline(always)] . fn is_alphanum(self) -> bool { . (*self).is_alphanum() -- line 1522 ---------------------------------------- -- line 1808 ---------------------------------------- . impl ContainsToken for ($($haystack),+,) . where . T: Clone, . $($haystack: ContainsToken),+ . { . #[inline] . fn contains_token(&self, token: T) -> bool { . let ($(ref $haystack),+,) = *self; 1,887 ( 0.00%) $($haystack.contains_token(token.clone()) || )+ false . } . } . ) . } . . macro_rules! impl_contains_token_for_tuples { . ($haystack1:ident, $($haystack:ident),+) => { . impl_contains_token_for_tuples!(__impl $haystack1; $($haystack),+); -- line 1824 ---------------------------------------- -- line 1856 ---------------------------------------- . #[inline(always)] . fn memchr(token: u8, slice: &[u8]) -> Option { . slice.iter().position(|t| *t == token) . } . . #[cfg(not(feature = "simd"))] . #[inline(always)] . fn memchr2(token: (u8, u8), slice: &[u8]) -> Option { 1,378 ( 0.00%) slice.iter().position(|t| *t == token.0 || *t == token.1) . } . . #[cfg(not(feature = "simd"))] . #[inline(always)] . fn memchr3(token: (u8, u8, u8), slice: &[u8]) -> Option { . slice . .iter() 9,822 ( 0.00%) .position(|t| *t == token.0 || *t == token.1 || *t == token.2) . } . . #[inline(always)] . fn memmem(slice: &[u8], literal: &[u8]) -> Option> { . match literal.len() { . 0 => Some(0..0), . 1 => memchr(literal[0], slice).map(|i| i..i + 1), . _ => memmem_(slice, literal), -- line 1880 ---------------------------------------- 3,697 ( 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/range.rs -------------------------------------------------------------------------------- Ir -- line 567 ---------------------------------------- . /// ``` . #[stable(feature = "range_is_empty", since = "1.47.0")] . #[inline] . #[rustc_const_unstable(feature = "const_range", issue = "none")] . pub const fn is_empty(&self) -> bool . where . Idx: [const] PartialOrd, . { 57 ( 0.00%) self.exhausted || !(self.start <= self.end) . } . } . . /// A range only bounded inclusively above (`..=end`). . /// . /// The `RangeToInclusive` `..=end` contains all values with `x <= end`. . /// It cannot serve as an [`Iterator`] because it doesn't have a starting point. . /// -- line 583 ---------------------------------------- -- line 877 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "range_contains", since = "1.35.0")] . fn contains(&self, item: &U) -> bool . where . T: [const] PartialOrd, . U: ?Sized + [const] PartialOrd, . { 20,492 ( 0.00%) (match self.start_bound() { . Included(start) => start <= item, . Excluded(start) => start < item, . Unbounded => true, . }) && (match self.end_bound() { . Included(end) => item <= end, . Excluded(end) => item < end, . Unbounded => true, . }) -- line 893 ---------------------------------------- 3,140 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . /// Run one field's `check_*`. . /// . /// Fully qualified through [`rustc_lint::EarlyLintPass`] since some passes impl . /// both `EarlyLintPass` and `LateLintPass` with like-named methods, which would . /// be ambiguous on the concrete field type. . #[macro_export] . macro_rules! run_combined_early_lint_pass_field { . ($self:ident, $field:ident, $name:ident, ($($arg:expr),* $(,)?)) => { 2,394,333 ( 0.14%) rustc_lint::EarlyLintPass::$name(&mut $self.$field, $($arg),*); 394,168 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs:::check_pat (4,753x) 71,439 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs:::check_pat (4,753x) . }; . } . . /// Forward one `check_*` method to every field of the combined pass. . #[macro_export] . macro_rules! expand_combined_early_lint_pass_method { . ([$($field:ident),*], $self:ident, $name:ident, $args:tt) => ({ . $($crate::run_combined_early_lint_pass_field!($self, $field, $name, $args);)* -- line 35 ---------------------------------------- -- line 36 ---------------------------------------- . }) . } . . /// Generate the combined `EarlyLintPass` impl's `check_*` methods, one per method . /// in rustc's early-pass method list. . #[macro_export] . macro_rules! expand_combined_early_lint_pass_methods { . ($fields:tt, [$($(#[$attr:meta])* fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( 1,041,241 ( 0.06%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::EarlyContext<'_>, $($param: $arg),*) { . $crate::expand_combined_early_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 386,434 ( 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 ---------------------------------------- 2,570 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/let_and_return.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::{Block, Expr, PatKind, StmtKind}; . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty::GenericArgKind; . use rustc_span::edition::Edition; . . use super::LET_AND_RETURN; . 19,880 ( 0.00%) pub(super) fn check_block<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { . // we need both a let-binding stmt and an expr 8,520 ( 0.00%) if let Some(retexpr) = block.expr 2,545 ( 0.00%) && let Some(stmt) = block.stmts.last() 812 ( 0.00%) && let StmtKind::Let(local) = &stmt.kind 382 ( 0.00%) && local.ty.is_none() 178 ( 0.00%) && local.els.is_none() 1,246 ( 0.00%) && cx.tcx.hir_attrs(local.hir_id).is_empty() 12,256 ( 0.00%) => ???:::hir_attrs (178x) 704 ( 0.00%) && let Some(initexpr) = &local.init 498 ( 0.00%) && let PatKind::Binding(_, local_id, _, _) = local.pat.kind 1 ( 0.00%) && retexpr.res_local_id() == Some(local_id) 3 ( 0.00%) && (cx.sess().edition() >= Edition::Edition2024 || !last_statement_borrows(cx, initexpr)) 5 ( 0.00%) && !initexpr.span.in_external_macro(cx.sess().source_map()) 117 ( 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 (1x) 4 ( 0.00%) && !retexpr.span.in_external_macro(cx.sess().source_map()) 117 ( 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 (1x) 3 ( 0.00%) && !local.span.from_expansion() 6 ( 0.00%) && !span_contains_non_whitespace(cx, stmt.span.between(retexpr.span), false) 197 ( 0.00%) => ???:::between (1x) . { . span_lint_hir_and_then( . cx, . LET_AND_RETURN, . retexpr.hir_id, . retexpr.span, . "returning the result of a `let` binding from a block", . |err| { -- line 39 ---------------------------------------- -- line 60 ---------------------------------------- . err.multipart_suggestion( . "return the expression directly", . vec![(local.span, String::new()), (retexpr.span, sugg)], . app, . ); . }, . ); . } 19,880 ( 0.00%) } . fn last_statement_borrows<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_expr(cx.tcx, expr, |e| { 12 ( 0.00%) if let Some(def_id) = fn_def_id(cx, e) 112 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (1x) 1 ( 0.00%) && cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .output() 3 ( 0.00%) .walk() 7 ( 0.00%) => ???:::walk (1x) . .any(|arg| matches!(arg.kind(), GenericArgKind::Lifetime(re) if !re.is_static())) . { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() -- line 87 ---------------------------------------- 199 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . #[clippy::version = "1.67.0"] . pub MANUAL_LET_ELSE, . pedantic, . "manual implementation of a let...else statement" . } . . impl<'tcx> QuestionMark { . pub(crate) fn check_manual_let_else(&self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'tcx>) { 706 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 2,118 ( 0.00%) && let Some(init) = local.init 679 ( 0.00%) && local.els.is_none() 679 ( 0.00%) && local.ty.is_none() 1,214 ( 0.00%) && init.span.eq_ctxt(stmt.span) 3,645 ( 0.00%) && let Some(if_let_or_match) = IfLetOrMatch::parse(cx, init) 12,403 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse (596x) 532 ( 0.00%) && !stmt.span.in_external_macro(cx.sess().source_map()) 15,561 ( 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 (133x) 798 ( 0.00%) && self.msrv.meets(cx, msrvs::LET_ELSE) 3,591 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (133x) . { . match if_let_or_match { . IfLetOrMatch::IfLet(if_let_expr, let_pat, if_then, if_else, ..) => { . if let Some(ident_map) = expr_simple_identity_map(local.pat, let_pat, if_then) . && let Some(if_else) = if_else . && is_never_expr(cx, if_else).is_some() . && let qm_allowed = is_lint_allowed(cx, QUESTION_MARK, stmt.hir_id) . && (qm_allowed || pat_and_expr_can_be_question_mark(cx, let_pat, if_else).is_none()) -- line 68 ---------------------------------------- 4,174 ( 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; . } . 1 ( 0.00%) self.check_mod(&krate.items); 32,596 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod (1x) . } . 23,130 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 10,280 ( 0.00%) 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", . ); . } . } 20,560 ( 0.00%) } . } . . #[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 ---------------------------------------- -- line 118 ---------------------------------------- . && path.segments[0].ident.name == kw::SelfLower . { . self.imports_referenced_with_self.push(path.segments[1].ident.name); . } . } . } . . impl SingleComponentPathImports { 496 ( 0.00%) fn check_mod(&mut self, items: &[Box]) { . // keep track of imports reused with `self` keyword, such as `self::crypto_hash` in the example . // below. Removing the `use crypto_hash;` would make this a compile error . // ``` . // use crypto_hash; . // . // use self::crypto_hash::{Algorithm, Hasher}; . // ``` . let mut imports_reused_with_self = Vec::new(); -- line 134 ---------------------------------------- -- line 142 ---------------------------------------- . // keep track of macros defined in the module as we don't want it to trigger on this (#7106) . // ``` . // macro_rules! foo { () => {} }; . // pub(crate) use foo; . // ``` . let mut macros = Vec::new(); . . for item in items { 1,274 ( 0.00%) self.track_uses(item, &mut imports_reused_with_self, &mut single_use_usages, &mut macros); . } . . // Only walk the module's AST in search of `self::xxx` paths when there are single . // component imports left to lint, as the visitor recurses into every nested item. . single_use_usages.retain(|usage| !imports_reused_with_self.contains(&usage.name)); . if single_use_usages.is_empty() { . return; . } -- line 158 ---------------------------------------- -- line 162 ---------------------------------------- . import_usage_visitor.visit_item(item); . } . . for usage in single_use_usages { . if !import_usage_visitor.imports_referenced_with_self.contains(&usage.name) { . self.found.entry(usage.item_id).or_default().push(usage); . } . } 496 ( 0.00%) } . . fn track_uses( . &mut self, . item: &Item, . imports_reused_with_self: &mut Vec, . single_use_usages: &mut Vec, . macros: &mut Vec, . ) { 5,838 ( 0.00%) if item.span.from_expansion() || item.vis.kind.is_pub() { . return; . } . 6,568 ( 0.00%) match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, ..)) => { 122 ( 0.00%) self.check_mod(items); 31,200 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod'2 (33x) . }, . ItemKind::MacroDef(ident, MacroDef { macro_rules: true, .. }) => { 34 ( 0.00%) macros.push(ident.name); . }, . ItemKind::Use(use_tree) => { . let segments = &use_tree.prefix.segments; . . // keep track of `use some_module;` usages 1,364 ( 0.00%) if segments.len() == 1 { 50 ( 0.00%) if let UseTreeKind::Simple(None) = use_tree.kind { . let name = segments[0].ident.name; . if !macros.contains(&name) { . single_use_usages.push(SingleUse { . name, . span: item.span, . item_id: item.id, . can_suggest: true, . }); -- line 203 ---------------------------------------- -- line 223 ---------------------------------------- . can_suggest: false, . }); . } . } . } . } . } . // keep track of `use self::some_module` usages 316 ( 0.00%) else if segments[0].ident.name == kw::SelfLower { . // simple case such as `use self::module::SomeStruct` . if segments.len() > 1 { . imports_reused_with_self.push(segments[1].ident.name); . return; . } . . // nested case such as `use self::{module1::Struct1, module2::Struct2}` . if let UseTreeKind::Nested { items, .. } = &use_tree.kind { -- line 239 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs -------------------------------------------------------------------------------- Ir -- line 58 ---------------------------------------- . "Vec with uninitialized data" . } . . declare_lint_pass!(UninitVec => [UNINIT_VEC]); . . // FIXME: update to a visitor-based implementation. . // Threads: https://github.com/rust-lang/rust-clippy/pull/7682#discussion_r710998368 . impl<'tcx> LateLintPass<'tcx> for UninitVec { 25,560 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { 2,840 ( 0.00%) let ctxt = block.span.ctxt(); 17,040 ( 0.00%) if !ctxt.in_external_macro(cx.tcx.sess.source_map()) { 469,866 ( 0.03%) => ???:::in_external_macro (2,840x) 7,980 ( 0.00%) for [stmt1, stmt2] in block.stmts.array_windows::<2>() { 4,218 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt2.kind 1,186 ( 0.00%) && stmt1.span.ctxt() == ctxt 1,150 ( 0.00%) && stmt2.span.ctxt() == ctxt 1,114 ( 0.00%) && expr.span.ctxt() == ctxt . { 2,160 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt1, expr); 51,075 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (540x) . } . } . 3,024 ( 0.00%) if let (Some(stmt), Some(expr)) = (block.stmts.last(), block.expr) 758 ( 0.00%) && stmt.span.ctxt() == ctxt 742 ( 0.00%) && expr.span.ctxt() == ctxt . { 4,026 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt, expr); 22,622 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (366x) . } . } 19,792 ( 0.00%) } . } . 9,060 ( 0.00%) fn handle_uninit_vec_pair<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . maybe_init_or_reserve: &'tcx Stmt<'tcx>, . maybe_set_len: &'tcx Expr<'tcx>, . ) { 1,812 ( 0.00%) if let Some(vec) = extract_init_or_reserve_target(cx, maybe_init_or_reserve) 3 ( 0.00%) && let Some((set_len_self, call_span)) = extract_set_len_self(cx, maybe_set_len) . && vec.location.eq_expr(cx, ctxt, set_len_self) . && let ty::Ref(_, vec_ty, _) = cx.typeck_results().expr_ty_adjusted(set_len_self).kind() . && let ty::Adt(_, args) = vec_ty.kind() . // `#[allow(...)]` attribute can be set on enclosing unsafe block of `set_len()` . && !is_lint_allowed(cx, UNINIT_VEC, maybe_set_len.hir_id) . { . if vec.has_capacity() { . // with_capacity / reserve -> set_len -- line 104 ---------------------------------------- -- line 119 ---------------------------------------- . span_lint( . cx, . UNINIT_VEC, . vec![call_span, maybe_init_or_reserve.span], . "calling `set_len()` on empty `Vec` creates out-of-bound values", . ); . } . } 7,248 ( 0.00%) } . . /// The target `Vec` that is initialized or reserved . #[derive(Clone, Copy)] . struct TargetVec<'tcx> { . location: VecLocation<'tcx>, . /// `None` if `reserve()` . init_kind: Option, . } -- line 135 ---------------------------------------- -- line 153 ---------------------------------------- . VecLocation::Expr(self_expr) => SpanlessEq::new(cx).eq_expr(ctxt, self_expr, expr), . } . } . } . . /// Finds the target location where the result of `Vec` initialization is stored . /// or `self` expression for `Vec::reserve()`. . fn extract_init_or_reserve_target<'tcx>(cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'tcx>) -> Option> { 3,520 ( 0.00%) match stmt.kind { . StmtKind::Let(local) => { 1,167 ( 0.00%) if let Some(init_expr) = local.init 2,748 ( 0.00%) && let PatKind::Binding(_, hir_id, _, None) = local.pat.kind 1,620 ( 0.00%) && let Some(init_kind) = get_vec_init_kind(cx, init_expr) 16,252 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (324x) . { . return Some(TargetVec { . location: VecLocation::Local(hir_id), . init_kind: Some(init_kind), . }); . } . }, 2,349 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => match expr.kind { 176 ( 0.00%) ExprKind::Assign(lhs, rhs, _span) => { 440 ( 0.00%) if let Some(init_kind) = get_vec_init_kind(cx, rhs) { 2,944 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (88x) . return Some(TargetVec { . location: VecLocation::Expr(lhs), . init_kind: Some(init_kind), . }); . } . }, 1,882 ( 0.00%) ExprKind::MethodCall(path, self_expr, [_], _) if is_reserve(cx, path, self_expr) => { . return Some(TargetVec { . location: VecLocation::Expr(self_expr), . init_kind: None, . }); . }, . _ => (), . }, . StmtKind::Item(_) => (), . } . None . } . . fn is_reserve(cx: &LateContext<'_>, path: &PathSegment<'_>, self_expr: &Expr<'_>) -> bool { . cx.typeck_results() 185 ( 0.00%) .expr_ty(self_expr) 7,412 ( 0.00%) => ???:::expr_ty (185x) . .peel_refs() . .is_diag_item(cx, sym::Vec) . && path.ident.name == sym::reserve . } . . /// Returns self if the expression is `Vec::set_len()` . fn extract_set_len_self<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(&'tcx Expr<'tcx>, Span)> { . // peel unsafe blocks in `unsafe { vec.set_len() }` . let expr = peel_hir_expr_while(expr, |e| { 14 ( 0.00%) if let ExprKind::Block(block, _) = e.kind { . // Extract the first statement/expression . match (block.stmts.first().map(|stmt| &stmt.kind), block.expr) { . (None, Some(expr)) => Some(expr), . (Some(StmtKind::Expr(expr) | StmtKind::Semi(expr)), _) => Some(expr), . _ => None, . } . } else { . None . } . }); 14 ( 0.00%) match expr.kind { 2 ( 0.00%) ExprKind::MethodCall(path, self_expr, [arg], _) => { 1 ( 0.00%) let self_type = cx.typeck_results().expr_ty(self_expr).peel_refs(); 40 ( 0.00%) => ???:::expr_ty (1x) 3 ( 0.00%) if self_type.is_diag_item(cx, sym::Vec) && path.ident.name == sym::set_len && !is_integer_literal(arg, 0) { . Some((self_expr, expr.span)) . } else { . None . } . }, . _ => None, . } . } -- line 229 ---------------------------------------- 28,464 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . macro_rules! integer_sum_product { . (@impls $zero:expr, $one:expr, #[$attr:meta], $($a:ty)*) => ($( . #[$attr] . impl Sum for $a { . fn sum>(iter: I) -> Self { . iter.fold( . $zero, . #[rustc_inherit_overflow_checks] 24,807 ( 0.00%) |a, b| a + b, . ) . } . } . . #[$attr] . impl Product for $a { . fn product>(iter: I) -> Self { . iter.fold( -- line 63 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/precedence.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . pub PRECEDENCE_BITS, . restriction, . "operations mixing bit shifting with bit combining/masking" . } . . declare_lint_pass!(Precedence => [PRECEDENCE, PRECEDENCE_BITS]); . . impl EarlyLintPass for Precedence { 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 44,536 ( 0.00%) if expr.span.from_expansion() { . return; . } . 80,667 ( 0.00%) if let ExprKind::Binary(Spanned { node: op, .. }, ref left, ref right) = expr.kind { . let span_sugg = |lint: &'static Lint, expr: &Expr, sugg, appl| { . span_lint_and_sugg( . cx, . lint, . expr.span, . "operator precedence might not be obvious", . "consider parenthesizing your expression", . sugg, -- line 63 ---------------------------------------- -- line 106 ---------------------------------------- . op.as_str(), . snippet_with_applicability(cx, right.span, "..", &mut applicability) . ); . span_sugg(lint_for(&[op, side_op]), expr, sugg, applicability); . }, . _ => (), . } . } else if let ExprKind::MethodCall(method_call) = &expr.kind 9,712 ( 0.00%) && let ExprKind::Closure(closure) = &method_call.receiver.kind . { . span_lint_and_then(cx, PRECEDENCE, expr.span, "precedence might not be obvious", |diag| { . diag.multipart_suggestion( . "consider parenthesizing the closure", . vec![ . (closure.fn_decl_span.shrink_to_lo(), String::from("(")), . (closure.body.span.shrink_to_hi(), String::from(")")), . ], . Applicability::MachineApplicable, . ); . }); . } 178,144 ( 0.01%) } . } . . fn get_bin_opt(expr: &Expr) -> Option { . match expr.kind { . ExprKind::Binary(Spanned { node: op, .. }, _, _) => Some(op), . _ => None, . } . } . . #[must_use] . fn is_bit_op(op: BinOpKind) -> bool { 1,074 ( 0.00%) matches!(op, BitXor | BitAnd | BitOr | Shl | Shr) . } . . fn lint_for(ops: &[BinOpKind]) -> &'static Lint { . if ops.iter().all(|op| is_bit_op(*op)) { . PRECEDENCE_BITS . } else { . PRECEDENCE . } -- line 147 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'tcx>, . body: &'tcx Body<'tcx>, . span: Span, . _def_id: LocalDefId, . ) { 4,961 ( 0.00%) if let FnRetTy::Return(hir_ty) = decl.output 25 ( 0.00%) && is_unit_ty(hir_ty) . && !hir_ty.span.from_expansion() . && get_def(span) == get_def(hir_ty.span) . { . // The explicit `-> ()` in the closure signature might be necessary for multiple reasons: . // - Implicit types in closure signatures are forbidden when `for<...>` is present . // - If the closure body ends with a function call, and that function's return type is generic, the . // `-> ()` could be required for it to be inferred . // -- line 63 ---------------------------------------- -- line 75 ---------------------------------------- . && let Some(expr) = block.expr . && is_never_expr(cx, expr).is_some() . { . return; . } . . lint_unneeded_unit_return(cx, hir_ty.span, span); . } 1,774 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 137,847 ( 0.01%) if let ExprKind::Ret(Some(expr)) | ExprKind::Break(_, Some(expr)) = expr.kind 2 ( 0.00%) && is_unit_expr(expr) . && !expr.span.from_expansion() . { . span_lint_and_sugg( . cx, . UNUSED_UNIT, . expr.span, . "unneeded `()`", . "remove the `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 27,194 ( 0.00%) } . 1,542 ( 0.00%) fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { 1,022 ( 0.00%) if let [segment] = &poly.trait_ref.path.segments 1,004 ( 0.00%) && matches!(segment.ident.name, sym::Fn | sym::FnMut | sym::FnOnce) 39 ( 0.00%) && let Some(args) = segment.args 13 ( 0.00%) && args.parenthesized == GenericArgsParentheses::ParenSugar 39 ( 0.00%) && let [constraint] = &args.constraints 13 ( 0.00%) && constraint.ident.name == sym::Output 65 ( 0.00%) && let AssocItemConstraintKind::Equality { term: Term::Ty(hir_ty) } = constraint.kind 39 ( 0.00%) && args.span_ext.hi() != poly.span.hi() 18 ( 0.00%) && !hir_ty.span.from_expansion() 27 ( 0.00%) && args.span_ext.hi() != hir_ty.span.hi() . && is_unit_ty(hir_ty) . { . lint_unneeded_unit_return(cx, hir_ty.span, poly.span); . } 1,799 ( 0.00%) } . } . . impl EarlyLintPass for UnusedUnit { . /// Check for unit expressions in blocks. This is left in the early pass because some macros . /// expand its inputs as-is, making it invisible to the late pass. See #4076. 10,844 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . if let Some(stmt) = block.stmts.last() 5,388 ( 0.00%) && let StmtKind::Expr(expr) = &stmt.kind 6,189 ( 0.00%) && let rustc_ast::ExprKind::Tup(inner) = &expr.kind 28 ( 0.00%) && inner.is_empty() . && let ctxt = block.span.ctxt() . && stmt.span.ctxt() == ctxt . && expr.span.ctxt() == ctxt . && expr.attrs.is_empty() . { . let sp = expr.span; . span_lint_and_sugg( . cx, -- line 135 ---------------------------------------- -- line 136 ---------------------------------------- . UNUSED_UNIT, . sp, . "unneeded unit expression", . "remove the final `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 13,555 ( 0.00%) } . } . . fn is_unit_ty(ty: &Ty<'_>) -> bool { 2,869 ( 0.00%) matches!(ty.kind, TyKind::Tup([])) . } . . // get the def site . #[must_use] . fn get_def(span: Span) -> Option { . if span.from_expansion() { . Some(span.ctxt().outer_expn_data().def_site) . } else { -- line 156 ---------------------------------------- 23,965 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/author.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . } else { . println!(" && {}", format_args!($($t)*)); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Author { . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 6,384 ( 0.00%) check_item(cx, item.hir_id()); 493,481 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (3,192x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 3,008 ( 0.00%) check_item(cx, item.hir_id()); 401,992 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (1,504x) . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 44 ( 0.00%) check_item(cx, item.hir_id()); 3,907 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (22x) . } . 15,921 ( 0.00%) fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) { 3,538 ( 0.00%) check_node(cx, arm.hir_id, |v| { . v.arm(&v.bind("arm", arm)); . }); 14,152 ( 0.00%) } . 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 54,388 ( 0.00%) check_node(cx, expr.hir_id, |v| { . v.expr(&v.bind("expr", expr)); . }); 217,552 ( 0.01%) } . 18,495 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 11,780 ( 0.00%) match stmt.kind { 5,298 ( 0.00%) StmtKind::Expr(e) | StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 4,110 ( 0.00%) check_node(cx, stmt.hir_id, |v| { . v.stmt(&v.bind("stmt", stmt)); . }); 16,440 ( 0.00%) } . } . 42,462 ( 0.00%) fn check_item(cx: &LateContext<'_>, hir_id: HirId) { 23,590 ( 0.00%) if let Some(body) = cx.tcx.hir_maybe_body_owned_by(hir_id.expect_owner().def_id) { 651,312 ( 0.04%) => ???:::hir_maybe_body_owned_by (4,718x) . check_node_with_body( . cx, . hir_id, 1,716 ( 0.00%) |v| { . v.expr(&v.bind("expr", body.value)); . }, . Some(body), . ); . } 37,744 ( 0.00%) } . . fn check_node(cx: &LateContext<'_>, hir_id: HirId, f: impl Fn(&PrintVisitor<'_, '_>)) { . check_node_with_body(cx, hir_id, f, None); . } . . /// Check the node at `hir_id`, in the context of `body` or the default from `cx` if none is given. . fn check_node_with_body( . cx: &LateContext<'_>, . hir_id: HirId, . f: impl Fn(&PrintVisitor<'_, '_>), . body: Option<&Body<'_>>, . ) { 30,883 ( 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 { 42,585 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 237,375 ( 0.01%) => ???:::hir_attrs (3,379x) 3,843 ( 0.00%) get_builtin_attr(attrs, sym::author).count() > 0 . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . } . impl AlmostCompleteRange { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . impl EarlyLintPass for AlmostCompleteRange { . fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &Expr) { 44,844 ( 0.00%) if let ExprKind::Range(Some(start), Some(end), RangeLimits::HalfOpen) = &e.kind 28 ( 0.00%) && is_incomplete_range(start, end) 56 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/almost_complete_range.rs:clippy_lints::almost_complete_range::is_incomplete_range (4x) . && !e.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . e.span, . "almost complete ascii range", . |diag| { -- line 53 ---------------------------------------- -- line 61 ---------------------------------------- . "use an inclusive range", . "..=".to_owned(), . Applicability::MaybeIncorrect, . ); . } . }, . ); . } 22,268 ( 0.00%) } . 28,518 ( 0.00%) fn check_pat(&mut self, cx: &EarlyContext<'_>, p: &Pat) { 9,614 ( 0.00%) if let PatKind::Range(Some(start), Some(end), kind) = &p.kind 36 ( 0.00%) && matches!(kind.node, RangeEnd::Excluded) . && is_incomplete_range(start, end) . && !p.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . p.span, . "almost complete ascii range", -- line 81 ---------------------------------------- -- line 88 ---------------------------------------- . } else { . "...".to_owned() . }, . Applicability::MaybeIncorrect, . ); . }, . ); . } 33,271 ( 0.00%) } . . extract_msrv_attr!(); . } . 8 ( 0.00%) fn is_incomplete_range(start: &Expr, end: &Expr) -> bool { 8 ( 0.00%) match (&start.peel_parens().kind, &end.peel_parens().kind) { . (&ExprKind::Lit(start_lit), &ExprKind::Lit(end_lit)) => { . matches!( . (LitKind::from_token_lit(start_lit), LitKind::from_token_lit(end_lit),), . ( . Ok(LitKind::Byte(b'a') | LitKind::Char('a')), . Ok(LitKind::Byte(b'z') | LitKind::Char('z')) . ) | ( . Ok(LitKind::Byte(b'A') | LitKind::Char('A')), -- line 110 ---------------------------------------- -- line 112 ---------------------------------------- . ) | ( . Ok(LitKind::Byte(b'0') | LitKind::Char('0')), . Ok(LitKind::Byte(b'9') | LitKind::Char('9')), . ) . ) . }, . _ => false, . } 12 ( 0.00%) } 704 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs -------------------------------------------------------------------------------- Ir -- line 22 ---------------------------------------- . (Variant::Unwrap, true) => "unwrap_err", . (Variant::Unwrap, false) => "unwrap", . (Variant::Expect, true) => "expect_err", . (Variant::Expect, false) => "expect", . } . } . . fn lint(self) -> &'static Lint { 374 ( 0.00%) match self { . Variant::Unwrap => UNWRAP_USED, . Variant::Expect => EXPECT_USED, . } . } . } . . /// Lint usage of `unwrap` or `unwrap_err` for `Result` and `unwrap()` for `Option` (and their . /// `expect` counterparts). . #[allow(clippy::too_many_arguments)] 408 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . expr: &Expr<'_>, . recv: &Expr<'_>, . is_err: bool, . allow_unwrap_in_consts: bool, . allow_unwrap_in_tests: bool, . unwrap_allowed_ids: &rustc_data_structures::fx::FxHashSet, . unwrap_allowed_aliases: &[rustc_hir::def_id::DefId], . variant: Variant, . ) { 102 ( 0.00%) let ty = cx.typeck_results().expr_ty(recv).peel_refs(); 1,360 ( 0.00%) => ???:::expr_ty (34x) . 327 ( 0.00%) let (kind, none_value, none_prefix) = match ty.opt_diag_name(cx) { 52 ( 0.00%) Some(sym::Option) if !is_err => ("an `Option`", "None", ""), . Some(sym::Result) 16 ( 0.00%) if let ty::Adt(_, substs) = ty.kind() 40 ( 0.00%) && let Some(t_or_e_ty) = substs[usize::from(!is_err)].as_type() => . { 24 ( 0.00%) if is_never_like(t_or_e_ty) { . return; . } . 16 ( 0.00%) ("a `Result`", if is_err { "Ok" } else { "Err" }, "an ") . }, . _ => return, . }; . 69 ( 0.00%) let method_suffix = if is_err { "_err" } else { "" }; . 274 ( 0.00%) if let ty::Adt(adt, _) = ty.kind() . && unwrap_allowed_ids.contains(&adt.did()) . { . return; . } . . for &def_id in unwrap_allowed_aliases { . let alias_ty = cx.tcx.type_of(def_id).instantiate_identity().skip_norm_wip(); . if let (ty::Adt(adt, substs), ty::Adt(alias_adt, alias_substs)) = (ty.kind(), alias_ty.kind()) -- line 78 ---------------------------------------- -- line 98 ---------------------------------------- . } . } . if all_match { . return; . } . } . } . 68 ( 0.00%) if allow_unwrap_in_tests && is_in_test(cx.tcx, expr.hir_id) { . return; . } . 272 ( 0.00%) if allow_unwrap_in_consts && is_inside_always_const_context(cx.tcx, expr.hir_id) { 31,598 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (34x) . return; . } . 238 ( 0.00%) span_lint_and_then( 53,384 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (34x) . cx, . variant.lint(), 34 ( 0.00%) expr.span, 204 ( 0.00%) format!("used `{}()` on {kind} value", variant.method_name(is_err)), 306 ( 0.00%) |diag| { . diag.note(format!("if this value is {none_prefix}`{none_value}`, it will panic")); . . if variant == Variant::Unwrap && is_lint_allowed(cx, EXPECT_USED, expr.hir_id) { . diag.help(format!( . "consider using `expect{method_suffix}()` to provide a better panic message" . )); . } . }, . ); 272 ( 0.00%) } . . #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] 10,248 ( 0.00%) pub(super) fn check_call( . cx: &LateContext<'_>, . expr: &Expr<'_>, . func: &Expr<'_>, . args: &[Expr<'_>], . allow_unwrap_in_consts: bool, . allow_unwrap_in_tests: bool, . allow_expect_in_consts: bool, . allow_expect_in_tests: bool, . unwrap_allowed_ids: &rustc_data_structures::fx::FxHashSet, . unwrap_allowed_aliases: &[rustc_hir::def_id::DefId], . ) { . let Some(recv) = args.first() else { . return; . }; 11,398 ( 0.00%) let Some((DefKind::AssocFn, def_id)) = cx.typeck_results().type_dependent_def(func.hir_id) else { 52,854 ( 0.00%) => ???:::type_dependent_def (1,343x) . return; . }; . 218 ( 0.00%) match cx.tcx.item_name(def_id) { . sym::unwrap => { . check( . cx, . expr, . recv, . false, . allow_unwrap_in_consts, . allow_unwrap_in_tests, -- line 159 ---------------------------------------- -- line 198 ---------------------------------------- . allow_expect_in_tests, . unwrap_allowed_ids, . unwrap_allowed_aliases, . Variant::Expect, . ); . }, . _ => (), . } 11,712 ( 0.00%) } 1,679 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/manual_is_multiple_of.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_ast::BinOpKind; . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . . use super::MANUAL_IS_MULTIPLE_OF; . 4,296 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . op: BinOpKind, . lhs: &'tcx Expr<'tcx>, . rhs: &'tcx Expr<'tcx>, . msrv: Msrv, . ) { 2,148 ( 0.00%) if msrv.meets(cx, msrvs::UNSIGNED_IS_MULTIPLE_OF) 9,666 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (358x) . && let Some(operand) = uint_compare_to_zero(cx, expr, op, lhs, rhs) . && let ExprKind::Binary(operand_op, operand_left, operand_right) = operand.kind . && operand_op.node == BinOpKind::Rem . && matches!( . cx.typeck_results().expr_ty_adjusted(operand_left).peel_refs().kind(), . ty::Uint(_) . ) . && matches!( -- line 30 ---------------------------------------- -- line 47 ---------------------------------------- . format!( . "{}{}.is_multiple_of({divisor})", . if op == BinOpKind::Eq { "" } else { "!" }, . Sugg::hir_with_context(cx, operand_left, expr.span.ctxt(), "_", &mut app).maybe_paren() . ), . app, . ); . } 2,864 ( 0.00%) } . . // If we have a `x == 0`, `x != 0` or `x > 0` (or the reverted ones), return the non-zero operand . fn uint_compare_to_zero<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'tcx>, . op: BinOpKind, . lhs: &'tcx Expr<'tcx>, . rhs: &'tcx Expr<'tcx>, -- line 63 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use super::utils::is_relevant_expr; . use clippy_utils::diagnostics::span_lint; . use rustc_hir::attrs::InlineAttr; . use rustc_hir::{Attribute, BodyId, find_attr}; . use rustc_lint::LateContext; . use rustc_span::Span; . use rustc_span::symbol::Symbol; . 13,632 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, span: Span, name: Symbol, attrs: &[Attribute], body: Option) { . if span.from_expansion() { . return; . } . 4,126 ( 0.00%) if let Some(span) = find_attr!(attrs, Inline(InlineAttr::Always, span) => *span) . && body.is_none_or(|body| is_relevant_expr(cx, cx.tcx.hir_body(body).value)) . { . span_lint( . cx, . INLINE_ALWAYS, . span, . format!("you have declared `#[inline(always)]` on `{name}`. This is usually a bad idea"), . ); . } 8,520 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_add.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub IMPLICIT_SATURATING_ADD, . style, . "Perform saturating addition instead of implicitly checking max bound of data type" . } . . declare_lint_pass!(ImplicitSaturatingAdd => [IMPLICIT_SATURATING_ADD]); . . impl<'tcx> LateLintPass<'tcx> for ImplicitSaturatingAdd { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 55,507 ( 0.00%) if let ExprKind::If(cond, then, None) = expr.kind 2 ( 0.00%) && let Some((c, op_node, l)) = get_const(cx, cond) 10 ( 0.00%) && let BinOpKind::Ne | BinOpKind::Lt = op_node 5 ( 0.00%) && let ExprKind::Block(block, None) = then.kind 3 ( 0.00%) && let Block { . stmts: 5 ( 0.00%) [ . Stmt { 1 ( 0.00%) kind: StmtKind::Expr(ex) | StmtKind::Semi(ex), . .. . }, . ], . expr: None, . .. . } . | Block { . stmts: [], . expr: Some(ex), . .. 3 ( 0.00%) } = block 3 ( 0.00%) && let ExprKind::AssignOp(op1, target, value) = ex.kind . && let ty = cx.typeck_results().expr_ty(target) . && Some(c) == get_int_max(ty) . && let ctxt = expr.span.ctxt() . && ex.span.ctxt() == ctxt . && cond.span.ctxt() == ctxt . && clippy_utils::SpanlessEq::new(cx).eq_expr(ctxt, l, target) . && AssignOpKind::AddAssign == op1.node . && let ExprKind::Lit(lit) = value.kind -- line 72 ---------------------------------------- -- line 88 ---------------------------------------- . IMPLICIT_SATURATING_ADD, . expr.span, . "manual saturating add detected", . "use instead", . sugg, . app, . ); . } 217,552 ( 0.01%) } . } . . fn get_int_max(ty: Ty<'_>) -> Option { . use rustc_middle::ty::{Int, Uint}; . match ty.peel_refs().kind() { . Int(IntTy::I8) => i8::MAX.try_into().ok(), . Int(IntTy::I16) => i16::MAX.try_into().ok(), . Int(IntTy::I32) => i32::MAX.try_into().ok(), -- line 104 ---------------------------------------- -- line 111 ---------------------------------------- . Uint(UintTy::U64) => Some(u64::MAX.into()), . Uint(UintTy::U128) => Some(u128::MAX), . Uint(UintTy::Usize) => usize::MAX.try_into().ok(), . _ => None, . } . } . . fn get_const<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option<(u128, BinOpKind, &'tcx Expr<'tcx>)> { 608 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind { 50 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 2,800 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (50x) 50 ( 0.00%) let ctxt = expr.span.ctxt(); 318 ( 0.00%) if let Some(Constant::Int(c)) = ecx.eval_local(r, ctxt) { 7,841 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (50x) . return Some((c, op.node, l)); . } 240 ( 0.00%) if let Some(Constant::Int(c)) = ecx.eval_local(l, ctxt) { 7,377 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (48x) . return Some((c, invert_op(op.node)?, r)); . } . } . None . } . . fn invert_op(op: BinOpKind) -> Option { . use rustc_hir::BinOpKind::{Ge, Gt, Le, Lt, Ne}; -- line 133 ---------------------------------------- 460 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 76 ---------------------------------------- . /// `hir::Item`, `hir::TraitItem`, or `hir::ImplItem` (i.e., the closest "item-like"), . /// and the `local_id` which is unique within the given owner. . /// . /// This two-level structure makes for more stable values: One can move an item . /// around within the source code, or add or remove stuff before it, without . /// the `local_id` part of the `HirId` changing, which is a very useful property in . /// incremental compilation where we have to persist things through changes to . /// the code base. 358,830 ( 0.02%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable, StableHash)] . #[rustc_pass_by_value] . pub struct HirId { 7,670 ( 0.00%) pub owner: OwnerId, . pub local_id: ItemLocalId, . } . . // To ensure correctness of incremental compilation, . // `HirId` must not implement `Ord` or `PartialOrd`. . // See https://github.com/rust-lang/rust/issues/90317. . impl !Ord for HirId {} . impl !PartialOrd for HirId {} -- line 95 ---------------------------------------- -- line 138 ---------------------------------------- . rustc_data_structures::define_stable_id_collections!(HirIdMap, HirIdSet, HirIdMapEntry, HirId); . rustc_data_structures::define_id_collections!( . ItemLocalMap, . ItemLocalSet, . ItemLocalMapEntry, . ItemLocalId . ); . 3,892 ( 0.00%) rustc_index::newtype_index! { . /// An `ItemLocalId` uniquely identifies something within a given "item-like"; . /// that is, within a `hir::Item`, `hir::TraitItem`, or `hir::ImplItem`. There is no . /// guarantee that the numerical value of a given `ItemLocalId` corresponds to . /// the node's position within the owning item in any way, but there is a . /// guarantee that the `ItemLocalId`s within an owner occupy a dense range of . /// integers starting at zero, so a mapping that maps all or most nodes within . /// an "item-like" to something else can be implemented by a `Vec` instead of a . /// tree or hash map. -- line 154 ---------------------------------------- 2,252 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use clippy_utils::{is_empty_block, is_expr_default, is_from_proc_macro}; . use rustc_errors::Applicability; . use rustc_hir::{Block, Expr, ExprKind, MatchSource, Node, StmtKind}; . use rustc_lint::LateContext; . use rustc_span::SyntaxContext; . . use super::{UNIT_ARG, utils}; . 244,746 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 54,388 ( 0.00%) if expr.span.from_expansion() { . return; . } . . // apparently stuff in the desugaring of `?` can trigger this . // so check for that here . // only the calls to `Try::from_error` is marked as desugared, . // so we need to check both the current Expr and its parent. 39,628 ( 0.00%) if is_questionmark_desugar_marked_call(expr) { . return; . } 153,063 ( 0.01%) if let Node::Expr(parent_expr) = cx.tcx.parent_hir_node(expr.hir_id) 1,923,730 ( 0.11%) => ???:::parent_hir_node (17,618x) 11,793 ( 0.00%) && is_questionmark_desugar_marked_call(parent_expr) . { . return; . } . 66,302 ( 0.00%) let (receiver, args) = match expr.kind { . ExprKind::Call(_, args) => (None, args), 8,620 ( 0.00%) ExprKind::MethodCall(_, receiver, args, _) => (Some(receiver), args), . _ => return, . }; . . let args_to_recover = receiver . .into_iter() . .chain(args) . .filter(|arg| { 9,779 ( 0.00%) if cx.typeck_results().expr_ty(arg).is_unit() && !utils::is_unit_literal(arg) { 194,776 ( 0.01%) => ???:::expr_ty (4,858x) . !matches!( . &arg.kind, . ExprKind::Match(.., MatchSource::TryDesugar(_)) | ExprKind::Path(..) . ) . } else { . false . } . }) . .collect::>(); 3,548 ( 0.00%) if !args_to_recover.is_empty() && !is_from_proc_macro(cx, expr) { . lint_unit_args(cx, expr, args_to_recover.as_slice()); . } 217,552 ( 0.01%) } . . fn is_questionmark_desugar_marked_call(expr: &Expr<'_>) -> bool { . use rustc_span::hygiene::DesugaringKind; 41,856 ( 0.00%) if let ExprKind::Call(callee, _) = expr.kind { 16,185 ( 0.00%) callee.span.is_desugaring(DesugaringKind::QuestionMark) 523,705 ( 0.03%) => ???:::is_desugaring (5,395x) . } else { . false . } . } . . fn lint_unit_args<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>, args_to_recover: &[&'tcx Expr<'tcx>]) { . let mut applicability = Applicability::MachineApplicable; . let (singular, plural) = if args_to_recover.len() > 1 { -- line 69 ---------------------------------------- 11,275 ( 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 { 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 7,789 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 2,700 ( 0.00%) items, . .. 2,810 ( 0.00%) }) = item.kind . { 2,700 ( 0.00%) let did = of_trait.trait_ref.path.res.def_id(); . if paths::SERDE_DE_VISITOR.matches(cx, did) { . let mut seen_str = None; . let mut seen_string = None; . for item in items { . match cx.tcx.item_name(item.owner_id) { . sym::visit_str => seen_str = Some(cx.tcx.def_span(item.owner_id)), . sym::visit_string => seen_string = Some(cx.tcx.def_span(item.owner_id)), . _ => {}, -- line 42 ---------------------------------------- -- line 49 ---------------------------------------- . cx, . SERDE_API_MISUSE, . span, . "you should not implement `visit_string` without also implementing `visit_str`", . ); . } . } . } 25,536 ( 0.00%) } . } 1,350 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs -------------------------------------------------------------------------------- Ir -- line 66 ---------------------------------------- . /// Collection of any type parameters with trait bounds that appear in a where clause. . where_bounds: FxHashSet, . /// The entire `Generics` object of the function, useful for querying purposes. . generics: &'tcx Generics<'tcx>, . } . . impl<'cx, 'tcx> TypeWalker<'cx, 'tcx> { . fn new(cx: &'cx LateContext<'tcx>, generics: &'tcx Generics<'tcx>) -> Self { 290 ( 0.00%) let ty_params = generics . .params . .iter() 563 ( 0.00%) .filter_map(|param| match param.kind { 24 ( 0.00%) GenericParamKind::Type { synthetic, .. } if !synthetic => Some((param.def_id.into(), param.span)), . _ => None, . }) . .collect(); . 1,335 ( 0.00%) Self { . cx, . ty_params, . inline_bounds: FxHashMap::default(), . where_bounds: FxHashSet::default(), . generics, . } . } . -- line 91 ---------------------------------------- -- line 101 ---------------------------------------- . . fn emit_sugg(&self, spans: Vec, msg: String, help: &'static str) { . let suggestions: Vec<(Span, String)> = spans.iter().copied().zip(std::iter::repeat(String::new())).collect(); . span_lint_and_then(self.cx, EXTRA_UNUSED_TYPE_PARAMETERS, spans, msg, |diag| { . diag.multipart_suggestion(help, suggestions, Applicability::MaybeIncorrect); . }); . } . 1,160 ( 0.00%) fn emit_lint(&self) { 435 ( 0.00%) let explicit_params = self . .generics . .params . .iter() . .filter(|param| !param.is_elided_lifetime() && !param.is_impl_trait()) . .collect::>(); . . let extra_params = explicit_params . .iter() . .enumerate() . .filter(|(_, param)| self.ty_params.contains_key(¶m.def_id.to_def_id())) . .collect::>(); . 290 ( 0.00%) let (msg, help) = match extra_params.len() { . 0 => return, . 1 => ( . format!( . "type parameter `{}` goes unused in function definition", . extra_params[0].1.name.ident() . ), . "consider removing the parameter", . ), -- line 131 ---------------------------------------- -- line 183 ---------------------------------------- . let prev_span = self.get_bound_span(prev); . self.get_bound_span(param).with_lo(prev_span.hi()) . } . }) . .collect() . }; . self.emit_sugg(spans, msg, help); . } 1,160 ( 0.00%) } . } . . /// Given a generic bound, if the bound is for a trait that's not a `LangItem`, return the . /// `LocalDefId` for that trait. . fn bound_to_trait_def_id(bound: &GenericBound<'_>) -> Option { 30 ( 0.00%) bound.trait_ref()?.trait_def_id()?.as_local() 195 ( 0.00%) => ???:::trait_def_id (15x) . } . . impl<'tcx> Visitor<'tcx> for TypeWalker<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . 12 ( 0.00%) fn visit_ty(&mut self, t: &'tcx Ty<'tcx, AmbigArg>) { 41 ( 0.00%) if let Some((def_id, _)) = t.peel_refs().as_generic_param() { . self.ty_params.remove(&def_id); . } else { 3,176 ( 0.00%) walk_ty(self, t); 1,650 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (24x) . } 3 ( 0.00%) } . 63 ( 0.00%) fn visit_where_predicate(&mut self, predicate: &'tcx WherePredicate<'tcx>) { . let span = predicate.span; 36 ( 0.00%) if let WherePredicateKind::BoundPredicate(predicate) = predicate.kind { . // Collect spans for any bounds on type parameters. 45 ( 0.00%) if let Some((def_id, _)) = predicate.bounded_ty.peel_refs().as_generic_param() { 30 ( 0.00%) match predicate.origin { . PredicateOrigin::GenericParam => { . self.inline_bounds.insert(def_id, span); . }, . PredicateOrigin::WhereClause => { . self.where_bounds.insert(def_id); . }, . PredicateOrigin::ImplTrait => (), . } . . // If the bound contains non-public traits, err on the safe side and don't lint the . // corresponding parameter. 9 ( 0.00%) if !predicate . .bounds . .iter() . .filter_map(bound_to_trait_def_id) 21 ( 0.00%) .all(|id| self.cx.effective_visibilities.is_exported(id)) 57 ( 0.00%) => ???:::is_exported (1x) . { . self.ty_params.remove(&def_id); . } . } else { . // If the bounded type isn't a generic param, but is instead a concrete generic . // type, any params we find nested inside of it are being used as concrete types, . // and can therefore can be considered used. So, we're fine to walk the left-hand . // side of the where bound. . walk_unambig_ty(self, predicate.bounded_ty); . } 9 ( 0.00%) for bound in predicate.bounds { . walk_param_bound(self, bound); . } . } 72 ( 0.00%) } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 165 ( 0.00%) self.cx.tcx . } . } . . fn is_empty_body(cx: &LateContext<'_>, body: BodyId) -> bool { 3,273 ( 0.00%) matches!(cx.tcx.hir_body(body).value.kind, ExprKind::Block(b, _) if b.stmts.is_empty() && b.expr.is_none()) 15,688 ( 0.00%) => ???:::hir_body (231x) . } . . impl<'tcx> LateLintPass<'tcx> for ExtraUnusedTypeParameters { 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 6,384 ( 0.00%) if let ItemKind::Fn { 248 ( 0.00%) generics, 462 ( 0.00%) body: body_id, . .. . } = item.kind 248 ( 0.00%) && !generics.params.is_empty() 390 ( 0.00%) && !is_empty_body(cx, body_id) 1,610 ( 0.00%) && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) 12,120 ( 0.00%) => ???:::is_exported (230x) 345 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) 230 ( 0.00%) && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, generics); 230 ( 0.00%) walk_item(&mut walker, item); 552,165 ( 0.03%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_item:: (115x) 115 ( 0.00%) walker.emit_lint(); 13,355 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::emit_lint (115x) . } 25,536 ( 0.00%) } . 10,528 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { . // Only lint on inherent methods, not trait methods. 3,008 ( 0.00%) if let ImplItemKind::Fn(.., body_id) = item.kind 2,876 ( 0.00%) && !item.generics.params.is_empty() 5,295 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 158,322 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1,059x) 290 ( 0.00%) && !is_empty_body(cx, body_id) 1,288 ( 0.00%) && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) 10,323 ( 0.00%) => ???:::is_exported (184x) 90 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) 60 ( 0.00%) && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, item.generics); 60 ( 0.00%) walk_impl_item(&mut walker, item); 112,207 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item:: (30x) 30 ( 0.00%) walker.emit_lint(); 3,020 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::emit_lint (30x) . } 12,032 ( 0.00%) } . } 9,326 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . "detects cases of references to owned empty strings being passed as an argument to a function expecting `&str`" . } . . declare_lint_pass!(UnnecessaryOwnedEmptyStrings => [ . UNNECESSARY_OWNED_EMPTY_STRINGS, . ]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyStrings { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 57,672 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner_expr) = expr.kind 1,224 ( 0.00%) && let ExprKind::Call(fun, args) = inner_expr.kind 96 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 128 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 736 ( 0.00%) => ???:::qpath_res (32x) 160 ( 0.00%) && let ty::Ref(_, inner_str, _) = cx.typeck_results().expr_ty_adjusted(expr).kind() 2,535 ( 0.00%) => ???:::expr_ty_adjusted (32x) 96 ( 0.00%) && inner_str.is_str() . { . let fun_name = cx.tcx.get_diagnostic_name(fun_def_id); . if fun_name == Some(sym::string_new) { . span_lint_and_sugg( . cx, . UNNECESSARY_OWNED_EMPTY_STRINGS, . expr.span, . "usage of `&String::new()` for a function expecting a `&str` argument", -- line 53 ---------------------------------------- -- line 69 ---------------------------------------- . expr.span, . "usage of `&String::from(\"\")` for a function expecting a `&str` argument", . "try", . "\"\"".to_owned(), . Applicability::MachineApplicable, . ); . } . } 217,552 ( 0.01%) } . } 224 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . use rustc_lint::LateContext; . use rustc_middle::mir::FakeReadCause; . use rustc_middle::ty; . use rustc_span::{BytePos, Ident, Span, SyntaxContext}; . . use super::{COLLAPSIBLE_MATCH, pat_contains_disallowed_or}; . use crate::collapsible_if::{parens_around, peel_parens}; . 7,260 ( 0.00%) pub(super) fn check_match<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, arms: &'tcx [Arm<'_>], msrv: Msrv) { 1,533 ( 0.00%) if let Some(els_arm) = arms.iter().rfind(|arm| arm_is_wild_like(cx, arm)) { . let last_non_wildcard = arms.iter().rposition(|arm| !arm_is_wild_like(cx, arm)); . for (idx, arm) in arms.iter().enumerate() { . let only_wildcards_after = last_non_wildcard.is_none_or(|lnw| idx >= lnw); 3,220 ( 0.00%) check_arm( 19,216 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm (322x) . cx, 322 ( 0.00%) arm.span.ctxt(), . true, 322 ( 0.00%) arm.pat, . expr, 322 ( 0.00%) arm.body, . arm.guard, . Some(els_arm.body), . msrv, . only_wildcards_after, . ); . } . } 5,808 ( 0.00%) } . . pub(super) fn check_if_let<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . pat: &'tcx Pat<'_>, . body: &'tcx Expr<'_>, . else_expr: Option<&'tcx Expr<'_>>, . let_expr: &'tcx Expr<'_>, . msrv: Msrv, . ) { 560 ( 0.00%) check_arm(cx, ctxt, false, pat, let_expr, body, None, else_expr, msrv, false); 4,841 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm (70x) . } . . #[expect(clippy::too_many_arguments, clippy::too_many_lines)] 5,880 ( 0.00%) fn check_arm<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . outer_is_match: bool, . outer_pat: &'tcx Pat<'tcx>, . outer_cond: &'tcx Expr<'tcx>, . outer_then_body: &'tcx Expr<'tcx>, . outer_guard: Option<&'tcx Expr<'tcx>>, . outer_else_body: Option<&'tcx Expr<'tcx>>, . msrv: Msrv, . only_wildcards_after: bool, . ) { . let inner_expr = peel_blocks_with_stmt(outer_then_body); 1,580 ( 0.00%) if let Some(inner) = IfLetOrMatch::parse(cx, inner_expr) 8,256 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse (392x) 6 ( 0.00%) && let Some((inner_scrutinee, inner_then_pat, inner_else_body)) = match inner { . IfLetOrMatch::IfLet(scrutinee, pat, _, els, _) => Some((scrutinee, pat, els)), . IfLetOrMatch::Match(scrutinee, arms, ..) => { 6 ( 0.00%) if arms.len() == 2 && arms.iter().all(|a| a.guard.is_none()) . // if there are more than two arms, collapsing would be non-trivial . // one of the arms must be "wild-like" . && let Some(wild_idx) = arms.iter().rposition(|a| arm_is_wild_like(cx, a)) . { 6 ( 0.00%) let (then, els) = (&arms[1 - wild_idx], &arms[wild_idx]); 10 ( 0.00%) Some((scrutinee, then.pat, Some(els.body))) . } else { . None . } . }, . } 4 ( 0.00%) && outer_pat.span.eq_ctxt(inner_scrutinee.span) . // match expression must be a local binding . // match { .. } 8 ( 0.00%) && let Some(binding_id) = peel_ref_operators(cx, inner_scrutinee).res_local_id() 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_ref_operators (2x) . && !pat_contains_disallowed_or(cx, inner_then_pat, msrv) . // the binding must come from the pattern of the containing match arm . // .... => match { .. } . && let (Some((binding_ident, binding_span)), is_innermost_parent_pat_struct) = . find_pat_binding_and_is_innermost_parent_pat_struct(outer_pat, binding_id) . // the "else" branches must be equal . && match (outer_else_body, inner_else_body) { . (None, None) => true, -- line 97 ---------------------------------------- -- line 135 ---------------------------------------- . let outer_cond_msg = format!("use: `{}{}`", snippet(cx, outer_cond.span, ".."), method); . help_span.push_span_label(outer_cond.span, outer_cond_msg); . } . diag.span_help( . help_span, . "the outer pattern can be modified to include the inner pattern", . ); . }); 784 ( 0.00%) } else if outer_is_match // Leave if-let to the `collapsible_if` lint . && only_wildcards_after // adding a guard allows fall-through; unsafe if other arms follow . && let Some(inner) = If::hir(inner_expr) . && outer_pat.span.eq_ctxt(inner.cond.span) . && match (outer_else_body, inner.r#else) { . (None, None) => true, . (None, Some(e)) | (Some(e), None) => is_unit_expr(e), . (Some(a), Some(b)) => SpanlessEq::new(cx).eq_expr(ctxt, a, b), . } -- line 151 ---------------------------------------- -- line 204 ---------------------------------------- . let else_inner_span = inner.then.span.shrink_to_hi().to(else_inner.span); . sugg.push((else_inner_span, String::new())); . } . . diag.multipart_suggestion("collapse nested if block", sugg, Applicability::MachineApplicable); . }, . ); . } 3,136 ( 0.00%) } . . /// A "wild-like" arm has a wild (`_`) or `None` pattern and no guard. Such arms can be "collapsed" . /// into a single wild arm without any significant loss in semantics or readability. . fn arm_is_wild_like(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { 1,851 ( 0.00%) if arm.guard.is_some() { . return false; . } 8,455 ( 0.00%) matches!(arm.pat.kind, PatKind::Binding(..) | PatKind::Wild) || is_none_pattern(cx, arm.pat) 25,809 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (1,543x) . } . . fn find_pat_binding_and_is_innermost_parent_pat_struct(pat: &Pat<'_>, hir_id: HirId) -> (Option<(Ident, Span)>, bool) { . let mut binding = None; . let mut is_innermost_parent_pat_struct = false; . pat.walk_short(|p| match p.kind { . // ignore OR patterns . PatKind::Or(_) => false, -- line 228 ---------------------------------------- 3,219 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/erase.rs -------------------------------------------------------------------------------- Ir -- line 20 ---------------------------------------- . use crate::ty::{self, Ty, TyCtxt}; . use crate::{mir, thir, traits}; . . unsafe extern "C" { . type NoAutoTraits; . } . . /// Internal implementation detail of [`Erased`]. 5,899 ( 0.00%) #[derive(Copy, Clone)] . pub struct ErasedData { . /// We use `MaybeUninit` here to make sure it's legal to store a transmuted . /// value that isn't actually of type `Storage`. . data: MaybeUninit, . /// `Storage` is an erased type, so we use an external type here to opt-out of auto traits . /// as those would be incorrect. . no_auto_traits: PhantomData, . } -- line 36 ---------------------------------------- -- line 96 ---------------------------------------- . . /// Restores an erased value to its real type. . /// . /// This relies on the fact that `Erased` and `Erased` are type-checked . /// as distinct types, even if they use the same storage type. . #[inline(always)] . #[define_opaque(Erased)] . pub fn restore_val(erased_value: Erased) -> T { 14,982 ( 0.00%) let ErasedData { data, .. }: ErasedData<::Storage> = erased_value; . // See comment in `erase_val` for why we use `transmute_unchecked`. . // . // SAFETY: Due to the use of impl Trait in `Erased` the only way to safely create an instance . // of `Erased` is to call `erase_val`, so we know that `erased_value.data` is a valid instance . // of `T` of the right size. 4,978 ( 0.00%) unsafe { transmute_unchecked::, T>(data) } . } . . impl Erasable for &'_ T { . type Storage = [u8; size_of::<&'_ ()>()]; . } . . impl Erasable for &'_ [T] { . type Storage = [u8; size_of::<&'_ [()]>()]; -- line 118 ---------------------------------------- 5,549 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/doc_suspicious_footnotes.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_hir::attrs::AttributeKind; . use rustc_hir::{AttrStyle, Attribute}; . use rustc_lint::{LateContext, LintContext as _}; . . use std::ops::Range; . . use super::{DOC_SUSPICIOUS_FOOTNOTES, Fragments}; . 18,781 ( 0.00%) pub fn check(cx: &LateContext<'_>, doc: &str, range: Range, fragments: &Fragments<'_>, attrs: &[Attribute]) { . for i in doc[range.clone()] . .bytes() . .enumerate() 67,800 ( 0.00%) .filter_map(|(i, c)| if c == b'[' { Some(i) } else { None }) . { 6 ( 0.00%) let start = i + range.start; 9 ( 0.00%) if doc.as_bytes().get(start + 1) == Some(&b'^') . && let Some(end) = all_numbers_upto_brace(doc, start + 2) . && doc.as_bytes().get(end) != Some(&b':') . && doc.as_bytes().get(start - 1) != Some(&b'\\') . && let Some(this_fragment) = { . // the `doc` string contains all fragments concatenated together . // figure out which one this suspicious footnote comes from . let mut starting_position = 0; . let mut found_fragment = fragments.fragments.last(); -- line 28 ---------------------------------------- -- line 107 ---------------------------------------- . Applicability::HasPlaceholders, . ); . } . } . }, . ); . } . } 21,464 ( 0.00%) } . . fn all_numbers_upto_brace(text: &str, i: usize) -> Option { . for (j, c) in text.as_bytes()[i..].iter().copied().enumerate().take(64) { . if c == b']' && j != 0 { . return Some(i + j + 1); . } . if !c.is_ascii_digit() || j >= 64 { . break; -- line 123 ---------------------------------------- 21,464 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs -------------------------------------------------------------------------------- Ir -- line 88 ---------------------------------------- . &'tcx hir::Expr<'tcx>, . &'tcx hir::FnDecl<'tcx>, . ty::Asyncness, . &'tcx [Param<'tcx>], . CaptureBy, . )> { . let mut data = None; . 4,344 ( 0.00%) while let ExprKind::Closure(closure) = expr.kind . && let body = cx.tcx.hir_body(closure.body) . && !contains_early_return(body.value) . && steps > 0 . { . let mut unwrapped_body_value = body.value; . let mut asyncness = ty::Asyncness::No; . let mut capture_clause = closure.capture_clause; . -- line 104 ---------------------------------------- -- line 147 ---------------------------------------- . /// ^^ this is the call expression we were given . /// ^^ this is what we want to return (and the depth is 3) . /// ``` . fn get_parent_call_exprs<'tcx>( . cx: &LateContext<'tcx>, . mut expr: &'tcx hir::Expr<'tcx>, . ) -> (&'tcx hir::Expr<'tcx>, usize) { . let mut depth = 1; 10,860 ( 0.00%) while let Some(parent) = get_parent_expr(cx, expr) 264,278 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (2,172x) 2,172 ( 0.00%) && let ExprKind::Call(recv, _) = parent.kind . && expr.span == recv.span . { . expr = parent; . depth += 1; . } . (expr, depth) . } . . impl<'tcx> LateLintPass<'tcx> for RedundantClosureCall { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 154,698 ( 0.01%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 2,178 ( 0.00%) if let ExprKind::Call(recv, _) = expr.kind . // don't lint if the receiver is a call, too. . // we do this in order to prevent linting multiple times; consider: . // `(|| || 1)()()` . // ^^ we only want to lint for this call (but we walk up the calls to consider both calls). . // without this check, we'd end up linting twice. 4,356 ( 0.00%) && !matches!(recv.kind, ExprKind::Call(..)) . // Check if `recv` comes from a macro expansion. If it does, make sure that it's an expansion that is . // the same as the one the call is in. . // For instance, let's assume `x!()` returns a closure: . // B ---v . // x!()() . // ^- A . // The call happens in the expansion `A`, while the closure originates from the expansion `B`. . // We don't want to suggest replacing `x!()()` with `x!()`. 4,356 ( 0.00%) && recv.span.ctxt().outer_expn() == expr.span.ctxt().outer_expn() . && let (full_expr, call_depth) = get_parent_call_exprs(cx, expr) . && let Some((mut body, fn_decl, coroutine_kind, params, capture_clause)) = . find_innermost_closure(cx, recv, call_depth) . // outside macros we lint properly. Inside macros, we lint only ||() style closures. . && (!matches!(expr.span.ctxt().outer_expn_data().kind, ExpnKind::Macro(_, _)) || params.is_empty()) . { . span_lint_and_then( . cx, -- line 194 ---------------------------------------- -- line 229 ---------------------------------------- . .maybe_paren(); . } . . diag.span_suggestion(full_expr.span, "try doing something like", hint, applicability); . } . }, . ); . } 217,552 ( 0.01%) } . 19,880 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx hir::Block<'_>) { . fn count_closure_usage<'tcx>( . cx: &LateContext<'tcx>, . block: &'tcx hir::Block<'_>, . path: &'tcx hir::Path<'tcx>, . ) -> usize { . struct ClosureUsageCount<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . path: &'tcx hir::Path<'tcx>, -- line 247 ---------------------------------------- -- line 265 ---------------------------------------- . self.cx.tcx . } . } . let mut closure_usage_count = ClosureUsageCount { cx, path, count: 0 }; . closure_usage_count.visit_block(block); . closure_usage_count.count . } . 3,310 ( 0.00%) for w in block.stmts.windows(2) { 2,443 ( 0.00%) if let hir::StmtKind::Let(local) = w[0].kind 1,539 ( 0.00%) && let Some(t) = local.init 992 ( 0.00%) && let ExprKind::Closure { .. } = t.kind . && let hir::PatKind::Binding(_, _, ident, _) = local.pat.kind . && let hir::StmtKind::Semi(second) = w[1].kind . && let ExprKind::Assign(_, call, _) = second.kind . && let ExprKind::Call(closure, _) = call.kind . && let ExprKind::Path(hir::QPath::Resolved(_, path)) = closure.kind . && ident == path.segments[0].ident . && count_closure_usage(cx, block, path) == 1 . { -- line 284 ---------------------------------------- -- line 286 ---------------------------------------- . cx, . REDUNDANT_CLOSURE_CALL, . second.hir_id, . second.span, . "closure called just once immediately after it was declared", . ); . } . } 22,720 ( 0.00%) } . } 15,408 ( 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/peekable.rs -------------------------------------------------------------------------------- Ir -- line 17 ---------------------------------------- . pub struct Peekable { . iter: I, . /// Remember a peeked value, even if it was None. . peeked: Option>, . } . . impl Peekable { . pub(in crate::iter) const fn new(iter: I) -> Peekable { 1,096 ( 0.00%) Peekable { iter, peeked: None } . } . } . . // Peekable must remember if a None has been seen in the `.peek()` method. . // It ensures that `.peek(); .peek();` or `.peek(); .next();` only advances the . // underlying iterator at most once. This does not by itself make the iterator . // fused. . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Peekable { . type Item = I::Item; . . #[inline] . fn next(&mut self) -> Option { 17,083 ( 0.00%) match self.peeked.take() { 2,265 ( 0.00%) Some(v) => v, 24,423 ( 0.00%) None => self.iter.next(), 1,972,692 ( 0.11%) => /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next (8,141x) . } . } . . #[inline] . #[rustc_inherit_overflow_checks] . fn count(mut self) -> usize { . match self.peeked.take() { . Some(None) => 0, -- line 49 ---------------------------------------- -- line 210 ---------------------------------------- . /// // After the iterator is finished, so is `peek()` . /// assert_eq!(iter.peek(), None); . /// assert_eq!(iter.next(), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn peek(&mut self) -> Option<&I::Item> { . let iter = &mut self.iter; 405 ( 0.00%) self.peeked.get_or_insert_with(|| iter.next()).as_ref() 100,699 ( 0.01%) => /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next (151x) . } . . /// Returns a mutable reference to the next() value without advancing the iterator. . /// . /// Like [`next`], if there is a value, it is wrapped in a `Some(T)`. . /// But if the iteration is over, `None` is returned. . /// . /// Because `peek_mut()` returns a reference, and many iterators iterate over -- line 226 ---------------------------------------- 15,892 ( 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/hash/sip.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . // the compiler can pick up on just a few simd optimizations by itself. . v0: u64, . v2: u64, . v1: u64, . v3: u64, . } . . macro_rules! compress { 35 ( 0.00%) ($state:expr) => {{ compress!($state.v0, $state.v1, $state.v2, $state.v3) }}; . ($v0:expr, $v1:expr, $v2:expr, $v3:expr) => {{ 2,318 ( 0.00%) $v0 = $v0.wrapping_add($v1); 2,318 ( 0.00%) $v2 = $v2.wrapping_add($v3); . $v1 = $v1.rotate_left(13); . $v1 ^= $v0; . $v3 = $v3.rotate_left(16); . $v3 ^= $v2; . $v0 = $v0.rotate_left(32); . . $v2 = $v2.wrapping_add($v1); . $v0 = $v0.wrapping_add($v3); . $v1 = $v1.rotate_left(17); . $v1 ^= $v2; . $v3 = $v3.rotate_left(21); . $v3 ^= $v0; 35 ( 0.00%) $v2 = $v2.rotate_left(32); . }}; . } . . /// Loads an integer of the desired type from a byte stream, in LE order. Uses . /// `copy_nonoverlapping` to let the compiler generate the most efficient way . /// to load it from a possibly unaligned address. . /// . /// Safety: this performs unchecked indexing of `$buf` at -- line 100 ---------------------------------------- -- line 118 ---------------------------------------- . /// . /// Safety: this performs unchecked indexing of `buf` at `start..start+len`, so . /// that must be in-bounds. . #[inline] . unsafe fn u8to64_le(buf: &[u8], start: usize, len: usize) -> u64 { . debug_assert!(len < 8); . let mut i = 0; // current byte index (from LSB) in the output u64 . let mut out = 0; 1,106 ( 0.00%) if i + 3 < len { . // SAFETY: `i` cannot be greater than `len`, and the caller must guarantee . // that the index start..start+len is in bounds. . out = unsafe { load_int_le!(buf, start + i, u32) } as u64; . i += 4; . } 1,778 ( 0.00%) if i + 1 < len { . // SAFETY: same as above. 228 ( 0.00%) out |= (unsafe { load_int_le!(buf, start + i, u16) } as u64) << (i * 8); 76 ( 0.00%) i += 2 . } 1,106 ( 0.00%) if i < len { . // SAFETY: same as above. 1,650 ( 0.00%) out |= (unsafe { *buf.get_unchecked(start + i) } as u64) << (i * 8); . i += 1; . } . debug_assert_eq!(i, len); . out . } . . impl SipHasher { . /// Creates a new `SipHasher` with the two initial keys set to 0. -- line 147 ---------------------------------------- -- line 195 ---------------------------------------- . }; . state.reset(); . state . } . . #[inline] . const fn reset(&mut self) { . self.length = 0; 550 ( 0.00%) self.state.v0 = self.k0 ^ 0x736f6d6570736575; 550 ( 0.00%) self.state.v1 = self.k1 ^ 0x646f72616e646f6d; . self.state.v2 = self.k0 ^ 0x6c7967656e657261; . self.state.v3 = self.k1 ^ 0x7465646279746573; . self.ntail = 0; . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl super::Hasher for SipHasher { -- line 212 ---------------------------------------- -- line 225 ---------------------------------------- . self.0.hasher.finish() . } . } . . #[unstable(feature = "hashmap_internals", issue = "none")] . impl super::Hasher for SipHasher13 { . #[inline] . fn write(&mut self, msg: &[u8]) { 64 ( 0.00%) self.hasher.write(msg) 1,760 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/sip.rs: as core::hash::Hasher>::write (32x) . } . . #[inline] . fn write_str(&mut self, s: &str) { . self.hasher.write_str(s); . } . . #[inline] -- line 241 ---------------------------------------- -- line 248 ---------------------------------------- . // Note: no integer hashing methods (`write_u*`, `write_i*`) are defined . // for this type. We could add them, copy the `short_write` implementation . // in librustc_data_structures/sip128.rs, and add `write_u*`/`write_i*` . // methods to `SipHasher`, `SipHasher13`, and `DefaultHasher`. This would . // greatly speed up integer hashing by those hashers, at the cost of . // slightly slowing down compile speeds on some benchmarks. See #69152 for . // details. . #[inline] 518 ( 0.00%) fn write(&mut self, msg: &[u8]) { . let length = msg.len(); 518 ( 0.00%) self.length += length; . . let mut needed = 0; . 1,554 ( 0.00%) if self.ntail != 0 { 408 ( 0.00%) needed = 8 - self.ntail; . // SAFETY: `cmp::min(length, needed)` is guaranteed to not be over `length` 816 ( 0.00%) self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << (8 * self.ntail); 408 ( 0.00%) if length < needed { 169 ( 0.00%) self.ntail += length; . return; . } else { 35 ( 0.00%) self.state.v3 ^= self.tail; . S::c_rounds(&mut self.state); 70 ( 0.00%) self.state.v0 ^= self.tail; . self.ntail = 0; . } . } . . // Buffered tail is now flushed, process new input. 349 ( 0.00%) let len = length - needed; 698 ( 0.00%) let left = len & 0x7; // len % 8 . . let mut i = needed; 986 ( 0.00%) while i < len - left { . // SAFETY: because `len - left` is the biggest multiple of 8 under . // `len`, and because `i` starts at `needed` where `len` is `length - needed`, . // `i + 8` is guaranteed to be less than or equal to `length`. . let mi = unsafe { load_int_le!(msg, i, u64) }; . 144 ( 0.00%) self.state.v3 ^= mi; . S::c_rounds(&mut self.state); 144 ( 0.00%) self.state.v0 ^= mi; . 144 ( 0.00%) i += 8; . } . . // SAFETY: `i` is now `needed + len.div_euclid(8) * 8`, . // so `i + left` = `needed + len` = `length`, which is by . // definition equal to `msg.len()`. 349 ( 0.00%) self.tail = unsafe { u8to64_le(msg, i, left) }; . self.ntail = left; 1,036 ( 0.00%) } . . #[inline] . fn write_str(&mut self, s: &str) { . // This hasher works byte-wise, and `0xFF` cannot show up in a `str`, . // so just hashing the one extra byte is enough to be prefix-free. 727 ( 0.00%) self.write(s.as_bytes()); 94 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/sip.rs: as core::hash::Hasher>::write (2x) . self.write_u8(0xFF); . } . . #[inline] . fn finish(&self) -> u64 { 275 ( 0.00%) let mut state = self.state; . 825 ( 0.00%) let b: u64 = ((self.length as u64 & 0xff) << 56) | self.tail; . 275 ( 0.00%) state.v3 ^= b; . S::c_rounds(&mut state); 275 ( 0.00%) state.v0 ^= b; . 275 ( 0.00%) state.v2 ^= 0xff; . S::d_rounds(&mut state); . 825 ( 0.00%) state.v0 ^ state.v1 ^ state.v2 ^ state.v3 . } . } . . impl Clone for Hasher { . #[inline] . fn clone(&self) -> Hasher { . Hasher { . k0: self.k0, -- line 331 ---------------------------------------- 3,905 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_err_arm.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::visitors::is_local_used; . use clippy_utils::{is_in_const_context, is_wild, peel_blocks_with_stmt}; . use rustc_hir::{Arm, Expr, PatKind, intravisit}; . use rustc_lint::LateContext; . use rustc_span::symbol::{kw, sym}; . . use super::MATCH_WILD_ERR_ARM; . 5,830 ( 0.00%) pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'tcx>]) { . // `unwrap`/`expect` is not (yet) const, so we want to allow this in const contexts for now 1,590 ( 0.00%) if is_in_const_context(cx) { 174,631 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (530x) . return; . } . 1,060 ( 0.00%) let ex_ty = cx.typeck_results().expr_ty(ex).peel_refs(); 21,224 ( 0.00%) => ???:::expr_ty (530x) 1,002 ( 0.00%) if ex_ty.is_diag_item(cx, sym::Result) { . for arm in arms { 84 ( 0.00%) if let PatKind::TupleStruct(ref path, inner, _) = arm.pat.kind { 40 ( 0.00%) let path_str = rustc_hir_pretty::qpath_to_string( 7,703 ( 0.00%) => ???:rustc_hir_pretty::qpath_to_string (10x) . #[allow(trivial_casts)] 30 ( 0.00%) &(&cx.tcx as &dyn intravisit::HirTyCtxt<'_>), . path, . ); 1 ( 0.00%) if path_str == "Err" { . let mut matching_wild = inner.iter().any(is_wild); 1 ( 0.00%) let mut ident_bind_name = kw::Underscore; . if !matching_wild { . // Looking for unused bindings (i.e.: `_e`) . for pat in inner { 10 ( 0.00%) if let PatKind::Binding(_, id, ident, None) = pat.kind 3 ( 0.00%) && ident.as_str().starts_with('_') 32 ( 0.00%) => ???:::as_str (1x) . && !is_local_used(cx, arm.body, id) . { . ident_bind_name = ident.name; . matching_wild = true; . } . } . } 3 ( 0.00%) if matching_wild . && let Some(macro_call) = root_macro_call(peel_blocks_with_stmt(arm.body).span) . && is_panic(cx, macro_call.def_id) . { . // `Err(_)` or `Err(_e)` arm with `panic!` found . span_lint_and_note( . cx, . MATCH_WILD_ERR_ARM, . arm.pat.span, -- line 50 ---------------------------------------- -- line 52 ---------------------------------------- . None, . "match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable", . ); . } . } . } . } . } 4,240 ( 0.00%) } 11 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use rustc_ast::PatKind; . use rustc_ast::visit::FnKind; . use rustc_data_structures::fx::FxHashMap; . use rustc_lint::EarlyContext; . use rustc_span::Span; . . use super::DUPLICATE_UNDERSCORE_ARGUMENT; . 14,312 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, fn_kind: FnKind<'_>) { . let mut registered_names: FxHashMap = FxHashMap::default(); . . for arg in &fn_kind.decl().inputs { 17,658 ( 0.00%) if let PatKind::Ident(_, ident, None) = arg.pat.kind { . let arg_name = ident.to_string(); . 6 ( 0.00%) if let Some(arg_name) = arg_name.strip_prefix('_') { . if let Some(correspondence) = registered_names.get(arg_name) { . span_lint( . cx, . DUPLICATE_UNDERSCORE_ARGUMENT, . *correspondence, . format!( . "`{arg_name}` already exists, having another argument having almost the same \ . name makes code comprehension and documentation more difficult" . ), . ); . } . } else { 9,735 ( 0.00%) registered_names.insert(arg_name, arg.pat.span); . } . } . } 14,312 ( 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/traits.rs -------------------------------------------------------------------------------- Ir -- line 121 ---------------------------------------- . /// Check that a range is in bounds for slicing a string. . /// If this returns true, it is safe to call `slice.get_unchecked(range)` or . /// `slice.get_unchecked_mut(range)`. . #[inline(always)] . const fn check_range(slice: &str, range: crate::range::Range) -> bool { . let crate::range::Range { start, end } = range; . let bytes = slice.as_bytes(); . 72,805 ( 0.00%) if start > end || end > slice.len() { . return false; . } . 34,850 ( 0.00%) if start == slice.len() { . // If `start == slice.len()`, then `end == slice.len()` must also be true. . return true; . } . . // SAFETY: . // `start > end || end > slice.len()` is false, so `start <= end <= slice.len()` is true. . // `start == slice.len()` is false, so `start < slice.len()` is also true. . // . // No need to check for `end == 0`, because if `end == 0` is true then `start == slice.len()` . // would also be true, which is already handled above. . unsafe { 48,398 ( 0.00%) (start == 0 || bytes.as_ptr().add(start).read().is_utf8_char_boundary()) 31,848 ( 0.00%) && (end == slice.len() || bytes.as_ptr().add(end).read().is_utf8_char_boundary()) . } . } . . /// Implements substring slicing with syntax `&self[begin .. end]` or `&mut . /// self[begin .. end]`. . /// . /// Returns a slice of the given string from the byte range . /// [`begin`, `end`). -- line 154 ---------------------------------------- -- line 213 ---------------------------------------- . end: usize = self.end, . len: usize = slice.len() . ) => end >= start && end <= len, . ); . . // SAFETY: the caller guarantees that `self` is in bounds of `slice` . // which satisfies all the conditions for `add`. . unsafe { 63,274 ( 0.00%) let new_len = unchecked_sub(self.end, self.start); . slice.as_ptr().add(self.start).cast_slice(new_len) as *const str . } . } . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . let slice = slice as *mut [u8]; . -- line 229 ---------------------------------------- -- line 254 ---------------------------------------- . } . . #[stable(feature = "new_range_api", since = "1.96.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex for range::Range { . type Output = str; . #[inline] . fn get(self, slice: &str) -> Option<&Self::Output> { 26,711 ( 0.00%) if check_range(slice, self) { . // SAFETY: just checked that `self` is in bounds, . // and we are passing in a safe reference, so the return value will also be one. . // We also checked char boundaries, so this is valid UTF-8. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } -- line 270 ---------------------------------------- -- line 297 ---------------------------------------- . end: usize = self.end, . len: usize = slice.len() . ) => end >= start && end <= len, . ); . . // SAFETY: the caller guarantees that `self` is in bounds of `slice` . // which satisfies all the conditions for `add`. . unsafe { 1,689 ( 0.00%) let new_len = unchecked_sub(self.end, self.start); . slice.as_ptr().add(self.start).cast_slice(new_len) as *const str . } . } . #[inline] . #[track_caller] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . let slice = slice as *mut [u8]; . -- line 313 ---------------------------------------- -- line 416 ---------------------------------------- . /// Panics if `end` does not point to the starting byte offset of a . /// character (as defined by `is_char_boundary`), or if `end > len`. . #[stable(feature = "str_checked_slicing", since = "1.20.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex for ops::RangeTo { . type Output = str; . #[inline] . fn get(self, slice: &str) -> Option<&Self::Output> { 863 ( 0.00%) if slice.is_char_boundary(self.end) { . // SAFETY: just checked that `end` is on a char boundary, . // and we are passing in a safe reference, so the return value will also be one. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } . #[inline] -- line 432 ---------------------------------------- -- line 447 ---------------------------------------- . #[inline] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . // SAFETY: the caller has to uphold the safety contract for `get_unchecked_mut`. . unsafe { (0..self.end).get_unchecked_mut(slice) } . } . #[inline] . fn index(self, slice: &str) -> &Self::Output { . let end = self.end; 291 ( 0.00%) match self.get(slice) { . Some(s) => s, . None => super::slice_error_fail(slice, 0, end), . } . } . #[inline] . fn index_mut(self, slice: &mut str) -> &mut Self::Output { . if slice.is_char_boundary(self.end) { . // SAFETY: just checked that `end` is on a char boundary, -- line 463 ---------------------------------------- -- line 485 ---------------------------------------- . /// Panics if `begin` does not point to the starting byte offset of . /// a character (as defined by `is_char_boundary`), or if `begin > len`. . #[stable(feature = "str_checked_slicing", since = "1.20.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex for ops::RangeFrom { . type Output = str; . #[inline] . fn get(self, slice: &str) -> Option<&Self::Output> { 38 ( 0.00%) if slice.is_char_boundary(self.start) { . // SAFETY: just checked that `start` is on a char boundary, . // and we are passing in a safe reference, so the return value will also be one. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } . #[inline] -- line 501 ---------------------------------------- 49,096 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_hir::def::{DefKind, Res}; . use rustc_hir::{BinOpKind, Expr, ExprKind, Node, Path, QPath}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::{Span, SyntaxContext, kw}; . . use super::IDENTITY_OP; . 4,296 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { . if !is_allowed(cx, expr, op, left, right) { . return; -- line 22 ---------------------------------------- -- line 23 ---------------------------------------- . } . . // we need to know whether a ref is coerced to a value . // if a ref is coerced, then the suggested lint must deref it . // e.g. `let _: i32 = x+0` with `x: &i32` should be replaced with `let _: i32 = *x`. . // we do this by checking the _kind_ of the type of the expression . // if it's a ref, we then check whether it is erased, and that's it. . let (peeled_left_span, left_is_coerced_to_value) = { 220 ( 0.00%) let expr = peel_hir_expr_refs(left).0; 550 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (110x) 110 ( 0.00%) let span = expr.span; . let is_coerced = expr_is_erased_ref(cx, expr); . (span, is_coerced) . }; . . let (peeled_right_span, right_is_coerced_to_value) = { 110 ( 0.00%) let expr = peel_hir_expr_refs(right).0; 550 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (110x) 110 ( 0.00%) let span = expr.span; . let is_coerced = expr_is_erased_ref(cx, expr); . (span, is_coerced) . }; . 440 ( 0.00%) let ctxt = expr.span.ctxt(); 409 ( 0.00%) match op { . BinOpKind::Add | BinOpKind::BitOr | BinOpKind::BitXor => { 238 ( 0.00%) if is_redundant_op(cx, left, 0, ctxt) { 9,579 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (34x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); . } else if is_redundant_op(cx, right, 0, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } . }, . BinOpKind::Shl | BinOpKind::Shr | BinOpKind::Sub if is_redundant_op(cx, right, 0, ctxt) => { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . }, . BinOpKind::Mul => { 14 ( 0.00%) if is_redundant_op(cx, left, 1, ctxt) { 710 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (2x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); . } else if is_redundant_op(cx, right, 1, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } . }, . BinOpKind::Div if is_redundant_op(cx, right, 1, ctxt) => { -- line 68 ---------------------------------------- -- line 73 ---------------------------------------- . if is_redundant_op(cx, left, -1, ctxt) { . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); . } else if is_redundant_op(cx, right, -1, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } . }, 2 ( 0.00%) BinOpKind::Rem => check_remainder(cx, left, right, expr.span, left.span), . _ => (), . } 2,864 ( 0.00%) } . . fn expr_is_erased_ref(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 1,210 ( 0.00%) match cx.typeck_results().expr_ty(expr).kind() { 8,828 ( 0.00%) => ???:::expr_ty (220x) . ty::Ref(r, ..) => r.is_erased(), . _ => false, . } . } . . #[derive(Copy, Clone)] . enum Parens { . Needed, -- line 95 ---------------------------------------- -- line 168 ---------------------------------------- . expr: &'tcx Expr<'tcx>, . cmp: BinOpKind, . left: &Expr<'tcx>, . right: &Expr<'tcx>, . ) -> bool { . // Exclude case where the left or right side is associated function call returns a type which is . // `Self` that is not given explicitly, and the expression is not a let binding's init . // expression and the let binding has a type annotation, or a function's return value. 3,938 ( 0.00%) if (is_assoc_fn_without_type_instance(cx, left) || is_assoc_fn_without_type_instance(cx, right)) 15,877 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_assoc_fn_without_type_instance (716x) . && !is_expr_used_with_type_annotation(cx, expr) . { . return false; . } . . // This lint applies to integers and their references 1,074 ( 0.00%) cx.typeck_results().expr_ty(left).peel_refs().is_integral() 14,384 ( 0.00%) => ???:::expr_ty (358x) 330 ( 0.00%) && cx.typeck_results().expr_ty(right).peel_refs().is_integral() 4,400 ( 0.00%) => ???:::expr_ty (110x) . // `1 << 0` is a common pattern in bit manipulation code 110 ( 0.00%) && !(cmp == BinOpKind::Shl . && is_zero_integer_const(cx, right, expr.span.ctxt()) . && integer_const(cx, left, expr.span.ctxt()) == Some(1)) . } . . fn check_remainder(cx: &LateContext<'_>, left: &Expr<'_>, right: &Expr<'_>, span: Span, arg: Span) { 4 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 112 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (2x) . let ctxt = span.ctxt(); 30 ( 0.00%) if match (ecx.eval_full_int(left, ctxt), ecx.eval_full_int(right, ctxt)) { 870 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_full_int (4x) . (Some(FullInt::S(lv)), Some(FullInt::S(rv))) => lv.abs() < rv.abs(), . (Some(FullInt::U(lv)), Some(FullInt::U(rv))) => lv < rv, . _ => return, . } { . span_ineffective_operation(cx, span, arg, Parens::Unneeded, false); . } . } . 1,164 ( 0.00%) fn is_redundant_op(cx: &LateContext<'_>, e: &Expr<'_>, m: i8, ctxt: SyntaxContext) -> bool { 937 ( 0.00%) if let Some(Constant::Int(v)) = ConstEvalCtxt::new(cx).eval_local(e, ctxt).map(Constant::peel_refs) { 15,079 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (97x) 5,432 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (97x) 129 ( 0.00%) let check = match *cx.typeck_results().expr_ty(e).peel_refs().kind() { 1,720 ( 0.00%) => ???:::expr_ty (43x) . ty::Int(ity) => unsext(cx.tcx, -1_i128, ity), 258 ( 0.00%) ty::Uint(uty) => clip(cx.tcx, !0, uty), 1,069 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (43x) . _ => return false, . }; 138 ( 0.00%) if match m { 40 ( 0.00%) 0 => v == 0, . -1 => v == check, 6 ( 0.00%) 1 => v == 1, . _ => unreachable!(), . } { . return true; . } . } . false 776 ( 0.00%) } . . fn span_ineffective_operation( . cx: &LateContext<'_>, . span: Span, . arg: Span, . parens: Parens, . is_ref_coerced_to_val: bool, . ) { -- line 228 ---------------------------------------- -- line 268 ---------------------------------------- . /// 0 . /// } . /// } . /// fn test() { . /// let _ = 0usize + &Default::default(); . /// let _ = 0usize + &Def::def(); . /// } . /// ``` 4,296 ( 0.00%) fn is_assoc_fn_without_type_instance<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> bool { 2,875 ( 0.00%) if let ExprKind::Call(func, _) = peel_hir_expr_refs(expr).0.kind 3,580 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (716x) 94 ( 0.00%) && let ExprKind::Path(QPath::Resolved( . // If it's not None, don't need to go further. . None, . Path { . res: Res::Def(DefKind::AssocFn, def_id), . .. . }, 20 ( 0.00%) )) = func.kind . && let output_ty = cx . .tcx . .fn_sig(*def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .output() . && let ty::Param(ty::ParamTy { . name: kw::SelfUpper, .. . }) = output_ty.kind() . { . return true; . } . false 4,296 ( 0.00%) } 1,873 ( 0.00%) -------------------------------------------------------------------------------- -- 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]>`. 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 7,789 ( 0.00%) if let ItemKind::Impl(imp) = item.kind 2,810 ( 0.00%) && let Some(of_trait) = imp.of_trait 4,050 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 6,750 ( 0.00%) && let Some(hash_id) = cx.tcx.get_diagnostic_item(sym::Hash) 143,100 ( 0.01%) => ???:::get_diagnostic_item (1,350x) 12,150 ( 0.00%) && Res::Def(DefKind::Trait, hash_id) == of_trait.trait_ref.path.res 44,556 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::eq (1,350x) 15 ( 0.00%) && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) 318 ( 0.00%) => ???:::get_diagnostic_item (3x) . // 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]>` 33 ( 0.00%) && implements_trait(cx, ty, borrow_id, &[cx.tcx.types.str_.into()]) 105,280 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (3x) . && implements_trait(cx, ty, borrow_id, &[Ty::new_slice(cx.tcx, cx.tcx.types.u8).into()]) . { . span_lint_and_then( . cx, . IMPL_HASH_BORROW_WITH_STR_AND_BYTES, . of_trait.trait_ref.path.span, . "the semantics of `Borrow` around `Hash` can't be satisfied when both `Borrow` and `Borrow<[u8]>` are implemented", . |diag| { -- line 96 ---------------------------------------- -- 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"); . }, . ); . } 25,536 ( 0.00%) } . } 1,356 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 128 ---------------------------------------- . /// Methods on `Vec` that also exists on slices. . pub const VEC_METHODS_SHADOWING_SLICE_METHODS: [Symbol; 3] = [sym::as_ptr, sym::is_empty, sym::len]; . . #[macro_export] . macro_rules! extract_msrv_attr { . () => { . fn check_attributes(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 825,578 ( 0.05%) self.msrv.check_attributes(attrs); 977,244 ( 0.06%) => /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 (144,436x) . } . . fn check_attributes_post(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 789,469 ( 0.04%) self.msrv.check_attributes_post(attrs); 977,244 ( 0.06%) => /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 (144,436x) . } . }; . } . . /// If the given expression is a local binding, find the initializer expression. . /// If that initializer expression is another local binding, find its initializer again. . /// . /// This process repeats as long as possible (but usually no more than once). Initializer -- line 149 ---------------------------------------- -- line 160 ---------------------------------------- . /// . /// // or... . /// let abc = 1; . /// let def = abc + 2; . /// // ^^^^^^^ output . /// dbg!(def); . /// // ^^^ input . /// ``` 752 ( 0.00%) pub fn expr_or_init<'a, 'b, 'tcx: 'b>(cx: &LateContext<'tcx>, mut expr: &'a Expr<'b>) -> &'a Expr<'b> { . while let Some(init) = expr . .res_local_id() . .and_then(|id| find_binding_init(cx, id)) 6 ( 0.00%) .filter(|init| cx.typeck_results().expr_adjustments(init).is_empty()) 72 ( 0.00%) => ???:::expr_adjustments (2x) . { . expr = init; . } . expr 450 ( 0.00%) } . . /// Finds the initializer expression for a local binding. Returns `None` if the binding is mutable. . /// . /// By only considering immutable bindings, we guarantee that the returned expression represents the . /// value of the binding wherever it is referenced. . /// . /// Example: For `let x = 1`, if the `HirId` of `x` is provided, the `Expr` `1` is returned. . /// Note: If you have an expression that references a binding `x`, use `path_to_local` to get the . /// canonical binding `HirId`. 240 ( 0.00%) pub fn find_binding_init<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 408 ( 0.00%) if let Node::Pat(pat) = cx.tcx.hir_node(hir_id) 372 ( 0.00%) => ???:::hir_node (6x) 276 ( 0.00%) && matches!(pat.kind, PatKind::Binding(BindingMode::NONE, ..)) 255 ( 0.00%) && let Node::LetStmt(local) = cx.tcx.parent_hir_node(hir_id) 432 ( 0.00%) => ???:::parent_hir_node (4x) . { 23 ( 0.00%) return local.init; . } . None 200 ( 0.00%) } . . /// Checks if the given local has an initializer or is from something other than a `let` statement . /// . /// e.g. returns true for `x` in `fn f(x: usize) { .. }` and `let x = 1;` but false for `let x;` . pub fn local_is_initialized(cx: &LateContext<'_>, local: HirId) -> bool { . for (_, node) in cx.tcx.hir_parent_iter(local) { . match node { . Node::Pat(..) | Node::PatField(..) => {}, -- line 203 ---------------------------------------- -- 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"); 36,848 ( 0.00%) cx.enclosing_body.is_some_and(|id| { 18,424 ( 0.00%) cx.tcx 92,120 ( 0.01%) .hir_body_const_context(cx.tcx.hir_body_owner_def_id(id)) 3,531,369 ( 0.20%) => ???:::hir_body_const_context (18,424x) 2,289,976 ( 0.13%) => ???:::hir_body_owner_def_id (18,424x) . .is_some() . }) 18,424 ( 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 5,812 ( 0.00%) pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { . use rustc_hir::ConstContext::{Const, ConstFn, Static}; 23,248 ( 0.00%) let Some(ctx) = tcx.hir_body_const_context(tcx.hir_enclosing_body_owner(hir_id)) else { 1,924,664 ( 0.11%) => ???:::hir_enclosing_body_owner (2,906x) 552,510 ( 0.03%) => ???:::hir_body_const_context (2,906x) . return false; . }; . match ctx { . ConstFn => false, . Static(_) . | Const { . allow_const_fn_promotion: _, . } => true, . } 5,812 ( 0.00%) } . . /// Checks if `{ctor_call_id}(...)` is `{enum_item}::{variant_name}(...)`. . pub fn is_enum_variant_ctor( . cx: &LateContext<'_>, . enum_item: Symbol, . variant_name: Symbol, . ctor_call_id: DefId, . ) -> bool { -- line 257 ---------------------------------------- -- line 277 ---------------------------------------- . }, . _ => did, . }; . . cx.tcx.is_diagnostic_item(item, did) . } . . /// Checks if the `DefId` matches the given `LangItem` or it's constructor. 1,440 ( 0.00%) pub fn is_lang_item_or_ctor(cx: &LateContext<'_>, did: DefId, item: LangItem) -> bool { 1,008 ( 0.00%) let did = match cx.tcx.def_kind(did) { . DefKind::Ctor(..) => cx.tcx.parent(did), . // Constructors for types in external crates seem to have `DefKind::Variant` . DefKind::Variant => match cx.tcx.opt_parent(did) { . Some(did) if matches!(cx.tcx.def_kind(did), DefKind::Variant) => did, . _ => did, . }, . _ => did, . }; . 288 ( 0.00%) cx.tcx.lang_items().get(item) == Some(did) 5,760 ( 0.00%) => ???:::lang_items (144x) 1,152 ( 0.00%) } . . /// Checks is `expr` is `None` . pub fn is_none_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 39 ( 0.00%) expr.basic_res().ctor_parent(cx).is_lang_item(cx, OptionNone) 1,235 ( 0.00%) } . . /// If `expr` is `Some(inner)`, returns `inner` 50 ( 0.00%) pub fn as_some_expr<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 102 ( 0.00%) if let ExprKind::Call(e, [arg]) = expr.kind . && e.basic_res().ctor_parent(cx).is_lang_item(cx, OptionSome) . { . Some(arg) . } else { . None . } 50 ( 0.00%) } . . /// Check if the given `Expr` is an empty block (i.e. `{}`) or not. . pub fn is_empty_block(expr: &Expr<'_>) -> bool { . matches!( . expr.kind, . ExprKind::Block( . Block { . stmts: [], -- line 321 ---------------------------------------- -- line 324 ---------------------------------------- . }, . _, . ) . ) . } . . /// Checks if `expr` is an empty block or an empty tuple. . pub fn is_unit_expr(expr: &Expr<'_>) -> bool { 1,908 ( 0.00%) matches!( 1,256 ( 0.00%) expr.kind, . ExprKind::Block( . Block { . stmts: [], . expr: None, . .. . }, . _ 6 ( 0.00%) ) | ExprKind::Tup([]) . ) . } . . /// Checks if given pattern is a wildcard (`_`) . pub fn is_wild(pat: &Pat<'_>) -> bool { 101 ( 0.00%) matches!(pat.kind, PatKind::Wild) . } . . /// If `pat` is: . /// - `Some(inner)`, returns `inner` . /// - it will _usually_ contain just one element, but could have two, given patterns like . /// `Some(inner, ..)` or `Some(.., inner)` . /// - `Some`, returns `[]` . /// - otherwise, returns `None` 234 ( 0.00%) pub fn as_some_pattern<'a, 'hir>(cx: &LateContext<'_>, pat: &'a Pat<'hir>) -> Option<&'a [Pat<'hir>]> { 192 ( 0.00%) if let PatKind::TupleStruct(ref qpath, inner, _) = pat.kind 76 ( 0.00%) && cx 190 ( 0.00%) .qpath_res(qpath, pat.hir_id) 874 ( 0.00%) => ???:::qpath_res (38x) 38 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, OptionSome) . { . Some(inner) . } else { . None . } 312 ( 0.00%) } . . /// Checks if the `pat` is `None`. . pub fn is_none_pattern(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { 6,088 ( 0.00%) matches!(pat.kind, 217 ( 0.00%) PatKind::Expr(PatExpr { kind: PatExprKind::Path(qpath), .. }) 1,302 ( 0.00%) if cx.qpath_res(qpath, pat.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone)) 4,232 ( 0.00%) => ???:::qpath_res (184x) 2,530 ( 0.00%) } . . /// Checks if `arm` has the form `None => None`. 960 ( 0.00%) pub fn is_none_arm(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { 243 ( 0.00%) is_none_pattern(cx, arm.pat) . && matches!( 50 ( 0.00%) peel_blocks(arm.body).kind, . ExprKind::Path(qpath) . if cx.qpath_res(&qpath, arm.body.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone) . ) 1,120 ( 0.00%) } . . /// Checks if the given `QPath` belongs to a type alias. . pub fn is_ty_alias(qpath: &QPath<'_>) -> bool { 2,746 ( 0.00%) match *qpath { 15,907 ( 0.00%) QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), 1,206 ( 0.00%) QPath::TypeRelative(ty, _) if let TyKind::Path(qpath) = ty.kind => is_ty_alias(&qpath), 2,079 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias'2 (133x) . QPath::TypeRelative(..) => false, . } 1,373 ( 0.00%) } . . /// Checks if the `def_id` belongs to a function that is part of a trait impl. . pub fn is_def_id_trait_method(cx: &LateContext<'_>, def_id: LocalDefId) -> bool { . if let Node::Item(item) = cx.tcx.parent_hir_node(cx.tcx.local_def_id_to_hir_id(def_id)) . && let ItemKind::Impl(imp) = item.kind . { . imp.of_trait.is_some() . } else { . false . } . } . . pub fn last_path_segment<'tcx>(path: &QPath<'tcx>) -> &'tcx PathSegment<'tcx> { 12,416 ( 0.00%) match *path { 12,410 ( 0.00%) QPath::Resolved(_, path) => path.segments.last().expect("A path must have at least one segment"), . QPath::TypeRelative(_, seg) => seg, . } 6,100 ( 0.00%) } . . pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator> { 108 ( 0.00%) last_path_segment(qpath) . .args . .map_or(&[][..], |a| a.args) . .iter() 324 ( 0.00%) .filter_map(|a| match a { . GenericArg::Type(ty) => Some(ty.as_unambig_ty()), . _ => None, . }) 108 ( 0.00%) } . . /// If the expression is a path to a local (with optional projections), . /// returns the canonical `HirId` of the local. . /// . /// For example, `x.field[0].field2` would return the `HirId` of `x`. . pub fn path_to_local_with_projections(expr: &Expr<'_>) -> Option { . match expr.kind { . ExprKind::Field(recv, _) | ExprKind::Index(recv, _, _) => path_to_local_with_projections(recv), -- line 430 ---------------------------------------- -- line 448 ---------------------------------------- . /// impl std::ops::Add for Point { . /// type Output = Self; . /// . /// fn add(self, other: Self) -> Self { . /// Point(0, 0) . /// } . /// } . /// ``` 44,392 ( 0.00%) pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, owner: OwnerId) -> Option<&'tcx TraitRef<'tcx>> { 38,843 ( 0.00%) if let Node::Item(item) = cx.tcx.hir_node(cx.tcx.hir_owner_parent(owner)) 358,262 ( 0.02%) => ???:::hir_node (5,549x) 11,098 ( 0.00%) && let ItemKind::Impl(impl_) = &item.kind 5,549 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { . return Some(&of_trait.trait_ref); . } . None 44,392 ( 0.00%) } . . /// This method will return tuple of projection stack and root of the expression, . /// used in `can_mut_borrow_both`. . /// . /// For example, if `e` represents the `v[0].a.b[x]` . /// this method will return a tuple, composed of a `Vec` . /// containing the `Expr`s for `v[0], v[0].a, v[0].a.b, v[0].a.b[x]` . /// and an `Expr` for root of them, `v` -- line 472 ---------------------------------------- -- line 656 ---------------------------------------- . } . } . false . } . . /// Returns true if the expr is equal to `Default::default()` of its type when evaluated. . /// . /// It doesn't cover all cases, like struct literals, but it is a close approximation. 13 ( 0.00%) pub fn is_default_equivalent(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 8 ( 0.00%) match &e.kind { . ExprKind::Lit(lit) => match lit.node { . LitKind::Bool(false) | LitKind::Int(Pu128(0), _) => true, . LitKind::Str(s, _) => s.is_empty(), . _ => false, . }, . ExprKind::Tup(items) | ExprKind::Array(items) => items.iter().all(|x| is_default_equivalent(cx, x)), . ExprKind::Repeat(x, len) => { . if let ConstArgKind::Anon(anon_const) = len.kind -- line 673 ---------------------------------------- -- line 678 ---------------------------------------- . { . true . } else { . false . } . }, . ExprKind::Call(repl_func, []) => is_default_equivalent_call(cx, repl_func, Some(e)), . ExprKind::Call(from_func, [arg]) => is_default_equivalent_from(cx, from_func, arg), 1 ( 0.00%) ExprKind::Path(qpath) => cx 5 ( 0.00%) .qpath_res(qpath, e.hir_id) 78 ( 0.00%) => ???:::qpath_res (1x) . .ctor_parent(cx) . .is_lang_item(cx, OptionNone), . ExprKind::AddrOf(rustc_hir::BorrowKind::Ref, _, expr) => matches!(expr.kind, ExprKind::Array([])), . ExprKind::Block(Block { stmts: [], expr, .. }, _) => expr.is_some_and(|e| is_default_equivalent(cx, e)), . _ => false, . } 8 ( 0.00%) } . . fn is_default_equivalent_from(cx: &LateContext<'_>, from_func: &Expr<'_>, arg: &Expr<'_>) -> bool { . if let ExprKind::Path(QPath::TypeRelative(ty, seg)) = from_func.kind . && seg.ident.name == sym::from . { . match arg.kind { . ExprKind::Lit(hir::Lit { . node: LitKind::Str(sym, _), -- line 702 ---------------------------------------- -- line 786 ---------------------------------------- . // TODO: check if the local has been partially moved. Assume it has for now. . false . }, . _ => true, . } . } . . /// How a local is captured by a closure 3 ( 0.00%) #[derive(Debug, Clone, Copy, PartialEq, Eq)] . pub enum CaptureKind { . Value, . Use, . Ref(Mutability), . } . impl CaptureKind { . pub fn is_imm_ref(self) -> bool { . self == Self::Ref(Mutability::Not) -- line 802 ---------------------------------------- -- line 820 ---------------------------------------- . } . } . . /// Given an expression referencing a local, determines how it would be captured in a closure. . /// . /// Note as this will walk up to parent expressions until the capture can be determined it should . /// only be used while making a closure somewhere a value is consumed. e.g. a block, match arm, or . /// function argument (other than a receiver). 180 ( 0.00%) pub fn capture_local_usage(cx: &LateContext<'_>, e: &Expr<'_>) -> CaptureKind { . fn pat_capture_kind(cx: &LateContext<'_>, pat: &Pat<'_>) -> CaptureKind { . let mut capture = CaptureKind::Ref(Mutability::Not); . pat.each_binding_or_first(&mut |_, id, span, _| match cx . .typeck_results() . .extract_binding_mode(cx.sess(), id, span) . .0 . { . ByRef::No if !is_copy(cx, cx.typeck_results().node_type(id)) => { -- line 836 ---------------------------------------- -- line 847 ---------------------------------------- . debug_assert!(matches!( . e.kind, . ExprKind::Path(QPath::Resolved(None, Path { res: Res::Local(_), .. })) . )); . . let mut capture = CaptureKind::Value; . let mut capture_expr_ty = e; . 220 ( 0.00%) for (parent, child_id) in hir_parent_with_src_iter(cx.tcx, e.hir_id) { 117 ( 0.00%) if let [ . Adjustment { . kind: Adjust::Deref(_) | Adjust::Borrow(AutoBorrow::Ref(..)), . target, . }, . ref adjust @ .., 85 ( 0.00%) ] = *cx . .typeck_results() . .adjustments() . .get(child_id) . .map_or(&[][..], |x| &**x) 68 ( 0.00%) && let rustc_ty::RawPtr(_, mutability) | rustc_ty::Ref(_, _, mutability) = 17 ( 0.00%) *adjust.last().map_or(target, |a| a.target).kind() . { . return CaptureKind::Ref(mutability); . } . 10 ( 0.00%) match parent { 37 ( 0.00%) Node::Expr(e) => match e.kind { 1 ( 0.00%) ExprKind::AddrOf(_, mutability, _) => return CaptureKind::Ref(mutability), . ExprKind::Index(..) | ExprKind::Unary(UnOp::Deref, _) => capture = CaptureKind::Ref(Mutability::Not), 4 ( 0.00%) ExprKind::Assign(lhs, ..) | ExprKind::AssignOp(_, lhs, _) if lhs.hir_id == child_id => { . return CaptureKind::Ref(Mutability::Mut); . }, . ExprKind::Field(..) => { . if capture == CaptureKind::Value { . capture_expr_ty = e; . } . }, . ExprKind::Let(let_expr) => { -- line 885 ---------------------------------------- -- line 911 ---------------------------------------- . } . . if capture == CaptureKind::Value && is_copy(cx, cx.typeck_results().expr_ty(capture_expr_ty)) { . // Copy types are never automatically captured by value. . CaptureKind::Ref(Mutability::Not) . } else { . capture . } 180 ( 0.00%) } . . /// Checks if the expression can be moved into a closure as is. This will return a list of captures . /// if so, otherwise, `None`. . pub fn can_move_expr_to_closure<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { . struct V<'cx, 'tcx> { . cx: &'cx LateContext<'tcx>, . // Stack of potential break targets contained in the expression. . loops: Vec, -- line 927 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . /// Matches an `Expr` against a chain of methods, and return the matched `Expr`s. . /// . /// For example, if `expr` represents the `.baz()` in `foo.bar().baz()`, . /// `method_chain_args(expr, &[sym::bar, sym::baz])` will return a `Vec` . /// containing the `Expr`s for . /// `.bar()` and `.baz()` 51,891 ( 0.00%) pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[Symbol]) -> Option, &'a [Expr<'a>])>> { . let mut current = expr; . let mut matched = Vec::with_capacity(methods.len()); . for method_name in methods.iter().rev() { . // method chains are stored last -> first 16,104 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, _) = current.kind { 1,278 ( 0.00%) if path.ident.name == *method_name { 20 ( 0.00%) if receiver.span.from_expansion() || args.iter().any(|e| e.span.from_expansion()) { . return None; . } . matched.push((receiver, args)); // build up `matched` backwards . current = receiver; // go to parent expression . } else { . return None; . } . } else { . return None; . } . } . // Reverse `matched` so that it is in the same order as `methods`. . matched.reverse(); 60 ( 0.00%) Some(matched) 66,717 ( 0.00%) } . . /// Returns `true` if the provided `def_id` is an entrypoint to a program. 1,998 ( 0.00%) pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool { 222 ( 0.00%) cx.tcx . .entry_fn(()) . .is_some_and(|(entry_fn_def_id, _)| def_id == entry_fn_def_id) 1,776 ( 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. 91 ( 0.00%) pub fn parent_item_name(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 78 ( 0.00%) let parent_id = cx.tcx.hir_get_parent_item(expr.hir_id).def_id; 247 ( 0.00%) => ???:::hir_get_parent_item (13x) 43 ( 0.00%) match cx.tcx.hir_node_by_def_id(parent_id) { 1 ( 0.00%) Node::Item(item) => item.kind.ident().map(|ident| ident.name), 12 ( 0.00%) Node::TraitItem(TraitItem { ident, .. }) | Node::ImplItem(ImplItem { ident, .. }) => Some(ident.name), . _ => None, . } 104 ( 0.00%) } . . pub struct ContainsName<'a, 'tcx> { . pub cx: &'a LateContext<'tcx>, . pub name: Symbol, . } . . impl<'tcx> Visitor<'tcx> for ContainsName<'_, 'tcx> { . type Result = ControlFlow<()>; -- line 1091 ---------------------------------------- -- line 1118 ---------------------------------------- . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Gets the parent expression, if any –- this is useful to constrain a lint. 37,539 ( 0.00%) pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 75,078 ( 0.00%) get_parent_expr_for_hir(cx, e.hir_id) 75,078 ( 0.00%) } . . /// This retrieves the parent for the given `HirId` if it's an expression. This is useful for . /// constraint lints 495 ( 0.00%) pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 150,840 ( 0.01%) match cx.tcx.parent_hir_node(hir_id) { 4,116,610 ( 0.23%) => ???:::parent_hir_node (37,539x) . Node::Expr(parent) => Some(parent), . _ => None, . } 330 ( 0.00%) } . . /// Gets the enclosing block, if any. 76 ( 0.00%) pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> { 38 ( 0.00%) let enclosing_node = cx . .tcx 76 ( 0.00%) .hir_get_enclosing_scope(hir_id) 8,918 ( 0.00%) => ???:::hir_get_enclosing_scope (38x) 114 ( 0.00%) .map(|enclosing_id| cx.tcx.hir_node(enclosing_id)); 2,356 ( 0.00%) => ???:::hir_node (38x) 228 ( 0.00%) enclosing_node.and_then(|node| match node { . Node::Block(block) => Some(block), . Node::Item(&Item { . kind: ItemKind::Fn { body: eid, .. }, . .. . }) . | Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(_, eid), . .. -- line 1153 ---------------------------------------- -- line 1156 ---------------------------------------- . kind: TraitItemKind::Fn(_, TraitFn::Provided(eid)), . .. . }) => match cx.tcx.hir_body(eid).value.kind { . ExprKind::Block(block, _) => Some(block), . _ => None, . }, . _ => None, . }) 114 ( 0.00%) } . . /// Returns the [`Closure`] enclosing `hir_id`, if any. . pub fn get_enclosing_closure<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Closure<'tcx>> { . cx.tcx.hir_parent_iter(hir_id).find_map(|(_, node)| { . if let Node::Expr(expr) = node . && let ExprKind::Closure(closure) = expr.kind . { . Some(closure) -- line 1172 ---------------------------------------- -- line 1203 ---------------------------------------- . Node::Stmt(_) | Node::Block(_) | Node::LetStmt(_) | Node::Arm(_) | Node::ExprField(_) => (), . _ => break, . } . } . None . } . . /// Gets the parent node if it's an impl block. 34 ( 0.00%) pub fn get_parent_as_impl(tcx: TyCtxt<'_>, id: HirId) -> Option<&Impl<'_>> { 238 ( 0.00%) match tcx.hir_parent_iter(id).next() { . Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(imp), . .. . }), . )) => Some(imp), . _ => None, . } 68 ( 0.00%) } . . /// Removes blocks around an expression, only if the block contains just one expression . /// and no statements. Unsafe blocks are not removed. . /// . /// Examples: . /// * `{}` -> `{}` . /// * `{ x }` -> `x` . /// * `{{ x }}` -> `x` . /// * `{ x; }` -> `{ x; }` . /// * `{ x; y }` -> `{ x; y }` . /// * `{ unsafe { x } }` -> `unsafe { x }` . pub fn peel_blocks<'a>(mut expr: &'a Expr<'a>) -> &'a Expr<'a> { 4,331 ( 0.00%) while let ExprKind::Block( . Block { 1,143 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 3,497 ( 0.00%) ) = expr.kind . { . expr = inner; . } . expr . } . . /// Removes blocks around an expression, only if the block contains just one expression . /// or just one expression statement with a semicolon. Unsafe blocks are not removed. -- line 1251 ---------------------------------------- -- line 1252 ---------------------------------------- . /// . /// Examples: . /// * `{}` -> `{}` . /// * `{ x }` -> `x` . /// * `{ x; }` -> `x` . /// * `{{ x; }}` -> `x` . /// * `{ x; y }` -> `{ x; y }` . /// * `{ unsafe { x } }` -> `unsafe { x }` 36 ( 0.00%) pub fn peel_blocks_with_stmt<'a>(mut expr: &'a Expr<'a>) -> &'a Expr<'a> { 4,491 ( 0.00%) while let ExprKind::Block( . Block { 3,578 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . } . | Block { . stmts: . [ . Stmt { 123 ( 0.00%) kind: StmtKind::Expr(inner) | StmtKind::Semi(inner), . .. . }, . ], . expr: None, . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 1,834 ( 0.00%) ) = expr.kind . { 433 ( 0.00%) expr = inner; . } . expr 36 ( 0.00%) } . . /// Checks if the given expression is the else clause of either an `if` or `if let` expression. 3,165 ( 0.00%) pub fn is_else_clause(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 2,110 ( 0.00%) let mut iter = tcx.hir_parent_iter(expr.hir_id); 3,178 ( 0.00%) match iter.next() { . Some(( . _, . Node::Expr(Expr { . kind: ExprKind::If(_, _, Some(else_expr)), . .. . }), . )) => else_expr.hir_id == expr.hir_id, . _ => false, . } 4,220 ( 0.00%) } . . /// Checks if the given expression is a part of `let else` . /// returns `true` for both the `init` and the `else` part . pub fn is_inside_let_else(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { . hir_parent_with_src_iter(tcx, expr.hir_id).any(|(node, child_id)| { . matches!( . node, . Node::LetStmt(LetStmt { -- line 1309 ---------------------------------------- -- line 1343 ---------------------------------------- . }) . } else { . false . } . } . . /// Checks whether the given expression is a constant literal of the given value. . pub fn is_integer_literal(expr: &Expr<'_>, value: u128) -> bool { 378 ( 0.00%) if let ExprKind::Lit(spanned) = expr.kind 44 ( 0.00%) && let LitKind::Int(v, _) = spanned.node . { . return v == value; . } . false . } . . /// Checks whether the given expression is an untyped integer literal. . pub fn is_integer_literal_untyped(expr: &Expr<'_>) -> bool { -- line 1360 ---------------------------------------- -- line 1363 ---------------------------------------- . { . return suffix == LitIntType::Unsuffixed; . } . . false . } . . /// Checks whether the given expression is a constant literal of the given value. 18 ( 0.00%) pub fn is_float_literal(expr: &Expr<'_>, value: f64) -> bool { 18 ( 0.00%) if let ExprKind::Lit(spanned) = expr.kind . && let LitKind::Float(v, _) = spanned.node . { . v.as_str().parse() == Ok(value) . } else { . false . } 18 ( 0.00%) } . . /// Returns `true` if the given `Expr` has been coerced before. . /// . /// Examples of coercions can be found in the Nomicon at . /// . . /// . /// See `rustc_middle::ty::adjustment::Adjustment` and `rustc_hir_analysis::check::coercion` for . /// more information on adjustments and coercions. 243 ( 0.00%) pub fn is_adjusted(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 162 ( 0.00%) cx.typeck_results().adjustments().get(e.hir_id).is_some() 324 ( 0.00%) } . . /// Returns the pre-expansion span if this comes from an expansion of the . /// macro `name`. . /// See also [`is_direct_expn_of`]. . #[must_use] 181,475 ( 0.01%) pub fn is_expn_of(mut span: Span, name: Symbol) -> Option { . loop { . if span.from_expansion() { . let data = span.ctxt().outer_expn_data(); 22,824 ( 0.00%) let new_span = data.call_site; . 33,312 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { 252 ( 0.00%) return Some(new_span); . } . . span = new_span; . } else { 21,224 ( 0.00%) return None; . } . } 96,075 ( 0.01%) } . . /// Returns the pre-expansion span if the span directly comes from an expansion . /// of the macro `name`. . /// The difference with [`is_expn_of`] is that in . /// ```no_run . /// # macro_rules! foo { ($name:tt!$args:tt) => { $name!$args } } . /// # macro_rules! bar { ($e:expr) => { $e } } . /// foo!(bar!(42)); . /// ``` . /// `42` is considered expanded from `foo!` and `bar!` by `is_expn_of` but only . /// from `bar!` by `is_direct_expn_of`. . #[must_use] 7,074 ( 0.00%) pub fn is_direct_expn_of(span: Span, name: Symbol) -> Option { . if span.from_expansion() { . let data = span.ctxt().outer_expn_data(); 3 ( 0.00%) let new_span = data.call_site; . 1,098 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { 6 ( 0.00%) return Some(new_span); . } . } . 783 ( 0.00%) None 3,930 ( 0.00%) } . . /// Convenience function to get the return type of a function. 6,972 ( 0.00%) pub fn return_ty<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId) -> Ty<'tcx> { 996 ( 0.00%) let ret_ty = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip().output(); 3,984 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ret_ty) 100,392 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (996x) 6,972 ( 0.00%) } . . /// Convenience function to get the nth argument type of a function. . pub fn nth_arg<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId, nth: usize) -> Ty<'tcx> { . let arg = cx . .tcx . .fn_sig(fn_def_id) . .instantiate_identity() . .skip_norm_wip() -- line 1453 ---------------------------------------- -- line 1467 ---------------------------------------- . _ => false, . }; . } . false . } . . /// Returns `true` if a pattern is refutable. . // TODO: should be implemented using rustc/mir_build/thir machinery 270 ( 0.00%) pub fn is_refutable(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { . fn is_qpath_refutable(cx: &LateContext<'_>, qpath: &QPath<'_>, id: HirId) -> bool { 38 ( 0.00%) !matches!( 62 ( 0.00%) cx.qpath_res(qpath, id), 69 ( 0.00%) => ???:::qpath_res (3x) . Res::Def(DefKind::Struct, ..) | Res::Def(DefKind::Ctor(def::CtorOf::Struct, _), _) . ) . } . . fn are_refutable<'a, I: IntoIterator>>(cx: &LateContext<'_>, i: I) -> bool { 19 ( 0.00%) i.into_iter().any(|pat| is_refutable(cx, pat)) 344 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_refutable'2 (5x) . } . 201 ( 0.00%) match pat.kind { . PatKind::Missing => unreachable!(), . PatKind::Wild | PatKind::Never => false, // If `!` typechecked then the type is empty, so not refutable. 8 ( 0.00%) PatKind::Binding(_, _, _, pat) => pat.is_some_and(|pat| is_refutable(cx, pat)), . PatKind::Box(pat) | PatKind::Ref(pat, _, _) => is_refutable(cx, pat), . PatKind::Expr(PatExpr { 3 ( 0.00%) kind: PatExprKind::Path(qpath), . hir_id, . .. 6 ( 0.00%) }) => is_qpath_refutable(cx, qpath, *hir_id), 3 ( 0.00%) PatKind::Or(pats) => { . // TODO: should be the honest check, that pats is exhaustive set . are_refutable(cx, pats) . }, . PatKind::Tuple(pats, _) => are_refutable(cx, pats), 4 ( 0.00%) PatKind::Struct(ref qpath, fields, _) => { 8 ( 0.00%) is_qpath_refutable(cx, qpath, pat.hir_id) || are_refutable(cx, fields.iter().map(|field| field.pat)) . }, 9 ( 0.00%) PatKind::TupleStruct(ref qpath, pats, _) => { 15 ( 0.00%) is_qpath_refutable(cx, qpath, pat.hir_id) || are_refutable(cx, pats) . }, . PatKind::Slice(head, middle, tail) => { . match &cx.typeck_results().node_type(pat.hir_id).kind() { . rustc_ty::Slice(..) => { . // [..] is the only irrefutable slice pattern. . !head.is_empty() || middle.is_none() || !tail.is_empty() . }, . rustc_ty::Array(..) => are_refutable(cx, head.iter().chain(middle).chain(tail.iter())), -- line 1514 ---------------------------------------- -- line 1515 ---------------------------------------- . _ => { . // unreachable!() . true . }, . } . }, . PatKind::Expr(..) | PatKind::Range(..) | PatKind::Err(_) | PatKind::Deref(_) | PatKind::Guard(..) => true, . } 216 ( 0.00%) } . . /// If the pattern is an `or` pattern, call the function once for each sub pattern. Otherwise, call . /// the function once on the given pattern. . pub fn recurse_or_patterns<'tcx, F: FnMut(&'tcx Pat<'tcx>)>(pat: &'tcx Pat<'tcx>, mut f: F) { 77 ( 0.00%) if let PatKind::Or(pats) = pat.kind { . pats.iter().for_each(f); . } else { 74 ( 0.00%) f(pat); 4,412 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::check::{closure#2} (37x) . } . } . . pub fn is_self(slf: &Param<'_>) -> bool { . if let PatKind::Binding(.., name, _) = slf.pat.kind { . name.name == kw::SelfLower . } else { . false -- line 1539 ---------------------------------------- -- 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> { 10,371 ( 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 1603 ---------------------------------------- . /// of the expectations in `ids` . /// . /// This should only be used when the lint would otherwise be emitted, for a way to check if a lint . /// is allowed early to skip work see [`is_lint_allowed`] . /// . /// To emit at a lint at a different context than the one current see . /// [`span_lint_hir`](diagnostics::span_lint_hir) or . /// [`span_lint_hir_and_then`](diagnostics::span_lint_hir_and_then) 357 ( 0.00%) pub fn fulfill_or_allowed(cx: &LateContext<'_>, lint: &'static Lint, ids: impl IntoIterator) -> bool { . let mut suppress_lint = false; . . for id in ids { 321 ( 0.00%) let level_spec = cx.tcx.lint_level_spec_at_node(lint, id); 48,709 ( 0.00%) => ???:::lint_level_spec_at_node (119x) 532 ( 0.00%) if let Some(expectation) = level_spec.lint_id() { . cx.fulfill_expectation(expectation); . } . 252 ( 0.00%) match level_spec.level() { . Level::Allow | Level::Expect => suppress_lint = true, . Level::Warn | Level::ForceWarn | Level::Deny | Level::Forbid => {}, . } . } . . suppress_lint 476 ( 0.00%) } . . /// 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. 28,836 ( 0.00%) pub fn is_lint_allowed(cx: &LateContext<'_>, lint: &'static Lint, id: HirId) -> bool { 14,418 ( 0.00%) cx.tcx.lint_level_spec_at_node(lint, id).is_allow() 7,448,373 ( 0.42%) => ???:::lint_level_spec_at_node (7,209x) 14,418 ( 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 . } . 6 ( 0.00%) pub fn int_bits(tcx: TyCtxt<'_>, ity: IntTy) -> u64 { . Integer::from_int_ty(&tcx, ity).size().bits() 12 ( 0.00%) } . . #[expect(clippy::cast_possible_wrap)] . /// Turn a constant int byte representation into an i128 . pub fn sext(tcx: TyCtxt<'_>, u: u128, ity: IntTy) -> i128 { . let amt = 128 - int_bits(tcx, ity); 15 ( 0.00%) ((u as i128) << amt) >> amt . } . . #[expect(clippy::cast_sign_loss)] . /// clip unused bytes . pub fn unsext(tcx: TyCtxt<'_>, u: i128, ity: IntTy) -> u128 { . let amt = 128 - int_bits(tcx, ity); 9 ( 0.00%) ((u as u128) << amt) >> amt . } . . /// clip unused bytes 68 ( 0.00%) pub fn clip(tcx: TyCtxt<'_>, u: u128, ity: UintTy) -> u128 { . let bits = Integer::from_uint_ty(&tcx, ity).size().bits(); . let amt = 128 - bits; 612 ( 0.00%) (u << amt) >> amt 204 ( 0.00%) } . . pub fn has_attr(attrs: &[hir::Attribute], symbol: Symbol) -> bool { . attrs.iter().any(|attr| attr.has_name(symbol)) . } . . pub fn has_repr_attr(cx: &LateContext<'_>, hir_id: HirId) -> bool { . find_attr!(cx.tcx, hir_id, Repr { .. }) . } -- line 1678 ---------------------------------------- -- 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. 162,274 ( 0.01%) pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_owner_iter(id) 253,458 ( 0.01%) .filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_)))) 55,226 ( 0.00%) .any(|(id, _)| find_attr!(tcx, id.def_id, AutomaticallyDerived)) 1,580,340 ( 0.09%) => ???:>::get_attrs (15,630x) 162,274 ( 0.01%) } . . /// Checks if the given `DefId` matches the `libc` item. 10,060 ( 0.00%) pub fn match_libc_symbol(cx: &LateContext<'_>, did: DefId, name: Symbol) -> bool { . // libc is meant to be used as a flat list of names, but they're all actually defined in different . // modules based on the target platform. Ignore everything but crate name and the item name. 3,018 ( 0.00%) cx.tcx.crate_name(did.krate) == sym::libc && cx.tcx.def_path_str(did).ends_with(name.as_str()) 8,048 ( 0.00%) } . . /// Returns the list of condition expressions and the list of blocks in a . /// sequence of `if/else`. . /// E.g., this returns `([a, b], [c, d, e])` for the expression . /// `if a { c } else if b { d } else { e }`. 2,432 ( 0.00%) pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>, Vec<&'tcx Block<'tcx>>) { . let mut conds = Vec::new(); . let mut blocks: Vec<&Block<'_>> = Vec::new(); . . while let Some(higher::IfOrIfLet { cond, then, r#else }) = higher::IfOrIfLet::hir(expr) { . conds.push(cond); 1,161 ( 0.00%) if let ExprKind::Block(block, _) = then.kind { . blocks.push(block); . } else { . panic!("ExprKind::If node is not an ExprKind::Block"); . } . 774 ( 0.00%) if let Some(else_expr) = r#else { . expr = else_expr; . } else { . break; . } . } . . // final `else {..}` 304 ( 0.00%) if !blocks.is_empty() 719 ( 0.00%) && let ExprKind::Block(block, _) = expr.kind . { . blocks.push(block); . } . 3,648 ( 0.00%) (conds, blocks) 2,736 ( 0.00%) } . . /// Peels away all the compiler generated code surrounding the body of an async closure. . pub fn get_async_closure_expr<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::Closure(&Closure { . body, . kind: hir::ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, _)), . .. . }) = expr.kind -- line 1748 ---------------------------------------- -- line 1765 ---------------------------------------- . } . . /// Peels away all the compiler generated code surrounding the body of an async function, . pub fn get_async_fn_body<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'_>) -> Option<&'tcx Expr<'tcx>> { . get_async_closure_expr(tcx, body.value) . } . . // check if expr is calling method or function with #[must_use] attribute 24 ( 0.00%) pub fn is_must_use_func_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 40 ( 0.00%) let did = match expr.kind { . ExprKind::Call(path, _) => { . if let ExprKind::Path(ref qpath) = path.kind . && let Res::Def(_, did) = cx.qpath_res(qpath, path.hir_id) . { . Some(did) . } else { . None . } . }, . ExprKind::MethodCall(..) => cx.typeck_results().type_dependent_def_id(expr.hir_id), . _ => None, . }; . . did.is_some_and(|did| find_attr!(cx.tcx, did, MustUse { .. })) 24 ( 0.00%) } . . /// Checks if a function's body represents the identity function. Looks for bodies of the form: . /// * `|x| x` . /// * `|x| return x` . /// * `|x| { return x }` . /// * `|x| { return x; }` . /// * `|(x, y)| (x, y)` . /// * `|[x, y]| [x, y]` . /// * `|Foo(bar, baz)| Foo(bar, baz)` . /// * `|Foo { bar, baz }| Foo { bar, baz }` . /// * `|x| { let y = x; ...; let z = y; z }` . /// * `|x| { let y = x; ...; let z = y; return z }` . /// . /// Consider calling [`is_expr_untyped_identity_function`] or [`is_expr_identity_function`] instead. 182 ( 0.00%) fn is_body_identity_function<'hir>(cx: &LateContext<'_>, func: &Body<'hir>) -> bool { 78 ( 0.00%) let [param] = func.params else { . return false; . }; . 26 ( 0.00%) let mut param_pat = param.pat; . . // Given a sequence of `Stmt`s of the form `let p = e` where `e` is an expr identical to the . // current `param_pat`, advance the current `param_pat` to `p`. . // . // Note: This is similar to `clippy_utils::get_last_chain_binding_hir_id`, but it works . // directly over a `Pattern` rather than a `HirId`. And it checks for compatibility via . // `is_expr_identity_of_pat` rather than `HirId` equality . let mut advance_param_pat_over_stmts = |stmts: &[Stmt<'hir>]| { -- line 1817 ---------------------------------------- -- line 1824 ---------------------------------------- . } else { . return false; . } . } . . true . }; . 26 ( 0.00%) let mut expr = func.value; . loop { 130 ( 0.00%) match expr.kind { . ExprKind::Block( . &Block { . stmts: [], . expr: Some(e), . .. . }, . _, . ) -- line 1842 ---------------------------------------- -- line 1875 ---------------------------------------- . && let StmtKind::Semi(e) | StmtKind::Expr(e) = last_stmt.kind . && let ExprKind::Ret(Some(ret_val)) = e.kind . { . expr = ret_val; . } else { . return false; . } . }, 260 ( 0.00%) _ => return is_expr_identity_of_pat(cx, param_pat, expr, true), 2,356 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_identity_of_pat (26x) . } . } . } . . /// Checks if the given expression is an identity representation of the given pattern: . /// * `x` is the identity representation of `x` . /// * `(x, y)` is the identity representation of `(x, y)` . /// * `[x, y]` is the identity representation of `[x, y]` . /// * `Foo(bar, baz)` is the identity representation of `Foo(bar, baz)` . /// * `Foo { bar, baz }` is the identity representation of `Foo { bar, baz }` . /// . /// Note that `by_hir` is used to determine bindings are checked by their `HirId` or by their name. . /// This can be useful when checking patterns in `let` bindings or `match` arms. 234 ( 0.00%) pub fn is_expr_identity_of_pat(cx: &LateContext<'_>, pat: &Pat<'_>, expr: &Expr<'_>, by_hir: bool) -> bool { 15 ( 0.00%) if cx . .typeck_results() . .pat_binding_modes() 52 ( 0.00%) .get(pat.hir_id) 15 ( 0.00%) .is_some_and(|mode| matches!(mode.0, ByRef::Yes(..))) . { . // If the parameter is `(x, y)` of type `&(T, T)`, or `[x, y]` of type `&[T; 2]`, then . // due to match ergonomics, the inner patterns become references. Don't consider this . // the identity function as that changes types. . return false; . } . . // NOTE: we're inside a (function) body, so this won't ICE . let qpath_res = |qpath, hir| cx.typeck_results().qpath_res(qpath, hir); . 378 ( 0.00%) match (pat.kind, expr.kind) { 30 ( 0.00%) (PatKind::Binding(_, id, _, _), _) if by_hir => { . expr.res_local_id() == Some(id) && cx.typeck_results().expr_adjustments(expr).is_empty() . }, . (PatKind::Binding(_, _, ident, _), ExprKind::Path(QPath::Resolved(_, path))) => { . matches!(path.segments, [ segment] if segment.ident.name == ident.name) . }, . (PatKind::Tuple(pats, dotdot), ExprKind::Tup(tup)) . if dotdot.as_opt_usize().is_none() && pats.len() == tup.len() => . { -- line 1922 ---------------------------------------- -- line 1946 ---------------------------------------- . qpath_res(&pat_ident, pat.hir_id) == qpath_res(ident, expr.hir_id) . // check fields . && unordered_over(field_pats, fields, |field_pat, field| { . field_pat.ident == field.ident && is_expr_identity_of_pat(cx, field_pat.pat, field.expr, by_hir) . }) . }, . _ => false, . } 208 ( 0.00%) } . . /// This is the same as [`is_expr_identity_function`], but does not consider closures . /// with type annotations for its bindings (or similar) as identity functions: . /// * `|x: u8| x` . /// * `std::convert::identity::` 85 ( 0.00%) pub fn is_expr_untyped_identity_function(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 425 ( 0.00%) match expr.kind { 72 ( 0.00%) ExprKind::Closure(&Closure { body, fn_decl, .. }) 72 ( 0.00%) if fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) => . { 168 ( 0.00%) is_body_identity_function(cx, cx.tcx.hir_body(body)) 2,912 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_body_identity_function (24x) 1,978 ( 0.00%) => ???:::hir_body (24x) . }, . ExprKind::Path(QPath::Resolved(_, path)) 110 ( 0.00%) if path.segments.iter().all(|seg| seg.infer_args) 110 ( 0.00%) && let Some(did) = path.res.opt_def_id() => . { 220 ( 0.00%) cx.tcx.is_diagnostic_item(sym::convert_identity, did) 3,108 ( 0.00%) => ???:::is_diagnostic_item (55x) . }, . _ => false, . } 18 ( 0.00%) } . . /// Checks if an expression represents the identity function . /// Only examines closures and `std::convert::identity` . /// . /// NOTE: If you want to use this function to find out if a closure is unnecessary, you likely want . /// to call [`is_expr_untyped_identity_function`] instead, which makes sure that the closure doesn't . /// have type annotations. This is important because removing a closure with bindings can . /// remove type information that helped type inference before, which can then lead to compile . /// errors. . pub fn is_expr_identity_function(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 12 ( 0.00%) match expr.kind { 22 ( 0.00%) ExprKind::Closure(&Closure { body, .. }) => is_body_identity_function(cx, cx.tcx.hir_body(body)), 250 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_body_identity_function (2x) 174 ( 0.00%) => ???:::hir_body (2x) . _ => expr.basic_res().is_diag_item(cx, sym::convert_identity), . } 4 ( 0.00%) } . . /// Gets the node where an expression is either used, or it's type is unified with another branch. . /// Returns both the node and the `HirId` of the closest child node. 6,472 ( 0.00%) pub fn get_expr_use_or_unification_node<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<(Node<'tcx>, HirId)> { 7,281 ( 0.00%) for (node, child_id) in hir_parent_with_src_iter(tcx, expr.hir_id) { 1,754 ( 0.00%) match node { . Node::Block(_) => {}, . Node::Arm(arm) if arm.body.hir_id == child_id => {}, 3,291 ( 0.00%) Node::Expr(expr) => match expr.kind { . ExprKind::Block(..) | ExprKind::DropTemps(_) => {}, 85 ( 0.00%) ExprKind::Match(_, [arm], _) if arm.hir_id == child_id => {}, 16 ( 0.00%) ExprKind::If(_, then_expr, None) if then_expr.hir_id == child_id => return None, 775 ( 0.00%) _ => return Some((Node::Expr(expr), child_id)), . }, 68 ( 0.00%) node => return Some((node, child_id)), . } . } . None 6,472 ( 0.00%) } . . /// Checks if the result of an expression is used, or it's type is unified with another branch. 4 ( 0.00%) pub fn is_expr_used_or_unified(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 4 ( 0.00%) !matches!( 2 ( 0.00%) get_expr_use_or_unification_node(tcx, expr), 197 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (1x) . None | Some(( . Node::Stmt(Stmt { . kind: StmtKind::Expr(_) . | StmtKind::Semi(_) . | StmtKind::Let(LetStmt { . pat: Pat { . kind: PatKind::Wild, . .. -- line 2022 ---------------------------------------- -- line 2023 ---------------------------------------- . }, . .. . }), . .. . }), . _ . )) . ) 2 ( 0.00%) } . . /// Checks if the expression is the final expression returned from a block. 1,042 ( 0.00%) pub fn is_expr_final_block_expr(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 3,647 ( 0.00%) matches!(tcx.parent_hir_node(expr.hir_id), Node::Block(..)) 56,478 ( 0.00%) => ???:::parent_hir_node (521x) 1,042 ( 0.00%) } . . /// Checks if the expression is a temporary value. . // This logic is the same as the one used in rustc's `check_named_place_expr function`. . // https://github.com/rust-lang/rust/blob/3ed2a10d173d6c2e0232776af338ca7d080b1cd4/compiler/rustc_hir_typeck/src/expr.rs#L482-L499 . pub fn is_expr_temporary_value(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . !expr.is_place_expr(|base| { . cx.typeck_results() . .adjustments() -- line 2044 ---------------------------------------- -- 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 { 1,535 ( 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() {} . /// } . /// ``` 10,281 ( 0.00%) pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool { 17,009 ( 0.00%) if let Node::Item(item) = cx.tcx.parent_hir_node(hir_id) { 1,482,387 ( 0.08%) => ???:::parent_hir_node (3,427x) 12,540 ( 0.00%) matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) . } else { . false . } 6,854 ( 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. 70,524 ( 0.00%) pub fn fn_def_id(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 17,631 ( 0.00%) fn_def_id_with_node_args(cx, expr).map(|(did, _)| did) 845,166 ( 0.05%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (17,631x) 35,262 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call, . /// as well as its node args. 123,417 ( 0.01%) pub fn fn_def_id_with_node_args<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'_>, . ) -> Option<(DefId, GenericArgsRef<'tcx>)> { . let typeck = cx.typeck_results(); 89,619 ( 0.01%) match &expr.kind { 7,317 ( 0.00%) ExprKind::MethodCall(..) => Some(( 14,634 ( 0.00%) typeck.type_dependent_def_id(expr.hir_id)?, 125,245 ( 0.01%) => ???:::type_dependent_def_id (2,439x) 9,756 ( 0.00%) typeck.node_args(expr.hir_id), 93,555 ( 0.01%) => ???:::node_args (2,439x) 3,889 ( 0.00%) )), . ExprKind::Call( . Expr { 1,464 ( 0.00%) kind: ExprKind::Path(qpath), . hir_id: path_hir_id, . .. . }, . .., . ) => { . // Only return Fn-like DefIds, not the DefIds of statics/consts/etc that contain or . // deref to fn pointers, dyn Fn, impl Fn - #8850 7,278 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(..) | DefKind::AssocFn, id) = 14,570 ( 0.00%) typeck.qpath_res(qpath, *path_hir_id) 38,948 ( 0.00%) => ???:::qpath_res (1,464x) . { 8,700 ( 0.00%) Some((id, typeck.node_args(*path_hir_id))) 48,273 ( 0.00%) => ???:::node_args (1,450x) . } else { . None . } . }, . _ => None, . } 158,679 ( 0.01%) } . . /// Returns `Option` where String is a textual representation of the type encapsulated in . /// the slice iff the given expression is a slice of primitives. . /// . /// (As defined in the `is_recursively_primitive_type` function.) Returns `None` otherwise. . pub fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { . let expr_type = cx.typeck_results().expr_ty_adjusted(expr); . let expr_kind = expr_type.kind(); -- line 2150 ---------------------------------------- -- line 2180 ---------------------------------------- . . /// Returns a list of groups where elements in each group are equal according to `eq` . /// . /// - Within each group the elements are sorted by the order they appear in `exprs` . /// - The groups themselves are sorted by their first element's appearence in `exprs` . /// . /// Given functions `eq` and `hash` such that `eq(a, b) == true` . /// implies `hash(a) == hash(b)` 6,384 ( 0.00%) pub fn search_same(exprs: &[T], mut hash: Hash, mut eq: Eq) -> Vec> . where . Hash: FnMut(&T) -> u64, . Eq: FnMut(&T, &T) -> bool, . { . match exprs { 1,625 ( 0.00%) [a, b] if eq(a, b) => return vec![vec![a, b]], 1,154 ( 0.00%) _ if exprs.len() <= 2 => return vec![], . _ => {}, . } . . let mut buckets: UnindexMap>> = UnindexMap::default(); . . for expr in exprs { 160 ( 0.00%) match buckets.entry(hash(expr)) { . indexmap::map::Entry::Occupied(mut o) => { . let bucket = o.get_mut(); . match bucket.iter_mut().find(|group| eq(expr, group[0])) { . Some(group) => group.push(expr), . None => bucket.push(vec![expr]), . } . }, . indexmap::map::Entry::Vacant(v) => { 800 ( 0.00%) v.insert(vec![vec![expr]]); 80 ( 0.00%) }, . } . } . . buckets . .into_values() . .flatten() 160 ( 0.00%) .filter(|group| group.len() > 1) . .collect() 5,472 ( 0.00%) } . . /// Peels off all references on the pattern. Returns the underlying pattern and the number of . /// references removed. 412 ( 0.00%) pub fn peel_hir_pat_refs<'a>(pat: &'a Pat<'a>) -> (&'a Pat<'a>, usize) { . fn peel<'a>(pat: &'a Pat<'a>, count: usize) -> (&'a Pat<'a>, usize) { 824 ( 0.00%) if let PatKind::Ref(pat, _, _) = pat.kind { . peel(pat, count + 1) . } else { . (pat, count) . } . } . peel(pat, 0) 412 ( 0.00%) } . . /// Peels of expressions while the given closure returns `Some`. 232 ( 0.00%) pub fn peel_hir_expr_while<'tcx>( . mut expr: &'tcx Expr<'tcx>, . mut f: impl FnMut(&'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>>, . ) -> &'tcx Expr<'tcx> { 14 ( 0.00%) while let Some(e) = f(expr) { . expr = e; . } . expr 261 ( 0.00%) } . . /// Peels off up to the given number of references on the expression. Returns the underlying . /// expression and the number of references removed. . pub fn peel_n_hir_expr_refs<'a>(expr: &'a Expr<'a>, count: usize) -> (&'a Expr<'a>, usize) { . let mut remaining = count; . let e = peel_hir_expr_while(expr, |e| match e.kind { . ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) if remaining != 0 => { . remaining -= 1; -- line 2253 ---------------------------------------- -- 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. 56,642 ( 0.00%) pub fn peel_hir_expr_refs<'a>(expr: &'a Expr<'a>) -> (&'a Expr<'a>, usize) { . let mut count = 0; 59,342 ( 0.00%) let e = peel_hir_expr_while(expr, |e| match e.kind { 675 ( 0.00%) ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) => { 675 ( 0.00%) count += 1; . Some(e) . }, . _ => None, . }); . (e, count) 28,321 ( 0.00%) } . . /// Peels off all references on the type. Returns the underlying type and the number of references . /// removed. . pub fn peel_hir_ty_refs<'a>(mut ty: &'a hir::Ty<'a>) -> (&'a hir::Ty<'a>, usize) { . let mut count = 0; . loop { . match &ty.kind { . TyKind::Ref(_, ref_ty) => { -- line 2293 ---------------------------------------- -- line 2304 ---------------------------------------- . match &ty.kind { . TyKind::Ptr(mut_ty) | TyKind::Ref(_, mut_ty) => peel_hir_ty_refs_and_ptrs(mut_ty.ty), . _ => ty, . } . } . . /// Removes `AddrOf` operators (`&`) or deref operators (`*`), but only if a reference type is . /// dereferenced. An overloaded deref such as `Vec` to slice would not be removed. 63 ( 0.00%) pub fn peel_ref_operators<'hir>(cx: &LateContext<'_>, mut expr: &'hir Expr<'hir>) -> &'hir Expr<'hir> { . loop { 32 ( 0.00%) match expr.kind { . ExprKind::AddrOf(_, _, e) => expr = e, 8 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) if cx.typeck_results().expr_ty(e).is_ref() => expr = e, . _ => break, . } . } . expr 35 ( 0.00%) } . . /// Returns a `Vec` of `Expr`s containing `AddrOf` operators (`&`) or deref operators (`*`) of a . /// given expression. . pub fn get_ref_operators<'hir>(cx: &LateContext<'_>, expr: &'hir Expr<'hir>) -> Vec<&'hir Expr<'hir>> { . let mut operators = Vec::new(); . peel_hir_expr_while(expr, |expr| match expr.kind { . ExprKind::AddrOf(_, _, e) => { . operators.push(expr); -- line 2329 ---------------------------------------- -- line 2333 ---------------------------------------- . operators.push(expr); . Some(e) . }, . _ => None, . }); . operators . } . 101 ( 0.00%) pub fn is_hir_ty_cfg_dependant(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> bool { 373 ( 0.00%) if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind 202 ( 0.00%) && let Res::Def(_, def_id) = path.res . { 1,716 ( 0.00%) return find_attr!(cx.tcx, def_id, CfgTrace(..) | CfgAttrTrace(..)); 4,664 ( 0.00%) => ???:>::get_attrs (44x) . } . false 101 ( 0.00%) } . . static TEST_ITEM_NAMES_CACHE: OnceLock>>> = OnceLock::new(); . . /// Returns the names of the test items in the given module. . /// The names are sorted using the default `Symbol` ordering. 3,130 ( 0.00%) fn test_item_names(tcx: TyCtxt<'_>, module: LocalModId) -> Vec { . let cache = TEST_ITEM_NAMES_CACHE.get_or_init(|| Mutex::new(FxHashMap::default())); . let mut map = cache.lock().unwrap(); . match map.entry(module) { . Entry::Occupied(entry) => entry.get().clone(), . Entry::Vacant(entry) => { . let mut names = Vec::new(); . for id in tcx.hir_module_free_items(module) { 4,384 ( 0.00%) if matches!(tcx.def_kind(id.owner_id), DefKind::Const { .. }) . && let item = tcx.hir_item(id) . && let ItemKind::Const(ident, _generics, ty, _body) = item.kind . && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . // We could also check for the type name `test::TestDescAndFn` . && let Res::Def(DefKind::Struct, _) = path.res . && find_attr!(tcx, item.hir_id(), RustcTestMarker(..)) . { . names.push(ident.name); . } . } . names.sort_unstable(); 104 ( 0.00%) entry.insert(names).clone() . }, . } 2,504 ( 0.00%) } . . /// Checks if the function containing the given `HirId` is a `#[test]` function . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function 2,191 ( 0.00%) pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool { 1,252 ( 0.00%) let names = test_item_names(tcx, tcx.parent_module(id)); 936,132 ( 0.05%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::test_item_names (313x) 32,023 ( 0.00%) => ???:::parent_module (313x) . // Without `--test` there are no test items, so the parent walk can never match. 313 ( 0.00%) if names.is_empty() { . return false; . } . once((id, tcx.hir_node(id))) . .chain(tcx.hir_parent_iter(id)) . // Since you can nest functions we need to collect all until we leave . // function scope . .any(|(_id, node)| { . if let Node::Item(item) = node -- line 2393 ---------------------------------------- -- line 2394 ---------------------------------------- . && let ItemKind::Fn { ident, .. } = item.kind . { . // Note that we have sorted the item names in the visitor, . // so the binary_search gets the same as `contains`, but faster. . return names.binary_search(&ident.name).is_ok(); . } . false . }) 1,878 ( 0.00%) } . . /// Checks if `fn_def_id` has a `#[test]` attribute applied . /// . /// This only checks directly applied attributes. To see if a node has a parent function marked with . /// `#[test]` use [`is_in_test_function`]. . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function . pub fn is_test_function(tcx: TyCtxt<'_>, fn_def_id: LocalDefId) -> bool { -- line 2410 ---------------------------------------- -- line 2419 ---------------------------------------- . false . } . } . . /// Checks if `id` has a `#[cfg(test)]` attribute applied . /// . /// This only checks directly applied attributes, to see if a node is inside a `#[cfg(test)]` parent . /// use [`is_in_cfg_test`] 102 ( 0.00%) pub fn is_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { 190,074 ( 0.01%) if let Some(cfgs) = find_attr!(tcx, id, CfgTrace(cfgs) => cfgs) 52,033 ( 0.00%) => ???:>::get_attrs (860x) . && cfgs . .iter() 244 ( 0.00%) .any(|(cfg, _)| matches!(cfg, CfgEntry::NameValue { name: sym::test, .. })) . { . true . } else { . false . } 68 ( 0.00%) } . . /// Checks if any parent node of `HirId` has `#[cfg(test)]` attribute applied . pub fn is_in_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_id_iter(id).any(|parent_id| is_cfg_test(tcx, parent_id)) . } . . /// Checks if the node is in a `#[test]` function or has any parent node marked `#[cfg(test)]` 3,130 ( 0.00%) pub fn is_in_test(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { 1,565 ( 0.00%) is_in_test_function(tcx, hir_id) || is_in_cfg_test(tcx, hir_id) 975,980 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test_function (313x) 2,504 ( 0.00%) } . . /// Checks if the item of any of its parents has `#[cfg(...)]` attribute applied. . pub fn inherits_cfg(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { . find_attr!(tcx, def_id, CfgTrace(..)) . || find_attr!( . tcx.hir_parent_id_iter(tcx.local_def_id_to_hir_id(def_id)) . .flat_map(|parent_id| tcx.hir_attrs(parent_id)), . CfgTrace(..) -- line 2455 ---------------------------------------- -- line 2485 ---------------------------------------- . /// Whether the type must unify with another code path. . pub is_ty_unified: bool, . /// Whether the value will be moved before it's used. . pub moved_before_use: bool, . /// Whether the use site has the same `SyntaxContext` as the value. . pub same_ctxt: bool, . } . impl<'tcx> ExprUseSite<'tcx> { 798 ( 0.00%) pub fn use_node(&self, cx: &LateContext<'tcx>) -> ExprUseNode<'tcx> { 6,086 ( 0.00%) match self.node { 30 ( 0.00%) Node::LetStmt(l) => ExprUseNode::LetStmt(l), 12 ( 0.00%) Node::ExprField(field) => ExprUseNode::Field(field), . . Node::Item(&Item { . kind: ItemKind::Static(..) | ItemKind::Const(..), . owner_id, . .. . }) . | Node::TraitItem(&TraitItem { . kind: TraitItemKind::Const(..), -- line 2504 ---------------------------------------- -- line 2518 ---------------------------------------- . }) . | Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(..), . owner_id, . .. . }) . | Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(..), 50 ( 0.00%) owner_id, . .. . }) => ExprUseNode::Return(owner_id), . 5,872 ( 0.00%) Node::Expr(use_expr) => match use_expr.kind { . ExprKind::Ret(_) => ExprUseNode::Return(OwnerId { . def_id: cx.tcx.hir_body_owner_def_id(cx.enclosing_body.unwrap()), . }), . 30 ( 0.00%) ExprKind::Closure(closure) => ExprUseNode::Return(OwnerId { def_id: closure.def_id }), 475 ( 0.00%) ExprKind::Call(func, args) => match args.iter().position(|arg| arg.hir_id == self.child_id) { 1,425 ( 0.00%) Some(i) => ExprUseNode::FnArg(func, i), . None => ExprUseNode::Callee, . }, 350 ( 0.00%) ExprKind::MethodCall(name, _, args, _) => ExprUseNode::MethodArg( 70 ( 0.00%) use_expr.hir_id, 70 ( 0.00%) name.args, . args.iter() . .position(|arg| arg.hir_id == self.child_id) . .map_or(0, |i| i + 1), . ), . ExprKind::Field(_, name) => ExprUseNode::FieldAccess(name), 4 ( 0.00%) ExprKind::AddrOf(kind, mutbl, _) => ExprUseNode::AddrOf(kind, mutbl), . _ => ExprUseNode::Other, . }, . _ => ExprUseNode::Other, . } 2,394 ( 0.00%) } . } . . /// The node which consumes a value. . pub enum ExprUseNode<'tcx> { . /// Assignment to, or initializer for, a local . LetStmt(&'tcx LetStmt<'tcx>), . /// Initializer for a const or static item. . ConstStatic(OwnerId), -- line 2561 ---------------------------------------- -- line 2573 ---------------------------------------- . FieldAccess(Ident), . /// Borrow expression. . AddrOf(ast::BorrowKind, Mutability), . Other, . } . impl<'tcx> ExprUseNode<'tcx> { . /// Checks if the value is returned from the function. . pub fn is_return(&self) -> bool { 1,590 ( 0.00%) matches!(self, Self::Return(_)) . } . . /// Checks if the value is used as a method call receiver. . pub fn is_recv(&self) -> bool { 134 ( 0.00%) matches!(self, Self::MethodArg(_, _, 0)) . } . . /// Gets the needed type as it's defined without any type inference. 5,502 ( 0.00%) pub fn defined_ty(&self, cx: &LateContext<'tcx>) -> Option> { 7,892 ( 0.00%) match *self { . Self::LetStmt(LetStmt { ty: Some(ty), .. }) => Some(DefinedTy::Hir(ty)), . Self::ConstStatic(id) => Some(DefinedTy::Mir { . def_site_def_id: Some(id.def_id.to_def_id()), . ty: Binder::dummy(cx.tcx.type_of(id).instantiate_identity().skip_norm_wip()), . }), 116 ( 0.00%) Self::Return(id) => { 190 ( 0.00%) if let Node::Expr(Expr { . kind: ExprKind::Closure(c), . .. 66 ( 0.00%) }) = cx.tcx.hir_node_by_def_id(id.def_id) . { 40 ( 0.00%) match c.fn_decl.output { . FnRetTy::DefaultReturn(_) => None, . FnRetTy::Return(ty) => Some(DefinedTy::Hir(ty)), . } . } else { . let ty = cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip().output(); 200 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id.def_id.to_def_id()), . ty, . }) . } . }, 28 ( 0.00%) Self::Field(field) => match get_parent_expr_for_hir(cx, field.hir_id) { . Some(Expr { . hir_id, . kind: ExprKind::Struct(path, ..), . .. 40 ( 0.00%) }) => adt_and_variant_of_res(cx, cx.qpath_res(path, *hir_id)) 396 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::adt_and_variant_of_res (4x) 92 ( 0.00%) => ???:::qpath_res (4x) . .and_then(|(adt, variant)| { . variant . .fields . .iter() . .find(|f| f.name == field.ident.name) . .map(|f| (adt, f)) . }) . .map(|(adt, field_def)| DefinedTy::Mir { . def_site_def_id: Some(adt.did()), 24 ( 0.00%) ty: Binder::dummy(cx.tcx.type_of(field_def.did).instantiate_identity().skip_norm_wip()), 32 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/binder.rs:>::dummy (4x) . }), . _ => None, . }, 948 ( 0.00%) Self::FnArg(callee, i) => { 1,422 ( 0.00%) let sig = expr_sig(cx, callee)?; 152,330 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::expr_sig (474x) 3,792 ( 0.00%) let (hir_ty, ty) = sig.input_with_hir(i)?; 20,358 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::input_with_hir (474x) 2,844 ( 0.00%) Some(match hir_ty { . Some(hir_ty) => DefinedTy::Hir(hir_ty), . None => DefinedTy::Mir { . def_site_def_id: sig.predicates_id(), . ty, . }, . }) 474 ( 0.00%) }, 140 ( 0.00%) Self::MethodArg(id, _, i) => { 140 ( 0.00%) let id = cx.typeck_results().type_dependent_def_id(id)?; 3,570 ( 0.00%) => ???:::type_dependent_def_id (70x) 70 ( 0.00%) let sig = cx.tcx.fn_sig(id).skip_binder(); 280 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id), . ty: sig.input(i), . }) 70 ( 0.00%) }, . Self::LetStmt(_) | Self::FieldAccess(..) | Self::Callee | Self::Other | Self::AddrOf(..) => None, . } 7,074 ( 0.00%) } . } . . struct ReplacingFilterMap(I, F); . impl Iterator for ReplacingFilterMap . where . I: Iterator, . F: FnMut(&mut I, I::Item) -> Option, . { . type Item = U; . fn next(&mut self) -> Option { 2,016 ( 0.00%) while let Some(x) = self.0.next() { . if let Some(x) = (self.1)(&mut self.0, x) { . return Some(x); . } . } . None . } . } . -- line 2674 ---------------------------------------- -- line 2676 ---------------------------------------- . /// which simply moves a value. . #[expect(clippy::too_many_lines)] . pub fn expr_use_sites<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . mut ctxt: SyntaxContext, . e: &'tcx Expr<'tcx>, . ) -> impl Iterator> { 2,442 ( 0.00%) let mut adjustments: &[_] = typeck.expr_adjustments(e); 33,901 ( 0.00%) => ???:::expr_adjustments (814x) . let mut is_ty_unified = false; . let mut moved_before_use = false; . let mut same_ctxt = true; 11,396 ( 0.00%) ReplacingFilterMap( 1,628 ( 0.00%) hir_parent_with_src_iter(tcx, e.hir_id), . move |iter: &mut _, (parent, child_id)| { . let parent_ctxt; . let mut parent_adjustments: &[_] = &[]; 4,032 ( 0.00%) match parent { . Node::Expr(parent_expr) => { 842 ( 0.00%) parent_ctxt = parent_expr.span.ctxt(); 2,526 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 2,526 ( 0.00%) parent_adjustments = typeck.expr_adjustments(parent_expr); 32,834 ( 0.00%) => ???:::expr_adjustments (842x) 4,855 ( 0.00%) match parent_expr.kind { 112 ( 0.00%) ExprKind::Match(scrutinee, arms, _) if scrutinee.hir_id != child_id => { 16 ( 0.00%) is_ty_unified |= arms.len() != 1; . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, 16 ( 0.00%) ExprKind::If(cond, _, else_) if cond.hir_id != child_id => { . is_ty_unified |= else_.is_some(); . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, . ExprKind::Break(Destination { target_id: Ok(id), .. }, _) => { -- line 2715 ---------------------------------------- -- line 2716 ---------------------------------------- . is_ty_unified = true; . moved_before_use = true; . *iter = hir_parent_with_src_iter(tcx, id); . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, 77 ( 0.00%) ExprKind::Block(b, _) => { 77 ( 0.00%) is_ty_unified |= b.targeted_by_break; . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, . ExprKind::DropTemps(_) | ExprKind::Type(..) => { . if adjustments.is_empty() { -- line 2733 ---------------------------------------- -- line 2734 ---------------------------------------- . adjustments = parent_adjustments; . } . return None; . }, . _ => {}, . } . }, . Node::Arm(arm) => { 16 ( 0.00%) parent_ctxt = arm.span.ctxt(); 48 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 32 ( 0.00%) if arm.body.hir_id == child_id { . return None; . } . }, . Node::Block(b) => { 308 ( 0.00%) same_ctxt &= b.span.ctxt() == ctxt; . return None; . }, . Node::ConstBlock(_) => parent_ctxt = ctxt, 4 ( 0.00%) Node::ExprField(&ExprField { span, .. }) => { . parent_ctxt = span.ctxt(); 8 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 4 ( 0.00%) }, . Node::AnonConst(&AnonConst { span, .. }) . | Node::ConstArg(&ConstArg { span, .. }) . | Node::Field(&FieldDef { span, .. }) . | Node::ImplItem(&ImplItem { span, .. }) . | Node::Item(&Item { span, .. }) . | Node::LetStmt(&LetStmt { span, .. }) . | Node::Stmt(&Stmt { span, .. }) . | Node::TraitItem(&TraitItem { span, .. }) . | Node::Variant(&Variant { span, .. }) => { . parent_ctxt = span.ctxt(); 138 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; . *iter = hir_parent_with_src_iter(tcx, CRATE_HIR_ID); . }, . Node::AssocItemConstraint(_) . | Node::ConstArgExprField(_) . | Node::Crate(_) . | Node::Ctor(_) . | Node::Err(_) . | Node::ForeignItem(_) -- line 2775 ---------------------------------------- -- line 2803 ---------------------------------------- . is_ty_unified: mem::replace(&mut is_ty_unified, false), . moved_before_use: mem::replace(&mut moved_before_use, false), . same_ctxt: mem::replace(&mut same_ctxt, true), . }) . }, . ) . } . 9,768 ( 0.00%) pub fn get_expr_use_site<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . ctxt: SyntaxContext, . e: &'tcx Expr<'tcx>, . ) -> ExprUseSite<'tcx> { . // The value in `unwrap_or` doesn't actually matter; an expression always . // has a use site. . expr_use_sites(tcx, typeck, ctxt, e).next().unwrap_or_else(|| { -- line 2819 ---------------------------------------- -- line 2822 ---------------------------------------- . node: Node::Synthetic, // The crate root would also work. . child_id: CRATE_HIR_ID, . adjustments: &[], . is_ty_unified: false, . moved_before_use: false, . same_ctxt: false, . } . }) 6,512 ( 0.00%) } . . /// Tokenizes the input while keeping the text associated with each token. . pub fn tokenize_with_text(s: &str) -> impl Iterator { . let mut pos = 0; . tokenize(s, FrontmatterAllowed::No).map(move |t| { 6,928 ( 0.00%) let end = pos + t.len; 12 ( 0.00%) let range = pos as usize..end as usize; . let inner = InnerSpan::new(range.start, range.end); 3,996 ( 0.00%) pos = end; 4,981 ( 0.00%) (t.kind, s.get(range).unwrap_or_default(), inner) 693 ( 0.00%) }) . } . . /// Checks whether a given span has any comment token . /// This checks for all types of comment: line "//", block "/**", doc "///" "//!" . pub fn span_contains_comment<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> bool { . span.check_text(sm, |snippet| { . tokenize(snippet, FrontmatterAllowed::No).any(|token| { 55,673 ( 0.00%) matches!( . token.kind, . TokenKind::BlockComment { .. } | TokenKind::LineComment { .. } . ) . }) . }) . } . . /// Checks whether a given span has any significant token. A significant token is a non-whitespace -- line 2857 ---------------------------------------- -- line 2884 ---------------------------------------- . .filter(|(t, ..)| matches!(t, TokenKind::BlockComment { .. } | TokenKind::LineComment { .. })) . .map(|(_, s, _)| s.to_string()) . .collect::>() . }) . .unwrap_or_default() . } . . pub fn span_find_starting_semi(sm: &SourceMap, span: Span) -> Span { 155 ( 0.00%) sm.span_take_while(span, |&ch| ch == ' ' || ch == ';') 108,349 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/source_map.rs:::span_take_while:: (155x) . } . . /// Returns whether the given let pattern and else body can be turned into the `?` operator . /// . /// For this example: . /// ```ignore . /// let FooBar { a, b } = if let Some(a) = ex { a } else { return None }; . /// ``` -- line 2900 ---------------------------------------- -- line 2942 ---------------------------------------- . /// Binary operation traits like `LangItem::Add` . pub static BINOP_TRAITS: &[LangItem] = &[$(LangItem::$name,)*]; . . /// Operator-Assign traits like `LangItem::AddAssign` . pub static OP_ASSIGN_TRAITS: &[LangItem] = &[$(LangItem::$assign,)*]; . . /// Converts `BinOpKind::Add` to `(LangItem::Add, LangItem::AddAssign)`, for example . pub fn binop_traits(kind: hir::BinOpKind) -> Option<(LangItem, LangItem)> { 2,186 ( 0.00%) match kind { . $(hir::BinOpKind::$name => Some((LangItem::$name, LangItem::$assign)),)* . _ => None, . } . } . }; . } . . op_utils! { -- line 2958 ---------------------------------------- -- line 2966 ---------------------------------------- . BitOr BitOrAssign . Shl ShlAssign . Shr ShrAssign . } . . /// Returns `true` if the pattern is a `PatWild`, or is an ident prefixed with `_` . /// that is not locally used. . pub fn pat_is_wild<'tcx>(cx: &LateContext<'tcx>, pat: &'tcx PatKind<'_>, body: impl Visitable<'tcx>) -> bool { 60 ( 0.00%) match *pat { . PatKind::Wild => true, 18 ( 0.00%) PatKind::Binding(_, id, ident, None) if ident.as_str().starts_with('_') => { 192 ( 0.00%) => ???:::as_str (6x) . !visitors::is_local_used(cx, body, id) . }, . _ => false, . } . } . . #[derive(Clone, Copy)] . pub enum RequiresSemi { -- line 2984 ---------------------------------------- -- line 3372 ---------------------------------------- . expr.kind, . ExprKind::Block(..) | ExprKind::ConstBlock(..) | ExprKind::If(..) | ExprKind::Loop(..) | ExprKind::Match(..) . ) . } . . /// Returns true if the given `expr` is binary expression that needs to be wrapped in parentheses. . pub fn binary_expr_needs_parentheses(expr: &Expr<'_>) -> bool { . fn contains_block(expr: &Expr<'_>, is_operand: bool) -> bool { 5 ( 0.00%) match expr.kind { . ExprKind::Binary(_, lhs, _) | ExprKind::Cast(lhs, _) => contains_block(lhs, true), . _ if is_block_like(expr) => is_operand, . _ => false, . } . } . . contains_block(expr, false) 1 ( 0.00%) } . . /// Returns true if the specified expression is in a receiver position. . pub fn is_receiver_of_method_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . if let Some(parent_expr) = get_parent_expr(cx, expr) . && let ExprKind::MethodCall(_, receiver, ..) = parent_expr.kind . && receiver.hir_id == expr.hir_id . { . return true; . } . false . } . . /// Returns true if `expr` creates any temporary whose type references a non-static lifetime and has . /// a significant drop and does not consume it. 2 ( 0.00%) pub fn leaks_droppable_temporary_with_limited_lifetime<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_unconsumed_temporary(cx, expr, |temporary_ty| { . if temporary_ty.has_significant_drop(cx.tcx, cx.typing_env()) . && temporary_ty . .walk() . .any(|arg| matches!(arg.kind(), GenericArgKind::Lifetime(re) if !re.is_static())) . { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_break() 2 ( 0.00%) } . . /// Returns true if `expr` creates any temporary that has a significant drop and does not consume . /// it. . pub fn leaks_droppable_temporary<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_unconsumed_temporary(cx, expr, |temporary_ty| { . if temporary_ty.has_significant_drop(cx.tcx, cx.typing_env()) { . ControlFlow::Break(()) . } else { -- line 3424 ---------------------------------------- -- line 3570 ---------------------------------------- . { . Some(into_future_arg) . } else { . None . } . } . . /// Checks if the given expression is a call to `Default::default()`. 398 ( 0.00%) pub fn is_expr_default<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { 972 ( 0.00%) if let ExprKind::Call(fn_expr, []) = &expr.kind 156 ( 0.00%) && let ExprKind::Path(qpath) = &fn_expr.kind 351 ( 0.00%) && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) 3,042 ( 0.00%) => ???:::qpath_res (39x) . { 117 ( 0.00%) cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 2,502 ( 0.00%) => ???:::is_diagnostic_item (39x) . } else { . false . } 398 ( 0.00%) } . . /// Checks if `expr` may be directly used as the return value of its enclosing body. . /// The following cases are covered: . /// - `expr` as the last expression of the body, or of a block that can be used as the return value . /// - `return expr` . /// - then or else part of a `if` in return position . /// - arm body of a `match` in a return position . /// - `break expr` or `break 'label expr` if the loop or block being exited is used as a return -- line 3595 ---------------------------------------- -- line 3597 ---------------------------------------- . /// . /// Contrary to [`TyCtxt::hir_get_fn_id_for_return_block()`], if `expr` is part of a . /// larger expression, for example a field expression of a `struct`, it will not be . /// considered as matching the condition and will return `false`. . /// . /// Also, even if `expr` is assigned to a variable which is later returned, this function . /// will still return `false` because `expr` is not used *directly* as the return value . /// as it goes through the intermediate variable. 7 ( 0.00%) pub fn potential_return_of_enclosing_body(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 1 ( 0.00%) let enclosing_body_owner = cx . .tcx 7 ( 0.00%) .local_def_id_to_hir_id(cx.tcx.hir_enclosing_body_owner(expr.hir_id)); 382 ( 0.00%) => ???:::hir_enclosing_body_owner (1x) . let mut prev_id = expr.hir_id; . let mut skip_until_id = None; 5 ( 0.00%) for (hir_id, node) in cx.tcx.hir_parent_iter(expr.hir_id) { 1 ( 0.00%) if hir_id == enclosing_body_owner { . return true; . } 2 ( 0.00%) if let Some(id) = skip_until_id { . prev_id = hir_id; . if id == hir_id { . skip_until_id = None; . } . continue; . } 2 ( 0.00%) match node { . Node::Block(Block { expr, .. }) if expr.is_some_and(|expr| expr.hir_id == prev_id) => {}, . Node::Arm(arm) if arm.body.hir_id == prev_id => {}, 4 ( 0.00%) Node::Expr(expr) => match expr.kind { . ExprKind::Ret(_) => return true, . ExprKind::If(_, then, opt_else) . if then.hir_id == prev_id || opt_else.is_some_and(|els| els.hir_id == prev_id) => {}, . ExprKind::Match(_, arms, _) if arms.iter().any(|arm| arm.hir_id == prev_id) => {}, . ExprKind::Block(block, _) if block.hir_id == prev_id => {}, . ExprKind::Break( . Destination { . target_id: Ok(target_id), -- line 3633 ---------------------------------------- -- line 3640 ---------------------------------------- . _ => break, . } . prev_id = hir_id; . } . . // `expr` is used as part of "something" and is not returned directly from its . // enclosing body. . false 9 ( 0.00%) } . . /// Checks if the expression has adjustments that require coercion, for example: dereferencing with . /// overloaded deref, coercing pointers and `dyn` objects. . pub fn expr_adjustment_requires_coercion(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . cx.typeck_results().expr_adjustments(expr).iter().any(|adj| { . matches!( . adj.kind, . Adjust::Deref(DerefAdjustKind::Overloaded(_)) -- line 3656 ---------------------------------------- -- line 3671 ---------------------------------------- . )), . .. . }) . ) . } . . /// Checks if the chosen edition and `msrv` allows using `if let` chains. . pub fn can_use_if_let_chains(cx: &LateContext<'_>, msrv: Msrv) -> bool { 138 ( 0.00%) cx.tcx.sess.edition().at_least_rust_2024() && msrv.meets(cx, msrvs::LET_CHAINS) 46 ( 0.00%) } . . /// Returns an iterator over successive parent nodes paired with the ID of the node which . /// immediatly preceeded them. . #[inline] . pub fn hir_parent_with_src_iter(tcx: TyCtxt<'_>, mut id: HirId) -> impl Iterator, HirId)> { . tcx.hir_parent_id_iter(id) 11,666 ( 0.00%) .map(move |parent| (tcx.hir_node(parent), mem::replace(&mut id, parent))) 50,235 ( 0.00%) => ???:::hir_node (809x) . } 183,172 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_pattern.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_sugg; . use rustc_ast::ast::{Pat, PatKind}; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, LintContext as _}; . . use super::REDUNDANT_PATTERN; . 33,271 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 33,277 ( 0.00%) if let PatKind::Ident(ann, ident, Some(ref right)) = pat.kind 2 ( 0.00%) && let PatKind::Wild = right.kind . && !pat.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( . cx, . REDUNDANT_PATTERN, . pat.span, . format!( . "the `{} @ _` pattern can be written as just `{}`", . ident.name, ident.name, . ), . "try", . format!("{}{}", ann.prefix_str(), ident.name), . Applicability::MachineApplicable, . ); . } 38,024 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/repr_attributes.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_span::Span; . . use clippy_utils::diagnostics::span_lint_and_then; . use clippy_utils::msrvs::{self, Msrv}; . . use super::REPR_PACKED_WITHOUT_ABI; . . pub(super) fn check(cx: &LateContext<'_>, item_span: Span, attrs: &[Attribute], msrv: Msrv) { 10,790 ( 0.00%) if let Some(reprs) = find_attr!(attrs, Repr { reprs, .. } => reprs) { . let packed_span = reprs . .iter() 49 ( 0.00%) .find(|(r, _)| matches!(r, ReprAttr::ReprPacked(..))) . .map(|(_, s)| *s); . . if let Some(packed_span) = packed_span . && !reprs . .iter() . .any(|(x, _)| *x == ReprAttr::ReprC || *x == ReprAttr::ReprRust) . && msrv.meets(cx, msrvs::REPR_RUST) . { -- line 23 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . tcx: TyCtxt<'tcx>, . // Cache the current value of `hir_owner_nodes` to avoid repeatedly calling the same query for . // the same owner, which will uselessly record many times the same query dependency. . current_owner_nodes: Option<&'tcx OwnerNodes<'tcx>>, . } . . impl<'tcx> ParentHirIterator<'tcx> { . fn new(tcx: TyCtxt<'tcx>, current_id: HirId) -> ParentHirIterator<'tcx> { 1,268 ( 0.00%) ParentHirIterator { current_id, tcx, current_owner_nodes: None } . } . } . . impl<'tcx> Iterator for ParentHirIterator<'tcx> { . type Item = HirId; . . fn next(&mut self) -> Option { . if self.current_id == CRATE_HIR_ID { -- line 46 ---------------------------------------- -- line 100 ---------------------------------------- . Some((self.current_id.owner, node)) . } . } . . impl<'tcx> TyCtxt<'tcx> { . #[inline] . pub fn local_def_id_to_hir_id(self, def_id: impl IntoQueryKey) -> HirId { . let def_id = def_id.into_query_key(); 23,873 ( 0.00%) match self.hir_owner(def_id) { . ProjectedMaybeOwner::Owner(_) => HirId::make_owner(def_id), . ProjectedMaybeOwner::NonOwner(hir_id) => hir_id, . } . } . . /// This function is used only inside eval-always query `analysis` . /// (`analysis -> run_required_analysis` -> `emit_delayed_lints`), so it is safe . /// to obtain delayed lints from non-eval-always `owner` query. -- line 116 ---------------------------------------- -- line 162 ---------------------------------------- . /// Retrieves the `hir::Node` corresponding to `id`. . pub fn hir_node(self, id: HirId) -> Node<'tcx> { . self.hir_owner_nodes(id.owner).nodes[id.local_id].node . } . . /// Retrieves the `hir::Node` corresponding to `id`. . #[inline] . pub fn hir_node_by_def_id(self, id: LocalDefId) -> Node<'tcx> { 8,059 ( 0.00%) self.hir_node(self.local_def_id_to_hir_id(id)) 186 ( 0.00%) => ???:::hir_node (3x) . } . . /// Returns `HirId` of the parent HIR node of node with this `hir_id`. . /// Returns the same `hir_id` if and only if `hir_id == CRATE_HIR_ID`. . /// . /// If calling repeatedly and iterating over parents, prefer [`TyCtxt::hir_parent_iter`]. . pub fn parent_hir_id(self, hir_id: HirId) -> HirId { . let HirId { owner, local_id } = hir_id; -- line 178 ---------------------------------------- -- line 303 ---------------------------------------- . self.hir_span(hir_id), . "body_owned_by: {} has no associated body", . self.hir_id_to_string(hir_id) . ); . }) . } . . pub fn hir_body_param_idents(self, id: BodyId) -> impl Iterator> { 3,120 ( 0.00%) self.hir_body(id).params.iter().map(|param| match param.pat.kind { 520 ( 0.00%) PatKind::Binding(_, _, ident, _) => Some(ident), . PatKind::Wild => Some(Ident::new(kw::Underscore, param.pat.span)), . _ => None, . }) . } . . /// Returns the `BodyOwnerKind` of this `LocalDefId`. . /// . /// Panics if `LocalDefId` does not have an associated body. 15,042 ( 0.00%) pub fn hir_body_owner_kind(self, def_id: impl Into) -> BodyOwnerKind { 4,256 ( 0.00%) let def_id = def_id.into(); 25,582 ( 0.00%) match self.def_kind(def_id) { . DefKind::Const { .. } | DefKind::AssocConst { .. } => { 4 ( 0.00%) BodyOwnerKind::Const { inline: false } . } . DefKind::AnonConst => BodyOwnerKind::Const { . inline: self.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline, 179 ( 0.00%) }, . DefKind::Ctor(..) | DefKind::Fn | DefKind::AssocFn => BodyOwnerKind::Fn, . DefKind::Closure | DefKind::SyntheticCoroutineBody => BodyOwnerKind::Closure, . DefKind::Static { safety: _, mutability, nested: false } => { . BodyOwnerKind::Static(mutability) . } . DefKind::GlobalAsm => BodyOwnerKind::GlobalAsm, . dk => bug!("{:?} is not a body node: {:?}", def_id, dk), . } 13,060 ( 0.00%) } . . /// Returns the `ConstContext` of the body associated with this `LocalDefId`. . /// . /// Panics if `LocalDefId` does not have an associated body. . /// . /// This should only be used for determining the context of a body, a return . /// value of `Some` does not always suggest that the owner of the body is `const`, . /// just that it has to be checked as if it were. -- line 346 ---------------------------------------- -- line 524 ---------------------------------------- . pub fn hir_parent_id_iter(self, current_id: HirId) -> impl Iterator { . ParentHirIterator::new(self, current_id) . } . . /// Returns an iterator for the nodes in the ancestor tree of the `current_id` . /// until the crate root is reached. Prefer this over your own loop using `parent_id`. . #[inline] . pub fn hir_parent_iter(self, current_id: HirId) -> impl Iterator)> { 65,377 ( 0.00%) self.hir_parent_id_iter(current_id).map(move |id| (id, self.hir_node(id))) 497,924 ( 0.03%) => ???:::hir_node (7,679x) . } . . /// Returns an iterator for the nodes in the ancestor tree of the `current_id` . /// until the crate root is reached. Prefer this over your own loop using `parent_id`. . #[inline] . pub fn hir_parent_owner_iter(self, current_id: HirId) -> ParentOwnerIterator<'tcx> { . ParentOwnerIterator { current_id, tcx: self } . } -- line 540 ---------------------------------------- 32,661 ( 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/fuse.rs -------------------------------------------------------------------------------- Ir -- line 18 ---------------------------------------- . pub struct Fuse { . // NOTE: for `I: FusedIterator`, we never bother setting `None`, but . // we still have to be prepared for that state due to variance. . // See rust-lang/rust#85863 . iter: Option, . } . impl Fuse { . pub(in crate::iter) const fn new(iter: I) -> Fuse { 112 ( 0.00%) Fuse { iter: Some(iter) } . } . . pub(crate) fn into_inner(self) -> Option { . self.iter . } . } . . #[stable(feature = "fused", since = "1.26.0")] -- line 34 ---------------------------------------- -- line 94 ---------------------------------------- . FuseImpl::try_fold(self, acc, fold) . } . . #[inline] . fn fold(self, mut acc: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 10,488 ( 0.00%) if let Some(iter) = self.iter { 1 ( 0.00%) acc = iter.fold(acc, fold); 19 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, ::new::{closure#0}>, ::new::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), >::iter_fold::flatten, ::new::{closure#1}::{closure#0}>, (), as core::iter::traits::iterator::Iterator>::fold::flatten, ::new::{closure#1}::{closure#0}>, (), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, rustc_span::symbol::Symbol), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, rustc_span::symbol::Symbol)>>::extend, ::new::{closure#0}>, core::iter::adapters::map::Map, ::new::{closure#1}::{closure#0}>, ::new::{closure#1}>>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}> (1x) . } . acc . } . . #[inline] . fn find

(&mut self, predicate: P) -> Option . where . P: FnMut(&Self::Item) -> bool, -- line 111 ---------------------------------------- -- line 395 ---------------------------------------- . /// However, we must still be prepared for the possibility that it was already cleared! . #[doc(hidden)] . impl FuseImpl for Fuse . where . I: FusedIterator, . { . #[inline] . fn next(&mut self) -> Option<::Item> { 6,318 ( 0.00%) self.iter.as_mut()?.next() . } . . #[inline] . fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { . match &mut self.iter { . Some(iter) => iter.advance_by(n), . None => match NonZero::new(n) { . Some(n) => Err(n), -- line 411 ---------------------------------------- -- line 421 ---------------------------------------- . . #[inline] . fn try_fold(&mut self, mut acc: Acc, fold: Fold) -> R . where . Self: Sized, . Fold: FnMut(Acc, Self::Item) -> R, . R: Try, . { 55,519 ( 0.00%) if let Some(ref mut iter) = self.iter { 27,321 ( 0.00%) acc = iter.try_fold(acc, fold)?; 3,812 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, ::format_arg_positions::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, (), core::ops::control_flow::ControlFlow<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage)>, as core::iter::traits::iterator::Iterator>::try_fold::flatten, (), core::ops::control_flow::ControlFlow<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage)>, core::iter::traits::iterator::Iterator::find::check<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage), &mut ::is_aliased::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage)>> (54x) . } . try { acc } . } . . #[inline] . fn find

(&mut self, predicate: P) -> Option . where . P: FnMut(&Self::Item) -> bool, -- line 438 ---------------------------------------- 763 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . init: Option<&'a Expr<'a>>, . } . . struct UsageInfo<'a> { . cast_to: Option>, . in_generic_context: bool, . } . 15,840 ( 0.00%) pub(super) fn check<'a>(cx: &LateContext<'a>, body: &Body<'a>) { . let mut bindings: FxHashMap> = FxHashMap::default(); . 1,980 ( 0.00%) for_each_expr_without_closures(body.value, |expr| { 131,148 ( 0.01%) match expr.kind { 2,760 ( 0.00%) ExprKind::Block(block, _) => { 2,760 ( 0.00%) for stmt in block.stmts { 4,520 ( 0.00%) if let StmtKind::Let(let_stmt) = stmt.kind { 2,010 ( 0.00%) collect_binding_from_local(cx, let_stmt, &mut bindings); 414 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::collect_binding_from_local (23x) . } . } . }, 76 ( 0.00%) ExprKind::Let(let_expr) => { 228 ( 0.00%) collect_binding_from_let(cx, let_expr, &mut bindings); 1,368 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::collect_binding_from_let (76x) . }, . _ => {}, . } . ControlFlow::<()>::Continue(()) . }); . . #[allow(rustc::potential_query_instability)] 5,940 ( 0.00%) let mut binding_vec: Vec<_> = bindings.into_iter().collect(); . binding_vec.sort_by_key(|(_, info)| info.ty_span.lo()); . 1,980 ( 0.00%) for (hir_id, binding_info) in binding_vec { . check_binding_usages(cx, body, hir_id, &binding_info); . } 15,840 ( 0.00%) } . 532 ( 0.00%) fn collect_binding_from_let<'a>( . cx: &LateContext<'a>, . let_expr: &rustc_hir::LetExpr<'a>, . bindings: &mut FxHashMap>, . ) { 76 ( 0.00%) if let_expr.ty.is_none() . || let_expr.span.from_expansion() . || has_generic_return_type(cx, let_expr.init) . || contains_unsafe(let_expr.init) . { . return; . } . . if let PatKind::Binding(_, hir_id, _, _) = let_expr.pat.kind -- line 69 ---------------------------------------- -- line 76 ---------------------------------------- . BindingInfo { . source_ty: ty, . ty_span: ty_hir.span, . init: Some(let_expr.init), . }, . ); . } . } 608 ( 0.00%) } . 4,690 ( 0.00%) fn collect_binding_from_local<'a>( . cx: &LateContext<'a>, . let_stmt: &LetStmt<'a>, . bindings: &mut FxHashMap>, . ) { 670 ( 0.00%) if let_stmt.ty.is_none() 140 ( 0.00%) || let_stmt.span.from_expansion() 196 ( 0.00%) || let_stmt . .init 340 ( 0.00%) .is_some_and(|init| has_generic_return_type(cx, init) || contains_unsafe(init)) 9,270 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::has_generic_return_type (68x) . { . return; . } . 195 ( 0.00%) if let PatKind::Binding(_, hir_id, _, _) = let_stmt.pat.kind . && let Some(ty_hir) = let_stmt.ty . { 65 ( 0.00%) let ty = cx.typeck_results().pat_ty(let_stmt.pat); 2,600 ( 0.00%) => ???:::pat_ty (65x) . if ty.is_numeric() { . bindings.insert( . hir_id, . BindingInfo { . source_ty: ty, . ty_span: ty_hir.span, . init: let_stmt.init, . }, . ); . } . } 5,360 ( 0.00%) } . . fn contains_unsafe(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { 1,365 ( 0.00%) if let ExprKind::Block(block, _) = e.kind 5 ( 0.00%) && let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules 1,125 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 (1x) . { . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) . }) . .is_some() . } . 1,950 ( 0.00%) fn has_generic_return_type(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 1,206 ( 0.00%) match &expr.kind { . ExprKind::Block(block, _) => { 8 ( 0.00%) if let Some(tail_expr) = block.expr { . return has_generic_return_type(cx, tail_expr); . } . false . }, . ExprKind::If(_, then_block, else_expr) => { 6 ( 0.00%) has_generic_return_type(cx, then_block) || else_expr.is_some_and(|e| has_generic_return_type(cx, e)) 82 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::has_generic_return_type'2 (1x) . }, 630 ( 0.00%) ExprKind::Match(_, arms, _) => arms.iter().any(|arm| has_generic_return_type(cx, arm.body)), 2,772 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::has_generic_return_type'2 (126x) . ExprKind::Loop(block, label, ..) => for_each_expr_without_closures(*block, |e| { . match e.kind { . ExprKind::Loop(..) => { . // Unlabeled breaks inside nested loops target the inner loop, not ours . return ControlFlow::Continue(Descend::No); . }, . ExprKind::Break(dest, Some(break_expr)) => { . let targets_this_loop = -- line 148 ---------------------------------------- -- line 152 ---------------------------------------- . } . }, . _ => {}, . } . ControlFlow::Continue(Descend::Yes) . }) . .is_some(), . ExprKind::MethodCall(..) => { 25 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 255 ( 0.00%) => ???:::type_dependent_def_id (5x) 5 ( 0.00%) let sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . let ret_ty = sig.output().skip_binder(); . return ret_ty.has_param(); . } . false . }, . ExprKind::Call(callee, _) => { 4 ( 0.00%) if let ExprKind::Path(qpath) = &callee.kind { 5 ( 0.00%) let res = cx.qpath_res(qpath, callee.hir_id); 23 ( 0.00%) => ???:::qpath_res (1x) 12 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::AssocFn, def_id) = res { . let sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . let ret_ty = sig.output().skip_binder(); . return ret_ty.has_param(); . } . } . false . }, . _ => false, . } 1,365 ( 0.00%) } . . fn is_generic_res(cx: &LateContext<'_>, res: Res) -> bool { . let has_type_params = |def_id| { . cx.tcx . .generics_of(def_id) . .own_params . .iter() . .any(|p| p.kind.is_ty_or_const()) -- line 188 ---------------------------------------- 16,599 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_take.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . . impl ManualTake { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualTake { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 55,946 ( 0.00%) if let ExprKind::If(cond, then, Some(otherwise)) = expr.kind 432 ( 0.00%) && let ExprKind::Path(_) = cond.kind 18 ( 0.00%) && let ExprKind::Block( . Block { 21 ( 0.00%) stmts: [stmt], . expr: Some(then_expr), . .. . }, . .., 4 ( 0.00%) ) = then.kind . && let ExprKind::Block( . Block { . stmts: [], . expr: Some(else_expr), . .. . }, . .., . ) = otherwise.kind -- line 74 ---------------------------------------- -- line 98 ---------------------------------------- . expr.span, . "use", . format!("{negate}{std_or_core}::mem::take(&mut {taken})"), . app, . ); . }, . ); . } 217,552 ( 0.01%) } . } . . fn as_const_bool(e: &Expr<'_>) -> Option { . if let ExprKind::Lit(lit) = e.kind . && let LitKind::Bool(b) = lit.node . { . Some(b) . } else { -- line 114 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs -------------------------------------------------------------------------------- Ir . use rustc_ast::ast::{LitFloatType, LitIntType, LitKind}; . use std::iter; . . /// Represents the base of a numeric literal, used for parsing and formatting. 744 ( 0.00%) #[derive(Debug, PartialEq, Eq, Copy, Clone)] . pub enum Radix { . /// A binary literal (e.g., `0b1010`) . Binary, . /// An octal literal (e.g., `0o670`) . Octal, . /// A decimal literal (e.g., `123`) . Decimal, . /// A hexadecimal literal (e.g., `0xFF`) -- line 13 ---------------------------------------- -- line 47 ---------------------------------------- . pub exponent: Option<(&'a str, &'a str)>, . . /// The type suffix, including preceding underscore if present. . pub suffix: Option<&'a str>, . } . . impl<'a> NumericLiteral<'a> { . /// Attempts to parse a `NumericLiteral` from the source string of an `ast::LitKind`. 3,492 ( 0.00%) pub fn from_lit_kind(src: &'a str, lit_kind: &LitKind) -> Option> { . let unsigned_src = src.strip_prefix('-').map_or(src, |s| s); . if lit_kind.is_numeric() . && unsigned_src . .trim_start() . .chars() . .next() . .is_some_and(|c| c.is_ascii_digit()) . { . let (unsuffixed, suffix) = split_suffix(src, lit_kind); 744 ( 0.00%) let float = matches!(lit_kind, LitKind::Float(..)); 992 ( 0.00%) Some(NumericLiteral::new(unsuffixed, suffix, float)) 15,788 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (248x) . } else { 140 ( 0.00%) None . } 2,964 ( 0.00%) } . . /// Parses a raw numeric literal string into its structured `NumericLiteral` parts. . #[must_use] 1,736 ( 0.00%) pub fn new(lit: &'a str, suffix: Option<&'a str>, float: bool) -> Self { . let unsigned_lit = lit.trim_start_matches('-'); . // Determine delimiter for radix prefix, if present, and radix. 25 ( 0.00%) let radix = if unsigned_lit.starts_with("0x") { . Radix::Hexadecimal 21 ( 0.00%) } else if unsigned_lit.starts_with("0b") { . Radix::Binary 21 ( 0.00%) } else if unsigned_lit.starts_with("0o") { . Radix::Octal . } else { . Radix::Decimal . }; . . // Grab part of the literal after prefix, if present. . let (prefix, mut sans_prefix) = if radix == Radix::Decimal { . (None, lit) . } else { . let (p, s) = lit.split_at(2); . (Some(p), s) . }; . 492 ( 0.00%) if suffix.is_some() && sans_prefix.ends_with('_') { . // The '_' before the suffix isn't part of the digits . sans_prefix = &sans_prefix[..sans_prefix.len() - 1]; . } . . let (integer, fraction, exponent) = Self::split_digit_parts(sans_prefix, float); . 3,720 ( 0.00%) Self { . radix, . prefix, . integer, . fraction, . exponent, . suffix, . } 2,232 ( 0.00%) } . . /// Checks if the literal's radix is `Radix::Decimal` . pub fn is_decimal(&self) -> bool { . self.radix == Radix::Decimal . } . . fn split_digit_parts(digits: &str, float: bool) -> (&str, Option<&str>, Option<(&str, &str)>) { . let mut integer = digits; . let mut fraction = None; . let mut exponent = None; . 496 ( 0.00%) if float { . for (i, c) in digits.char_indices() { . match c { . '.' => { . integer = &digits[..i]; . fraction = Some(&digits[i + 1..]); . }, . 'e' | 'E' => { . let exp_start = if digits[..i].ends_with('_') { i - 1 } else { i }; -- line 130 ---------------------------------------- -- line 235 ---------------------------------------- . .map_or((src, None), |split_pos| { . let (unsuffixed, suffix) = src.split_at(split_pos); . (unsuffixed, Some(suffix)) . }) . } . . fn lit_suffix_length(lit_kind: &LitKind) -> Option { . debug_assert!(lit_kind.is_numeric()); 496 ( 0.00%) let suffix = match lit_kind { 992 ( 0.00%) LitKind::Int(_, int_lit_kind) => match int_lit_kind { . LitIntType::Signed(int_ty) => Some(int_ty.name_str()), . LitIntType::Unsigned(uint_ty) => Some(uint_ty.name_str()), . LitIntType::Unsuffixed => None, . }, . LitKind::Float(_, float_lit_kind) => match float_lit_kind { . LitFloatType::Suffixed(float_ty) => Some(float_ty.name_str()), . LitFloatType::Unsuffixed => None, . }, -- line 252 ---------------------------------------- 1,004 ( 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_lint/src/levels.rs -------------------------------------------------------------------------------- Ir -- line 482 ---------------------------------------- . } . } . . impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> . where . LevelSpec: Into, . { . pub(crate) fn sess(&self) -> &Session { 92,072 ( 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 { 63,644 ( 0.00%) self.provider.get_lint_level_spec(lint, self.sess) 1,351 ( 0.00%) => ???:::get_lint_level_spec (7x) . } . . /// 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); 392 ( 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 ---------------------------------------- 16,206 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs -------------------------------------------------------------------------------- Ir -- line 218 ---------------------------------------- . } . } . } . . impl<'tcx> GenericArg<'tcx> { . #[inline] . pub fn kind(self) -> GenericArgKind<'tcx> { . let ptr = 5,552 ( 0.00%) unsafe { self.ptr.map_addr(|addr| NonZero::new_unchecked(addr.get() & !TAG_MASK)) }; . // SAFETY: use of `Interned::new_unchecked` here is ok because these . // pointers were originally created from `Interned` types in `pack()`, . // and this is just going in the other direction. . unsafe { 11,517 ( 0.00%) match self.ptr.addr().get() & TAG_MASK { . REGION_TAG => GenericArgKind::Lifetime(ty::Region(Interned::new_unchecked( . ptr.cast::>().as_ref(), . ))), . TYPE_TAG => GenericArgKind::Type(Ty(Interned::new_unchecked( . ptr.cast::>>().as_ref(), . ))), . CONST_TAG => GenericArgKind::Const(ty::Const(Interned::new_unchecked( . ptr.cast::>>().as_ref(), -- line 239 ---------------------------------------- -- line 336 ---------------------------------------- . ) -> Result { . match self.kind() { . GenericArgKind::Lifetime(lt) => lt.try_fold_with(folder).map(Into::into), . GenericArgKind::Type(ty) => ty.try_fold_with(folder).map(Into::into), . GenericArgKind::Const(ct) => ct.try_fold_with(folder).map(Into::into), . } . } . 183 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . match self.kind() { 468 ( 0.00%) GenericArgKind::Lifetime(lt) => lt.fold_with(folder).into(), 266 ( 0.00%) GenericArgKind::Type(ty) => ty.fold_with(folder).into(), . GenericArgKind::Const(ct) => ct.fold_with(folder).into(), . } 92 ( 0.00%) } . } . . impl<'tcx> TypeVisitable> for GenericArg<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 1,954 ( 0.00%) match self.kind() { . GenericArgKind::Lifetime(lt) => lt.visit_with(visitor), 34 ( 0.00%) GenericArgKind::Type(ty) => ty.visit_with(visitor), . GenericArgKind::Const(ct) => ct.visit_with(visitor), . } . } . } . . impl<'tcx, E: TyEncoder<'tcx>> Encodable for GenericArg<'tcx> { . fn encode(&self, e: &mut E) { . self.kind().encode(e) -- line 365 ---------------------------------------- -- line 419 ---------------------------------------- . /// compiler that encodes information like the inferred type; . /// see `ty::InlineConstArgs` struct for more comments. . pub fn as_inline_const(&'tcx self) -> InlineConstArgs<'tcx> { . InlineConstArgs { args: self } . } . . /// Creates a [`GenericArgs`] that maps each generic parameter to itself. . pub fn identity_for_item(tcx: TyCtxt<'tcx>, def_id: impl Into) -> GenericArgsRef<'tcx> { 8 ( 0.00%) Self::for_item(tcx, def_id.into(), |param, _| tcx.mk_param_from_def(param)) 1,709 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::for_item::<>::identity_for_item::{closure#0}> (2x) . } . . /// Creates a [`GenericArgs`] for generic parameter definitions, . /// by calling closures to obtain each kind. . /// The closures get to observe the [`GenericArgs`] as they're . /// being built, which can be used to correctly . /// replace defaults of generic parameters. 24 ( 0.00%) pub fn for_item(tcx: TyCtxt<'tcx>, def_id: DefId, mut mk_kind: F) -> GenericArgsRef<'tcx> . where . F: FnMut(&ty::GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, . { . let defs = tcx.generics_of(def_id); . let count = defs.count(); . let mut args = SmallVec::with_capacity(count); 8 ( 0.00%) Self::fill_item(&mut args, tcx, defs, &mut mk_kind); 70 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fill_item::<>::identity_for_item::{closure#0}> (2x) 4 ( 0.00%) tcx.mk_args(&args) 38 ( 0.00%) => ???:::mk_args (2x) 14 ( 0.00%) } . . pub fn extend_to( . &self, . tcx: TyCtxt<'tcx>, . def_id: DefId, . mut mk_kind: F, . ) -> GenericArgsRef<'tcx> . where . F: FnMut(&ty::GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, . { . Self::for_item(tcx, def_id, |param, args| { . self.get(param.index as usize).cloned().unwrap_or_else(|| mk_kind(param, args)) . }) . } . 20 ( 0.00%) pub fn fill_item( . args: &mut SmallVec<[GenericArg<'tcx>; 8]>, . tcx: TyCtxt<'tcx>, . defs: &ty::Generics, . mk_kind: &mut F, . ) where . F: FnMut(&ty::GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, . { 8 ( 0.00%) if let Some(def_id) = defs.parent { . let parent_defs = tcx.generics_of(def_id); . Self::fill_item(args, tcx, parent_defs, mk_kind); . } 2 ( 0.00%) Self::fill_single(args, defs, mk_kind) 16 ( 0.00%) } . . pub fn fill_single( . args: &mut SmallVec<[GenericArg<'tcx>; 8]>, . defs: &ty::Generics, . mk_kind: &mut F, . ) where . F: FnMut(&ty::GenericParamDef, &[GenericArg<'tcx>]) -> GenericArg<'tcx>, . { -- line 481 ---------------------------------------- -- line 525 ---------------------------------------- . ty::GenericArgKind::Lifetime(_) => None, . generic => Some(generic), . }) . } . . #[inline] . #[track_caller] . pub fn type_at(&self, i: usize) -> Ty<'tcx> { 960 ( 0.00%) self[i].as_type().unwrap_or_else( . #[track_caller] . || bug!("expected type for param #{} in {:?}", i, self), . ) . } . . #[inline] . #[track_caller] . pub fn region_at(&self, i: usize) -> ty::Region<'tcx> { -- line 541 ---------------------------------------- -- line 626 ---------------------------------------- . Ok(folder.cx().mk_args(&[param0, param1])) . } . } . 0 => Ok(self), . _ => ty::util::try_fold_list(self, folder, |tcx, v| tcx.mk_args(v)), . } . } . 5,924 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See justification for this behavior in `try_fold_with`. 3,115 ( 0.00%) match self.len() { . 1 => { 609 ( 0.00%) let param0 = self[0].fold_with(folder); 17,539 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (32x) 4,291 ( 0.00%) if param0 == self[0] { self } else { folder.cx().mk_args(&[param0]) } . } . 2 => { 154 ( 0.00%) let param0 = self[0].fold_with(folder); 9,477 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (14x) 406 ( 0.00%) let param1 = self[1].fold_with(folder); 378 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (14x) 534 ( 0.00%) if param0 == self[0] && param1 == self[1] { . self . } else { 644 ( 0.00%) folder.cx().mk_args(&[param0, param1]) . } . } . 0 => self, 30 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_args(v)), 212 ( 0.00%) => ???:::mk_args (2x) . } 5,961 ( 0.00%) } . } . . impl<'tcx> TypeFoldable> for &'tcx ty::List> { . fn try_fold_with>>( . self, . folder: &mut F, . ) -> Result { . // This code is fairly hot, though not as hot as `GenericArgsRef`. -- line 661 ---------------------------------------- -- line 682 ---------------------------------------- . } else { . Ok(folder.cx().mk_type_list(&[param0, param1])) . } . } . _ => ty::util::try_fold_list(self, folder, |tcx, v| tcx.mk_type_list(v)), . } . } . 10,107 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See comment justifying behavior in `try_fold_with`. 2,248 ( 0.00%) match self.len() { . 2 => { 747 ( 0.00%) let param0 = self[0].fold_with(folder); 2,241 ( 0.00%) let param1 = self[1].fold_with(folder); 2,265 ( 0.00%) if param0 == self[0] && param1 == self[1] { . self . } else { 5,229 ( 0.00%) folder.cx().mk_type_list(&[param0, param1]) 93,904 ( 0.01%) => ???:::mk_type_list (745x) . } . } 401 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_type_list(v)), 356 ( 0.00%) => ???:::mk_type_list (3x) . } 10,089 ( 0.00%) } . } . . impl<'tcx, T: TypeVisitable>> TypeVisitable> for &'tcx ty::List { . #[inline] . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 3,700 ( 0.00%) walk_visitable_list!(visitor, self.iter()); . V::Result::output() . } . } . . /// Stores the user-given args to reach some fully qualified path . /// (e.g., `::Item` or `::Item`). . #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable)] . #[derive(StableHash, TypeFoldable, TypeVisitable, Lift)] -- line 718 ---------------------------------------- 4,278 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/temporary_assignment.rs -------------------------------------------------------------------------------- Ir -- line 21 ---------------------------------------- . pub TEMPORARY_ASSIGNMENT, . complexity, . "assignments to temporaries" . } . . declare_lint_pass!(TemporaryAssignment => [TEMPORARY_ASSIGNMENT]); . . fn is_temporary(expr: &Expr<'_>) -> bool { 652 ( 0.00%) matches!(&expr.kind, ExprKind::Struct(..) | ExprKind::Tup(..)) . } . . impl<'tcx> LateLintPass<'tcx> for TemporaryAssignment { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,388 ( 0.00%) if let ExprKind::Assign(target, ..) = &expr.kind { . let mut base = target; 1,110 ( 0.00%) while let ExprKind::Field(f, _) | ExprKind::Index(f, _, _) = &base.kind { . base = f; . } . if is_temporary(base) && !is_adjusted(cx, base) { . span_lint(cx, TEMPORARY_ASSIGNMENT, expr.span, "assignment to temporary"); . } . } . } . } -- line 44 ---------------------------------------- 326 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs -------------------------------------------------------------------------------- Ir -- line 51 ---------------------------------------- . pub SIZE_OF_REF, . suspicious, . "Argument to `size_of_val()` is a double-reference, which is almost certainly unintended" . } . . declare_lint_pass!(SizeOfRef => [SIZE_OF_REF]); . . impl LateLintPass<'_> for SizeOfRef { 108,776 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 63,325 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 8,652 ( 0.00%) && path.basic_res().is_diag_item(cx, sym::mem_size_of_val) . && let arg_ty = cx.typeck_results().expr_ty(arg) . && peel_and_count_ty_refs(arg_ty).1 > 1 . { . span_lint_and_help( . cx, . SIZE_OF_REF, . expr.span, . "argument to `size_of_val()` is a reference to a reference", . None, . "dereference the argument to `size_of_val()` to get the size of the value instead of the size of the reference-type", . ); . } 135,970 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_arbitrary_self_type.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . declare_lint_pass!(NeedlessArbitrarySelfType => [NEEDLESS_ARBITRARY_SELF_TYPE]); . . enum Mode { . Ref(Option), . Value, . } . . impl EarlyLintPass for NeedlessArbitrarySelfType { 9,980 ( 0.00%) fn check_param(&mut self, cx: &EarlyContext<'_>, p: &Param) { . // Bail out if the parameter it's not a receiver or was not written by the user 3,494 ( 0.00%) if !p.is_self() || p.span.from_expansion() { . return; . } . 2,886 ( 0.00%) let (path, binding_mode, mutbl) = match &p.ty.kind { . TyKind::Path(None, path) if let PatKind::Ident(BindingMode(ByRef::No, mutbl), _, _) = p.pat.kind => { . (path, Mode::Value, mutbl) . }, . TyKind::Ref(lifetime, mut_ty) 1,272 ( 0.00%) if let TyKind::Path(None, path) = &mut_ty.ty.kind . && let PatKind::Ident(BindingMode::NONE, _, _) = p.pat.kind => . { . (path, Mode::Ref(*lifetime), mut_ty.mutbl) . }, . _ => return, . }; . . let span = p.span.to(p.ty.span); -- line 87 ---------------------------------------- -- line 116 ---------------------------------------- . let mut sugg = vec![(p.ty.span.with_lo(p.span.hi()), String::new())]; . if !add.is_empty() { . sugg.push((p.span.shrink_to_lo(), add)); . } . diag.multipart_suggestion("remove the type", sugg, applicability); . }, . ); . } 9,980 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs -------------------------------------------------------------------------------- Ir -- line 62 ---------------------------------------- . maybe_typeck_results: Option<(&'tcx TypeckResults<'tcx>, &'tcx TypeckResults<'tcx>)>, . allow_side_effects: bool, . expr_fallback: Option>>, . path_check: PathCheck, . } . . impl<'a, 'tcx> SpanlessEq<'a, 'tcx> { . pub fn new(cx: &'a LateContext<'tcx>) -> Self { 4,490 ( 0.00%) Self { . cx, 1,665 ( 0.00%) maybe_typeck_results: cx.typeck_results.map(|x| (x, x)), . allow_side_effects: true, . expr_fallback: None, . path_check: PathCheck::default(), . } . } . . /// Consider expressions containing potential side effects as not equal. . #[must_use] . pub fn deny_side_effects(self) -> Self { 2,975 ( 0.00%) Self { . allow_side_effects: false, . ..self . } . } . . /// Check paths by their resolution instead of exact equality. See [`PathCheck`] for more . /// details. . #[must_use] . pub fn paths_by_resolution(self) -> Self { 12 ( 0.00%) Self { . path_check: PathCheck::Resolution, . ..self . } . } . . #[must_use] . pub fn expr_fallback( . self, -- line 100 ---------------------------------------- -- line 103 ---------------------------------------- . Self { . expr_fallback: Some(Box::new(expr_fallback)), . ..self . } . } . . /// Use this method to wrap comparisons that may involve inter-expression context. . /// See `self.locals`. 111 ( 0.00%) pub fn inter_expr(&mut self, ctxt: SyntaxContext) -> HirEqInterExpr<'_, 'a, 'tcx> { 21,564 ( 0.00%) HirEqInterExpr { . inner: self, . eval_ctxt: ctxt, . prev_left_ctxt: ctxt, . prev_right_ctxt: ctxt, . locals: HirIdMap::default(), . local_items: FxIndexMap::default(), . } 111 ( 0.00%) } . 388 ( 0.00%) pub fn eq_block(&mut self, ctxt: SyntaxContext, left: &Block<'_>, right: &Block<'_>) -> bool { 1,164 ( 0.00%) self.inter_expr(ctxt).eq_block(left, right) 210,710 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (194x) 3,195 ( 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:: (194x) 776 ( 0.00%) } . 750 ( 0.00%) pub fn eq_expr(&mut self, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 5,820 ( 0.00%) self.inter_expr(ctxt).eq_expr(left, right) 697,996 ( 0.04%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (375x) 7,183 ( 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:: (375x) 1,500 ( 0.00%) } . . pub fn eq_path(&mut self, ctxt: SyntaxContext, left: &Path<'_>, right: &Path<'_>) -> bool { . self.inter_expr(ctxt).eq_path(left, right) . } . . pub fn eq_path_segment(&mut self, ctxt: SyntaxContext, left: &PathSegment<'_>, right: &PathSegment<'_>) -> bool { . self.inter_expr(ctxt).eq_path_segment(left, right) . } -- line 136 ---------------------------------------- -- line 164 ---------------------------------------- . // right. For example, when comparing `{ let x = 1; x + 2 }` and `{ let y = 1; y + 2 }`, . // these blocks are considered equal since `x` is mapped to `y`. . pub locals: HirIdMap, . pub local_items: FxIndexMap, . } . . impl HirEqInterExpr<'_, '_, '_> { . pub fn set_eval_ctxt(&mut self, ctxt: SyntaxContext) { 16 ( 0.00%) self.eval_ctxt = ctxt; . self.prev_left_ctxt = ctxt; 16 ( 0.00%) self.prev_right_ctxt = ctxt; . } . 480 ( 0.00%) pub fn eq_stmt(&mut self, left: &Stmt<'_>, right: &Stmt<'_>) -> bool { 192 ( 0.00%) if self.check_ctxt(left.span.ctxt(), right.span.ctxt()) == Some(false) { 1,630 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (48x) . return false; . } . 290 ( 0.00%) match (&left.kind, &right.kind) { . (StmtKind::Let(l), StmtKind::Let(r)) => { . // This additional check ensures that the type of the locals are equivalent even if the init . // expression or type have some inferred parts. 20 ( 0.00%) if let Some((typeck_lhs, typeck_rhs)) = self.inner.maybe_typeck_results { 20 ( 0.00%) let l_ty = typeck_lhs.pat_ty(l.pat); 160 ( 0.00%) => ???:::pat_ty (4x) 16 ( 0.00%) let r_ty = typeck_rhs.pat_ty(r.pat); 160 ( 0.00%) => ???:::pat_ty (4x) 4 ( 0.00%) if l_ty != r_ty { . return false; . } . } . . // eq_pat adds the HirIds to the locals map. We therefore call it last to make sure that . // these only get added if the init and type is equal. . both(l.init.as_ref(), r.init.as_ref(), |l, r| self.eq_expr(l, r)) . && both(l.ty.as_ref(), r.ty.as_ref(), |l, r| self.eq_ty(l, r)) . && both(l.els.as_ref(), r.els.as_ref(), |l, r| self.eq_block(l, r)) . && self.eq_pat(l.pat, r.pat) . }, 473 ( 0.00%) (StmtKind::Expr(l), StmtKind::Expr(r)) | (StmtKind::Semi(l), StmtKind::Semi(r)) => self.eq_expr(l, r), 39,252 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (41x) 11,248 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (2x) . (StmtKind::Item(l), StmtKind::Item(r)) => self.eq_item(*l, *r), . _ => false, . } 45 ( 0.00%) } . . pub fn eq_item(&mut self, l: ItemId, r: ItemId) -> bool { . let left = self.inner.cx.tcx.hir_item(l); . let right = self.inner.cx.tcx.hir_item(r); . let eq = match (left.kind, right.kind) { . ( . ItemKind::Const(l_ident, l_generics, l_ty, ConstItemRhs::Body(l_body)), . ItemKind::Const(r_ident, r_generics, r_ty, ConstItemRhs::Body(r_body)), -- line 213 ---------------------------------------- -- line 379 ---------------------------------------- . default: r_default, . }, . ) => self.eq_ty(l_ty, r_ty) && both(*l_default, *r_default, |l, r| self.eq_const_arg(l, r)), . _ => false, . } . } . . /// Checks whether two blocks are the same. 1,393 ( 0.00%) fn eq_block(&mut self, left: &Block<'_>, right: &Block<'_>) -> bool { . use TokenKind::{Semi, Whitespace}; 597 ( 0.00%) if left.stmts.len() != right.stmts.len() { . return false; . } 755 ( 0.00%) let lspan = left.span.data(); 755 ( 0.00%) let rspan = right.span.data(); 1,661 ( 0.00%) match self.check_ctxt(lspan.ctxt, rspan.ctxt) { 4,387 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (151x) . Some(false) => return false, 298 ( 0.00%) None if self.eval_ctxt.is_root() => {}, . _ => { . // Don't try to check in between statements inside macros. 8 ( 0.00%) return over(left.stmts, right.stmts, |left, right| self.eq_stmt(left, right)) 11,412 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_stmt (2x) . && both(left.expr.as_ref(), right.expr.as_ref(), |left, right| { . self.eq_expr(left, right) . }); . }, . } . 298 ( 0.00%) let mut lstart = lspan.lo; 149 ( 0.00%) let mut rstart = rspan.lo; . . for (left, right) in left.stmts.iter().zip(right.stmts) { 210 ( 0.00%) if !self.eq_stmt(left, right) { 30,830 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_stmt (30x) . return false; . } . . // Try to detect any `cfg`ed statements or empty macro expansions. . let Some(lstmt_span) = walk_span_to_context(left.span, lspan.ctxt) else { . return false; . }; . let Some(rstmt_span) = walk_span_to_context(right.span, rspan.ctxt) else { -- line 418 ---------------------------------------- -- line 435 ---------------------------------------- . }) { . return false; . } . . lstart = lstmt_span.hi; . rstart = rstmt_span.hi; . } . 714 ( 0.00%) let (lend, rend) = match (left.expr, right.expr) { . (Some(left), Some(right)) => { 714 ( 0.00%) if !self.eq_expr(left, right) { 154,345 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (117x) 2,471 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (2x) . return false; . } 14 ( 0.00%) let Some(lexpr_span) = walk_span_to_context(left.span, lspan.ctxt) else { 172 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (2x) . return false; . }; 14 ( 0.00%) let Some(rexpr_span) = walk_span_to_context(right.span, rspan.ctxt) else { 172 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (2x) . return false; . }; . (lexpr_span.lo(), rexpr_span.lo()) 2 ( 0.00%) }, . (None, None) => (lspan.hi, rspan.hi), . (Some(_), None) | (None, Some(_)) => return false, . }; . 8 ( 0.00%) if lend < lstart && rend < rstart { . // Can happen when macros rearrange the input. . // Nothing in between the statements to check in this case. . return true; . } else if lend < lstart || rend < rstart { . // Only one of the blocks had a weird macro . return false; . } 14 ( 0.00%) eq_span_tokens(self.inner.cx, lstart..lend, rstart..rend, |t| { 2,980 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_span_tokens::, core::ops::range::Range, ::eq_block::{closure#3}> (2x) . !matches!(t, Whitespace | Semi) . }) 1,592 ( 0.00%) } . 7,854 ( 0.00%) fn should_ignore(&self, expr: &Expr<'_>) -> bool { 59 ( 0.00%) macro_backtrace(expr.span).last().is_some_and(|macro_call| { 59 ( 0.00%) matches!( 295 ( 0.00%) self.inner.cx.tcx.get_diagnostic_name(macro_call.def_id), 3,467 ( 0.00%) => ???:::get_diagnostic_name (59x) 60 ( 0.00%) Some(sym::todo_macro | sym::unimplemented_macro) . ) . }) 5,712 ( 0.00%) } . . pub fn eq_body(&mut self, left: BodyId, right: BodyId) -> bool { . // swap out TypeckResults when hashing a body . let old_maybe_typeck_results = self.inner.maybe_typeck_results.replace(( . self.inner.cx.tcx.typeck_body(left), . self.inner.cx.tcx.typeck_body(right), . )); . let res = self.eq_expr( -- line 488 ---------------------------------------- -- line 489 ---------------------------------------- . self.inner.cx.tcx.hir_body(left).value, . self.inner.cx.tcx.hir_body(right).value, . ); . self.inner.maybe_typeck_results = old_maybe_typeck_results; . res . } . . #[expect(clippy::too_many_lines)] 18,820 ( 0.00%) pub fn eq_expr(&mut self, left: &Expr<'_>, right: &Expr<'_>) -> bool { 16,905 ( 0.00%) match self.check_ctxt(left.span.ctxt(), right.span.ctxt()) { 32,760 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (1,128x) . None => { 8,745 ( 0.00%) if let Some((typeck_lhs, typeck_rhs)) = self.inner.maybe_typeck_results 15,741 ( 0.00%) && typeck_lhs.expr_ty(left) == typeck_rhs.expr_ty(right) 89,864 ( 0.01%) => ???:::expr_ty (2,236x) 22,917 ( 0.00%) && let (Some(l), Some(r)) = ( 6,268 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_lhs) 31,380 ( 0.00%) => ???:::typing_env (1,046x) 1,567 ( 0.00%) .eval_local(left, self.eval_ctxt), 6,268 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_rhs) 31,380 ( 0.00%) => ???:::typing_env (1,046x) 1,567 ( 0.00%) .eval_local(right, self.eval_ctxt), . ) 276 ( 0.00%) && l == r 261 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (7x) . { . return true; 3,678 ( 0.00%) } 4,535 ( 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:: (155x) . }, . Some(false) => return false, . Some(true) => {}, . } . 12,710 ( 0.00%) let is_eq = match ( 10,884 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &left.kind), 4,572 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (1,118x) 9,070 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &right.kind), 4,591 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (1,118x) . ) { . (ExprKind::AddrOf(lb, l_mut, le), ExprKind::AddrOf(rb, r_mut, re)) => { 80 ( 0.00%) lb == rb && l_mut == r_mut && self.eq_expr(le, re) . }, . (ExprKind::Array(l), ExprKind::Array(r)) => self.eq_exprs(l, r), . (ExprKind::Assign(ll, lr, _), ExprKind::Assign(rl, rr, _)) => { 12 ( 0.00%) self.inner.allow_side_effects && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }, . (ExprKind::AssignOp(lo, ll, lr), ExprKind::AssignOp(ro, rl, rr)) => { 8 ( 0.00%) self.inner.allow_side_effects && lo.node == ro.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }, 20 ( 0.00%) (ExprKind::Block(l, _), ExprKind::Block(r, _)) => self.eq_block(l, r), 18,361 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (4x) 19 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block'2 (1x) . (ExprKind::Binary(l_op, ll, lr), ExprKind::Binary(r_op, rl, rr)) => { 475 ( 0.00%) l_op.node == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) 51,321 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (28x) 408 ( 0.00%) || self.swap_binop(l_op.node, ll, lr).is_some_and(|(l_op, ll, lr)| { 2,250 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::swap_binop (26x) 113 ( 0.00%) l_op == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) 4,588 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (10x) 125 ( 0.00%) }) . }, . (ExprKind::Break(li, le), ExprKind::Break(ri, re)) => { 1 ( 0.00%) both(li.label.as_ref(), ri.label.as_ref(), |l, r| l.ident.name == r.ident.name) . && both(le.as_ref(), re.as_ref(), |l, r| self.eq_expr(l, r)) . }, . (ExprKind::Call(l_fun, l_args), ExprKind::Call(r_fun, r_args)) => { 1,426 ( 0.00%) self.inner.allow_side_effects && self.eq_expr(l_fun, r_fun) && self.eq_exprs(l_args, r_args) 38,548 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (49x) . }, . (ExprKind::Cast(lx, lt), ExprKind::Cast(rx, rt)) => { . self.eq_expr(lx, rx) && self.eq_ty(lt, rt) . }, . (ExprKind::Closure(_l), ExprKind::Closure(_r)) => false, . (ExprKind::ConstBlock(lb), ExprKind::ConstBlock(rb)) => self.eq_body(lb.body, rb.body), . (ExprKind::Continue(li), ExprKind::Continue(ri)) => { . both(li.label.as_ref(), ri.label.as_ref(), |l, r| l.ident.name == r.ident.name) . }, . (ExprKind::DropTemps(le), ExprKind::DropTemps(re)) => self.eq_expr(le, re), . (ExprKind::Field(l_f_exp, l_f_ident), ExprKind::Field(r_f_exp, r_f_ident)) => { 33 ( 0.00%) l_f_ident.name == r_f_ident.name && self.eq_expr(l_f_exp, r_f_exp) . }, . (ExprKind::Index(la, li, _), ExprKind::Index(ra, ri, _)) => self.eq_expr(la, ra) && self.eq_expr(li, ri), . (ExprKind::If(lc, lt, le), ExprKind::If(rc, rt, re)) => { 26 ( 0.00%) self.eq_expr(lc, rc) && self.eq_expr(lt, rt) 4,225 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (2x) . && both(le.as_ref(), re.as_ref(), |l, r| self.eq_expr(l, r)) . }, . (ExprKind::Let(l), ExprKind::Let(r)) => { 9 ( 0.00%) self.eq_pat(l.pat, r.pat) 772 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat (1x) 4 ( 0.00%) && both(l.ty.as_ref(), r.ty.as_ref(), |l, r| self.eq_ty(l, r)) 2 ( 0.00%) && self.eq_expr(l.init, r.init) . }, . (ExprKind::Lit(l), ExprKind::Lit(r)) => { 60 ( 0.00%) if self.check_ctxt(l.span.ctxt(), r.span.ctxt()) == Some(false) { 203 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (7x) . return false; . } 24 ( 0.00%) l.node == r.node 101 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::eq (7x) . }, . (ExprKind::Loop(lb, ll, lls, _), ExprKind::Loop(rb, rl, rls, _)) => { . lls == rls && self.eq_block(lb, rb) . && both(ll.as_ref(), rl.as_ref(), |l, r| l.ident.name == r.ident.name) . }, . (ExprKind::Match(le, la, ls), ExprKind::Match(re, ra, rs)) => { . (ls == rs || (matches!((ls, rs), (TryDesugar(_), TryDesugar(_))))) 126 ( 0.00%) && self.eq_expr(le, re) 23,708 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (9x) 96 ( 0.00%) && over(la, ra, |l, r| { 73,803 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_expr::{closure#7}> (7x) 304 ( 0.00%) self.eq_pat(l.pat, r.pat) 16,832 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat (40x) 40 ( 0.00%) && both(l.guard.as_ref(), r.guard.as_ref(), |l, r| self.eq_expr(l, r)) 160 ( 0.00%) && self.eq_expr(l.body, r.body) 112,983 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (40x) . }) . }, . ( . ExprKind::MethodCall(l_path, l_receiver, l_args, _), . ExprKind::MethodCall(r_path, r_receiver, r_args, _), . ) => { 582 ( 0.00%) self.inner.allow_side_effects 959 ( 0.00%) && self.eq_path_segment(l_path, r_path) 3,264 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (68x) 780 ( 0.00%) && self.eq_expr(l_receiver, r_receiver) 69,924 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (65x) 484 ( 0.00%) && self.eq_exprs(l_args, r_args) . }, . (ExprKind::UnsafeBinderCast(lkind, le, None), ExprKind::UnsafeBinderCast(rkind, re, None)) => . lkind == rkind && self.eq_expr(le, re), . (ExprKind::UnsafeBinderCast(lkind, le, Some(lt)), ExprKind::UnsafeBinderCast(rkind, re, Some(rt))) => . lkind == rkind && self.eq_expr(le, re) && self.eq_ty(lt, rt), . (ExprKind::OffsetOf(l_container, l_fields), ExprKind::OffsetOf(r_container, r_fields)) => { . self.eq_ty(l_container, r_container) && over(l_fields, r_fields, |l, r| l.name == r.name) . }, 3,216 ( 0.00%) (ExprKind::Path(l), ExprKind::Path(r)) => self.eq_qpath(l, r), 8,400 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (134x) . (ExprKind::Repeat(le, ll), ExprKind::Repeat(re, rl)) => { . self.eq_expr(le, re) && self.eq_const_arg(ll, rl) . }, . (ExprKind::Ret(l), ExprKind::Ret(r)) => both(l.as_ref(), r.as_ref(), |l, r| self.eq_expr(l, r)), . (ExprKind::Struct(l_path, lf, lo), ExprKind::Struct(r_path, rf, ro)) => { 231 ( 0.00%) self.eq_qpath(l_path, r_path) 4,884 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (33x) 264 ( 0.00%) && match (lo, ro) { . (StructTailExpr::Base(l),StructTailExpr::Base(r)) => self.eq_expr(l, r), . (StructTailExpr::None, StructTailExpr::None) | . (StructTailExpr::DefaultFields(_), StructTailExpr::DefaultFields(_)) => true, . _ => false, . } 198 ( 0.00%) && over(lf, rf, |l, r| self.eq_expr_field(l, r)) 27,222 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_expr::{closure#10}> (33x) . }, . (ExprKind::Tup(l_tup), ExprKind::Tup(r_tup)) => self.eq_exprs(l_tup, r_tup), . (ExprKind::Use(l_expr, _), ExprKind::Use(r_expr, _)) => self.eq_expr(l_expr, r_expr), . (ExprKind::Type(le, lt), ExprKind::Type(re, rt)) => self.eq_expr(le, re) && self.eq_ty(lt, rt), 5 ( 0.00%) (ExprKind::Unary(l_op, le), ExprKind::Unary(r_op, re)) => l_op == r_op && self.eq_expr(le, re), . (ExprKind::Yield(le, _), ExprKind::Yield(re, _)) => return self.eq_expr(le, re), . ( . // Else branches for branches above, grouped as per `match_same_arms`. . | ExprKind::AddrOf(..) . | ExprKind::Array(..) . | ExprKind::Assign(..) . | ExprKind::AssignOp(..) . | ExprKind::Binary(..) -- line 628 ---------------------------------------- -- line 664 ---------------------------------------- . // This behavior may change in the future. . | ExprKind::Closure(..) . // For the time being, we always consider that two instances of InlineAsm are different. . // This behavior may change in the future. . | ExprKind::InlineAsm(_) . , _ . ) => false, . }; 7,257 ( 0.00%) (is_eq && (!self.should_ignore(left) || !self.should_ignore(right))) 10,477 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::should_ignore (151x) 2,200 ( 0.00%) || self . .inner . .maybe_typeck_results . .is_some_and(|(left_typeck_results, right_typeck_results)| { . self.inner . .expr_fallback . .as_mut() . .is_some_and(|f| f(left_typeck_results, left, right_typeck_results, right)) . }) 15,056 ( 0.00%) } . . fn eq_exprs(&mut self, left: &[Expr<'_>], right: &[Expr<'_>]) -> bool { 1,433 ( 0.00%) over(left, right, |l, r| self.eq_expr(l, r)) 135,257 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_exprs::{closure#0}> (94x) . } . . fn eq_expr_field(&mut self, left: &ExprField<'_>, right: &ExprField<'_>) -> bool { 307 ( 0.00%) left.ident.name == right.ident.name && self.eq_expr(left.expr, right.expr) 25,812 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (35x) . } . . fn eq_generic_arg(&mut self, left: &GenericArg<'_>, right: &GenericArg<'_>) -> bool { 16 ( 0.00%) match (left, right) { . (GenericArg::Const(l), GenericArg::Const(r)) => self.eq_const_arg(l.as_unambig_ct(), r.as_unambig_ct()), . (GenericArg::Lifetime(l_lt), GenericArg::Lifetime(r_lt)) => Self::eq_lifetime(l_lt, r_lt), 4 ( 0.00%) (GenericArg::Type(l_ty), GenericArg::Type(r_ty)) => self.eq_ty(l_ty.as_unambig_ty(), r_ty.as_unambig_ty()), 281 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_ty (1x) . (GenericArg::Infer(l_inf), GenericArg::Infer(r_inf)) => self.eq_ty(&l_inf.to_ty(), &r_inf.to_ty()), . _ => false, . } . } . . fn eq_const_arg(&mut self, left: &ConstArg<'_>, right: &ConstArg<'_>) -> bool { . if self.check_ctxt(left.span.ctxt(), right.span.ctxt()) == Some(false) { . return false; -- line 704 ---------------------------------------- -- line 760 ---------------------------------------- . } . . fn eq_lifetime(left: &Lifetime, right: &Lifetime) -> bool { . left.kind == right.kind . } . . fn eq_pat_field(&mut self, left: &PatField<'_>, right: &PatField<'_>) -> bool { . let (PatField { ident: li, pat: lp, .. }, PatField { ident: ri, pat: rp, .. }) = (&left, &right); 192 ( 0.00%) li.name == ri.name && self.eq_pat(lp, rp) 7,428 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat'2 (24x) . } . . fn eq_pat_expr(&mut self, left: &PatExpr<'_>, right: &PatExpr<'_>) -> bool { 95 ( 0.00%) match (&left.kind, &right.kind) { . ( . PatExprKind::Lit { . lit: left, . negated: left_neg, . }, . PatExprKind::Lit { . lit: right, . negated: right_neg, . }, 108 ( 0.00%) ) => left_neg == right_neg && left.node == right.node, 156 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::eq (12x) 77 ( 0.00%) (PatExprKind::Path(left), PatExprKind::Path(right)) => self.eq_qpath(left, right), 1,456 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (7x) . (PatExprKind::Lit { .. } | PatExprKind::Path(..), _) => false, . } . } . . /// Checks whether two patterns are the same. 871 ( 0.00%) fn eq_pat(&mut self, left: &Pat<'_>, right: &Pat<'_>) -> bool { 893 ( 0.00%) match (&left.kind, &right.kind) { . (PatKind::Box(l), PatKind::Box(r)) => self.eq_pat(l, r), . (PatKind::Struct(lp, la, ..), PatKind::Struct(rp, ra, ..)) => { 120 ( 0.00%) self.eq_qpath(lp, rp) && over(la, ra, |l, r| self.eq_pat_field(l, r)) . }, . (PatKind::TupleStruct(lp, la, ls), PatKind::TupleStruct(rp, ra, rs)) => { 14 ( 0.00%) self.eq_qpath(lp, rp) && over(la, ra, |l, r| self.eq_pat(l, r)) && ls == rs . }, . (PatKind::Binding(lb, li, _, lp), PatKind::Binding(rb, ri, _, rp)) => { 26 ( 0.00%) let eq = lb == rb && both(lp.as_ref(), rp.as_ref(), |l, r| self.eq_pat(l, r)); 78 ( 0.00%) if eq { 104 ( 0.00%) self.locals.insert(*li, *ri); . } . eq . }, 14 ( 0.00%) (PatKind::Expr(l), PatKind::Expr(r)) => self.eq_pat_expr(l, r), 6 ( 0.00%) (PatKind::Tuple(l, ls), PatKind::Tuple(r, rs)) => ls == rs && over(l, r, |l, r| self.eq_pat(l, r)), 918 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat'2 (2x) . (PatKind::Range(ls, le, li), PatKind::Range(rs, re, ri)) => { 90 ( 0.00%) both(ls.as_ref(), rs.as_ref(), |a, b| self.eq_pat_expr(a, b)) 30 ( 0.00%) && both(le.as_ref(), re.as_ref(), |a, b| self.eq_pat_expr(a, b)) . && (li == ri) . }, . (PatKind::Ref(le, lp, lm), PatKind::Ref(re, rp, rm)) => lp == rp && lm == rm && self.eq_pat(le, re), . (PatKind::Slice(ls, li, le), PatKind::Slice(rs, ri, re)) => { . over(ls, rs, |l, r| self.eq_pat(l, r)) . && over(le, re, |l, r| self.eq_pat(l, r)) . && both(li.as_ref(), ri.as_ref(), |l, r| self.eq_pat(l, r)) . }, . (PatKind::Wild, PatKind::Wild) => true, . _ => false, . } 480 ( 0.00%) } . 1,728 ( 0.00%) fn eq_qpath(&mut self, left: &QPath<'_>, right: &QPath<'_>) -> bool { 3,041 ( 0.00%) match (left, right) { . (QPath::Resolved(lty, lpath), QPath::Resolved(rty, rpath)) => { 4,171 ( 0.00%) both(lty.as_ref(), rty.as_ref(), |l, r| self.eq_ty(l, r)) && self.eq_path(lpath, rpath) 3,448 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path (26x) . }, . (QPath::TypeRelative(lty, lseg), QPath::TypeRelative(rty, rseg)) => { 170 ( 0.00%) self.eq_ty(lty, rty) && self.eq_path_segment(lseg, rseg) 1,636 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_ty (10x) 480 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (10x) . }, . _ => false, . } 30 ( 0.00%) } . 4,776 ( 0.00%) pub fn eq_path(&mut self, left: &Path<'_>, right: &Path<'_>) -> bool { 6,413 ( 0.00%) match (left.res, right.res) { 1,241 ( 0.00%) (Res::Local(l), Res::Local(r)) => l == r || self.locals.get(&l) == Some(&r), 984 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (82x) . (Res::Local(_), _) | (_, Res::Local(_)) => false, 44 ( 0.00%) (Res::Def(l_kind, l), Res::Def(r_kind, r)) . if l_kind == r_kind . && let DefKind::Const { .. } . | DefKind::Static { .. } . | DefKind::Fn . | DefKind::TyAlias . | DefKind::Use . | DefKind::Mod = l_kind => . { 185 ( 0.00%) (l == r || self.local_items.get(&l) == Some(&r)) && self.eq_path_segments(left.segments, right.segments) 2,302 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segments (17x) 60 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (5x) . }, 776 ( 0.00%) _ => self.eq_path_segments(left.segments, right.segments), . } 4,776 ( 0.00%) } . . fn eq_path_parameters(&mut self, left: &GenericArgs<'_>, right: &GenericArgs<'_>) -> bool { 439 ( 0.00%) if left.parenthesized == right.parenthesized { 439 ( 0.00%) over(left.args, right.args, |l, r| self.eq_generic_arg(l, r)) // FIXME(flip1995): may not work 438 ( 0.00%) && over(left.constraints, right.constraints, |l, r| self.eq_assoc_eq_constraint(l, r)) . } else { . false . } . } . 153 ( 0.00%) pub fn eq_path_segments<'tcx>( . &mut self, . mut left: &'tcx [PathSegment<'tcx>], . mut right: &'tcx [PathSegment<'tcx>], . ) -> bool { 633 ( 0.00%) if let PathCheck::Resolution = self.inner.path_check . && let Some(left_seg) = generic_path_segments(left) . && let Some(right_seg) = generic_path_segments(right) . { . // If we compare by resolution, then only check the last segments that could possibly have generic . // arguments . left = left_seg; . right = right_seg; . } . 1,460 ( 0.00%) over(left, right, |l, r| self.eq_path_segment(l, r)) 12,384 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (258x) 144 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment'2 (3x) 102 ( 0.00%) } . 3,073 ( 0.00%) pub fn eq_path_segment(&mut self, left: &PathSegment<'_>, right: &PathSegment<'_>) -> bool { . if !self.eq_path_parameters(left.args(), right.args()) { . return false; . } . 2,190 ( 0.00%) if let PathCheck::Resolution = self.inner.path_check . && left.res != Res::Err . && right.res != Res::Err . { . left.res == right.res . } else { . // The == of idents doesn't work with different contexts, . // we have to be explicit about hygiene . left.ident.name == right.ident.name . } 3,512 ( 0.00%) } . 88 ( 0.00%) pub fn eq_ty(&mut self, left: &Ty<'_>, right: &Ty<'_>) -> bool { 110 ( 0.00%) match (&left.kind, &right.kind) { . (TyKind::Slice(l_vec), TyKind::Slice(r_vec)) => self.eq_ty(l_vec, r_vec), . (TyKind::Array(lt, ll), TyKind::Array(rt, rl)) => self.eq_ty(lt, rt) && self.eq_const_arg(ll, rl), . (TyKind::Ptr(l_mut), TyKind::Ptr(r_mut)) => l_mut.mutbl == r_mut.mutbl && self.eq_ty(l_mut.ty, r_mut.ty), . (TyKind::Ref(_, l_rmut), TyKind::Ref(_, r_rmut)) => { . l_rmut.mutbl == r_rmut.mutbl && self.eq_ty(l_rmut.ty, r_rmut.ty) . }, . (TyKind::Path(l), TyKind::Path(r)) => self.eq_qpath(l, r), . (TyKind::Tup(l), TyKind::Tup(r)) => over(l, r, |l, r| self.eq_ty(l, r)), -- line 907 ---------------------------------------- -- line 916 ---------------------------------------- . // TODO: this could be extended to check for identical associated item bound constraints . left.ident.name == right.ident.name . && (both_some_and(left.ty(), right.ty(), |l, r| self.eq_ty(l, r)) . || both_some_and(left.ct(), right.ct(), |l, r| self.eq_const_arg(l, r))) . } . . /// Checks whether either operand is within a macro context, and if so, whether the macro calls . /// are equal. 16,744 ( 0.00%) fn check_ctxt(&mut self, left: SyntaxContext, right: SyntaxContext) -> Option { . let prev_left = mem::replace(&mut self.prev_left_ctxt, left); . let prev_right = mem::replace(&mut self.prev_right_ctxt, right); . 4,186 ( 0.00%) if left == self.eval_ctxt && right == self.eval_ctxt { . None 138 ( 0.00%) } else if left == prev_left && right == prev_right { . // Same as the previous context, no need to recheck anything . Some(true) . } else if left == prev_left 854 ( 0.00%) || right == prev_right . || left == self.eval_ctxt . || right == self.eval_ctxt . || left.is_root() . || right.is_root() . { . // Either only one context changed, or at least one context is a parent of the . // evaluation context. . // Unfortunately we can't get a span of a metavariable so we have to treat the . // second case as unequal. . Some(false) . } else { . // Walk each context in lockstep up to the evaluation context checking that each . // expansion has the same kind. 94 ( 0.00%) let mut left_data = left.outer_expn_data(); 282 ( 0.00%) let mut right_data = right.outer_expn_data(); . loop { . use TokenKind::{BlockComment, LineComment, Whitespace}; 190 ( 0.00%) if left_data.macro_def_id != right_data.macro_def_id || left_data.kind != right_data.kind { . return Some(false); . } 95 ( 0.00%) let left = left_data.call_site.ctxt(); 95 ( 0.00%) let right = right_data.call_site.ctxt(); 273 ( 0.00%) if left == self.eval_ctxt && right == self.eval_ctxt { . // Finally if the outermost expansion is a macro call, check if the . // tokens are the same. 279 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, _) = left_data.kind { 12 ( 0.00%) return Some(eq_span_tokens( 17,759 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_span_tokens::::check_ctxt::{closure#0}> (6x) 12 ( 0.00%) self.inner.cx, 6 ( 0.00%) left_data.call_site, 6 ( 0.00%) right_data.call_site, 58 ( 0.00%) |t| !matches!(t, Whitespace | LineComment { .. } | BlockComment { .. }), . )); . } . return Some(true); . } 18 ( 0.00%) if left == prev_left && right == prev_right { . return Some(true); . } 6 ( 0.00%) if left == prev_left . || right == prev_right 14 ( 0.00%) || left == self.eval_ctxt . || right == self.eval_ctxt . || left.is_root() . || right.is_root() . { . // Either there's a different number of expansions, or at least one context is . // a parent of the evaluation context. . return Some(false); . } 22 ( 0.00%) left_data = left.outer_expn_data(); 22 ( 0.00%) right_data = right.outer_expn_data(); . } . } 18,837 ( 0.00%) } . . fn swap_binop<'a>( . &self, . binop: BinOpKind, . lhs: &'a Expr<'a>, . rhs: &'a Expr<'a>, . ) -> Option<(BinOpKind, &'a Expr<'a>, &'a Expr<'a>)> { 130 ( 0.00%) match binop { . // `==` and `!=`, are commutative 15 ( 0.00%) BinOpKind::Eq | BinOpKind::Ne => Some((binop, rhs, lhs)), . // Comparisons can be reversed . BinOpKind::Lt => Some((BinOpKind::Gt, rhs, lhs)), . BinOpKind::Le => Some((BinOpKind::Ge, rhs, lhs)), . BinOpKind::Ge => Some((BinOpKind::Le, rhs, lhs)), 3 ( 0.00%) BinOpKind::Gt => Some((BinOpKind::Lt, rhs, lhs)), . // Non-commutative operators . BinOpKind::Shl | BinOpKind::Shr | BinOpKind::Rem | BinOpKind::Sub | BinOpKind::Div => None, . // We know that those operators are commutative for primitive types, . // and we don't assume anything for other types . BinOpKind::Mul . | BinOpKind::Add . | BinOpKind::And . | BinOpKind::Or . | BinOpKind::BitAnd . | BinOpKind::BitXor 20 ( 0.00%) | BinOpKind::BitOr => self.inner.maybe_typeck_results.and_then(|(typeck_lhs, _)| { . typeck_lhs 100 ( 0.00%) .expr_ty_adjusted(lhs) 1,476 ( 0.00%) => ???:::expr_ty_adjusted (20x) . .peel_refs() . .is_primitive() . .then_some((binop, rhs, lhs)) . }), . } 26 ( 0.00%) } . } . . /// Some simple reductions like `{ return }` => `return` 3,628 ( 0.00%) fn reduce_exprkind<'hir>( . cx: &LateContext<'_>, . eval_ctxt: SyntaxContext, . kind: &'hir ExprKind<'hir>, . ) -> &'hir ExprKind<'hir> { 7,256 ( 0.00%) if let ExprKind::Block(block, _) = kind { 93 ( 0.00%) match (block.stmts, block.expr) { . // From an `if let` expression without an `else` block. The arm for the implicit wild pattern is an empty . // block with an empty span. 64 ( 0.00%) ([], None) if block.span.is_empty() => &ExprKind::Tup(&[]), . // `{}` => `()` . ([], None) . if block.span.ctxt() != eval_ctxt . || block.span.check_text(cx, |src| { . tokenize(src, FrontmatterAllowed::No) . .map(|t| t.kind) . .filter(|t| { . !matches!( -- line 1043 ---------------------------------------- -- line 1052 ---------------------------------------- . { . &ExprKind::Tup(&[]) . }, . ([], Some(expr)) => match expr.kind { . // `{ return .. }` => `return ..` . ExprKind::Ret(..) => &expr.kind, . _ => kind, . }, 8 ( 0.00%) ([stmt], None) => match stmt.kind { 4 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => match expr.kind { . // `{ return ..; }` => `return ..` . ExprKind::Ret(..) => &expr.kind, . _ => kind, . }, . _ => kind, . }, . _ => kind, . } . } else { . kind . } 3,628 ( 0.00%) } . . /// Checks if the two `Option`s are both `None` or some equal values as per . /// `eq_fn`. . pub fn both(l: Option<&X>, r: Option<&X>, mut eq_fn: impl FnMut(&X, &X) -> bool) -> bool { . l.as_ref() 12 ( 0.00%) .map_or_else(|| r.is_none(), |x| r.as_ref().is_some_and(|y| eq_fn(x, y))) 408 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat::{closure#4} (12x) . } . . /// Checks if the two `Option`s are both `Some` and pass the predicate function. . pub fn both_some_and(l: Option, r: Option, mut pred: impl FnMut(X, Y) -> bool) -> bool { . l.is_some_and(|l| r.is_some_and(|r| pred(l, r))) . } . . /// Checks if two slices are equal as per `eq_fn`. . pub fn over(left: &[X], right: &[Y], mut eq_fn: impl FnMut(&X, &Y) -> bool) -> bool { 3,766 ( 0.00%) left.len() == right.len() && left.iter().zip(right).all(|(x, y)| eq_fn(x, y)) 258 ( 0.00%) } . . /// Counts how many elements of the slices are equal as per `eq_fn`. . pub fn count_eq( . left: &mut dyn Iterator, . right: &mut dyn Iterator, . mut eq_fn: impl FnMut(&X, &X) -> bool, . ) -> usize { . left.zip(right).take_while(|(l, r)| eq_fn(l, r)).count() -- line 1098 ---------------------------------------- -- line 1099 ---------------------------------------- . } . . /// Checks if two expressions evaluate to the same value, and don't contain any side effects. . /// . /// The context argument is the context used to view the two expressions. e.g. when comparing the . /// two arguments in `f(m!(1), m!(2))` the context of the call expression should be used. This is . /// needed to handle the case where two macros expand to the same thing, but the arguments are . /// different. 2,380 ( 0.00%) pub fn eq_expr_value(cx: &LateContext<'_>, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 595 ( 0.00%) SpanlessEq::new(cx).deny_side_effects().eq_expr(ctxt, left, right) 3,570 ( 0.00%) } . . /// Returns the segments of a path that might have generic parameters. . /// Usually just the last segment for free items, except for when the path resolves to an associated . /// item, in which case it is the last two . fn generic_path_segments<'tcx>(segments: &'tcx [PathSegment<'tcx>]) -> Option<&'tcx [PathSegment<'tcx>]> { . match segments.last()?.res { . Res::Def(DefKind::AssocConst { .. } | DefKind::AssocFn | DefKind::AssocTy, _) => { . // >::assoc:: -- line 1117 ---------------------------------------- -- line 1133 ---------------------------------------- . cx: &'a LateContext<'tcx>, . maybe_typeck_results: Option<&'tcx TypeckResults<'tcx>>, . s: FxHasher, . path_check: PathCheck, . } . . impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { . pub fn new(cx: &'a LateContext<'tcx>) -> Self { 1,777 ( 0.00%) Self { . cx, 369 ( 0.00%) maybe_typeck_results: cx.typeck_results, . s: FxHasher::default(), . path_check: PathCheck::default(), . } . } . . /// Check paths by their resolution instead of exact equality. See [`PathCheck`] for more . /// details. . #[must_use] -- line 1151 ---------------------------------------- -- line 1155 ---------------------------------------- . ..self . } . } . . pub fn finish(self) -> u64 { . self.s.finish() . } . 260 ( 0.00%) pub fn hash_block(&mut self, b: &Block<'_>) { 26 ( 0.00%) for s in b.stmts { . self.hash_stmt(s); . } . 78 ( 0.00%) if let Some(e) = b.expr { 28 ( 0.00%) self.hash_expr(e); 16,170 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (8x) . } . . mem::discriminant(&b.rules).hash(&mut self.s); 208 ( 0.00%) } . . #[expect(clippy::too_many_lines)] 19,566 ( 0.00%) pub fn hash_expr(&mut self, e: &Expr<'_>) { 4,348 ( 0.00%) let simple_const = self.maybe_typeck_results.and_then(|typeck_results| { 6,522 ( 0.00%) ConstEvalCtxt::with_env(self.cx.tcx, self.cx.typing_env(), typeck_results).eval_local(e, e.span.ctxt()) 11,070 ( 0.00%) => ???:::typing_env (369x) . }); . . // const hashing may result in the same hash as some unrelated node, so add a sort of . // discriminant depending on which path we're choosing next 2,174 ( 0.00%) simple_const.hash(&mut self.s); . if simple_const.is_some() { . return; . } . . mem::discriminant(&e.kind).hash(&mut self.s); . 6,396 ( 0.00%) match &e.kind { . ExprKind::AddrOf(kind, m, e) => { . mem::discriminant(kind).hash(&mut self.s); . m.hash(&mut self.s); 26 ( 0.00%) self.hash_expr(e); . }, . ExprKind::Continue(i) => { 67 ( 0.00%) if let Some(i) = i.label { . self.hash_name(i.ident.name); . } . }, . ExprKind::Array(v) => { 3 ( 0.00%) self.hash_exprs(v); . }, . ExprKind::Assign(l, r, _) => { 40 ( 0.00%) self.hash_expr(l); 3,332 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (8x) . self.hash_expr(r); . }, . ExprKind::AssignOp(o, l, r) => { . mem::discriminant(&o.node).hash(&mut self.s); . self.hash_expr(l); . self.hash_expr(r); . }, . ExprKind::Become(f) => { . self.hash_expr(f); . }, . ExprKind::Block(b, _) => { 92 ( 0.00%) self.hash_block(b); 2,859 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block (2x) . }, . ExprKind::Binary(op, l, r) => { . mem::discriminant(&op.node).hash(&mut self.s); 222 ( 0.00%) self.hash_expr(l); 44,760 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (30x) . self.hash_expr(r); . }, . ExprKind::Break(i, j) => { 44 ( 0.00%) if let Some(i) = i.label { . self.hash_name(i.ident.name); . } 22 ( 0.00%) if let Some(j) = j { . self.hash_expr(j); . } . }, . ExprKind::Call(fun, args) => { 807 ( 0.00%) self.hash_expr(fun); 29,386 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (94x) 269 ( 0.00%) self.hash_exprs(args); . }, . ExprKind::Cast(e, ty) | ExprKind::Type(e, ty) => { . self.hash_expr(e); . self.hash_ty(ty); . }, . ExprKind::Closure(Closure { 3 ( 0.00%) capture_clause, body, .. . }) => { . mem::discriminant(capture_clause).hash(&mut self.s); . // closures inherit TypeckResults 21 ( 0.00%) self.hash_expr(self.cx.tcx.hir_body(*body).value); 250 ( 0.00%) => ???:::hir_body (3x) . }, . ExprKind::ConstBlock(l_id) => { . self.hash_body(l_id.body); . }, . ExprKind::DropTemps(e) | ExprKind::Yield(e, _) => { 44 ( 0.00%) self.hash_expr(e); . }, . ExprKind::Field(e, f) => { 111 ( 0.00%) self.hash_expr(e); 275 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (1x) 37 ( 0.00%) self.hash_name(f.name); . }, . ExprKind::Index(a, i, _) => { 44 ( 0.00%) self.hash_expr(a); 275 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (1x) . self.hash_expr(i); . }, . ExprKind::InlineAsm(asm) => { . for piece in asm.template { . match piece { . InlineAsmTemplatePiece::String(s) => s.hash(&mut self.s), . InlineAsmTemplatePiece::Placeholder { . operand_idx, -- line 1266 ---------------------------------------- -- line 1310 ---------------------------------------- . InlineAsmOperand::Const { anon_const } => { . self.hash_body(anon_const.body); . }, . InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path), . InlineAsmOperand::Label { block } => self.hash_block(block), . } . } . }, 2 ( 0.00%) ExprKind::Let(LetExpr { pat, init, ty, .. }) => { 6 ( 0.00%) self.hash_expr(init); 1,174 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (2x) 6 ( 0.00%) if let Some(ty) = ty { . self.hash_ty(ty); . } 8 ( 0.00%) self.hash_pat(pat); 312 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (2x) . }, . ExprKind::Lit(l) => { . l.node.hash(&mut self.s); . }, . ExprKind::Loop(b, i, ..) => { 9 ( 0.00%) self.hash_block(b); 7,621 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block (1x) 33,783 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block'2 (2x) 52 ( 0.00%) if let Some(i) = i { . self.hash_name(i.ident.name); . } . }, . ExprKind::If(cond, then, else_opt) => { 27 ( 0.00%) self.hash_expr(cond); 2,892 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (3x) 27 ( 0.00%) self.hash_expr(then); 5,248 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (3x) . if let Some(e) = else_opt { . self.hash_expr(e); . } . }, . ExprKind::Match(scrutinee, arms, _) => { 126 ( 0.00%) self.hash_expr(scrutinee); 3,751 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (4x) . 42 ( 0.00%) for arm in *arms { 249 ( 0.00%) self.hash_pat(arm.pat); 1,158 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (8x) 249 ( 0.00%) if let Some(e) = arm.guard { . self.hash_expr(e); . } 249 ( 0.00%) self.hash_expr(arm.body); 7,896 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (8x) . } . }, . ExprKind::MethodCall(path, receiver, args, _fn_span) => { 686 ( 0.00%) self.hash_name(path.ident.name); 1,029 ( 0.00%) self.hash_expr(receiver); 56,242 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (167x) 343 ( 0.00%) self.hash_exprs(args); . }, . ExprKind::OffsetOf(container, fields) => { . self.hash_ty(container); . for field in *fields { . self.hash_name(field.name); . } . }, . ExprKind::Path(qpath) => { -- line 1363 ---------------------------------------- -- line 1368 ---------------------------------------- . self.hash_const_arg(len); . }, . ExprKind::Ret(e) => { . if let Some(e) = e { . self.hash_expr(e); . } . }, . ExprKind::Struct(path, fields, expr) => { 32 ( 0.00%) self.hash_qpath(path); . 32 ( 0.00%) for f in *fields { 83 ( 0.00%) self.hash_name(f.ident.name); 249 ( 0.00%) self.hash_expr(f.expr); 3,048 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (2x) . } . 64 ( 0.00%) if let StructTailExpr::Base(e) = expr { 12 ( 0.00%) self.hash_expr(e); . } . }, . ExprKind::Tup(tup) => { 29 ( 0.00%) self.hash_exprs(tup); . }, . ExprKind::Use(expr, _) => { . self.hash_expr(expr); . }, . ExprKind::Unary(l_op, le) => { . mem::discriminant(l_op).hash(&mut self.s); 17 ( 0.00%) self.hash_expr(le); . }, . ExprKind::UnsafeBinderCast(kind, expr, ty) => { . mem::discriminant(kind).hash(&mut self.s); . self.hash_expr(expr); . if let Some(ty) = ty { . self.hash_ty(ty); . } . }, . ExprKind::Err(_) => {}, . } 17,392 ( 0.00%) } . . pub fn hash_exprs(&mut self, e: &[Expr<'_>]) { . for e in e { 1,761 ( 0.00%) self.hash_expr(e); 356,054 ( 0.02%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (265x) . } . } . . pub fn hash_name(&mut self, n: Symbol) { . n.hash(&mut self.s); . } . . pub fn hash_qpath(&mut self, p: &QPath<'_>) { 2,590 ( 0.00%) match p { . QPath::Resolved(_, path) => { 3,513 ( 0.00%) self.hash_path(path); 1,026 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_path (21x) . }, . QPath::TypeRelative(_, path) => { 49 ( 0.00%) self.hash_name(path.ident.name); . }, . } . // self.maybe_typeck_results.unwrap().qpath_res(p, id).hash(&mut self.s); . } . . pub fn hash_pat_expr(&mut self, lit: &PatExpr<'_>) { . mem::discriminant(&lit.kind).hash(&mut self.s); 2 ( 0.00%) match &lit.kind { . PatExprKind::Lit { lit, negated } => { . lit.node.hash(&mut self.s); . negated.hash(&mut self.s); . }, . PatExprKind::Path(qpath) => self.hash_qpath(qpath), . } . } . -- line 1440 ---------------------------------------- -- line 1449 ---------------------------------------- . for variant in variants { . self.hash_ty_pat(variant); . } . }, . TyPatKind::NotNull | TyPatKind::Err(_) => {}, . } . } . 2,534 ( 0.00%) pub fn hash_pat(&mut self, pat: &Pat<'_>) { . mem::discriminant(&pat.kind).hash(&mut self.s); 543 ( 0.00%) match &pat.kind { . PatKind::Missing => unreachable!(), . PatKind::Binding(BindingMode(by_ref, mutability), _, _, pat) => { . mem::discriminant(by_ref).hash(&mut self.s); 96 ( 0.00%) if let ByRef::Yes(pi, mu) = by_ref { . mem::discriminant(pi).hash(&mut self.s); . mem::discriminant(mu).hash(&mut self.s); . } . mem::discriminant(mutability).hash(&mut self.s); 384 ( 0.00%) if let Some(pat) = pat { . self.hash_pat(pat); . } . }, . PatKind::Box(pat) | PatKind::Deref(pat) => self.hash_pat(pat), 2 ( 0.00%) PatKind::Expr(expr) => self.hash_pat_expr(expr), . PatKind::Or(pats) => { . for pat in *pats { . self.hash_pat(pat); . } . }, . PatKind::Range(s, e, i) => { . if let Some(s) = s { . self.hash_pat_expr(s); -- line 1481 ---------------------------------------- -- line 1502 ---------------------------------------- . self.hash_pat(pat); . } . for pat in *r { . self.hash_pat(pat); . } . }, . PatKind::Struct(qpath, fields, e) => { . self.hash_qpath(qpath); 76 ( 0.00%) for f in *fields { 75 ( 0.00%) self.hash_name(f.ident.name); 225 ( 0.00%) self.hash_pat(f.pat); 3,786 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat'2 (75x) . } . e.hash(&mut self.s); . }, . PatKind::Tuple(pats, e) => { 1 ( 0.00%) for pat in *pats { 4 ( 0.00%) self.hash_pat(pat); 98 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat'2 (2x) . } . e.hash(&mut self.s); . }, . PatKind::TupleStruct(qpath, pats, e) => { . self.hash_qpath(qpath); 6 ( 0.00%) for pat in *pats { 12 ( 0.00%) self.hash_pat(pat); 294 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat'2 (6x) . } . e.hash(&mut self.s); 6 ( 0.00%) }, . PatKind::Never | PatKind::Wild | PatKind::Err(_) => {}, . } 1,432 ( 0.00%) } . 9,640 ( 0.00%) pub fn hash_path(&mut self, path: &Path<'_>) { 2,410 ( 0.00%) match path.res { . // constant hash since equality is dependant on inter-expression context . // e.g. The expressions `if let Some(x) = foo() {}` and `if let Some(y) = foo() {}` are considered equal . // even though the binding names are different and they have different `HirId`s. . Res::Local(_) => 1_usize.hash(&mut self.s), . _ => { 1,176 ( 0.00%) if let PathCheck::Resolution = self.path_check . && let [.., last] = path.segments . && let Some(segments) = generic_path_segments(path.segments) . { . for seg in segments { . self.hash_generic_args(seg.args().args); . } . last.res.hash(&mut self.s); . } else { 588 ( 0.00%) for seg in path.segments { 996 ( 0.00%) self.hash_name(seg.ident.name); 3,984 ( 0.00%) self.hash_generic_args(seg.args().args); 2,988 ( 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:::hash_generic_args (996x) . } . } . }, . } 9,640 ( 0.00%) } . . pub fn hash_modifiers(&mut self, modifiers: TraitBoundModifiers) { . let TraitBoundModifiers { constness, polarity } = modifiers; . mem::discriminant(&polarity).hash(&mut self.s); . mem::discriminant(&constness).hash(&mut self.s); . } . . pub fn hash_stmt(&mut self, b: &Stmt<'_>) { . mem::discriminant(&b.kind).hash(&mut self.s); . 236 ( 0.00%) match &b.kind { . StmtKind::Let(local) => { 52 ( 0.00%) self.hash_pat(local.pat); 196 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (4x) 39 ( 0.00%) if let Some(init) = local.init { 26 ( 0.00%) self.hash_expr(init); 3,509 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (4x) . } 39 ( 0.00%) if let Some(els) = local.els { . self.hash_block(els); . } . }, . StmtKind::Item(..) => {}, . StmtKind::Expr(expr) | StmtKind::Semi(expr) => { 171 ( 0.00%) self.hash_expr(expr); 45,444 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (7x) . }, . } . } . . pub fn hash_lifetime(&mut self, lifetime: &Lifetime) { . lifetime.ident.name.hash(&mut self.s); . mem::discriminant(&lifetime.kind).hash(&mut self.s); . if let LifetimeKind::Param(param_id) = lifetime.kind { -- line 1587 ---------------------------------------- -- line 1708 ---------------------------------------- . for arg in arg_list { . match arg { . GenericArg::Lifetime(l) => self.hash_lifetime(l), . GenericArg::Type(ty) => self.hash_ty(ty.as_unambig_ty()), . GenericArg::Const(ca) => self.hash_const_arg(ca.as_unambig_ct()), . GenericArg::Infer(inf) => self.hash_ty(&inf.to_ty()), . } . } 996 ( 0.00%) } . } . 68 ( 0.00%) pub fn hash_stmt(cx: &LateContext<'_>, s: &Stmt<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); . h.hash_stmt(s); 34 ( 0.00%) h.finish() 102 ( 0.00%) } . . pub fn is_bool(ty: &Ty<'_>) -> bool { . if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind { . matches!(path.res, Res::PrimTy(PrimTy::Bool)) . } else { . false . } . } . 335 ( 0.00%) pub fn hash_expr(cx: &LateContext<'_>, e: &Expr<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); 335 ( 0.00%) h.hash_expr(e); 614,732 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr (335x) 335 ( 0.00%) h.finish() 670 ( 0.00%) } . 78 ( 0.00%) fn eq_span_tokens( . cx: &LateContext<'_>, . left: impl SpanRange, . right: impl SpanRange, . pred: impl Fn(TokenKind) -> bool, . ) -> bool { . fn f(cx: &LateContext<'_>, left: Range, right: Range, pred: impl Fn(TokenKind) -> bool) -> bool { 48 ( 0.00%) if let Some(lsrc) = left.get_source_range(cx) . && let Some(lsrc) = lsrc.as_str() 48 ( 0.00%) && let Some(rsrc) = right.get_source_range(cx) . && let Some(rsrc) = rsrc.as_str() . { . let pred = |&(token, ..): &(TokenKind, _, _)| pred(token); . let map = |(_, source, _)| source; . . let ltok = tokenize_with_text(lsrc).filter(pred).map(map); . let rtok = tokenize_with_text(rsrc).filter(pred).map(map); . ltok.eq(rtok) . } else { . // Unable to access the source. Conservatively assume the blocks aren't equal. . false . } . } 54 ( 0.00%) f(cx, left.into_range(), right.into_range(), pred) 504 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (12x) 64 ( 0.00%) } . . /// Returns true if the expression contains ambiguous literals (unsuffixed float or int literals) . /// that could be interpreted as either f32/f64 or i32/i64 depending on context. . pub fn has_ambiguous_literal_in_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . match expr.kind { . ExprKind::Path(ref qpath) => { . if let Res::Local(hir_id) = cx.qpath_res(qpath, expr.hir_id) . && let Node::LetStmt(local) = cx.tcx.parent_hir_node(hir_id) -- line 1771 ---------------------------------------- 50,136 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs -------------------------------------------------------------------------------- Ir -- line 224 ---------------------------------------- . fn count(self) -> usize . where . Self: Sized + [const] Destruct, . Self::Item: [const] Destruct, . { . self.fold( . 0, . #[rustc_inherit_overflow_checks] 361 ( 0.00%) const |accum, _elem| accum + 1, . ) . } . . /// Consumes the iterator, returning the last element. . /// . /// This method will evaluate the iterator until it returns [`None`]. While . /// doing so, it keeps track of the current element. After [`None`] is . /// returned, `last()` will then return the last element it saw. -- line 240 ---------------------------------------- -- line 382 ---------------------------------------- . /// let a = [1, 2, 3]; . /// assert_eq!(a.into_iter().nth(10), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_non_const_trait_method] . fn nth(&mut self, n: usize) -> Option { . self.advance_by(n).ok()?; 48 ( 0.00%) self.next() 3,063 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::next (24x) . } . . /// Creates an iterator starting at the same point, but stepping by . /// the given amount at each iteration. . /// . /// Note 1: The first element of the iterator will always be returned, . /// regardless of the step given. . /// -- line 398 ---------------------------------------- -- line 879 ---------------------------------------- . Self: Sized, . F: FnMut(Self::Item), . { . #[inline] . fn call(mut f: impl FnMut(T)) -> impl FnMut((), T) { . move |(), item| f(item) . } . 10,623 ( 0.00%) self.fold((), call(f)); 178,874 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> (3,490x) . } . . /// Creates an iterator which uses a closure to determine if an element . /// should be yielded. . /// . /// Given an element the closure must return `true` or `false`. The returned . /// iterator will yield only the elements for which the closure returns . /// `true`. -- line 895 ---------------------------------------- -- line 2078 ---------------------------------------- . // accidentally noticed that some rustc iterators had malformed `size_hint`s, . // so this will help catch such things in debug-assertions-std runners, . // even if users won't actually ever see it. . if cfg!(debug_assertions) { . let hint = self.size_hint(); . assert!(hint.1.is_none_or(|high| high >= hint.0), "Malformed size_hint {hint:?}"); . } . 2,719 ( 0.00%) FromIterator::from_iter(self) 25,946 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs: as core::iter::traits::collect::FromIterator<(rustc_hir_id::HirId, usize)>>::from_iter::>, clippy_lints::ptr::ptr_arg::check_ptr_arg_usage::{closure#1}>> (472x) . } . . /// Fallibly transforms an iterator into a collection, short circuiting if . /// a failure is encountered. . /// . /// `try_collect()` is a variation of [`collect()`][`collect`] that allows fallible . /// conversions during collection. Its main use case is simplifying conversions from . /// iterators yielding [`Option`][`Option`] into `Option>`, or similarly for other [`Try`] -- line 2094 ---------------------------------------- -- line 2338 ---------------------------------------- . // These closure "factory" functions exist to avoid genericity in `Self`. . . #[inline] . fn is_false<'a, T>( . predicate: &'a mut impl FnMut(&T) -> bool, . true_count: &'a mut usize, . ) -> impl FnMut(&&mut T) -> bool + 'a { . move |x| { 26 ( 0.00%) let p = predicate(&**x); 7 ( 0.00%) *true_count += p as usize; . !p . } . } . . #[inline] . fn is_true(predicate: &mut impl FnMut(&T) -> bool) -> impl FnMut(&&mut T) -> bool + '_ { 46 ( 0.00%) move |x| predicate(&**x) . } . . // Repeatedly find the first `false` and swap it with the last `true`. . let mut true_count = 0; . while let Some(head) = self.find(is_false(predicate, &mut true_count)) { . if let Some(tail) = self.rfind(is_true(predicate)) { . crate::mem::swap(head, tail); 3 ( 0.00%) true_count += 1; . } else { . break; . } . } . true_count . } . . /// Checks if the elements of this iterator are partitioned according to the given predicate, -- line 2370 ---------------------------------------- -- line 2474 ---------------------------------------- . /// } else { . /// ControlFlow::Break(prev) . /// } . /// }); . /// assert_eq!(triangular, ControlFlow::Continue(435)); . /// ``` . #[inline] . #[stable(feature = "iterator_try_fold", since = "1.27.0")] 213,052 ( 0.01%) fn try_fold(&mut self, init: B, mut f: F) -> R . where . Self: Sized, . F: [const] FnMut(B, Self::Item) -> R + [const] Destruct, . R: [const] Try, . { . let mut accum = init; 1,259,150 ( 0.07%) while let Some(x) = self.next() { 1,380 ( 0.00%) => ???:::next (29x) 237,653 ( 0.01%) accum = f(accum, x)?; 1,490 ( 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 core::iter::traits::iterator::Iterator::all::check<&(rustc_middle::ty::predicate::Clause, rustc_span::span_encoding::Span), clippy_utils::eager_or_lazy::fn_eagerness::{closure#2}>::{closure#0} as core::ops::function::FnMut<((), &(rustc_middle::ty::predicate::Clause, rustc_span::span_encoding::Span))>>::call_mut (10x) . } . try { accum } 145,538 ( 0.01%) } . . /// An iterator method that applies a fallible function to each item in the . /// iterator, stopping at the first error and returning that error. . /// . /// This can also be thought of as the fallible form of [`for_each()`] . /// or as the stateless version of [`try_fold()`]. . /// . /// [`for_each()`]: Iterator::for_each -- line 2501 ---------------------------------------- -- line 2658 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . fn fold(mut self, init: B, mut f: F) -> B . where . Self: Sized + [const] Destruct, . F: [const] FnMut(B, Self::Item) -> B + [const] Destruct, . { . let mut accum = init; 243,452 ( 0.01%) while let Some(x) = self.next() { 3,040 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/percent-encoding-2.3.2/src/lib.rs:::next (56x) 100,769 ( 0.01%) accum = f(accum, x); . } 458,610 ( 0.03%) accum . } . . /// Reduces the elements to a single one, by repeatedly applying a reducing . /// operation. . /// . /// If the iterator is empty, returns [`None`]; otherwise, returns the . /// result of the reduction. . /// -- line 2677 ---------------------------------------- -- line 2695 ---------------------------------------- . #[inline] . #[stable(feature = "iterator_fold_self", since = "1.51.0")] . fn reduce(mut self, f: F) -> Option . where . Self: Sized + [const] Destruct, . F: [const] FnMut(Self::Item, Self::Item) -> Self::Item + [const] Destruct, . { . let first = self.next()?; 198 ( 0.00%) Some(self.fold(first, f)) . } . . /// Reduces the elements to a single one by repeatedly applying a reducing operation. If the . /// closure returns a failure, the failure is propagated back to the caller immediately. . /// . /// The return type of this method depends on the return type of the closure. If the closure . /// returns `Result`, then this function will return `Result, . /// E>`. If the closure returns `Option`, then this function will return -- line 2711 ---------------------------------------- -- line 2828 ---------------------------------------- . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . #[inline] . fn check(mut f: impl FnMut(T) -> bool) -> impl FnMut((), T) -> ControlFlow<()> { . move |(), x| { . if f(x) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) } 10 ( 0.00%) } . } 26 ( 0.00%) self.try_fold((), check(f)) == ControlFlow::Continue(()) 8,628 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, core::slice::iter::Iter> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::all::check<(&rustc_hir::hir::PatField, &rustc_hir::hir::PatField), clippy_utils::hir_utils::over::eq_pat::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<()>> (24x) 1,012 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, core::slice::iter::Iter> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::all::check<(&rustc_hir::hir::Pat, &rustc_hir::hir::Pat), clippy_utils::hir_utils::over::eq_pat::{closure#3}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<()>> (2x) . } . . /// Tests if any element of the iterator matches a predicate. . /// . /// `any()` takes a closure that returns `true` or `false`. It applies . /// this closure to each element of the iterator, and if any of them return . /// `true`, then so does `any()`. If they all return `false`, it . /// returns `false`. -- line 2846 ---------------------------------------- -- line 2955 ---------------------------------------- . fn find

(&mut self, predicate: P) -> Option . where . Self: Sized, . P: FnMut(&Self::Item) -> bool, . { . #[inline] . fn check(mut predicate: impl FnMut(&T) -> bool) -> impl FnMut((), T) -> ControlFlow { . move |(), x| { 696 ( 0.00%) if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) } 156 ( 0.00%) } . } . . self.try_fold((), check(predicate)).break_value() . } . . /// Applies function to the elements of iterator and returns . /// the first non-none result. . /// -- line 2972 ---------------------------------------- -- line 2986 ---------------------------------------- . #[rustc_non_const_trait_method] . fn find_map(&mut self, f: F) -> Option . where . Self: Sized, . F: FnMut(Self::Item) -> Option, . { . #[inline] . fn check(mut f: impl FnMut(T) -> Option) -> impl FnMut((), T) -> ControlFlow { 42,513 ( 0.00%) move |(), x| match f(x) { 16,553 ( 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::manual_clamp::is_two_if_pattern::{closure#0} as core::ops::function::FnMut<((clippy_lints::manual_clamp::MaybeBorrowedStmtKind, clippy_lints::manual_clamp::MaybeBorrowedStmtKind),)>>::call_mut (414x) . Some(x) => ControlFlow::Break(x), . None => ControlFlow::Continue(()), . } . } . 17,833 ( 0.00%) self.try_fold((), check(f)).break_value() 4,300,759 ( 0.24%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> (17,612x) . } . . /// Applies function to the elements of iterator and returns . /// the first true result or the first error. . /// . /// The return type of this method depends on the return type of the closure. . /// If you return `Result` from the closure, you'll get a `Result, E>`. . /// If you return `Option` from the closure, you'll get an `Option>`. -- line 3008 ---------------------------------------- -- line 3134 ---------------------------------------- . { . #[inline] . fn check<'a, T>( . mut predicate: impl FnMut(T) -> bool + 'a, . acc: &'a mut usize, . ) -> impl FnMut((), T) -> ControlFlow + 'a { . #[rustc_inherit_overflow_checks] . move |_, x| { 9 ( 0.00%) if predicate(x) { . ControlFlow::Break(*acc) . } else { . *acc += 1; . ControlFlow::Continue(()) . } . } . } . -- line 3150 ---------------------------------------- -- line 3468 ---------------------------------------- . /// . /// let (x, (y, z)): (Vec<_>, (Vec<_>, Vec<_>)) = a.into_iter().unzip(); . /// assert_eq!(x, [1, 4]); . /// assert_eq!(y, [2, 5]); . /// assert_eq!(z, [3, 6]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_non_const_trait_method] 4,032 ( 0.00%) fn unzip(self) -> (FromA, FromB) . where . FromA: Default + Extend, . FromB: Default + Extend, . Self: Sized + Iterator, . { . let mut unzipped: (FromA, FromB) = Default::default(); . unzipped.extend(self); 5,040 ( 0.00%) unzipped 4,536 ( 0.00%) } . . /// Creates an iterator which copies all of its elements. . /// . /// This is useful when you have an iterator over `&T`, but you need an . /// iterator over `T`. . /// . /// # Examples . /// -- line 3493 ---------------------------------------- -- line 3873 ---------------------------------------- . #[stable(feature = "iter_order", since = "1.5.0")] . #[rustc_non_const_trait_method] . fn eq(self, other: I) -> bool . where . I: IntoIterator, . Self::Item: PartialEq, . Self: Sized, . { 104 ( 0.00%) self.eq_by(other, |x, y| x == y) 6,340 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, ::block::{closure#0}>, ::block::{closure#1}> as core::iter::traits::iterator::Iterator>::eq_by::<[rustc_lexer::TokenKind; 1], , ::block::{closure#0}>, ::block::{closure#1}> as core::iter::traits::iterator::Iterator>::eq<[rustc_lexer::TokenKind; 1]>::{closure#0}> (16x) . } . . /// Determines if the elements of this [`Iterator`] are equal to those of . /// another with respect to the specified equality function. . /// . /// # Examples . /// . /// ``` -- line 3889 ---------------------------------------- -- line 3891 ---------------------------------------- . /// . /// let xs = [1, 2, 3, 4]; . /// let ys = [1, 4, 9, 16]; . /// . /// assert!(xs.iter().eq_by(ys, |x, y| x * x == y)); . /// ``` . #[unstable(feature = "iter_order_by", issue = "64295")] . #[rustc_non_const_trait_method] 72 ( 0.00%) fn eq_by(self, other: I, eq: F) -> bool . where . Self: Sized, . I: IntoIterator, . F: FnMut(Self::Item, I::Item) -> bool, . { . #[inline] . fn compare(mut eq: F) -> impl FnMut(X, Y) -> ControlFlow<()> . where . F: FnMut(X, Y) -> bool, . { . move |x, y| { . if eq(x, y) { ControlFlow::Continue(()) } else { ControlFlow::Break(()) } . } . } . 136 ( 0.00%) SpecIterEq::spec_iter_eq(self, other.into_iter(), compare(eq)) 96 ( 0.00%) } . . /// Determines if the elements of this [`Iterator`] are not equal to those of . /// another. . /// . /// # Examples . /// . /// ``` . /// assert_eq!([1].iter().ne([1].iter()), false); -- line 3924 ---------------------------------------- -- line 4160 ---------------------------------------- . #[inline] . fn spec_iter_eq(self, b: B, f: F) -> bool . where . F: FnMut(Self::Item, ::Item) -> ControlFlow<()>, . { . // we *can't* short-circuit if: . match (self.size_hint(), b.size_hint()) { . // ... both iterators have the same length 10 ( 0.00%) ((_, Some(a)), (_, Some(b))) if a == b => {} . // ... or both of them are longer than `usize::MAX` (i.e. have an unknown length). . ((_, None), (_, None)) => {} . // otherwise, we can ascertain that they are unequal without actually comparing items . _ => return false, . } . . iter_eq(self, b, f) . } -- line 4176 ---------------------------------------- -- line 4202 ---------------------------------------- . B: Iterator, . { . move |x| match b.next() { . None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)), . Some(y) => f(x, y).map_break(ControlFlow::Break), . } . } . 32 ( 0.00%) match a.try_for_each(compare(&mut b, f)) { . ControlFlow::Continue(()) => ControlFlow::Continue(match b.next() { . None => Ordering::Equal, . Some(_) => Ordering::Less, . }), . ControlFlow::Break(x) => x, . } . } . -- line 4218 ---------------------------------------- -- line 4229 ---------------------------------------- . /// Implements `Iterator` for mutable references to iterators, such as those produced by [`Iterator::by_ref`]. . /// . /// This implementation passes all method calls on to the original iterator. . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for &mut I { . type Item = I::Item; . #[inline] . fn next(&mut self) -> Option { 72 ( 0.00%) (**self).next() 189 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as core::iter::traits::iterator::Iterator>::next (33x) 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:, core::slice::iter::Iter> as core::iter::traits::iterator::Iterator>::next (3x) . } . fn size_hint(&self) -> (usize, Option) { . (**self).size_hint() . } . fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { . (**self).advance_by(n) . } . fn nth(&mut self, n: usize) -> Option { -- line 4245 ---------------------------------------- 726,226 ( 0.04%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::def_id::DefId; . use rustc_hir::{QPath, Ty, TyKind}; . use rustc_lint::LateContext; . use std::borrow::Cow; . . use super::RC_BUFFER; . 5,940 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 594 ( 0.00%) let mut app = Applicability::Unspecified; 5,346 ( 0.00%) let rc = match cx.tcx.get_diagnostic_name(def_id) { 34,823 ( 0.00%) => ???:::get_diagnostic_name (594x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; 10 ( 0.00%) if let Some(ty) = qpath_generic_tys(qpath).next() 95 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (5x) . && let Some(alternate) = match_buffer_type(cx, ty, &mut app) . { . span_lint_and_then( . cx, . RC_BUFFER, . hir_ty.span, . format!("usage of `{rc}` when `T` is a buffer type"), . |diag| { . diag.span_suggestion_verbose(ty.span, "try", alternate, app); . }, . ); . true . } else { . false . } 4,752 ( 0.00%) } . . fn match_buffer_type( . cx: &LateContext<'_>, . ty: &Ty<'_>, . applicability: &mut Applicability, . ) -> Option> { . let id = ty.basic_res().opt_def_id()?; 50 ( 0.00%) let path = match cx.tcx.get_diagnostic_name(id) { 435 ( 0.00%) => ???:::get_diagnostic_name (5x) . Some(sym::OsString) => "std::ffi::OsStr".into(), . Some(sym::PathBuf) => "std::path::Path".into(), . Some(sym::Vec) => { . let TyKind::Path(vec_qpath) = &ty.kind else { . return None; . }; . let vec_generic_ty = qpath_generic_tys(vec_qpath).next()?; . let snippet = snippet_with_applicability(cx, vec_generic_ty.span, "_", applicability); . format!("[{snippet}]").into() . }, 10 ( 0.00%) _ if Some(id) == cx.tcx.lang_items().string() => "str".into(), 200 ( 0.00%) => ???:::lang_items (5x) . _ => return None, . }; . Some(path) . } 35 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/await_holding_invalid.rs -------------------------------------------------------------------------------- Ir -- line 178 ---------------------------------------- . AWAIT_HOLDING_REFCELL_REF, . ]); . . pub struct AwaitHolding { . def_ids: DefIdMap<(&'static str, &'static DisallowedPathWithoutReplacement)>, . } . . impl AwaitHolding { 8 ( 0.00%) pub(crate) fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { . let (def_ids, _) = create_disallowed_map( . tcx, . &conf.await_holding_invalid_types, . PathNS::Type, . crate::disallowed_types::def_kind_predicate, . "type", . false, . ); . Self { def_ids } 8 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for AwaitHolding { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 54,558 ( 0.00%) if let hir::ExprKind::Closure(hir::Closure { . kind: hir::ClosureKind::Coroutine(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Async, _)), . def_id, . .. 85 ( 0.00%) }) = expr.kind . && let Some(coroutine_layout) = cx.tcx.mir_coroutine_witnesses(*def_id) . { . self.check_interior_types(cx, coroutine_layout); . } 217,552 ( 0.01%) } . } . . impl AwaitHolding { . fn check_interior_types(&self, cx: &LateContext<'_>, coroutine: &CoroutineLayout<'_>) { . for (ty_index, ty_cause) in coroutine.field_tys.iter_enumerated() { . if let rustc_middle::ty::Adt(adt, _) = ty_cause.ty.kind() { . let await_points = || { . coroutine -- line 218 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ranges.rs -------------------------------------------------------------------------------- Ir -- line 184 ---------------------------------------- . . impl Ranges { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Ranges { 244,746 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,388 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = expr.kind 382 ( 0.00%) && matches!( 764 ( 0.00%) op.node, . BinOpKind::And | BinOpKind::BitAnd | BinOpKind::Or | BinOpKind::BitOr . ) 1,122 ( 0.00%) && self.msrv.meets(cx, msrvs::RANGE_CONTAINS) 5,049 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (187x) 748 ( 0.00%) && !is_in_const_context(cx) 61,401 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (187x) . { 1,309 ( 0.00%) check_possible_range_contains(cx, op.node, l, r, expr, expr.span); 136,427 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains (187x) . } . 163,314 ( 0.01%) if let Some(range) = higher::Range::hir(cx, expr) { 1,294,420 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (27,194x) . check_exclusive_range_plus_one(cx, expr, &range); . check_inclusive_range_minus_one(cx, expr, &range); . check_reversed_empty_range(cx, expr, &range); . } 217,552 ( 0.01%) } . } . 2,394 ( 0.00%) fn check_possible_range_contains( . cx: &LateContext<'_>, . op: BinOpKind, . left: &Expr<'_>, . right: &Expr<'_>, . expr: &Expr<'_>, . span: Span, . ) { 2,660 ( 0.00%) let combine_and = match op { . BinOpKind::And | BinOpKind::BitAnd => true, . BinOpKind::Or | BinOpKind::BitOr => false, . _ => return, . }; . // value, name, order (higher/lower), inclusiveness 8,514 ( 0.00%) if let (Some(l), Some(r)) = (check_range_bounds(cx, left), check_range_bounds(cx, right)) { 8,868 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_range_bounds (374x) . // we only lint comparisons on the same name and with different . // direction . if l.id != r.id || l.ord == r.ord { . return; . } . let ord = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(l.expr), &l.val, &r.val); . if combine_and && ord == Some(r.ord) { . // order lower bound and upper bound -- line 234 ---------------------------------------- -- line 291 ---------------------------------------- . MANUAL_RANGE_CONTAINS, . span, . format!("manual `!{range_type}::contains` implementation"), . "use", . format!("!({lo}{space}{range_op}{hi}).contains(&{name})"), . applicability, . ); . } 532 ( 0.00%) } . . // If the LHS is the same operator, we have to recurse to get the "real" RHS, since they have . // the same operator precedence 532 ( 0.00%) if let ExprKind::Binary(ref lhs_op, _left, new_lhs) = left.kind 109 ( 0.00%) && op == lhs_op.node 790 ( 0.00%) && let new_span = Span::new(new_lhs.span.lo(), right.span.hi(), expr.span.ctxt(), expr.span.parent()) . && new_span.check_text(cx, |src| { . // Do not continue if we have mismatched number of parens, otherwise the suggestion is wrong 158 ( 0.00%) src.matches('(').count() == src.matches(')').count() . }) . { 395 ( 0.00%) check_possible_range_contains(cx, op, new_lhs, right, expr, new_span); 8,633 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains'2 (79x) . } 2,128 ( 0.00%) } . . struct RangeBounds<'a> { . val: Constant, . expr: &'a Expr<'a>, . id: HirId, . name_span: Span, . val_span: Span, . ord: Ordering, . inc: bool, . } . . // Takes a binary expression such as x <= 2 as input . // Breaks apart into various pieces, such as the value of the number, . // hir id of the variable, and direction/inclusiveness of the operator 3,724 ( 0.00%) fn check_range_bounds<'a>(cx: &'a LateContext<'_>, ex: &'a Expr<'_>) -> Option> { 1,064 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = ex.kind { 1,226 ( 0.00%) let (inclusive, ordering) = match op.node { . BinOpKind::Gt => (false, Ordering::Greater), . BinOpKind::Ge => (true, Ordering::Greater), . BinOpKind::Lt => (false, Ordering::Less), . BinOpKind::Le => (true, Ordering::Less), . _ => return None, . }; . if let Some(id) = l.res_local_id() { 29 ( 0.00%) if let Some(c) = ConstEvalCtxt::new(cx).eval(r) { 421 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (3x) 168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (3x) 12 ( 0.00%) return Some(RangeBounds { . val: c, . expr: r, . id, 2 ( 0.00%) name_span: l.span, 4 ( 0.00%) val_span: r.span, . ord: ordering, . inc: inclusive, . }); . } . } else if let Some(id) = r.res_local_id() 14 ( 0.00%) && let Some(c) = ConstEvalCtxt::new(cx).eval(l) 220 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (2x) 112 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (2x) . { . return Some(RangeBounds { . val: c, . expr: l, . id, . name_span: r.span, . val_span: l.span, . ord: ordering.reverse(), . inc: inclusive, . }); . } . } . None 4,256 ( 0.00%) } . . /// Check whether `expr` could switch range types without breaking the typing requirements. This is . /// generally the case when `expr` is used as an iterator for example, or as a slice or `&str` . /// index. . /// . /// FIXME: Note that the current implementation may still return false positives. A proper fix would . /// check that the obligations are still satisfied after switching the range type. 8 ( 0.00%) fn can_switch_ranges<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . original: RangeLimits, . inner_ty: Ty<'tcx>, . ) -> bool { 5 ( 0.00%) let use_site = get_expr_use_site(cx.tcx, cx.typeck_results(), ctxt, expr); 312 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (1x) 5 ( 0.00%) let (Node::Expr(parent_expr), false) = (use_site.node, use_site.is_ty_unified) else { . return false; . }; . . // Check if `expr` is the argument of a compiler-generated `IntoIter::into_iter(expr)` 4 ( 0.00%) if let ExprKind::Call(func, [arg]) = parent_expr.kind . && arg.hir_id == use_site.child_id . && let ExprKind::Path(qpath) = func.kind . && cx.tcx.qpath_is_lang_item(qpath, LangItem::IntoIterIntoIter) . && parent_expr.span.is_desugaring(DesugaringKind::ForLoop) . { . return true; . } . . // Check if `expr` is used as the receiver of a method of the `Iterator`, `IntoIterator`, . // or `RangeBounds` traits. 3 ( 0.00%) if let ExprKind::MethodCall(_, receiver, _, _) = parent_expr.kind 1 ( 0.00%) && receiver.hir_id == use_site.child_id . && let Some(method_did) = cx.typeck_results().type_dependent_def_id(parent_expr.hir_id) . && let Some(trait_did) = cx.tcx.trait_of_assoc(method_did) . && matches!( . cx.tcx.get_diagnostic_name(trait_did), . Some(sym::Iterator | sym::IntoIterator | sym::RangeBounds) . ) . { . return true; . } . . // Check if `expr` is an argument of a call which requires an `Iterator`, `IntoIterator`, . // or `RangeBounds` trait. 7 ( 0.00%) if let ExprKind::Call(_, args) | ExprKind::MethodCall(_, _, args, _) = parent_expr.kind 5 ( 0.00%) && let Some(id) = fn_def_id(cx, parent_expr) 142 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (1x) . && let Some(arg_idx) = args.iter().position(|e| e.hir_id == use_site.child_id) . { 5 ( 0.00%) let input_idx = if matches!(parent_expr.kind, ExprKind::MethodCall(..)) { . arg_idx + 1 . } else { . arg_idx . }; 2 ( 0.00%) let inputs = cx . .tcx 3 ( 0.00%) .liberate_late_bound_regions(id, cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip()) . .inputs(); 3 ( 0.00%) let expr_ty = inputs[input_idx]; . // Check that the `expr` type is present only once, otherwise modifying just one of them might be . // risky if they are referenced using the same generic type for example. . if inputs.iter().enumerate().all(|(n, ty)| 4 ( 0.00%) n == input_idx 2 ( 0.00%) || !ty.walk().any(|arg| matches!(arg.kind(), 7 ( 0.00%) => ???:::walk (1x) . GenericArgKind::Type(ty) if ty == expr_ty))) . // Look for a clause requiring `Iterator`, `IntoIterator`, or `RangeBounds`, and resolving to `expr_type`. . && cx . .tcx . .param_env(id) . .caller_bounds() . .into_iter() . .any(|p| { 5 ( 0.00%) if let ClauseKind::Trait(t) = p.kind().skip_binder() 14 ( 0.00%) => ???:::kind (1x) . && t.polarity == PredicatePolarity::Positive 4 ( 0.00%) && matches!( 1 ( 0.00%) cx.tcx.get_diagnostic_name(t.trait_ref.def_id), 87 ( 0.00%) => ???:::get_diagnostic_name (1x) . Some(sym::Iterator | sym::IntoIterator | sym::RangeBounds) . ) . { . t.self_ty() == expr_ty . } else { . false . } . }) -- line 448 ---------------------------------------- -- line 476 ---------------------------------------- . // We could also check that the associated item of the `index_def_id` trait with the switched range type . // return the same type, but it is reasonable to expect so. We can't check that the result is identical . // in both `Index>` and `Index>` anyway. . { . return true; . } . . false 10 ( 0.00%) } . . // exclusive range plus one: `x..(y+1)` . fn check_exclusive_range_plus_one<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, range: &higher::Range<'tcx>) { . check_range_switch( . cx, . expr, . range, . RangeLimits::HalfOpen, -- line 492 ---------------------------------------- -- line 515 ---------------------------------------- . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . range: &higher::Range<'tcx>, . kind: RangeLimits, . predicate: impl for<'hir> FnOnce(&Expr<'hir>) -> Option<&'hir Expr<'hir>>, . lint: &'static Lint, . msg: &'static str, . ) { 50 ( 0.00%) if let higher::Range { 8 ( 0.00%) start, . end: Some(end), . ty, 8 ( 0.00%) span, 50 ( 0.00%) } = *range 32 ( 0.00%) && span.can_be_used_for_suggestions() 224 ( 0.00%) => ???:::can_be_used_for_suggestions (8x) . && ty.limits() == kind . && let Some(y) = predicate(end) 10 ( 0.00%) && can_switch_ranges(cx, span.ctxt(), expr, kind, cx.typeck_results().expr_ty(y)) 29,990 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::can_switch_ranges (1x) 40 ( 0.00%) => ???:::expr_ty (1x) . { . // Suggest the opposite range limits to the ones being checked. . let operator = match kind { 4 ( 0.00%) RangeLimits::HalfOpen => "..=", . RangeLimits::Closed => "..", . }; 17 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 1,895 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (1x) . let mut app = Applicability::MachineApplicable; . let start = start.map_or(String::new(), |x| { . Sugg::hir_with_context(cx, x, span.ctxt(), "", &mut app) . .maybe_paren() . .to_string() . }); . let end = Sugg::hir_with_context(cx, y, span.ctxt(), "", &mut app).maybe_paren(); . match span.with_source_text(cx, |src| src.starts_with('(') && src.ends_with(')')) { -- line 547 ---------------------------------------- -- line 582 ---------------------------------------- . . fn is_empty_range(limits: RangeLimits, ordering: Ordering) -> bool { . match limits { . RangeLimits::HalfOpen => ordering != Ordering::Less, . RangeLimits::Closed => ordering == Ordering::Greater, . } . } . 4 ( 0.00%) if let higher::Range { . start: Some(start), . end: Some(end), 4 ( 0.00%) ty: range_ty, 4 ( 0.00%) span, 4 ( 0.00%) } = *range 12 ( 0.00%) && let ty = cx.typeck_results().expr_ty(start) 160 ( 0.00%) => ???:::expr_ty (4x) 16 ( 0.00%) && let ty::Int(_) | ty::Uint(_) = ty.kind() 16 ( 0.00%) && let ecx = ConstEvalCtxt::new(cx) 224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (4x) 20 ( 0.00%) && let Some(start_idx) = ecx.eval(start) 708 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (4x) . && let Some(end_idx) = ecx.eval(end) . && let Some(ordering) = Constant::partial_cmp(cx.tcx, ty, &start_idx, &end_idx) . && is_empty_range(range_ty.limits(), ordering) . { . if inside_indexing_expr(cx, expr) { . // Avoid linting `N..N` as it has proven to be useful, see #5689 and #5628 ... . if ordering != Ordering::Equal { . span_lint( -- line 607 ---------------------------------------- -- line 637 ---------------------------------------- . } . }, . ); . } . } . } . . fn y_plus_one<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 12 ( 0.00%) match expr.kind { . ExprKind::Binary( . Spanned { . node: BinOpKind::Add, .. . }, 2 ( 0.00%) lhs, 2 ( 0.00%) rhs, . ) => { . if is_integer_literal(lhs, 1) { . Some(rhs) 1 ( 0.00%) } else if is_integer_literal(rhs, 1) { . Some(lhs) . } else { . None . } . }, . _ => None, . } . } -- line 663 ---------------------------------------- 30,719 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/op_ref.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::def_id::DefId; . use rustc_hir::{BinOpKind, BorrowKind, Expr, ExprKind, GenericArg, ItemKind, QPath, TyKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . . use super::OP_REF; . . #[expect(clippy::too_many_lines)] 4,296 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 1,790 ( 0.00%) let (trait_id, requires_ref) = match op { . BinOpKind::Add => (cx.tcx.lang_items().add_trait(), false), . BinOpKind::Sub => (cx.tcx.lang_items().sub_trait(), false), . BinOpKind::Mul => (cx.tcx.lang_items().mul_trait(), false), . BinOpKind::Div => (cx.tcx.lang_items().div_trait(), false), . BinOpKind::Rem => (cx.tcx.lang_items().rem_trait(), false), . // don't lint short circuiting ops . BinOpKind::And | BinOpKind::Or => return, . BinOpKind::BitXor => (cx.tcx.lang_items().bitxor_trait(), false), . BinOpKind::BitAnd => (cx.tcx.lang_items().bitand_trait(), false), . BinOpKind::BitOr => (cx.tcx.lang_items().bitor_trait(), false), . BinOpKind::Shl => (cx.tcx.lang_items().shl_trait(), false), . BinOpKind::Shr => (cx.tcx.lang_items().shr_trait(), false), 78 ( 0.00%) BinOpKind::Ne | BinOpKind::Eq => (cx.tcx.lang_items().eq_trait(), true), . BinOpKind::Lt | BinOpKind::Le | BinOpKind::Ge | BinOpKind::Gt => { . (cx.tcx.lang_items().partial_ord_trait(), true) . }, . }; 342 ( 0.00%) if let Some(trait_id) = trait_id { 1,548 ( 0.00%) match (&left.kind, &right.kind) { . // do not suggest to dereference literals . (&ExprKind::Lit(..), _) | (_, &ExprKind::Lit(..)) => {}, . // &foo == &bar . (&ExprKind::AddrOf(BorrowKind::Ref, _, l), &ExprKind::AddrOf(BorrowKind::Ref, _, r)) => { . let lty = cx.typeck_results().expr_ty(l); . let rty = cx.typeck_results().expr_ty(r); . let lcpy = is_copy(cx, lty); . let rcpy = is_copy(cx, rty); -- line 49 ---------------------------------------- -- line 166 ---------------------------------------- . Applicability::MachineApplicable, . ); . }); . } . }, . _ => {}, . } . } 2,864 ( 0.00%) } . . fn in_impl<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . bin_op: DefId, . ) -> Option<(&'tcx rustc_hir::Ty<'tcx>, &'tcx rustc_hir::Ty<'tcx>)> { . if let Some(block) = get_enclosing_block(cx, e.hir_id) . && let Some(impl_def_id) = cx.tcx.impl_of_assoc(block.hir_id.owner.to_def_id()) -- line 182 ---------------------------------------- 1,609 ( 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/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 { 11,344 ( 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 { 120,779 ( 0.01%) 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 { 4,731 ( 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)); 4,371 ( 0.00%) self.vec.set_len(len + ch_len); . } . } . . /// Returns a byte slice of this `String`'s contents. . /// . /// The inverse of this method is [`from_utf8`]. . /// . /// [`from_utf8`]: String::from_utf8 -- line 1448 ---------------------------------------- -- line 1507 ---------------------------------------- . /// assert_eq!(s.pop(), Some('a')); . /// . /// assert_eq!(s.pop(), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn pop(&mut self) -> Option { . let ch = self.chars().rev().next()?; 548 ( 0.00%) let newlen = self.len() - ch.len_utf8(); . unsafe { . self.vec.set_len(newlen); . } . Some(ch) . } . . /// Removes a [`char`] from this `String` at byte position `idx` and returns it. . /// -- line 1523 ---------------------------------------- -- line 1889 ---------------------------------------- . /// assert!(!v.is_empty()); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")] . #[rustc_no_implicit_autorefs] . pub const fn is_empty(&self) -> bool { 7 ( 0.00%) self.len() == 0 . } . . /// Splits the string into two at the given byte index. . /// . /// Returns a newly allocated `String`. `self` contains bytes `[0, at)`, and . /// the returned `String` contains bytes `[at, len)`. `at` must be on the . /// boundary of a UTF-8 code point. . /// -- line 1905 ---------------------------------------- -- 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); 1,548 ( 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] 260 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 520 ( 0.00%) fmt::Display::fmt(&**self, f) 65,399 ( 0.00%) => ???:::fmt (260x) . } . } . . #[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 2806 ---------------------------------------- . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl Add<&str> for String { . type Output = String; . . #[inline] . fn add(mut self, other: &str) -> String { . self.push_str(other); 54 ( 0.00%) self . } . } . . /// Implements the `+=` operator for appending to a `String`. . /// . /// This has the same behavior as the [`push_str`][String::push_str] method. . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "stringaddassign", since = "1.12.0")] -- line 2822 ---------------------------------------- -- line 2923 ---------------------------------------- . /// if the `Display` implementation returns an error. . /// This indicates an incorrect `Display` implementation . /// since `fmt::Write for String` never returns an error itself. . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl ToString for T { . #[inline] . fn to_string(&self) -> String { 60 ( 0.00%) ::spec_to_string(self) 3,693 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::spec_to_string (15x) . } . } . . #[cfg(not(no_global_oom_handling))] . trait SpecToString { . fn spec_to_string(&self) -> String; . } . . #[cfg(not(no_global_oom_handling))] . impl SpecToString for T { . // A common guideline is to not inline generic functions. However, . // removing `#[inline]` from this method causes non-negligible regressions. . // See , the last attempt . // to try to remove it. . #[inline] 60 ( 0.00%) default fn spec_to_string(&self) -> String { . let mut buf = String::new(); . let mut formatter = . core::fmt::Formatter::new(&mut buf, core::fmt::FormattingOptions::new()); . // Bypass format_args!() to avoid write_str with zero-length strs 6,116 ( 0.00%) fmt::Display::fmt(self, &mut formatter) 13,058 ( 0.00%) => ???:::fmt (59x) . .expect("a Display implementation returned an error unexpectedly"); 6,226 ( 0.00%) buf 45 ( 0.00%) } . } . . #[cfg(not(no_global_oom_handling))] . impl SpecToString for core::ascii::Char { . #[inline] . fn spec_to_string(&self) -> String { . self.as_str().to_owned() . } -- line 2963 ---------------------------------------- -- line 3274 ---------------------------------------- . /// let s = "eggplant".to_string(); . /// let s2 = "eggplant".to_string(); . /// assert_eq!(Cow::from(s), Cow::<'static, str>::Owned(s2)); . /// ``` . /// . /// [`Owned`]: crate::borrow::Cow::Owned "borrow::Cow::Owned" . #[inline] . fn from(s: String) -> Cow<'a, str> { 2,471 ( 0.00%) Cow::Owned(s) . } . } . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "cow_from_string_ref", since = "1.28.0")] . impl<'a> From<&'a String> for Cow<'a, str> { . /// Converts a [`String`] reference into a [`Borrowed`] variant. . /// No heap allocation is performed, and the string -- line 3290 ---------------------------------------- -- 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] 14,833 ( 0.00%) fn write_str(&mut self, s: &str) -> fmt::Result { . self.push_str(s); . Ok(()) 14,833 ( 0.00%) } . . #[inline] . fn write_char(&mut self, c: char) -> fmt::Result { . self.push(c); . Ok(()) . } . } . -- line 3392 ---------------------------------------- 771 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint, span_lint_and_then}; . use clippy_utils::macros::{find_assert_eq_args, first_node_macro_backtrace}; . use clippy_utils::{eq_expr_value, is_in_test_function, sym}; . use rustc_hir::{BinOpKind, Expr}; . use rustc_lint::LateContext; . . use super::EQ_OP; . 244,746 ( 0.01%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 27,314 ( 0.00%) if let Some(macro_call) = first_node_macro_backtrace(cx, e).find(|macro_call| { 3,618 ( 0.00%) matches!( 2,444 ( 0.00%) cx.tcx.get_diagnostic_name(macro_call.def_id), 43,635 ( 0.00%) => ???:::get_diagnostic_name (611x) . Some(sym::assert_eq_macro | sym::assert_ne_macro | sym::debug_assert_eq_macro | sym::debug_assert_ne_macro) . ) 240 ( 0.00%) }) && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) 59,937 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_eq_args (24x) 168 ( 0.00%) && eq_expr_value(cx, macro_call.span.ctxt(), lhs, rhs) 14,678 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (24x) . && macro_call.is_local() . && !is_in_test_function(cx.tcx, e.hir_id) . { . span_lint( . cx, . EQ_OP, . lhs.span.to(rhs.span), . format!( . "identical args used in this `{}!` macro call", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } 217,552 ( 0.01%) } . 3,222 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { . if is_useless_with_eq_exprs(op) 2,240 ( 0.00%) && eq_expr_value(cx, e.span.ctxt(), left, right) 214,352 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (320x) . && !is_in_test_function(cx.tcx, e.hir_id) . { . span_lint_and_then( . cx, . EQ_OP, . e.span, . format!("equal expressions as operands to `{}`", op.as_str()), . |diag| { -- line 49 ---------------------------------------- -- line 50 ---------------------------------------- . if let BinOpKind::Ne = op . && cx.typeck_results().expr_ty(left).is_floating_point() . { . diag.note("if you intended to check if the operand is NaN, use `.is_nan()` instead"); . } . }, . ); . } 2,864 ( 0.00%) } 82,982 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/pat_util.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . where . I: Iterator, . { . type Item = (usize, ::Item); . . fn next(&mut self) -> Option<(usize, ::Item)> { . self.enumerate . .next() 104 ( 0.00%) .map(|(i, elem)| (if i < self.gap_pos { i } else { i + self.gap_len }, elem)) . } . . fn size_hint(&self) -> (usize, Option) { . self.enumerate.size_hint() . } . } . . pub trait EnumerateAndAdjustIterator { -- line 32 ---------------------------------------- -- line 57 ---------------------------------------- . } . } . . impl hir::Pat<'_> { . /// Call `f` on every "binding" in a pattern, e.g., on `a` in . /// `match foo() { Some(a) => (), None => () }` . pub fn each_binding(&self, mut f: impl FnMut(hir::BindingMode, HirId, Span, Ident)) { . self.walk_always(|p| { 10 ( 0.00%) if let PatKind::Binding(binding_mode, _, ident, _) = p.kind { 6 ( 0.00%) f(binding_mode, p.hir_id, p.span, ident); . } . }); . } . . /// Call `f` on every "binding" in a pattern, e.g., on `a` in . /// `match foo() { Some(a) => (), None => () }`. . /// . /// When encountering an or-pattern `p_0 | ... | p_n` only the first non-never pattern will be . /// visited. If they're all never patterns we visit nothing, which is ok since a never pattern . /// cannot have bindings. . pub fn each_binding_or_first(&self, f: &mut impl FnMut(hir::BindingMode, HirId, Span, Ident)) { 144 ( 0.00%) self.walk(|p| match &p.kind { . PatKind::Or(ps) => { . for p in *ps { . if !p.is_never_pattern() { . p.each_binding_or_first(f); . break; . } . } . false . } . PatKind::Binding(bm, _, ident, _) => { 81 ( 0.00%) f(*bm, p.hir_id, p.span, *ident); . true . } . _ => true, . }) . } . . pub fn simple_ident(&self) -> Option { 8,838 ( 0.00%) match self.kind { 1,473 ( 0.00%) PatKind::Binding(BindingMode(ByRef::No, _), _, ident, None) => Some(ident), . _ => None, . } . } . . /// Returns variants that are necessary to exist for the pattern to match. . pub fn necessary_variants(&self) -> Vec { . let mut variants = vec![]; . self.walk(|p| match &p.kind { -- line 106 ---------------------------------------- 70 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/repeat_vec_with_capacity.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . diag.note(note); . diag.span_suggestion_verbose(span, sugg_msg, sugg, Applicability::MaybeIncorrect); . }, . ); . } . . /// Checks `vec![Vec::with_capacity(x); n]` . fn check_vec_macro(cx: &LateContext<'_>, expr: &Expr<'_>) { 81,582 ( 0.00%) if let Some(VecArgs::Repeat(repeat_expr, len_expr)) = VecArgs::hir(cx, expr) 913,613 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (27,194x) . && matching_root_macro_call(cx, expr.span, sym::vec_macro).is_some() . && fn_def_id(cx, repeat_expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::vec_with_capacity, did)) . && !len_expr.span.from_expansion() . && let Some(Constant::Int(2..)) = ConstEvalCtxt::new(cx).eval(expr_or_init(cx, len_expr)) . { . emit_lint( . cx, . expr.span.source_callsite(), -- line 88 ---------------------------------------- -- line 95 ---------------------------------------- . snippet(cx, repeat_expr.span, "..") . ), . ); . } . } . . /// Checks `iter::repeat(Vec::with_capacity(x))` . fn check_repeat_fn(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Msrv) { 54,388 ( 0.00%) if !expr.span.from_expansion() 83,878 ( 0.00%) && fn_def_id(cx, expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::iter_repeat, did)) 1,002,288 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (17,618x) 270,694 ( 0.02%) => ???:::is_diagnostic_item (3,878x) . && let ExprKind::Call(_, [repeat_expr]) = expr.kind . && fn_def_id(cx, repeat_expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::vec_with_capacity, did)) . && !repeat_expr.span.from_expansion() . && let Some(exec_context) = std_or_core(cx) . && msrv.meets(cx, msrvs::REPEAT_WITH) . { . emit_lint( . cx, -- line 112 ---------------------------------------- -- line 118 ---------------------------------------- . "{exec_context}::iter::repeat_with(|| {})", . snippet(cx, repeat_expr.span, "..") . ), . ); . } . } . . impl LateLintPass<'_> for RepeatVecWithCapacity { 299,134 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . check_vec_macro(cx, expr); 27,194 ( 0.00%) check_repeat_fn(cx, expr, self.msrv); 217,552 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . /// be moved. . possible_borrowers: Vec<(LocalDefId, PossibleBorrowerMap<'tcx, 'tcx>)>, . . // `IntoIterator` for arrays requires Rust 1.53. . msrv: Msrv, . } . impl NeedlessBorrowsForGenericArgs<'_> { . pub fn new(conf: &'static Conf) -> Self { 4 ( 0.00%) Self { . possible_borrowers: Vec::new(), . msrv: conf.msrv.into(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessBorrowsForGenericArgs<'tcx> { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 54,388 ( 0.00%) if matches!(expr.kind, ExprKind::AddrOf(..)) 1,344 ( 0.00%) && !expr.span.from_expansion() 4,081 ( 0.00%) && let use_site = get_expr_use_site(cx.tcx, cx.typeck_results(), SyntaxContext::root(), expr) 132,320 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (371x) 1,478 ( 0.00%) && use_site.same_ctxt . && !use_site.is_ty_unified 2,872 ( 0.00%) && let use_node = use_site.use_node(cx) 13,350 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (359x) 2,434 ( 0.00%) && let Some(DefinedTy::Mir { def_site_def_id: _, ty }) = use_node.defined_ty(cx) 67,537 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (359x) 570 ( 0.00%) && let ty::Param(param_ty) = *ty.skip_binder().kind() 60 ( 0.00%) && let Some((hir_id, fn_id, i)) = match use_node { . ExprUseNode::MethodArg(_, _, 0) => None, 3 ( 0.00%) ExprUseNode::MethodArg(hir_id, None, i) => cx . .typeck_results() 15 ( 0.00%) .type_dependent_def_id(hir_id) 153 ( 0.00%) => ???:::type_dependent_def_id (3x) . .map(|id| (hir_id, id, i)), . ExprUseNode::FnArg( . &Expr { . kind: ExprKind::Path(ref p), 4 ( 0.00%) hir_id, . .. . }, 2 ( 0.00%) i, 28 ( 0.00%) ) if !path_has_args(p) => match cx.typeck_results().qpath_res(p, hir_id) { 30 ( 0.00%) => ???:::qpath_res (2x) 8 ( 0.00%) Res::Def(DefKind::Fn | DefKind::Ctor(..) | DefKind::AssocFn, id) => Some((hir_id, id, i)), . _ => None, 2 ( 0.00%) }, . _ => None, . } 65 ( 0.00%) && let count = needless_borrow_count( 255,972 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:clippy_lints::needless_borrows_for_generic_args::needless_borrow_count (5x) . cx, . &mut self.possible_borrowers, . fn_id, 20 ( 0.00%) cx.typeck_results().node_args(hir_id), 195 ( 0.00%) => ???:::node_args (5x) . i, . param_ty, . expr, . self.msrv, . ) 10 ( 0.00%) && count != 0 . { . span_lint_and_then( . cx, . NEEDLESS_BORROWS_FOR_GENERIC_ARGS, . expr.span, . "the borrowed expression implements the required traits", . |diag| { . let mut app = Applicability::MachineApplicable; . let snip_span = peel_n_hir_expr_refs(expr, count).0.span; . let snip = snippet_with_context(cx, snip_span, expr.span.ctxt(), "..", &mut app).0; . diag.span_suggestion(expr.span, "change this to", snip.into_owned(), app); . }, . ); . } 217,552 ( 0.01%) } . 13,860 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'_>) { . if self . .possible_borrowers . .last() . .is_some_and(|&(local_def_id, _)| local_def_id == cx.tcx.hir_body_owner_def_id(body.id())) . { . self.possible_borrowers.pop(); . } 15,840 ( 0.00%) } . } . . fn path_has_args(p: &QPath<'_>) -> bool { 4 ( 0.00%) match *p { 18 ( 0.00%) QPath::Resolved(_, Path { segments: [.., s], .. }) | QPath::TypeRelative(_, s) => s.args.is_some(), . QPath::Resolved(..) => false, . } . } . . /// Checks for the number of borrow expressions which can be removed from the given expression . /// where the expression is used as an argument to a function expecting a generic type. . /// . /// The following constraints will be checked: . /// * The borrowed expression meets all the generic type's constraints. . /// * The generic type appears only once in the functions signature. . /// * The borrowed value is: . /// - `Copy` itself, or . /// - the only use of a mutable reference, or . /// - not a variable (created by a function call) . #[expect(clippy::too_many_arguments, clippy::too_many_lines)] 65 ( 0.00%) fn needless_borrow_count<'tcx>( . cx: &LateContext<'tcx>, . possible_borrowers: &mut Vec<(LocalDefId, PossibleBorrowerMap<'tcx, 'tcx>)>, . fn_id: DefId, . callee_args: ty::GenericArgsRef<'tcx>, . arg_index: usize, . param_ty: ParamTy, . mut expr: &Expr<'tcx>, . msrv: Msrv, . ) -> usize { 20 ( 0.00%) let destruct_trait_def_id = cx.tcx.lang_items().destruct_trait(); 200 ( 0.00%) => ???:::lang_items (5x) 10 ( 0.00%) let sized_trait_def_id = cx.tcx.lang_items().sized_trait(); 200 ( 0.00%) => ???:::lang_items (5x) 10 ( 0.00%) let meta_sized_trait_def_id = cx.tcx.lang_items().meta_sized_trait(); 200 ( 0.00%) => ???:::lang_items (5x) 10 ( 0.00%) let drop_trait_def_id = cx.tcx.lang_items().drop_trait(); 200 ( 0.00%) => ???:::lang_items (5x) . . let fn_sig = cx . .tcx . .fn_sig(fn_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); . let clauses = cx.tcx.param_env(fn_id).caller_bounds(); . let projection_predicates = clauses . .iter() . .filter_map(|clause| { 84 ( 0.00%) if let ClauseKind::Projection(projection_predicate) = clause.kind().skip_binder() { 294 ( 0.00%) => ???:::kind (21x) . Some(projection_predicate) . } else { . None . } . }) . .collect::>(); . . let mut trait_with_ref_mut_self_method = false; . . // If no traits were found, or only the `Destruct`, `Sized`, or `Any` traits were found, return. . if clauses . .iter() . .filter_map(|clause| { 44 ( 0.00%) if let ClauseKind::Trait(trait_predicate) = clause.kind().skip_binder() 154 ( 0.00%) => ???:::kind (11x) 30 ( 0.00%) && trait_predicate.trait_ref.self_ty() == param_ty.to_ty(cx.tcx) . { . Some(trait_predicate.trait_ref.def_id) . } else { . None . } . }) . .inspect(|trait_def_id| { 6 ( 0.00%) trait_with_ref_mut_self_method |= has_ref_mut_self_method(cx, *trait_def_id); . }) . .all(|trait_def_id| { . Some(trait_def_id) == destruct_trait_def_id . || Some(trait_def_id) == sized_trait_def_id . || Some(trait_def_id) == meta_sized_trait_def_id 8 ( 0.00%) || cx.tcx.is_diagnostic_item(sym::Any, trait_def_id) 200 ( 0.00%) => ???:::is_diagnostic_item (2x) . }) . { . return 0; . } . . // See: . // - https://github.com/rust-lang/rust-clippy/pull/9674#issuecomment-1289294201 . // - https://github.com/rust-lang/rust-clippy/pull/9674#issuecomment-1292225232 -- line 229 ---------------------------------------- -- line 231 ---------------------------------------- . .iter() . .any(|projection_predicate| is_mixed_projection_predicate(cx, fn_id, projection_predicate)) . { . return 0; . } . . // `args_with_referent_ty` can be constructed outside of `check_referent` because the same . // elements are modified each time `check_referent` is called. 2 ( 0.00%) let mut args_with_referent_ty = callee_args.to_vec(); . . let mut check_reference_and_referent = |reference: &Expr<'tcx>, referent: &Expr<'tcx>| { 8 ( 0.00%) if let ExprKind::Field(base, _) = &referent.kind 4 ( 0.00%) && let base_ty = cx.typeck_results().expr_ty(base) 80 ( 0.00%) => ???:::expr_ty (2x) 20 ( 0.00%) && drop_trait_def_id.is_some_and(|id| implements_trait(cx, base_ty, id, &[])) 16,182 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (2x) . { . return false; . } . 2 ( 0.00%) let referent_ty = cx.typeck_results().expr_ty(referent); 80 ( 0.00%) => ???:::expr_ty (2x) . 10 ( 0.00%) if !(is_copy(cx, referent_ty) 7,727 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (2x) 2 ( 0.00%) || referent_ty.is_ref() && referent_used_exactly_once(cx, possible_borrowers, reference) 6 ( 0.00%) || matches!(referent.kind, ExprKind::Call(..) | ExprKind::MethodCall(..))) . { . return false; . } . . // https://github.com/rust-lang/rust-clippy/pull/9136#pullrequestreview-1037379321 . if trait_with_ref_mut_self_method && !matches!(referent_ty.kind(), ty::Ref(_, _, Mutability::Mut)) { . return false; . } -- line 261 ---------------------------------------- -- line 290 ---------------------------------------- . .skip_norm_wip(); . let obligation = Obligation::new(cx.tcx, ObligationCause::dummy(), cx.param_env, clause); . let infcx = cx.tcx.infer_ctxt().build(cx.typing_mode()); . infcx.predicate_must_hold_modulo_regions(&obligation) . }) . }; . . let mut count = 0; 8 ( 0.00%) while let ExprKind::AddrOf(_, _, referent) = expr.kind { . if !check_reference_and_referent(expr, referent) { . break; . } . expr = referent; . count += 1; . } . count 45 ( 0.00%) } . . fn has_ref_mut_self_method(cx: &LateContext<'_>, trait_def_id: DefId) -> bool { . cx.tcx . .associated_items(trait_def_id) . .in_definition_order() . .any(|assoc_item| { . if assoc_item.is_method() { 6 ( 0.00%) let self_ty = cx . .tcx 4 ( 0.00%) .fn_sig(assoc_item.def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .inputs()[0]; 4 ( 0.00%) matches!(self_ty.kind(), ty::Ref(_, _, Mutability::Mut)) . } else { . false . } . }) . } . . fn is_mixed_projection_predicate<'tcx>( . cx: &LateContext<'tcx>, -- line 329 ---------------------------------------- 1,188 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . #[clippy::version = "1.50.0"] . pub SIZE_OF_IN_ELEMENT_COUNT, . correctness, . "using `size_of::` or `size_of_val::` where a count of elements of `T` is expected" . } . . declare_lint_pass!(SizeOfInElementCount => [SIZE_OF_IN_ELEMENT_COUNT]); . 180 ( 0.00%) fn get_size_of_ty<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, inverted: bool) -> Option> { 101 ( 0.00%) match expr.kind { . ExprKind::Call(count_func, _) => { . if !inverted . && let ExprKind::Path(ref count_func_qpath) = count_func.kind . && let Some(def_id) = cx.qpath_res(count_func_qpath, count_func.hir_id).opt_def_id() . && matches!( . cx.tcx.get_diagnostic_name(def_id), . Some(sym::mem_size_of | sym::mem_size_of_val) . ) . { . cx.typeck_results().node_args(count_func.hir_id).types().next() . } else { . None . } . }, 3 ( 0.00%) ExprKind::Binary(op, left, right) if BinOpKind::Mul == op.node => { . get_size_of_ty(cx, left, inverted).or_else(|| get_size_of_ty(cx, right, inverted)) . }, . ExprKind::Binary(op, left, right) if BinOpKind::Div == op.node => { . get_size_of_ty(cx, left, inverted).or_else(|| get_size_of_ty(cx, right, !inverted)) . }, . ExprKind::Cast(expr, _) => get_size_of_ty(cx, expr, inverted), . _ => None, . } 120 ( 0.00%) } . . fn get_pointee_ty_and_count_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . ) -> Option<(Ty<'tcx>, &'tcx Expr<'tcx>)> { . const METHODS: [Symbol; 10] = [ . sym::copy_to, . sym::copy_from, -- line 68 ---------------------------------------- -- line 71 ---------------------------------------- . sym::add, . sym::wrapping_add, . sym::sub, . sym::wrapping_sub, . sym::offset, . sym::wrapping_offset, . ]; . 143,529 ( 0.01%) if let ExprKind::Call(func, [.., count]) = expr.kind . // Find calls to ptr::{copy, copy_nonoverlapping} . // and ptr::swap_nonoverlapping, 9,165 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 15,275 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 86,746 ( 0.00%) => ???:::qpath_res (3,055x) 39,507 ( 0.00%) && matches!(cx.tcx.get_diagnostic_name(def_id), Some( 208,933 ( 0.01%) => ???:::get_diagnostic_name (3,039x) . sym::ptr_copy . | sym::ptr_copy_nonoverlapping . | sym::ptr_slice_from_raw_parts . | sym::ptr_slice_from_raw_parts_mut . | sym::ptr_swap_nonoverlapping . | sym::slice_from_raw_parts . | sym::slice_from_raw_parts_mut . )) . . // Get the pointee type . && let Some(pointee_ty) = cx.typeck_results().node_args(func.hir_id).types().next() . { . return Some((pointee_ty, count)); . } 12,572 ( 0.00%) if let ExprKind::MethodCall(method_path, ptr_self, [.., count], _) = expr.kind . // Find calls to copy_{from,to}{,_nonoverlapping} 1,133 ( 0.00%) && let method_ident = method_path.ident.name . && METHODS.contains(&method_ident) . . // Get the pointee type 30 ( 0.00%) && let ty::RawPtr(pointee_ty, _) = 15 ( 0.00%) cx.typeck_results().expr_ty(ptr_self).kind() 600 ( 0.00%) => ???:::expr_ty (15x) . { 15 ( 0.00%) return Some((*pointee_ty, count)); . } . None . } . . impl<'tcx> LateLintPass<'tcx> for SizeOfInElementCount { 163,164 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . const HELP_MSG: &str = "use a count of elements instead of a count of bytes\ . , it already gets multiplied by the size of the type"; . . const LINT_MSG: &str = "found a count of bytes \ . instead of a count of elements of `T`"; . . if let Some((pointee_ty, count_expr)) = get_pointee_ty_and_count_expr(cx, expr) . // Using a number of bytes for a byte type isn't suspicious 30 ( 0.00%) && pointee_ty != cx.tcx.types.u8 . // Find calls to functions with an element count parameter and get . // the pointee type and count parameter expression . . // Find a size_of call in the count parameter expression and . // check that it's the same type 60 ( 0.00%) && let Some(ty_used_for_size_of) = get_size_of_ty(cx, count_expr, false) 421 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs:clippy_lints::size_of_in_element_count::get_size_of_ty (15x) . && pointee_ty == ty_used_for_size_of . { . span_lint_and_help(cx, SIZE_OF_IN_ELEMENT_COUNT, count_expr.span, LINT_MSG, None, HELP_MSG); . } 163,164 ( 0.01%) } . } 6,155 ( 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 { 49,152 ( 0.00%) fn new(kind: ItemKindDescr, ident: Option, span: Span, mod_items: Option) -> Self { 32,768 ( 0.00%) Self { . kind, . name: ident.map(|ident| ident.name), . span: match ident { 2,228 ( 0.00%) Some(ident) => span.with_hi(ident.span.hi()), . None => span.shrink_to_lo(), . }, . mod_items, . } 32,768 ( 0.00%) } . } . . pub struct EmptyLineAfter { . items: Vec, . } . . impl EmptyLineAfter { . pub fn new() -> Self { -- line 143 ---------------------------------------- -- line 240 ---------------------------------------- . // ^ ^ . let asterisk = self.span.from_inner(InnerSpan::new(1, 2)); . suggestions.push((asterisk, String::new())); . }, . } . } . . fn from_attr(cx: &EarlyContext<'_>, attr: &Attribute) -> Option { 11,448 ( 0.00%) let SpanData { lo, hi, .. } = attr.span.data(); 15,264 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(lo); 530,424 ( 0.03%) => ???:::lookup_source_file (3,816x) . 3,816 ( 0.00%) Some(Self { . span: attr.span, 15,264 ( 0.00%) kind: match attr.kind { . AttrKind::Normal(_) | AttrKind::Synthetic(_) => StopKind::Attr, . AttrKind::DocComment(comment_kind, _) => StopKind::Doc(comment_kind), . }, 11,448 ( 0.00%) first: file.lookup_line(file.relative_position(lo))?, 416,178 ( 0.02%) => ???:::lookup_line (3,816x) 7,632 ( 0.00%) last: file.lookup_line(file.relative_position(hi))?, 416,178 ( 0.02%) => ???:::lookup_line (3,816x) 7,632 ( 0.00%) name: attr.name(), 15,771 ( 0.00%) => ???:::name (3,816x) . }) . } . } . . /// Represents a set of attrs/doc comments separated by 1 or more empty lines . /// . /// ```ignore . /// /// chunk 1 docs -- line 267 ---------------------------------------- -- line 453 ---------------------------------------- . StopKind::Doc(_) => format!("if the comment should document the {desc} use an inner doc comment"), . }, . suggestions, . Applicability::MaybeIncorrect, . ); . } . } . 53,248 ( 0.00%) fn check_item_kind(&mut self, cx: &EarlyContext<'_>, info: ItemInfo, attrs: &[Attribute], id: NodeId) { . self.items.push(info); . . let mut outer = attrs . .iter() 14,098 ( 0.00%) .filter(|attr| attr.style == AttrStyle::Outer && !attr.span.from_expansion()) 3,816 ( 0.00%) .map(|attr| Stop::from_attr(cx, attr)) . .collect::>>() . .unwrap_or_default(); . 4,096 ( 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 2,001 ( 0.00%) let span = self.items.last().unwrap().span; . if !span.from_expansion() 6,003 ( 0.00%) && let Ok(line) = cx.sess().source_map().lookup_line(span.lo()) 172,759 ( 0.01%) => ???:::lookup_line (667x) . { . outer.push(Stop { . span, . kind: StopKind::Attr, . first: line.line, . // last doesn't need to be accurate here, we don't compare it with anything . last: line.line, . name: None, . }); 1,334 ( 0.00%) } . . let mut gaps = Vec::new(); . let mut last = 0; . for pos in outer . .array_windows() 3,816 ( 0.00%) .positions(|[a, b]| b.first.saturating_sub(a.last) > 1) . { . // we want to be after the first stop in the window . 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); 32,768 ( 0.00%) } . } . . fn assoc_item_descr(kind: &AssocItemKind) -> &'static str { 7,630 ( 0.00%) match kind { . AssocItemKind::Const(_) => "constant item", . AssocItemKind::Fn(_) => "function", . AssocItemKind::Type(_) => "type alias", . AssocItemKind::MacCall(_) => "item macro invocation", . AssocItemKind::Delegation(_) => "delegated function", . AssocItemKind::DelegationMac(_) => "delegation", . } . } . . impl EarlyLintPass for EmptyLineAfter { 9 ( 0.00%) fn check_crate(&mut self, _: &EarlyContext<'_>, krate: &Crate) { . self.items.push(ItemInfo { . kind: ItemKindDescr::Crate, . name: Some(kw::Crate), 1 ( 0.00%) span: krate.spans.inner_span.with_hi(krate.spans.inner_span.lo()), . mod_items: krate . .items . .iter() 12 ( 0.00%) .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) 4 ( 0.00%) .map(|i| i.id) . .next(), . }); 8 ( 0.00%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . fn check_impl_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . fn check_trait_item_post(&mut self, _: &EarlyContext<'_>, _: &Item) { . self.items.pop(); . } . 12,208 ( 0.00%) fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 6,104 ( 0.00%) let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); 9,156 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); 112,719 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (1,526x) 7,630 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 1,198,437 ( 0.07%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (1,526x) 9,156 ( 0.00%) } . . fn check_trait_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { . let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); . let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); . self.check_item_kind(cx, info, &item.attrs, item.id); . } . 25,700 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 13,005 ( 0.00%) let (kind, mod_items) = match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, _, _)) => { . let first = items . .iter() 304 ( 0.00%) .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) 228 ( 0.00%) .map(|i| i.id) . .next(); . (ItemKindDescr::Module, first) . }, . ItemKind::Mod(..) => (ItemKindDescr::Module, None), 9,976 ( 0.00%) _ => (ItemKindDescr::Other(item.kind.descr()), None), . }; 12,850 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, mod_items); 168,806 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (2,570x) 12,850 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 1,499,491 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (2,570x) 20,560 ( 0.00%) } . } 34,846 ( 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/range.rs -------------------------------------------------------------------------------- Ir -- line 1092 ---------------------------------------- . . NonZero::new(n - taken).map_or(Ok(()), Err) . } . } . . impl RangeIteratorImpl for ops::Range { . #[inline] . fn spec_next(&mut self) -> Option { 21,746 ( 0.00%) if self.start < self.end { . let old = self.start; . // SAFETY: just checked precondition . self.start = unsafe { Step::forward_unchecked(old, 1) }; . Some(old) . } else { . None . } . } -- line 1108 ---------------------------------------- -- line 1134 ---------------------------------------- . // Otherwise 0 is returned which always safe to use. . self.start = unsafe { Step::forward_unchecked(self.start, taken) }; . . NonZero::new(n - taken).map_or(Ok(()), Err) . } . . #[inline] . fn spec_next_back(&mut self) -> Option { 8,545 ( 0.00%) if self.start < self.end { . // SAFETY: just checked precondition . self.end = unsafe { Step::backward_unchecked(self.end, 1) }; . Some(self.end) . } else { . None . } . } . -- line 1150 ---------------------------------------- -- line 1523 ---------------------------------------- . } . . #[stable(feature = "inclusive_range", since = "1.26.0")] . impl Iterator for ops::RangeInclusive { . type Item = A; . . #[inline] . fn next(&mut self) -> Option { 7 ( 0.00%) if self.is_empty() { . return None; . } . . let (n, o) = Step::forward_overflowing(self.start.clone(), 1); . . self.exhausted = o; . Some(mem::replace(&mut self.start, n)) . } -- line 1539 ---------------------------------------- 21,836 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/derived_hash_with_manual_eq.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . span: Span, . trait_ref: &TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . hash_is_automatically_derived: bool, . ) { 5,200 ( 0.00%) if let Some(peq_trait_def_id) = cx.tcx.lang_items().eq_trait() 52,000 ( 0.00%) => ???:::lang_items (1,300x) 5,200 ( 0.00%) && let Some(def_id) = trait_ref.trait_def_id() 16,900 ( 0.00%) => ???:::trait_def_id (1,300x) 7,800 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Hash, def_id) 100,661 ( 0.01%) => ???:::is_diagnostic_item (1,300x) . { . // Look for the PartialEq implementations for `ty` 117 ( 0.00%) cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| { 569,493 ( 0.03%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/trait_def.rs:::for_each_relevant_impl::<(), clippy_lints::derive::derived_hash_with_manual_eq::check::{closure#0}> (3x) 18 ( 0.00%) let peq_is_automatically_derived = cx.tcx.is_automatically_derived(impl_id); 9,791 ( 0.00%) => ???:::is_automatically_derived (6x) . 30 ( 0.00%) if !hash_is_automatically_derived || peq_is_automatically_derived { . return; . } . . let trait_ref = cx.tcx.impl_trait_ref(impl_id); . . // Only care about `impl PartialEq for Foo` . // For `impl PartialEq for A, input_types is [A, B] . if trait_ref.instantiate_identity().skip_norm_wip().args.type_at(1) == ty { -- line 34 ---------------------------------------- -- line 41 ---------------------------------------- . |diag| { . if let Some(local_def_id) = impl_id.as_local() { . let hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id); . diag.span_note(cx.tcx.hir_span(hir_id), "`PartialEq` implemented here"); . } . }, . ); . } 48 ( 0.00%) }); . } . } 3,903 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs -------------------------------------------------------------------------------- Ir -- line 22 ---------------------------------------- . Block, . Unit, . NeedsPar(Cow<'tcx, str>, Applicability), . Expr(Cow<'tcx, str>, Applicability), . } . . impl RetReplacement<'_> { . fn sugg_help(&self) -> &'static str { 6 ( 0.00%) match self { . Self::Empty | Self::Expr(..) => "remove `return`", . Self::Block => "replace `return` with an empty block", . Self::Unit => "replace `return` with a unit value", . Self::NeedsPar(..) => "remove `return` and wrap the sequence with parentheses", . } . } . . fn applicability(&self) -> Applicability { 2 ( 0.00%) match self { 2 ( 0.00%) Self::Expr(_, ap) | Self::NeedsPar(_, ap) => *ap, . _ => Applicability::MachineApplicable, . } . } . } . . impl Display for RetReplacement<'_> { 1 ( 0.00%) fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 5 ( 0.00%) match self { . Self::Empty => f.write_str(""), . Self::Block => f.write_str("{}"), . Self::Unit => f.write_str("()"), . Self::NeedsPar(inner, _) => write!(f, "({inner})"), 5 ( 0.00%) Self::Expr(inner, _) => write!(f, "{inner}"), . } 2 ( 0.00%) } . } . . pub(super) fn check_fn<'tcx>(cx: &LateContext<'tcx>, kind: FnKind<'tcx>, body: &'tcx Body<'tcx>, sp: Span) { . if sp.from_expansion() { . return; . } . 1,698 ( 0.00%) match kind { . FnKind::Closure => { . // when returning without value in closure, replace this `return` . // with an empty block to prevent invalid suggestion (see #6501) 170 ( 0.00%) let replacement = if let ExprKind::Ret(None) = &body.value.kind { . RetReplacement::Block . } else { . RetReplacement::Empty . }; 170 ( 0.00%) check_final_expr(cx, body.value, vec![], replacement, None); 59,967 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr (85x) . }, . FnKind::ItemFn(..) | FnKind::Method(..) => { 2,292 ( 0.00%) check_block_return(cx, &body.value.kind, sp, vec![]); 1,154,667 ( 0.07%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (764x) . }, . } . } . . // if `expr` is a block, check if there are needless returns in it 15,883 ( 0.00%) fn check_block_return<'tcx>(cx: &LateContext<'tcx>, expr_kind: &ExprKind<'tcx>, sp: Span, mut semi_spans: Vec) { 4,538 ( 0.00%) if let ExprKind::Block(block, _) = expr_kind { 4,200 ( 0.00%) if let Some(block_expr) = block.expr { 1,762 ( 0.00%) check_final_expr(cx, block_expr, semi_spans, RetReplacement::Empty, None); 333 ( 0.00%) } else if let Some(stmt) = block.stmts.last() { 820 ( 0.00%) if span_contains_cfg( 68,069 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (127x) . cx, 492 ( 0.00%) Span::between( 25,198 ( 0.00%) => ???:::between (127x) 328 ( 0.00%) stmt.span, 328 ( 0.00%) cx.sess().source_map().end_point(block.span), // the closing brace of the block 52,399 ( 0.00%) => ???:::end_point (127x) . ), . ) { . return; . } 984 ( 0.00%) match stmt.kind { . StmtKind::Expr(expr) => { . check_final_expr(cx, expr, semi_spans, RetReplacement::Empty, None); . }, 159 ( 0.00%) StmtKind::Semi(semi_expr) => { . // Remove ending semicolons and any whitespace ' ' in between. . // Without `return`, the suggestion might not compile if the semicolon is retained 1,109 ( 0.00%) if let Some(semi_span) = stmt.span.trim_start(semi_expr.span) { 15,783 ( 0.00%) => ???:::trim_start (122x) . let semi_span_to_remove = 620 ( 0.00%) span_find_starting_semi(cx.sess().source_map(), semi_span.with_hi(sp.hi())); 83,514 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::span_find_starting_semi (121x) . semi_spans.push(semi_span_to_remove); . } 1,590 ( 0.00%) check_final_expr(cx, semi_expr, semi_spans, RetReplacement::Empty, None); . }, . _ => (), . } . } . } 16,920 ( 0.00%) } . 19,332 ( 0.00%) fn check_final_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . semi_spans: Vec, /* containing all the places where we would need to remove semicolons if finding an . * needless return */ . replacement: RetReplacement<'tcx>, . match_ty_opt: Option>, . ) { . let peeled_drop_expr = expr.peel_drop_temps(); 224 ( 0.00%) match &peeled_drop_expr.kind { . // simple return is always "bad" . ExprKind::Ret(inner) => { . // check if expr return nothing 3 ( 0.00%) let ret_span = if inner.is_none() && replacement == RetReplacement::Empty { . extend_span_to_previous_non_ws(cx, peeled_drop_expr.span) . } else { 5 ( 0.00%) peeled_drop_expr.span . }; . 2 ( 0.00%) let replacement = if let Some(inner_expr) = inner { . // if desugar of `do yeet`, don't lint 5 ( 0.00%) if let ExprKind::Call(path_expr, [_]) = inner_expr.kind 6 ( 0.00%) && let ExprKind::Path(qpath) = path_expr.kind 7 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromYeet) 112 ( 0.00%) => ???:::qpath_is_lang_item (1x) . { . return; . } . 1 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 5 ( 0.00%) let (snippet, _) = snippet_with_context(cx, inner_expr.span, ret_span.ctxt(), "..", &mut applicability); 4 ( 0.00%) if binary_expr_needs_parentheses(inner_expr) { 7 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::binary_expr_needs_parentheses (1x) . RetReplacement::NeedsPar(snippet, applicability) . } else { . RetReplacement::Expr(snippet, applicability) . } . } else { . match match_ty_opt { . Some(match_ty) => { . match match_ty.kind() { -- line 153 ---------------------------------------- -- line 161 ---------------------------------------- . // want here . _ => return, . } . }, . None => replacement, . } . }; . 6 ( 0.00%) if inner.is_some_and(|inner| leaks_droppable_temporary_with_limited_lifetime(cx, inner)) { 1,770 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::leaks_droppable_temporary_with_limited_lifetime (1x) . return; . } . 2 ( 0.00%) if ret_span.from_expansion() || is_from_proc_macro(cx, expr) { . return; . } . . // Returns may be used to turn an expression into a statement in rustc's AST. . // This allows the addition of attributes, like `#[allow]` (See: clippy#9361) . // `#[expect(clippy::needless_return)]` needs to be handled separately to . // actually fulfill the expectation (clippy::#12998) 6 ( 0.00%) match cx.tcx.hir_attrs(expr.hir_id) { 121 ( 0.00%) => ???:::hir_attrs (1x) 4 ( 0.00%) [] => {}, . [attr] => { . if matches!(Level::from_opt_symbol(attr.name()), Some(Level::Expect)) . && let metas = attr.meta_item_list() . && let Some(lst) = metas . && let [MetaItemInner::MetaItem(meta_item), ..] = lst.as_slice() . && let [tool, lint_name] = meta_item.path.segments.as_slice() . && tool.ident.name == sym::clippy . && matches!( -- line 190 ---------------------------------------- -- line 195 ---------------------------------------- . // This is an expectation of the `needless_return` lint . } else { . return; . } . }, . _ => return, . } . 14 ( 0.00%) emit_return_lint( 609,515 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::emit_return_lint (1x) . cx, 1 ( 0.00%) peeled_drop_expr.span, . ret_span, . semi_spans, . &replacement, . expr.hir_id, . ); 1 ( 0.00%) }, 49 ( 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:: (1x) . ExprKind::If(_, then, else_clause_opt) => { 822 ( 0.00%) check_block_return(cx, &then.kind, peeled_drop_expr.span, semi_spans.clone()); 31,568 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (66x) 411 ( 0.00%) if let Some(else_clause) = else_clause_opt { . // The `RetReplacement` won't be used there as `else_clause` will be either a block or . // a `if` expression. 875 ( 0.00%) check_final_expr(cx, else_clause, semi_spans, RetReplacement::Empty, match_ty_opt); 747,866 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (58x) . } . }, . // a match expr, check all arms . // an if/if let expr, check both exprs . // note, if without else is going to be a type checking error anyways . // (except for unit type functions) so we don't match it . ExprKind::Match(_, arms, MatchSource::Normal) => { 210 ( 0.00%) let match_ty = cx.typeck_results().expr_ty(peeled_drop_expr); 3,960 ( 0.00%) => ???:::expr_ty (99x) 105 ( 0.00%) for arm in *arms { 2,527 ( 0.00%) check_final_expr(cx, arm.body, semi_spans.clone(), RetReplacement::Unit, Some(match_ty)); 54,100 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (348x) . } . }, . // if it's a whole block, check it 13,680 ( 0.00%) other_expr_kind => check_block_return(cx, other_expr_kind, peeled_drop_expr.span, semi_spans), 53,543 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (77x) 20,468 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (601x) . } 12,890 ( 0.00%) } . 12 ( 0.00%) fn emit_return_lint( . cx: &LateContext<'_>, . lint_span: Span, . ret_span: Span, . semi_spans: Vec, . replacement: &RetReplacement<'_>, . at: HirId, . ) { . span_lint_hir_and_then( . cx, 2 ( 0.00%) NEEDLESS_RETURN, . at, . lint_span, . "unneeded `return` statement", . |diag| { 1 ( 0.00%) let suggestions = std::iter::once((ret_span, replacement.to_string())) . .chain(semi_spans.into_iter().map(|span| (span, String::new()))) . .collect(); . . diag.multipart_suggestion(replacement.sugg_help(), suggestions, replacement.applicability()); . }, . ); 8 ( 0.00%) } . . // Go backwards while encountering whitespace and extend the given Span to that point. . fn extend_span_to_previous_non_ws(cx: &LateContext<'_>, sp: Span) -> Span { . if let Ok(prev_source) = cx.sess().source_map().span_to_prev_source(sp) { . let ws = *b" \t\n"; . if let Some(non_ws_pos) = prev_source.bytes().rposition(|c| !ws.contains(&c)) { . let len = prev_source.len() - non_ws_pos - 1; . return sp.with_lo(sp.lo() - BytePos::from_usize(len)); -- line 265 ---------------------------------------- 9,621 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs -------------------------------------------------------------------------------- Ir -- line 127 ---------------------------------------- . impl_lint_pass!(MemReplace => [ . MEM_REPLACE_OPTION_WITH_NONE, . MEM_REPLACE_OPTION_WITH_SOME, . MEM_REPLACE_WITH_DEFAULT, . MEM_REPLACE_WITH_UNINIT, . ]); . . fn check_replace_option_with_none(cx: &LateContext<'_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) -> bool { 5 ( 0.00%) if is_none_expr(cx, src) { 22 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (1x) . // Since this is a late pass (already type-checked), . // and we already know that the second argument is an . // `Option`, we do not need to check the first . // argument's type. All that's left is to get . // the replacee's expr after peeling off the `&mut` . let sugg_expr = peel_ref_operators(cx, dest); . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( -- line 143 ---------------------------------------- -- line 160 ---------------------------------------- . . fn check_replace_option_with_some( . cx: &LateContext<'_>, . src: &Expr<'_>, . dest: &Expr<'_>, . expr_span: Span, . msrv: Msrv, . ) -> bool { 5 ( 0.00%) if let Some(src_arg) = as_some_expr(cx, src) 4 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::as_some_expr (1x) . && msrv.meets(cx, msrvs::OPTION_REPLACE) . { . // We do not have to check for a `const` context here, because `core::mem::replace()` and . // `Option::replace()` have been const-stabilized simultaneously in version 1.83.0. . let sugg_expr = peel_ref_operators(cx, dest); . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, -- line 176 ---------------------------------------- -- line 186 ---------------------------------------- . applicability, . ); . true . } else { . false . } . } . 7 ( 0.00%) fn check_replace_with_uninit(cx: &LateContext<'_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) { 8 ( 0.00%) if let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(src.hir_id) 51 ( 0.00%) => ???:::type_dependent_def_id (1x) . // check if replacement is mem::MaybeUninit::uninit().assume_init() 7 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::assume_init, method_def_id) 54 ( 0.00%) => ???:::is_diagnostic_item (1x) . { . let Some(top_crate) = std_or_core(cx) else { return }; . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . MEM_REPLACE_WITH_UNINIT, . expr_span, . "replacing with `mem::MaybeUninit::uninit().assume_init()`", -- line 205 ---------------------------------------- -- line 208 ---------------------------------------- . "{top_crate}::ptr::read({})", . snippet_with_applicability(cx, dest.span, "", &mut applicability) . ), . applicability, . ); . return; . } . 2 ( 0.00%) if let ExprKind::Call(repl_func, []) = src.kind . && let ExprKind::Path(ref repl_func_qpath) = repl_func.kind . && let Some(repl_def_id) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def_id() . { . let repl_name = cx.tcx.get_diagnostic_name(repl_def_id); . if repl_name == Some(sym::mem_uninitialized) { . let Some(top_crate) = std_or_core(cx) else { return }; . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( -- line 224 ---------------------------------------- -- line 239 ---------------------------------------- . MEM_REPLACE_WITH_UNINIT, . expr_span, . "replacing with `mem::zeroed()`", . None, . "consider using a default value or the `take_mut` crate instead", . ); . } . } 8 ( 0.00%) } . 13 ( 0.00%) fn check_replace_with_default( . cx: &LateContext<'_>, . src: &Expr<'_>, . dest: &Expr<'_>, . expr: &Expr<'_>, . msrv: Msrv, . ) -> bool { 6 ( 0.00%) if is_expr_used_or_unified(cx.tcx, expr) 210 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_used_or_unified (1x) . // disable lint for primitives 2 ( 0.00%) && let expr_type = cx.typeck_results().expr_ty_adjusted(src) 69 ( 0.00%) => ???:::expr_ty_adjusted (1x) . && !is_non_aggregate_primitive_type(expr_type) 5 ( 0.00%) && is_default_equivalent(cx, src) 119 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_default_equivalent (1x) . && !expr.span.in_external_macro(cx.tcx.sess.source_map()) . && let Some(top_crate) = std_or_core(cx) . && msrv.meets(cx, msrvs::MEM_TAKE) . { . span_lint_and_then( . cx, . MEM_REPLACE_WITH_DEFAULT, . expr.span, -- line 268 ---------------------------------------- -- line 279 ---------------------------------------- . applicability, . ); . }, . ); . true . } else { . false . } 8 ( 0.00%) } . . pub struct MemReplace { . msrv: Msrv, . } . . impl MemReplace { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for MemReplace { 190,358 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 61,431 ( 0.00%) if let ExprKind::Call(func, [dest, src]) = expr.kind . // Check that `expr` is a call to `mem::replace()` 1,401 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 1,868 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 16,375 ( 0.00%) => ???:::qpath_res (467x) 2,802 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_replace, def_id) 27,389 ( 0.00%) => ???:::is_diagnostic_item (467x) . // Check that second argument is `Option::None` 1 ( 0.00%) && !check_replace_option_with_none(cx, src, dest, expr.span) 1 ( 0.00%) && !check_replace_option_with_some(cx, src, dest, expr.span, self.msrv) 8 ( 0.00%) && !check_replace_with_default(cx, src, dest, expr, self.msrv) 438 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:clippy_lints::mem_replace::check_replace_with_default (1x) . { 6 ( 0.00%) check_replace_with_uninit(cx, src, dest, expr.span); 145 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:clippy_lints::mem_replace::check_replace_with_uninit (1x) . } 217,552 ( 0.01%) } . } 1,872 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bit_width.rs -------------------------------------------------------------------------------- Ir -- line 93 ---------------------------------------- . . impl ManualBitWidth { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualBitWidth { 271,940 ( 0.02%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 81,582 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 46,638 ( 0.00%) match expr.kind { . // `T::BITS - n.leading_zeros()` . ExprKind::Binary(op, left, right) . if op.node == BinOpKind::Sub 78 ( 0.00%) && let ExprKind::MethodCall(leading_zeros, recv, [], _) = right.kind 3 ( 0.00%) && leading_zeros.ident.name == sym::leading_zeros . && let ExprKind::Path(QPath::TypeRelative(hir_ty, segment)) = left.kind . && segment.ident.name == sym::BITS . && let right_ty = cx.typeck_results().expr_ty(recv) . && let Some(right_int_kind) = get_int_kind(cx, right_ty) . && let left_ty = cx.typeck_results().node_type(hir_ty.hir_id) . && let Some(left_int_kind) = get_int_kind(cx, left_ty) . && self.msrv.meets(cx, msrvs::BIT_WIDTH) . && left.span.eq_ctxt(right.span) -- line 119 ---------------------------------------- -- line 124 ---------------------------------------- . emit_manual_bit_width(cx, recv, expr, right_int_kind); . } else { . // mismatched calling types . emit_type_mismatch(cx, recv, expr, right_int_kind); . } . }, . _ => {}, . } 217,552 ( 0.01%) } . } . . fn get_int_kind<'a>(cx: &LateContext<'a>, ty: Ty<'a>) -> Option> { . match ty.kind() { . // int::BITS or uint::BITS . ty::Int(int_ty) => Some(IntKind::Int(*int_ty)), . ty::Uint(uint_ty) => Some(IntKind::Uint(*uint_ty)), . // NonZero::::BITS -- line 140 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs -------------------------------------------------------------------------------- Ir -- line 95 ---------------------------------------- . . /// Resize is a slow initialization with the form `vec.resize(.., 0)` . Resize(&'tcx Expr<'tcx>), . } . . impl<'tcx> LateLintPass<'tcx> for SlowVectorInit { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Matches initialization on reassignments. For example: `vec = Vec::with_capacity(100)` 54,551 ( 0.00%) if let ExprKind::Assign(left, right, _) = expr.kind . && let Some(local_id) = left.res_local_id() 675 ( 0.00%) && let Some(size_expr) = Self::as_vec_initializer(cx, right) 12,110 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::as_vec_initializer (135x) . { . let vi = VecAllocation { . local_id, . allocation_expr: right, . size_expr, . }; . . Self::search_initialization(cx, vi, expr.hir_id); . } . } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . // Matches statements which initializes vectors. For example: `let mut vec = Vec::with_capacity(10)` . // or `Vec::new()` 4,824 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 4,942 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, local_id, _, None) = local.pat.kind 402 ( 0.00%) && let Some(init) = local.init 670 ( 0.00%) && let Some(size_expr) = Self::as_vec_initializer(cx, init) 12,165 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::as_vec_initializer (134x) . { 24 ( 0.00%) let vi = VecAllocation { . local_id, . allocation_expr: init, . size_expr, . }; . 40 ( 0.00%) Self::search_initialization(cx, vi, stmt.hir_id); 17,440 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::search_initialization (8x) . } . } . } . . impl SlowVectorInit { . /// Looks for `Vec::with_capacity(size)` or `Vec::new()` calls and returns the initialized size, . /// if any. More specifically, it returns: . /// - `Some(InitializedSize::Initialized(size))` for `Vec::with_capacity(size)` . /// - `Some(InitializedSize::Uninitialized)` for `Vec::new()` . /// - `None` for other, unrelated kinds of expressions 1,345 ( 0.00%) fn as_vec_initializer<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option> { . // Generally don't warn if the vec initializer comes from an expansion, except for the vec! macro. . // This lets us still warn on `vec![]`, while ignoring other kinds of macros that may output an . // empty vec 694 ( 0.00%) if expr.span.from_expansion() && matching_root_macro_call(cx, expr.span, sym::vec_macro).is_none() { 8,528 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (26x) . return None; . } . 2,833 ( 0.00%) if let ExprKind::Call(func, [len_expr]) = expr.kind 18 ( 0.00%) && func.ty_rel_def(cx).is_diag_item(cx, sym::vec_with_capacity) . { . Some(InitializedSize::Initialized(len_expr)) 258 ( 0.00%) } else if let ExprKind::Call(func, []) = expr.kind 72 ( 0.00%) && func.ty_rel_def(cx).is_diag_item(cx, sym::vec_new) . { . Some(InitializedSize::Uninitialized) . } else { . None . } 1,345 ( 0.00%) } . . /// Search initialization for the given vector 72 ( 0.00%) fn search_initialization<'tcx>(cx: &LateContext<'tcx>, vec_alloc: VecAllocation<'tcx>, parent_node: HirId) { 24 ( 0.00%) let enclosing_body = get_enclosing_block(cx, parent_node); 2,072 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_enclosing_block (8x) . 8 ( 0.00%) if enclosing_body.is_none() { . return; . } . 56 ( 0.00%) let mut v = VectorInitializationVisitor { . cx, . vec_alloc, . slow_expression: None, . initialization_found: false, . }; . . v.visit_block(enclosing_body.unwrap()); . 16 ( 0.00%) if let Some(ref allocation_expr) = v.slow_expression { . Self::lint_initialization(cx, allocation_expr, &v.vec_alloc); . } 64 ( 0.00%) } . . fn lint_initialization<'tcx>( . cx: &LateContext<'tcx>, . initialization: &InitializationType<'tcx>, . vec_alloc: &VecAllocation<'_>, . ) { . match initialization { . InitializationType::Extend(e) | InitializationType::Resize(e) => { -- line 191 ---------------------------------------- -- line 240 ---------------------------------------- . . /// `true` if the initialization of the vector has been found on the visited block. . initialization_found: bool, . } . . impl<'tcx> VectorInitializationVisitor<'_, 'tcx> { . /// Checks if the given expression is extending a vector with `repeat(0).take(..)` . fn search_slow_extend_filling(&mut self, expr: &'tcx Expr<'_>) { 9 ( 0.00%) if self.initialization_found 1 ( 0.00%) && let ExprKind::MethodCall(path, self_arg, [extend_arg], _) = expr.kind 1 ( 0.00%) && self_arg.res_local_id() == Some(self.vec_alloc.local_id) 1 ( 0.00%) && path.ident.name == sym::extend 4 ( 0.00%) && self.is_repeat_take(extend_arg) 20 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::is_repeat_take (1x) . { . self.slow_expression = Some(InitializationType::Extend(expr)); . } . } . . /// Checks if the given expression is resizing a vector with 0 . fn search_slow_resize_filling(&mut self, expr: &'tcx Expr<'tcx>) { 30 ( 0.00%) if self.initialization_found . && let ExprKind::MethodCall(path, self_arg, [len_arg, fill_arg], _) = expr.kind . && self_arg.res_local_id() == Some(self.vec_alloc.local_id) . && path.ident.name == sym::resize . // Check that is filled with 0 . && is_integer_literal(fill_arg, 0) . { . let is_matching_resize = if let InitializedSize::Initialized(size_expr) = self.vec_alloc.size_expr { . // If we have a size expression, check that it is equal to what's passed to `resize` -- line 268 ---------------------------------------- -- line 275 ---------------------------------------- . . if is_matching_resize { . self.slow_expression = Some(InitializationType::Resize(expr)); . } . } . } . . /// Returns `true` if give expression is `repeat(0).take(...)` 6 ( 0.00%) fn is_repeat_take(&mut self, expr: &'tcx Expr<'tcx>) -> bool { 5 ( 0.00%) if let ExprKind::MethodCall(take_path, recv, [len_arg], _) = expr.kind 1 ( 0.00%) && take_path.ident.name == sym::take . // Check that take is applied to `repeat(0)` . && self.is_repeat_zero(recv) . { . if let InitializedSize::Initialized(size_expr) = self.vec_alloc.size_expr { . // Check that len expression is equals to `with_capacity` expression . return SpanlessEq::new(self.cx).eq_expr(SyntaxContext::root(), len_arg, size_expr) . || matches!(len_arg.kind, ExprKind::MethodCall(path, ..) if path.ident.name == sym::capacity); . } . . self.vec_alloc.size_expr = InitializedSize::Initialized(len_arg); . return true; . } . . false 6 ( 0.00%) } . . /// Returns `true` if given expression is `repeat(0)` . fn is_repeat_zero(&self, expr: &Expr<'_>) -> bool { . if let ExprKind::Call(fn_expr, [repeat_arg]) = expr.kind . && fn_expr.basic_res().is_diag_item(self.cx, sym::iter_repeat) . && is_integer_literal(repeat_arg, 0) . { . true . } else { . false . } . } . } . . impl<'tcx> Visitor<'tcx> for VectorInitializationVisitor<'_, 'tcx> { 368 ( 0.00%) fn visit_stmt(&mut self, stmt: &'tcx Stmt<'_>) { 92 ( 0.00%) if self.initialization_found { 16 ( 0.00%) match stmt.kind { 7 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => { . self.search_slow_extend_filling(expr); . self.search_slow_resize_filling(expr); . }, . _ => (), . } . 8 ( 0.00%) self.initialization_found = false; . } else { . walk_stmt(self, stmt); . } 208 ( 0.00%) } . . fn visit_block(&mut self, block: &'tcx Block<'_>) { 42 ( 0.00%) if self.initialization_found { . if let Some(s) = block.stmts.first() { . self.visit_stmt(s); . } . . self.initialization_found = false; . } else { . walk_block(self, block); . } . } . . fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { . // Skip all the expressions previous to the vector initialization 635 ( 0.00%) if self.vec_alloc.allocation_expr.hir_id == expr.hir_id { 8 ( 0.00%) self.initialization_found = true; . } . 568 ( 0.00%) walk_expr(self, expr); 10,685 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 (46x) . } . } 803 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub PARTIALEQ_TO_NONE, . style, . "Binary comparison to `Option::None` relies on `T: PartialEq`, which is unneeded" . } . . declare_lint_pass!(PartialeqToNone => [PARTIALEQ_TO_NONE]); . . impl<'tcx> LateLintPass<'tcx> for PartialeqToNone { 217,552 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . // Skip expanded code, as we have no control over it anyway... 54,388 ( 0.00%) if e.span.from_expansion() { . return; . } . . // If the expression is of type `Option` . let is_ty_option = |expr: &Expr<'_>| { . cx.typeck_results() . .expr_ty(expr) . .peel_refs() . .is_diag_item(cx, sym::Option) . }; . . // If the expression is a literal `Option::None` . let is_none_ctor = 1,092 ( 0.00%) |expr: &Expr<'_>| !expr.span.from_expansion() && is_none_expr(cx, peel_hir_expr_refs(expr).0); 5,326 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (156x) 780 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (156x) . 17,618 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 36,668 ( 0.00%) if let ExprKind::Binary(op, left_side, right_side) = e.kind { . // All other comparisons (e.g. `>= None`) have special meaning wrt T 948 ( 0.00%) let is_eq = match op.node { . BinOpKind::Eq => true, . BinOpKind::Ne => false, . _ => return, . }; . . // We are only interested in comparisons between `Option` and a literal `Option::None` 156 ( 0.00%) let scrutinee = match ( 156 ( 0.00%) is_none_ctor(left_side) && is_ty_option(right_side), 156 ( 0.00%) is_none_ctor(right_side) && is_ty_option(left_side), . ) { . (true, false) => right_side, . (false, true) => left_side, . _ => return, . }; . . // Peel away refs/derefs (as long as we don't cross manual deref impls), as . // autoref/autoderef will take care of those -- line 83 ---------------------------------------- -- line 97 ---------------------------------------- . "use `Option::is_none()` instead" . } else { . "use `Option::is_some()` instead" . }, . sugg, . applicability, . ); . } 217,552 ( 0.01%) } . } 93 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 22,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 6,384 ( 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, . ); . }, . ); . } 25,536 ( 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/cmp.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq<[U]> for [T] . where . T: [const] PartialEq, . { . #[inline] . fn eq(&self, other: &[U]) -> bool { . let len = self.len(); 7,211 ( 0.00%) if len == other.len() { . // SAFETY: Just checked that they're the same length, and the pointers . // come from references-to-slices so they're guaranteed readable. . unsafe { SlicePartialEq::equal_same_length(self.as_ptr(), other.as_ptr(), len) } . } else { . false . } . } . } -- line 29 ---------------------------------------- -- line 123 ---------------------------------------- . // The codegen backend can still inline it later if needed. . #[rustc_no_mir_inline] . default unsafe fn equal_same_length(lhs: *const Self, rhs: *const B, len: usize) -> bool { . // Implemented as explicit indexing rather . // than zipped iterators for performance reasons. . // See PR https://github.com/rust-lang/rust/pull/116846 . // FIXME(const_hack): make this a `for idx in 0..len` loop. . let mut idx = 0; 2 ( 0.00%) while idx < len { . // SAFETY: idx < len, so both are in-bounds and readable 6 ( 0.00%) if unsafe { *lhs.add(idx) != *rhs.add(idx) } { . return false; . } . idx += 1; . } . . true . } . } -- line 141 ---------------------------------------- -- line 149 ---------------------------------------- . { . #[inline] . unsafe fn equal_same_length(lhs: *const Self, rhs: *const B, len: usize) -> bool { . // SAFETY: by our precondition, `lhs` and `rhs` are guaranteed to be valid . // for reading `len` values, which also means the size is guaranteed . // not to overflow because it exists in memory; . unsafe { . let size = crate::intrinsics::unchecked_mul(len, Self::SIZE); 253,069 ( 0.01%) compare_bytes(lhs as _, rhs as _, size) == 0 6,418 ( 0.00%) => ???:0x0000000000173660 (282x) . } . } . } . . #[doc(hidden)] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . // intermediate trait for specialization of slice's PartialOrd . const trait SlicePartialOrd: Sized { -- line 165 ---------------------------------------- -- line 382 ---------------------------------------- . fn slice_contains(&self, x: &[Self]) -> bool; . } . . impl SliceContains for T . where . T: PartialEq, . { . default fn slice_contains(&self, x: &[Self]) -> bool { 8 ( 0.00%) x.iter().any(|y| *y == *self) . } . } . . impl SliceContains for T { . #[inline] . fn slice_contains(&self, x: &[Self]) -> bool { . // SAFETY: `UnsignedBytewiseOrd` guarantees that `Self` has the same . // layout as `u8` and is initialized, so both the value and slice can -- line 398 ---------------------------------------- -- line 429 ---------------------------------------- . // SIMD . let mut chunks = arr.chunks_exact(LANE_COUNT); . for chunk in &mut chunks { . if chunk.iter().fold(false, |acc, x| acc | (*x == *self)) { . return true; . } . } . // Scalar remainder 46 ( 0.00%) return chunks.remainder().iter().any(|x| *x == *self); . } . } . )* . }; . } . . impl_slice_contains!(u16, u32, u64, i16, i32, i64, f32, f64, usize, isize, char); 32,722 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs -------------------------------------------------------------------------------- Ir -- line 61 ---------------------------------------- . pub struct Map { . // Used for `SplitWhitespace` and `SplitAsciiWhitespace` `as_str` methods . pub(crate) iter: I, . f: F, . } . . impl Map { . pub(in crate::iter) const fn new(iter: I, f: F) -> Map { 69,834 ( 0.00%) Map { iter, f } . } . . pub(crate) fn into_inner(self) -> I { . self.iter . } . } . . #[stable(feature = "core_impl_debug", since = "1.9.0")] -- line 77 ---------------------------------------- -- line 80 ---------------------------------------- . f.debug_struct("Map").field("iter", &self.iter).finish() . } . } . . fn map_fold( . mut f: impl FnMut(T) -> B, . mut g: impl FnMut(Acc, B) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { 1,612 ( 0.00%) move |acc, elt| g(acc, f(elt)) . } . . fn map_try_fold<'a, T, B, Acc, R>( . f: &'a mut impl FnMut(T) -> B, . mut g: impl FnMut(Acc, B) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { 7,983 ( 0.00%) move |acc, elt| g(acc, f(elt)) . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Map . where . F: FnMut(I::Item) -> B, . { . type Item = B; . . #[inline] 2,037 ( 0.00%) fn next(&mut self) -> Option { 43,433 ( 0.00%) self.iter.next().map(&mut self.f) 578,660 ( 0.03%) => ???:::next (7,679x) 1,734 ( 0.00%) } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.iter.size_hint() . } . 272,579 ( 0.02%) fn try_fold(&mut self, init: Acc, g: G) -> R . where . Self: Sized, . G: FnMut(Acc, Self::Item) -> R, . R: Try, . { 26 ( 0.00%) self.iter.try_fold(init, map_try_fold(&mut self.f, g)) 3,222 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, rustc_middle::ty::assoc::AssocItem)>, , rustc_middle::ty::assoc::AssocItem>>::iter::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::adapters::map::map_try_fold<(&core::option::Option, &rustc_middle::ty::assoc::AssocItem), &rustc_middle::ty::assoc::AssocItem, (), core::ops::control_flow::ControlFlow<()>, ::in_definition_order::{closure#0}, core::iter::traits::iterator::Iterator::any::check<&rustc_middle::ty::assoc::AssocItem, clippy_lints::needless_borrows_for_generic_args::has_ref_mut_self_method::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<()>> (6x) 217,918 ( 0.01%) } . 35,283 ( 0.00%) fn fold(self, init: Acc, g: G) -> Acc . where . G: FnMut(Acc, Self::Item) -> Acc, . { 80 ( 0.00%) self.iter.fold(init, map_fold(self.f, g)) 31,804 ( 0.00%) } . . #[inline] . unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> B . where . Self: TrustedRandomAccessNoCoerce, . { . // SAFETY: the caller must uphold the contract for . // `Iterator::__iterator_get_unchecked`. -- line 137 ---------------------------------------- 19,832 ( 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/char/mod.rs -------------------------------------------------------------------------------- Ir -- line 386 ---------------------------------------- . fn next(&mut self) -> Option { . self.0.next() . } . . fn size_hint(&self) -> (usize, Option) { . self.0.size_hint() . } . 5,418 ( 0.00%) fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { . self.0.fold(init, fold) 6,192 ( 0.00%) } . . 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(); 5,418 ( 0.00%) 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 . } . } 2,322 ( 0.00%) CaseMappingIter(iter) . } . } . . impl Iterator for CaseMappingIter { . type Item = char; . . fn next(&mut self) -> Option { . self.0.next() -- line 561 ---------------------------------------- 1,141 ( 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 86 ---------------------------------------- . } . . /// A "Path" is essentially Rust's notion of a name. . /// . /// It's represented as a sequence of identifiers, . /// along with a bunch of supporting information. . /// . /// E.g., `std::cmp::PartialEq`. 2,432 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct Path { . pub span: Span, . /// The segments in the path: the things separated by `::`. . /// Global paths begin with `kw::PathRoot`. . pub segments: ThinVec, . } . . // Succeeds if the path has a single segment that is arg-free and matches the given symbol. . impl PartialEq for Path { . #[inline] . fn eq(&self, name: &Symbol) -> bool { 328 ( 0.00%) if let [segment] = self.segments.as_ref() . && segment == name . { . true . } else { . false . } . } . } -- line 114 ---------------------------------------- -- line 203 ---------------------------------------- . s.push_str(&ident.to_string()); . } . s . } . . /// A segment of a path: an identifier, an optional lifetime, and a set of types. . /// . /// E.g., `std`, `String` or `Box`. 14 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct PathSegment { . /// The identifier portion of this path segment. . pub ident: Ident, . . pub id: NodeId, . . /// Type/lifetime parameters attached to this path. They come in . /// two flavors: `Path` and `Path(A,B) -> C`. -- line 219 ---------------------------------------- -- line 223 ---------------------------------------- . /// `Box` is used as a size optimization for the common case with no parameters. . pub args: Option>, . } . . // Succeeds if the path segment is arg-free and matches the given symbol. . impl PartialEq for PathSegment { . #[inline] . fn eq(&self, name: &Symbol) -> bool { 82 ( 0.00%) self.args.is_none() && self.ident.name == *name . } . } . . impl PathSegment { . pub fn from_ident(ident: Ident) -> Self { . PathSegment { ident, id: DUMMY_NODE_ID, args: None } . } . -- line 239 ---------------------------------------- -- line 247 ---------------------------------------- . None => self.ident.span, . } . } . } . . /// The generic arguments and associated item constraints of a path segment. . /// . /// E.g., `` as in `Foo` or `(A, B)` as in `Foo(A, B)`. 2,208 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum GenericArgs { . /// The `<'a, A, B, C>` in `foo::bar::baz::<'a, A, B, C>`. . AngleBracketed(AngleBracketedArgs), . /// The `(A, B)` and `C` in `Foo(A, B) -> C`. . Parenthesized(ParenthesizedArgs), . /// `(..)` in return type notation. . ParenthesizedElided(Span), . } -- line 263 ---------------------------------------- -- line 272 ---------------------------------------- . AngleBracketed(data) => data.span, . Parenthesized(data) => data.span, . ParenthesizedElided(span) => *span, . } . } . } . . /// Concrete argument in the sequence of generic args. 492 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum GenericArg { . /// `'a` in `Foo<'a>`. . Lifetime(#[visitable(extra = LifetimeCtxt::GenericArg)] Lifetime), . /// `Bar` in `Foo`. . Type(Box), . /// `1` in `Foo<1>`. . Const(AnonConst), . } -- line 288 ---------------------------------------- -- line 302 ---------------------------------------- . pub struct AngleBracketedArgs { . /// The overall span. . pub span: Span, . /// The comma separated parts in the `<...>`. . pub args: ThinVec, . } . . /// Either an argument for a generic parameter or a constraint on an associated item. 588 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 4,271 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_ref (90x) . pub enum AngleBracketedArg { . /// A generic argument for a generic parameter. . Arg(GenericArg), . /// A constraint on an associated item. . Constraint(AssocItemConstraint), . } . . impl AngleBracketedArg { -- line 318 ---------------------------------------- -- line 393 ---------------------------------------- . Trait(PolyTraitRef), . Outlives(#[visitable(extra = LifetimeCtxt::Bound)] Lifetime), . /// Precise capturing syntax: `impl Sized + use<'a>` . Use(ThinVec, Span), . } . . impl GenericBound { . pub fn span(&self) -> Span { 417 ( 0.00%) match self { . GenericBound::Trait(t, ..) => t.span, . GenericBound::Outlives(l) => l.ident.span, . GenericBound::Use(_, span) => *span, . } . } . } . . pub type GenericBounds = ThinVec; -- line 409 ---------------------------------------- -- line 616 ---------------------------------------- . /// Distinguishes between `unsafe { ... }` and `{ ... }`. . pub rules: BlockCheckMode, . pub span: Span, . } . . /// A match pattern. . /// . /// Patterns appear in match statements and some other contexts, such as `let` and `if let`. 77,774 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 255,487 ( 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:::clone (699x) . pub struct Pat { 3 ( 0.00%) pub id: NodeId, 6 ( 0.00%) pub kind: PatKind, 1,115 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::clone'2 (1x) . pub span: Span, . } . . impl Pat { . /// Attempt reparsing the pattern as a type. . /// This is intended for use by diagnostics. . pub fn to_ty(&self) -> Option> { . let kind = match &self.kind { -- line 635 ---------------------------------------- -- line 712 ---------------------------------------- . while let PatKind::Ref(inner, _, _) = ¤t.kind { . current = inner; . } . current . } . . /// Is this a `..` pattern? . pub fn is_rest(&self) -> bool { 1,014 ( 0.00%) matches!(self.kind, PatKind::Rest) . } . . /// Whether this could be a never pattern, taking into account that a macro invocation can . /// return a never pattern. Used to inform errors during parsing. . pub fn could_be_never_pattern(&self) -> bool { . let mut could_be_never_pattern = false; . self.walk(&mut |pat| match &pat.kind { . PatKind::Never | PatKind::MacCall(_) => { -- line 728 ---------------------------------------- -- line 771 ---------------------------------------- . } . } . . /// A single field in a struct pattern. . /// . /// Patterns like the fields of `Foo { x, ref y, ref mut z }` . /// are treated the same as `x: x, y: ref y, z: ref mut z`, . /// except when `is_shorthand` is true. 102 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct PatField { . /// The identifier for the field. . pub ident: Ident, . /// The pattern the field is destructured to. . pub pat: Box, . pub is_shorthand: bool, . pub attrs: AttrVec, . pub id: NodeId, . pub span: Span, . pub is_placeholder: bool, . } . 274 ( 0.00%) #[derive(Clone, Copy, Debug, Eq, PartialEq)] . #[derive(Encodable, Decodable, StableHash, Walkable)] . pub enum ByRef { . Yes(Pinnedness, Mutability), . No, . } . . impl ByRef { . #[must_use] -- line 800 ---------------------------------------- -- line 863 ---------------------------------------- . DotDotDot, . /// `..=` . DotDotEq, . } . . /// All the different flavors of pattern that Rust recognizes. . // . // Adding a new variant? Please update `test_pat` in `tests/ui/macros/stringify.rs`. 68,752 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 1,329 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat'2 (1x) . pub enum PatKind { . /// A missing pattern, e.g. for an anonymous param in a bare fn like `fn f(u32)`. . Missing, . . /// Represents a wildcard pattern (`_`). . Wild, . . /// A `PatKind::Ident` may either be a new bound variable (`ref mut binding @ OPT_SUBPATTERN`), . /// or a unit struct/variant pattern, or a const pattern (in the last two cases the third . /// field must be `None`). Disambiguation cannot be done with parser alone, so it happens . /// during name resolution. 2 ( 0.00%) Ident(BindingMode, Ident, Option>), . . /// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`). 1 ( 0.00%) Struct(Option>, Path, ThinVec, PatFieldsRest), . . /// A tuple struct/variant pattern (`Variant(x, y, .., z)`). 547 ( 0.00%) TupleStruct(Option>, Path, ThinVec), . . /// An or-pattern `A | B | C`. . /// Invariant: `pats.len() >= 2`. . Or(ThinVec), . . /// A possibly qualified path pattern. . /// Unqualified path patterns `A::B::C` can legally refer to variants, structs, constants . /// or associated constants. Qualified path patterns `::B::C`/`::B::C` can -- line 897 ---------------------------------------- -- line 945 ---------------------------------------- . /// A macro pattern; pre-expansion. . MacCall(Box), . . /// Placeholder for a pattern that wasn't syntactically well formed in some way. . Err(ErrorGuaranteed), . } . . /// Whether the `..` is present in a struct fields pattern. 4 ( 0.00%) #[derive(Clone, Copy, Encodable, Decodable, Debug, PartialEq, Walkable)] . pub enum PatFieldsRest { . /// `module::StructName { field, ..}` . Rest(Span), . /// `module::StructName { field, syntax error }` . Recovered(ErrorGuaranteed), . /// `module::StructName { field }` . None, . } . . /// The kind of borrow in an `AddrOf` expression, . /// e.g., `&place` or `&raw const place`. 80 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Debug)] . #[derive(Encodable, Decodable, StableHash, Walkable)] . pub enum BorrowKind { . /// A normal borrow, `&$expr` or `&mut $expr`. . /// The resulting type is either `&'a T` or `&'a mut T` . /// where `T = typeof($expr)` and `'a` is some lifetime. . Ref, . /// A raw borrow, `&raw const $expr` or `&raw mut $expr`. . /// The resulting type is either `*const T` or `*mut T` -- line 973 ---------------------------------------- -- line 974 ---------------------------------------- . /// where `T = typeof($expr)`. . Raw, . /// A pinned borrow, `&pin const $expr` or `&pin mut $expr`. . /// The resulting type is either `Pin<&'a T>` or `Pin<&'a mut T>` . /// where `T = typeof($expr)` and `'a` is some lifetime. . Pin, . } . 6,690 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, StableHash, Walkable)] . pub enum BinOpKind { . /// The `+` operator (addition) . Add, . /// The `-` operator (subtraction) . Sub, . /// The `*` operator (multiplication) . Mul, . /// The `/` operator (division) -- line 990 ---------------------------------------- -- line 1017 ---------------------------------------- . Ge, . /// The `>` operator (greater than) . Gt, . } . . impl BinOpKind { . pub fn as_str(&self) -> &'static str { . use BinOpKind::*; 188 ( 0.00%) match self { . Add => "+", . Sub => "-", . Mul => "*", . Div => "/", . Rem => "%", . And => "&&", . Or => "||", . BitXor => "^", -- line 1033 ---------------------------------------- -- line 1070 ---------------------------------------- . Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => { . Fixity::Left . } . } . } . . pub fn is_comparison(self) -> bool { . use BinOpKind::*; 2,244 ( 0.00%) match self { . Eq | Ne | Lt | Le | Gt | Ge => true, . Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => false, . } . } . . /// Returns `true` if the binary operator takes its arguments by value. . pub fn is_by_value(self) -> bool { . !self.is_comparison() -- line 1086 ---------------------------------------- -- line 1089 ---------------------------------------- . . pub type BinOp = Spanned; . . // Sometimes `BinOpKind` and `AssignOpKind` need the same treatment. The . // operations covered by `AssignOpKind` are a subset of those covered by . // `BinOpKind`, so it makes sense to convert `AssignOpKind` to `BinOpKind`. . impl From for BinOpKind { . fn from(op: AssignOpKind) -> BinOpKind { 34 ( 0.00%) match op { . AssignOpKind::AddAssign => BinOpKind::Add, . AssignOpKind::SubAssign => BinOpKind::Sub, . AssignOpKind::MulAssign => BinOpKind::Mul, . AssignOpKind::DivAssign => BinOpKind::Div, . AssignOpKind::RemAssign => BinOpKind::Rem, . AssignOpKind::BitXorAssign => BinOpKind::BitXor, . AssignOpKind::BitAndAssign => BinOpKind::BitAnd, . AssignOpKind::BitOrAssign => BinOpKind::BitOr, . AssignOpKind::ShlAssign => BinOpKind::Shl, . AssignOpKind::ShrAssign => BinOpKind::Shr, . } . } . } . 7 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, StableHash, Walkable)] . pub enum AssignOpKind { . /// The `+=` operator (addition) . AddAssign, . /// The `-=` operator (subtraction) . SubAssign, . /// The `*=` operator (multiplication) . MulAssign, . /// The `/=` operator (division) -- line 1120 ---------------------------------------- -- line 1156 ---------------------------------------- . } . } . . pub type AssignOp = Spanned; . . /// Unary operator. . /// . /// Note that `&data` is not an operator, it's an `AddrOf` expression. 461 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, StableHash, Walkable)] . pub enum UnOp { . /// The `*` operator for dereferencing . Deref, . /// The `!` operator for logical inversion . Not, . /// The `-` operator for negation . Neg, . } -- line 1172 ---------------------------------------- -- line 1318 ---------------------------------------- . pub fn init(&self) -> Option<&Expr> { . match self { . Self::Decl => None, . Self::Init(i) | Self::InitElse(i, _) => Some(i), . } . } . . pub fn init_else_opt(&self) -> Option<(&Expr, Option<&Block>)> { 3,196 ( 0.00%) match self { . Self::Decl => None, 623 ( 0.00%) Self::Init(init) => Some((init, None)), . Self::InitElse(init, els) => Some((init, Some(els))), . } . } . } . . /// An arm of a 'match'. . /// . /// E.g., `0..=10 => { println!("match!") }` as in -- line 1336 ---------------------------------------- -- line 1388 ---------------------------------------- . /// explicit discriminant values for enum variants. . #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct AnonConst { . pub id: NodeId, . pub value: Box, . } . . /// An expression. 1,200 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug)] . pub struct Expr { 48 ( 0.00%) pub id: NodeId, . pub kind: ExprKind, . pub span: Span, . pub attrs: AttrVec, . pub tokens: Option, . } . . impl Expr { . /// Check if this expression is potentially a trivial const arg, i.e., one that can _potentially_ -- line 1406 ---------------------------------------- -- line 1474 ---------------------------------------- . Parens::No, . ))), . _ => None, . } . } . . pub fn peel_parens(&self) -> &Expr { . let mut expr = self; 24 ( 0.00%) while let ExprKind::Paren(inner) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_parens_and_refs(&self) -> &Expr { . let mut expr = self; . while let ExprKind::Paren(inner) | ExprKind::AddrOf(BorrowKind::Ref, _, inner) = &expr.kind -- line 1490 ---------------------------------------- -- line 1712 ---------------------------------------- . pub receiver: Box, . /// The arguments, e.g. `a, b, c`. . pub args: ThinVec>, . /// The span of the function, without the dot and receiver e.g. `foo::(a, b, c)`. . pub span: Span, . } . 1,188 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum StructRest { . /// `..x`. . Base(Box), . /// `..`. . Rest(Span), . /// No trailing `..` or expression. . None, . /// No trailing `..` or expression, and also, a parse error occurred inside the struct braces. -- line 1728 ---------------------------------------- -- line 1737 ---------------------------------------- . pub struct StructExpr { . pub qself: Option>, . pub path: Path, . pub fields: ThinVec, . pub rest: StructRest, . } . . // Adding a new variant? Please update `test_expr` in `tests/ui/macros/stringify.rs`. 458 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug)] . pub enum ExprKind { . /// An array (e.g, `[a, b, c, d]`). . Array(ThinVec>), . /// Allow anonymous constants from an inline `const` block. . ConstBlock(AnonConst), . /// A function call. . /// . /// The first field resolves to the function itself, . /// and the second field is the list of arguments. . /// This also represents calling the constructor of . /// tuple-like ADTs such as tuple structs and enum variants. 55 ( 0.00%) Call(Box, ThinVec>), 2,563 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (11x) . /// A method call (e.g., `x.foo::(a, b, c)`). . MethodCall(Box), . /// A tuple (e.g., `(a, b, c, d)`). . Tup(ThinVec>), . /// A binary operation (e.g., `a + b`, `a * b`). . Binary(BinOp, Box, Box), . /// A unary operation (e.g., `!x`, `*x`). . Unary(UnOp, Box), -- line 1765 ---------------------------------------- -- line 1829 ---------------------------------------- . /// An assignment (`a = foo()`). . /// The `Span` argument is the span of the `=` token. . Assign(Box, Box, Span), . /// An assignment with an operator. . /// . /// E.g., `a += 1`. . AssignOp(AssignOp, Box, Box), . /// Access of a named (e.g., `obj.foo`) or unnamed (e.g., `obj.0`) struct field. 2 ( 0.00%) Field(Box, Ident), 209 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (1x) . /// An indexing operation (e.g., `foo[2]`). . /// The span represents the span of the `[2]`, including brackets. 21 ( 0.00%) Index(Box, Box, Span), 948 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (6x) . /// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`; and `..` in destructuring assignment). . Range(Option>, Option>, RangeLimits), . /// An underscore, used in destructuring assignment to ignore a value. . Underscore, . . /// Variable reference, possibly containing `::` and/or type . /// parameters (e.g., `foo::bar::`). . /// . /// Optionally "qualified" (e.g., ` as SomeTrait>::SomeType`). 30 ( 0.00%) Path(Option>, Path), . . /// A referencing operation (`&a`, `&mut a`, `&raw const a` or `&raw mut a`). . AddrOf(BorrowKind, Mutability, Box), . /// A `break`, with an optional label to break, and an optional expression. . Break(Option

{ . 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()); 371 ( 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),* $(,)?)) => { 14,687,479 ( 0.83%) if $self.$field.active { 12,031,843 ( 0.68%) rustc_lint::LateLintPass::$name(&mut $self.$field.pass, $($arg),*); 467,309 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_trait_item (22x) 42,684 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::check_trait_item (22x) 18,166 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_trait_item (22x) 16,413 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_trait_item (22x) 3,930 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_trait_item (22x) 550 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_trait_item (22x) . } . }; . } . . /// Forward one `check_*` method to every field of the combined pass. . #[macro_export] . macro_rules! expand_combined_late_lint_pass_method { . ([$($field:ident),*], $self:ident, $name:ident, $args:tt) => ({ -- line 48 ---------------------------------------- -- line 50 ---------------------------------------- . }) . } . . /// Generate the combined `LateLintPass` impl's `check_*` methods, one per method . /// in rustc's late-pass method list. . #[macro_export] . macro_rules! expand_combined_late_lint_pass_methods { . ($fields:tt, [$($(#[$attr:meta])* fn $name:ident($($param:ident: $arg:ty),*);)*]) => ( 1,410,491 ( 0.08%) $(#[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),*)); 822,735 ( 0.05%) })* . ) . } . . /// 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); . } . }; . } 210,414 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/question_mark.rs -------------------------------------------------------------------------------- Ir -- line 130 ---------------------------------------- . fn init_expr_can_use_question_mark(cx: &LateContext<'_>, init_expr: &Expr<'_>) -> bool { . let init_ty = cx.typeck_results().expr_ty_adjusted(init_expr); . cx.tcx . .lang_items() . .try_trait() . .is_some_and(|did| implements_trait(cx, init_ty, did, &[])) . } . 1,385 ( 0.00%) if let StmtKind::Let(LetStmt { . pat, . init: Some(init_expr), . els: Some(els), . .. 2,797 ( 0.00%) }) = stmt.kind . && init_expr_can_use_question_mark(cx, init_expr) . && let Some(ret) = find_let_else_ret_expression(els) . && let Some(inner_pat) = pat_and_expr_can_be_question_mark(cx, pat, ret) . && !span_contains_comment(cx, els.span) . && !span_contains_cfg(cx, els.span) . { . let mut applicability = Applicability::MaybeIncorrect; . let init_expr_str = -- line 151 ---------------------------------------- -- line 198 ---------------------------------------- . "this `let...else` may be rewritten with the `?` operator", . "replace it with", . sugg, . applicability, . ); . } . } . 1,072 ( 0.00%) fn is_early_return(smbl: Symbol, cx: &LateContext<'_>, if_block: &IfBlockType<'_>) -> bool { 402 ( 0.00%) match *if_block { 76 ( 0.00%) IfBlockType::IfIs(caller, caller_ty, call_sym, if_then) => { . // If the block could be identified as `if x.is_none()/is_err()`, . // we then only need to check the if_then return to see if it is none/err. 124 ( 0.00%) caller_ty.is_diag_item(cx, smbl) 72 ( 0.00%) && expr_return_none_or_err(smbl, cx, if_then, caller, None) 587 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (9x) . && match smbl { 4 ( 0.00%) sym::Option => call_sym == sym::is_none, . sym::Result => call_sym == sym::is_err, . _ => false, . } . }, 58 ( 0.00%) IfBlockType::IfLet(res, let_expr_ty, let_pat_sym, let_expr, if_then, if_else) => { 40 ( 0.00%) let_expr_ty.is_diag_item(cx, smbl) . && match smbl { 24 ( 0.00%) sym::Option => { . // We only need to check `if let Some(x) = option` not `if let None = option`, . // because the later one will be suggested as `if option.is_none()` thus causing conflict. 13 ( 0.00%) res.ctor_parent(cx).is_lang_item(cx, OptionSome) 12 ( 0.00%) && if_else.is_some_and(|inner| expr_return_none_or_err(smbl, cx, inner, let_expr, None)) 103 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (2x) . }, . sym::Result => { 10 ( 0.00%) (res.ctor_parent(cx).is_lang_item(cx, ResultOk) 4 ( 0.00%) && if_else.is_some_and(|inner| { 16 ( 0.00%) expr_return_none_or_err(smbl, cx, inner, let_expr, Some(let_pat_sym)) 46 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (2x) . })) 2 ( 0.00%) || res.ctor_parent(cx).is_lang_item(cx, ResultErr) . && expr_return_none_or_err(smbl, cx, if_then, let_expr, Some(let_pat_sym)) . && if_else.is_none() . }, . _ => false, . } . }, . } 1,072 ( 0.00%) } . 52 ( 0.00%) fn expr_return_none_or_err( . smbl: Symbol, . cx: &LateContext<'_>, . expr: &Expr<'_>, . cond_expr: &Expr<'_>, . err_sym: Option, . ) -> bool { 92 ( 0.00%) match peel_blocks_with_stmt(expr).kind { . ExprKind::Ret(Some(ret_expr)) => expr_return_none_or_err(smbl, cx, ret_expr, cond_expr, err_sym), 1 ( 0.00%) ExprKind::Path(ref qpath) => match smbl { 2 ( 0.00%) sym::Option => cx 6 ( 0.00%) .qpath_res(qpath, expr.hir_id) 23 ( 0.00%) => ???:::qpath_res (1x) 1 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, OptionNone), . sym::Result => expr.res_local_id().is_some() && expr.res_local_id() == cond_expr.res_local_id(), . _ => false, . }, 8 ( 0.00%) ExprKind::Call(call_expr, [arg]) => { 4 ( 0.00%) if smbl == sym::Result . && let ExprKind::Path(QPath::Resolved(_, path)) = &call_expr.kind . && let Some(segment) = path.segments.first() . && let Some(err_sym) = err_sym . && let ExprKind::Path(QPath::Resolved(_, arg_path)) = &arg.kind . && let Some(PathSegment { ident, .. }) = arg_path.segments.first() . { . return segment.ident.name == sym::Err && err_sym == ident.name; . } . false . }, . _ => false, . } 65 ( 0.00%) } . . /// Checks if the given expression on the given context matches the following structure: . /// . /// ```ignore . /// if option.is_none() { . /// return None; . /// } . /// ``` -- line 282 ---------------------------------------- -- line 285 ---------------------------------------- . /// if result.is_err() { . /// return result; . /// } . /// ``` . /// . /// If it matches, it will suggest to use the `?` operator instead . fn check_is_none_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . if let Some(higher::If { cond, then, r#else }) = higher::If::hir(expr) 2,214 ( 0.00%) && !is_else_clause(cx.tcx, expr) 60,531 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (369x) 758 ( 0.00%) && let ExprKind::MethodCall(segment, caller, [], _) = &cond.kind 76 ( 0.00%) && let caller_ty = cx.typeck_results().expr_ty(caller) 1,520 ( 0.00%) => ???:::expr_ty (38x) 380 ( 0.00%) && let if_block = IfBlockType::IfIs(caller, caller_ty, segment.ident.name, then) 380 ( 0.00%) && (is_early_return(sym::Option, cx, &if_block) || is_early_return(sym::Result, cx, &if_block)) 7,417 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (76x) . { . let mut applicability = Applicability::MachineApplicable; . let receiver_str = snippet_with_context(cx, caller.span, expr.span.ctxt(), "..", &mut applicability).0; . let by_ref = !cx.type_is_copy_modulo_regions(caller_ty) . && !matches!(caller.kind, ExprKind::Call(..) | ExprKind::MethodCall(..)); . let sugg = if let Some(else_inner) = r#else { . if eq_expr_value(cx, expr.span.ctxt(), caller, peel_blocks(else_inner)) { . format!("Some({receiver_str}?)") -- line 305 ---------------------------------------- -- line 324 ---------------------------------------- . . #[derive(Clone, Copy, Debug)] . enum TryMode { . Result, . Option, . } . . fn find_try_mode<'tcx>(cx: &LateContext<'tcx>, scrutinee: &Expr<'tcx>) -> Option { 237 ( 0.00%) let scrutinee_ty = cx.typeck_results().expr_ty_adjusted(scrutinee).peel_refs(); 5,478 ( 0.00%) => ???:::expr_ty_adjusted (79x) . let ty::Adt(scrutinee_adt_def, _) = scrutinee_ty.kind() else { . return None; . }; . 219 ( 0.00%) match cx.tcx.get_diagnostic_name(scrutinee_adt_def.did())? { 4,923 ( 0.00%) => ???:::get_diagnostic_name (73x) 187 ( 0.00%) sym::Result => Some(TryMode::Result), . sym::Option => Some(TryMode::Option), . _ => None, . } . } . . // Check that `pat` is `{ctor_lang_item}(val)`, returning `val`. 18 ( 0.00%) fn extract_ctor_call<'a, 'tcx>( . cx: &LateContext<'tcx>, . expected_ctor: LangItem, . pat: &'a Pat<'tcx>, . ) -> Option<&'a Pat<'tcx>> { 76 ( 0.00%) if let PatKind::TupleStruct(variant_path, [val_binding], _) = &pat.kind 20 ( 0.00%) && cx 60 ( 0.00%) .qpath_res(variant_path, pat.hir_id) 230 ( 0.00%) => ???:::qpath_res (10x) 10 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, expected_ctor) . { . Some(val_binding) . } else { . None . } 18 ( 0.00%) } . . // Extracts the local ID of a plain `val` pattern. . fn extract_binding_pat(pat: &Pat<'_>) -> Option { 4 ( 0.00%) if let PatKind::Binding(_, binding, _, None) = pat.kind { . Some(binding) . } else { . None . } . } . . fn check_arm_is_some_or_ok<'tcx>( . cx: &LateContext<'tcx>, -- line 372 ---------------------------------------- -- line 391 ---------------------------------------- . IfLetOrMatchThen::ManualUnwrap(val_binding.span, arm.body) . }); . } . . None . } . . fn check_arm_is_none_or_err<'tcx>(cx: &LateContext<'tcx>, mode: TryMode, arm: &Arm<'tcx>) -> bool { 54 ( 0.00%) if arm.guard.is_some() { . return false; . } . 106 ( 0.00%) let arm_body = peel_blocks(arm.body); 106 ( 0.00%) match mode { . TryMode::Result => { . // Check that pat is Err(val) 72 ( 0.00%) if let Some(ok_pat) = extract_ctor_call(cx, ResultErr, arm.pat) 2,202 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::extract_ctor_call (18x) . && let Some(ok_val) = extract_binding_pat(ok_pat) . // check `=> return Err(...)` 2 ( 0.00%) && let ExprKind::Ret(Some(wrapped_ret_expr)) = arm_body.kind . && let ExprKind::Call(ok_ctor, [ret_expr]) = wrapped_ret_expr.kind . && ok_ctor.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . // check if `...` is `val` from binding or `val.into()` . && is_local_or_local_into(cx, ret_expr, ok_val) . { . true . } else { . false . } . }, . TryMode::Option => { . // Check the pat is `None` 140 ( 0.00%) if is_none_pattern(cx, arm.pat) 3,608 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (35x) . // Check `=> return None` 37 ( 0.00%) && let ExprKind::Ret(Some(ret_expr)) = arm_body.kind 5 ( 0.00%) && is_none_expr(cx, ret_expr) 22 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (1x) . && !ret_expr.span.from_expansion() . { . true . } else { . false . } . }, . } 54 ( 0.00%) } . . /// Check if `expr` is `val` or `val.into()` . fn is_local_or_local_into(cx: &LateContext<'_>, expr: &Expr<'_>, val: HirId) -> bool { . let is_into_call = fn_def_id_with_node_args(cx, expr) . .and_then(|(fn_def_id, _)| cx.tcx.trait_of_assoc(fn_def_id)) . .is_some_and(|trait_def_id| cx.tcx.is_diagnostic_item(sym::Into, trait_def_id)); . match expr.kind { . ExprKind::MethodCall(_, recv, [], _) | ExprKind::Call(_, [recv]) => { . is_into_call && recv.res_local_id() == Some(val) . }, . _ => expr.res_local_id() == Some(val), . } . } . 270 ( 0.00%) fn check_arms_are_try<'tcx>( . cx: &LateContext<'tcx>, . mode: TryMode, . arm1: &Arm<'tcx>, . arm2: &Arm<'tcx>, . ) -> Option> { 108 ( 0.00%) (check_arm_is_none_or_err(cx, mode, arm2).then(|| check_arm_is_some_or_ok(cx, mode, arm1))) 4,717 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::question_mark::check_arm_is_none_or_err (27x) 108 ( 0.00%) .or_else(|| check_arm_is_none_or_err(cx, mode, arm1).then(|| check_arm_is_some_or_ok(cx, mode, arm2))) 2,837 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::question_mark::check_arm_is_none_or_err (27x) . .flatten() 162 ( 0.00%) } . . #[derive(Debug)] . enum IfLetOrMatchThen<'tcx> { . /// Return the binding from an if let or match arm as is. . DirectReturn, . /// Working on the binding from an if let or match arm as if it comes from a `?`. . ManualUnwrap(Span, &'tcx Expr<'tcx>), . } . 9,192 ( 0.00%) fn check_if_try_match<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 6,300 ( 0.00%) if let ExprKind::Match(scrutinee, [arm1, arm2], MatchSource::Normal | MatchSource::Postfix) = expr.kind 212 ( 0.00%) && !expr.span.from_expansion() 158 ( 0.00%) && let Some(mode) = find_try_mode(cx, scrutinee) 168 ( 0.00%) && !span_contains_cfg(cx, expr.span) 26,227 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (28x) 135 ( 0.00%) && let Some(if_let_or_match_then) = check_arms_are_try(cx, mode, arm1, arm2) 8,337 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_arms_are_try (27x) . { . span_lint_and_then( . cx, . QUESTION_MARK, . expr.span, . "this `match` expression can be replaced with `?`", . |diag| { . let mut applicability = Applicability::MachineApplicable; -- line 482 ---------------------------------------- -- line 509 ---------------------------------------- . ); . } . diag.span_suggestion(expr.span, "try instead", sugg, applicability); . }, . } . }, . ); . } 9,192 ( 0.00%) } . . fn check_if_let_some_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 1,198 ( 0.00%) if let Some(higher::IfLet { . let_pat, . let_expr, . if_then, . if_else, . .. 5,990 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 24,229 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (1,198x) 274 ( 0.00%) && let PatKind::TupleStruct(ref path1, [field], ddpos) = let_pat.kind . && ddpos.as_opt_usize().is_none() 329 ( 0.00%) && let PatKind::Binding(BindingMode(by_ref, _), bind_id, ident, None) = field.kind 87 ( 0.00%) && let caller_ty = cx.typeck_results().expr_ty(let_expr) 1,160 ( 0.00%) => ???:::expr_ty (29x) 406 ( 0.00%) && let if_block = IfBlockType::IfLet( 232 ( 0.00%) cx.qpath_res(path1, let_pat.hir_id), 667 ( 0.00%) => ???:::qpath_res (29x) . caller_ty, . ident.name, . let_expr, . if_then, . if_else, . ) 145 ( 0.00%) && let is_option_early_return = is_early_return(sym::Option, cx, &if_block) 2,734 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (29x) 203 ( 0.00%) && (is_option_early_return || is_early_return(sym::Result, cx, &if_block)) 2,481 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (29x) . && if_else . .map(|e| eq_expr_value(cx, expr.span.ctxt(), let_expr, peel_blocks(e))) . .is_none_or(|e| !e) . { . if !is_copy(cx, caller_ty) . && let Some(hir_id) = let_expr.res_local_id() . && local_used_after_expr(cx, hir_id, expr) . { -- line 548 ---------------------------------------- -- line 602 ---------------------------------------- . . impl QuestionMark { . fn inside_try_block(&self) -> bool { . self.try_block_depth_stack.last() > Some(&0) . } . } . . fn is_try_block(cx: &LateContext<'_>, bl: &Block<'_>) -> bool { 11,360 ( 0.00%) if let Some(expr) = bl.expr 12,200 ( 0.00%) && let ExprKind::Call(callee, [_]) = expr.kind 6,524 ( 0.00%) && let ExprKind::Path(qpath) = callee.kind 1,864 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromOutput) 52,128 ( 0.00%) => ???:::qpath_is_lang_item (466x) . { . true . } else { . false . } . } . . fn is_inferred_ret_closure(expr: &Expr<'_>) -> bool { 187,072 ( 0.01%) let ExprKind::Closure(closure) = expr.kind else { . return false; . }; . 510 ( 0.00%) match closure.fn_decl.output { . FnRetTy::Return(ret_ty) => ret_ty.is_suggestable_infer_ty(), . FnRetTy::DefaultReturn(_) => true, . } . } . . impl<'tcx> LateLintPass<'tcx> for QuestionMark { 14,385 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . // Cheap `let` check before the costlier lint level and const context queries. 4,110 ( 0.00%) if !matches!(stmt.kind, StmtKind::Let(..)) { . return; . } . 10,590 ( 0.00%) if !is_lint_allowed(cx, QUESTION_MARK_USED, stmt.hir_id) || !self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 642,742 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (706x) 19,062 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (706x) . { . return; . } . 4,942 ( 0.00%) if !self.inside_try_block() && !is_in_const_context(cx) { 231,896 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (706x) . check_let_some_else_return_none(cx, stmt); . } . self.check_manual_let_else(cx, stmt); 16,440 ( 0.00%) } . 271,940 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 81,582 ( 0.00%) if is_inferred_ret_closure(expr) { 85 ( 0.00%) self.inferred_ret_closure_stack += 1; . return; . } . . // Cheap `if`/`match` check before the costlier lint level and const context queries. . if matches!(expr.kind, ExprKind::If(..) | ExprKind::Match(..)) 3,594 ( 0.00%) && !self.inside_try_block() 4,792 ( 0.00%) && !is_in_const_context(cx) 396,325 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (1,198x) 8,386 ( 0.00%) && is_lint_allowed(cx, QUESTION_MARK_USED, expr.hir_id) 1,226,684 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (1,198x) 7,188 ( 0.00%) && self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 32,346 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,198x) . { . check_is_none_or_err_and_early_return(cx, expr); . check_if_let_some_or_err_and_early_return(cx, expr); . 2,396 ( 0.00%) if self.inferred_ret_closure_stack == 0 { 3,447 ( 0.00%) check_if_try_match(cx, expr); 73,219 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_try_match (1,149x) . } . } 217,637 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 85 ( 0.00%) if is_inferred_ret_closure(expr) { 85 ( 0.00%) self.inferred_ret_closure_stack -= 1; . } . } . . fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 4,238 ( 0.00%) if is_try_block(cx, block) { . *self . .try_block_depth_stack . .last_mut() . .expect("blocks are always part of bodies and must have a depth") += 1; . } . } . . fn check_body(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { -- line 687 ---------------------------------------- -- line 688 ---------------------------------------- . self.try_block_depth_stack.push(0); . } . . fn check_body_post(&mut self, _: &LateContext<'tcx>, _: &Body<'tcx>) { . self.try_block_depth_stack.pop(); . } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 4,238 ( 0.00%) if is_try_block(cx, block) { . *self . .try_block_depth_stack . .last_mut() . .expect("blocks are always part of bodies and must have a depth") -= 1; . } . } . } 6,935 ( 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)] 25,536 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 15,960 ( 0.00%) if cx.tcx.data_layout.pointer_size().bits() != 64 { . return; . } . if let ItemKind::Enum(_, _, def) = &item.kind { 29 ( 0.00%) for var in def.variants { 564 ( 0.00%) 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 . .type_of(def_id.to_def_id()) . .instantiate_identity() . .skip_norm_wip(); . let constant = cx.tcx.const_eval_poly(def_id.to_def_id()).ok(); . if let Some(Constant::Int(val)) = constant.and_then(|c| mir_to_const(cx.tcx, c, ty)) { -- line 51 ---------------------------------------- -- line 69 ---------------------------------------- . ENUM_CLIKE_UNPORTABLE_VARIANT, . var.span, . "C-like enum variant discriminant is not portable to 32-bit targets", . ); . } . } . } . } 25,536 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/non_minimal_cfg.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::SpanExt as _; . use rustc_ast::{MetaItemInner, MetaItemKind}; . use rustc_errors::Applicability; . use rustc_lint::EarlyContext; . use rustc_span::sym; . . pub(super) fn check(cx: &EarlyContext<'_>, attr: &Attribute) { . if attr.has_name(sym::cfg) 4,758 ( 0.00%) && let Some(items) = attr.meta_item_list() 611,569 ( 0.03%) => ???:::meta_item_list (793x) . { 1,586 ( 0.00%) check_nested_cfg(cx, &items); 59,501 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/non_minimal_cfg.rs:clippy_lints::attrs::non_minimal_cfg::check_nested_cfg (793x) . } . } . 7,704 ( 0.00%) fn check_nested_cfg(cx: &EarlyContext<'_>, items: &[MetaItemInner]) { . for item in items { 2,268 ( 0.00%) if let MetaItemInner::MetaItem(meta) = item { 10,660 ( 0.00%) if !meta.has_name(sym::any) && !meta.has_name(sym::all) { 11,696 ( 0.00%) => ???:::has_name (1,462x) . continue; . } 340 ( 0.00%) if let MetaItemKind::List(list) = &meta.kind { 340 ( 0.00%) check_nested_cfg(cx, list); 14,833 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/non_minimal_cfg.rs:clippy_lints::attrs::non_minimal_cfg::check_nested_cfg'2 (156x) 680 ( 0.00%) if list.len() == 1 { . span_lint_and_then( . cx, . NON_MINIMAL_CFG, . meta.span, . "unneeded sub `cfg` when there is only one condition", . |diag| { . if let Some(snippet) = list[0].span().get_text(cx) { . diag.span_suggestion( -- line 33 ---------------------------------------- -- line 46 ---------------------------------------- . meta.span, . "unneeded sub `cfg` when there is no condition", . |_| {}, . ); . } . } . } . } 7,704 ( 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. 56,981 ( 0.00%) #[derive(Clone, Copy, Eq, PartialEq, Hash)] . #[rustc_pass_by_value] . pub struct Span { 145 ( 0.00%) lo_or_index: u32, 126 ( 0.00%) len_with_tag_or_marker: u16, 63 ( 0.00%) ctxt_or_parent_or_marker: u16, . } . . // Convenience structures for all span formats. . #[derive(Clone, Copy)] . struct InlineCtxt { . lo: u32, . len: u16, . ctxt: u16, -- line 93 ---------------------------------------- -- line 109 ---------------------------------------- . #[derive(Clone, Copy)] . struct Interned { . index: u32, . } . . impl InlineCtxt { . #[inline] . fn data(self) -> SpanData { 8,387 ( 0.00%) let len = self.len as u32; . debug_assert!(len <= MAX_LEN); 9,114 ( 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 { 12,940 ( 0.00%) let len = (self.len_with_tag & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 39,940 ( 0.00%) 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) = 1,274 ( 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 { 13,612 ( 0.00%) SpanData { . ctxt: SyntaxContext::from_u16(self.ctxt), 8,246 ( 0.00%) ..with_span_interner(|interner| interner.spans[self.index as usize]) . } . } . #[inline] . fn span(index: u32, ctxt: u16) -> Span { . let (lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker) = . (index, BASE_LEN_INTERNED_MARKER, ctxt); . Span { lo_or_index, len_with_tag_or_marker, ctxt_or_parent_or_marker } . } -- line 177 ---------------------------------------- -- line 204 ---------------------------------------- . macro_rules! match_span_kind { . ( . $span:expr, . InlineCtxt($span1:ident) => $arm1:expr, . InlineParent($span2:ident) => $arm2:expr, . PartiallyInterned($span3:ident) => $arm3:expr, . Interned($span4:ident) => $arm4:expr, . ) => { 3,203,788 ( 0.18%) if $span.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { 4,000,317 ( 0.23%) 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 . } 1,174,228 ( 0.07%) } 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 240 ---------------------------------------- . const CTXT_INTERNED_MARKER: u16 = 0b1111_1111_1111_1111; . . /// The dummy span has zero position, length, and context, and no parent. . pub const DUMMY_SP: Span = . Span { lo_or_index: 0, len_with_tag_or_marker: 0, ctxt_or_parent_or_marker: 0 }; . . impl Span { . #[inline] 1,014 ( 0.00%) pub fn new( . mut lo: BytePos, . mut hi: BytePos, . ctxt: SyntaxContext, . parent: Option, . ) -> Self { 4,871 ( 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). 274 ( 0.00%) let (len, ctxt32) = (hi.0 - lo.0, ctxt.as_u32()); 19,311 ( 0.00%) if len <= MAX_LEN && ctxt32 <= MAX_CTXT { 11,236 ( 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(); 23,170 ( 0.00%) 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| { 12,170 ( 0.00%) with_span_interner(|interner| interner.intern(&SpanData { lo, hi, ctxt, parent })) 114,448 ( 0.01%) => ???:::intern (1,217x) . }; 153 ( 0.00%) if ctxt32 <= MAX_CTXT { . // Interned ctxt should never be read, so it can use any value. 2,287 ( 0.00%) PartiallyInterned::span(index(SyntaxContext::from_u32(u32::MAX)), ctxt32 as u16) . } else { . Interned::span(index(ctxt)) . } 31,099 ( 0.00%) } . . #[inline] 4,116 ( 0.00%) pub fn data(self) -> SpanData { . let data = self.data_untracked(); 20,474 ( 0.00%) if let Some(parent) = data.parent { 20,643 ( 0.00%) (*SPAN_TRACK)(parent); 10,416 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (496x) . } . data 776 ( 0.00%) } . . /// Internal function to translate between an encoded span and the expanded representation. . /// This function must not be used outside the incremental engine. . #[inline] 56 ( 0.00%) pub fn data_untracked(self) -> SpanData { . match_span_kind! { . self, . InlineCtxt(span) => span.data(), . InlineParent(span) => span.data(), 7,742 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . } 14 ( 0.00%) } . . /// 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! { . self, . // All branches here, except `InlineParent`, actually return `span.ctxt_or_parent_or_marker`. . // Since `Interned` is selected if the field contains `CTXT_INTERNED_MARKER` returning that value -- line 312 ---------------------------------------- -- line 321 ---------------------------------------- . Interned(_span) => SyntaxContext::from_u16(CTXT_INTERNED_MARKER), . }; . !ctxt.is_root() . } . . /// Returns `true` if this is a dummy span with any hygienic context. . #[inline] . pub fn is_dummy(self) -> bool { 10 ( 0.00%) if self.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { . // Inline-context or inline-parent format. . let lo = self.lo_or_index; . let len = (self.len_with_tag_or_marker & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 15 ( 0.00%) lo == 0 && len == 0 . } else { . // Fully-interned or partially-interned format. . let index = self.lo_or_index; . let data = with_span_interner(|interner| interner.spans[index as usize]); . data.lo == BytePos(0) && data.hi == BytePos(0) . } . } . -- line 342 ---------------------------------------- -- line 344 ---------------------------------------- . pub fn map_ctxt(self, map: impl FnOnce(SyntaxContext) -> SyntaxContext) -> Span { . let data = match_span_kind! { . self, . InlineCtxt(span) => { . // This format occurs 1-2 orders of magnitude more often than others (#125017), . // so it makes sense to micro-optimize it to avoid `span.data()` and `Span::new()`. . let new_ctxt = map(SyntaxContext::from_u16(span.ctxt)); . let new_ctxt32 = new_ctxt.as_u32(); 1,370 ( 0.00%) return if new_ctxt32 <= MAX_CTXT { . // Any small new context including zero will preserve the format. 685 ( 0.00%) InlineCtxt::span(span.lo, span.len, new_ctxt32 as u16) . } else { . span.data().with_ctxt(new_ctxt) . }; . }, . InlineParent(span) => span.data(), 294 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . }; . . data.with_ctxt(map(data.ctxt)) 2,496 ( 0.00%) } . . // Returns either syntactic context, if it can be retrieved without taking the interner lock, . // or an index into the interner if it cannot. . #[inline] . fn inline_ctxt(self) -> Result { . match_span_kind! { . self, . InlineCtxt(span) => Ok(SyntaxContext::from_u16(span.ctxt)), -- line 373 ---------------------------------------- -- line 382 ---------------------------------------- . #[cfg_attr(not(test), rustc_diagnostic_item = "SpanCtxt")] . #[inline] . pub fn ctxt(self) -> SyntaxContext { . self.inline_ctxt() . .unwrap_or_else(|index| with_span_interner(|interner| interner.spans[index].ctxt)) . } . . #[inline] 32 ( 0.00%) pub fn eq_ctxt(self, other: Span) -> bool { 8,178 ( 0.00%) match (self.inline_ctxt(), other.inline_ctxt()) { . (Ok(ctxt1), Ok(ctxt2)) => ctxt1 == ctxt2, . // If `inline_ctxt` returns `Ok` the context is <= MAX_CTXT. . // If it returns `Err` the span is fully interned and the context is > MAX_CTXT. . // As these do not overlap an `Ok` and `Err` result cannot have an equal context. . (Ok(_), Err(_)) | (Err(_), Ok(_)) => false, . (Err(index1), Err(index2)) => with_span_interner(|interner| { . interner.spans[index1].ctxt == interner.spans[index2].ctxt . }), . } 8 ( 0.00%) } . . #[inline] . pub fn with_parent(self, parent: Option) -> Span { . let data = match_span_kind! { . self, . InlineCtxt(span) => { . // This format occurs 1-2 orders of magnitude more often than others (#126544), . // so it makes sense to micro-optimize it to avoid `span.data()` and `Span::new()`. -- line 409 ---------------------------------------- -- line 415 ---------------------------------------- . if span.ctxt == 0 && parent32 <= MAX_CTXT { . return InlineParent::span(span.lo, span.len, parent32 as u16); . } . } . } . span.data() . }, . InlineParent(span) => span.data(), 210 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . }; . 210 ( 0.00%) if let Some(old_parent) = data.parent { 151 ( 0.00%) (*SPAN_TRACK)(old_parent); 1,239 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (59x) . } . data.with_parent(parent) . } . . #[inline] . pub fn parent(self) -> Option { . let interned_parent = . |index: u32| with_span_interner(|interner| interner.spans[index as usize].parent); -- line 436 ---------------------------------------- -- line 466 ---------------------------------------- . let (index, _) = self.spans.insert_full(*span_data); . index as u32 . } . } . . // If an interner exists, return it. Otherwise, prepare a fresh one. . #[inline] . fn with_span_interner T>(f: F) -> T { 9,883 ( 0.00%) crate::with_session_globals(|session_globals| f(&mut session_globals.span_interner.lock())) . } 1,557,388 ( 0.09%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs -------------------------------------------------------------------------------- Ir -- line 106 ---------------------------------------- . /// } . /// } . /// ``` . metavar_expns: BTreeMap, . } . . impl ExprMetavarsInUnsafe { . pub fn new(conf: &'static Conf) -> Self { 3 ( 0.00%) Self { . warn_unsafe_macro_metavars_in_private_macros: conf.warn_unsafe_macro_metavars_in_private_macros, . metavar_expns: BTreeMap::new(), . } . } . } . . struct BodyVisitor<'a, 'tcx> { . /// Stack of unsafe blocks -- the top item always represents the last seen unsafe block from -- line 122 ---------------------------------------- -- line 141 ---------------------------------------- . /// and visiting the expression with a root context while `expn_depth > 0` tells us . /// that it must be a metavariable. . expn_depth: u32, . cx: &'a LateContext<'tcx>, . lint: &'a mut ExprMetavarsInUnsafe, . } . . fn is_public_macro(cx: &LateContext<'_>, def_id: LocalDefId) -> bool { 352 ( 0.00%) (cx.effective_visibilities.is_exported(def_id) || find_attr!(cx.tcx, def_id, MacroExport { .. })) 4,048 ( 0.00%) => ???:>::get_attrs (44x) 1,848 ( 0.00%) => ???:::is_exported (44x) . && !cx.tcx.is_doc_hidden(def_id) . } . . impl<'tcx> Visitor<'tcx> for BodyVisitor<'_, 'tcx> { . fn visit_stmt(&mut self, s: &'tcx Stmt<'tcx>) { 3,864 ( 0.00%) let from_expn = s.span.from_expansion(); . if from_expn { 392 ( 0.00%) self.expn_depth += 1; . } . walk_stmt(self, s); . if from_expn { 392 ( 0.00%) self.expn_depth -= 1; . } . } . 209,184 ( 0.01%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) { 26,148 ( 0.00%) let ctxt = e.span.ctxt(); . 52,296 ( 0.00%) if let ExprKind::Block(block, _) = e.kind 5,098 ( 0.00%) && let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules . && !ctxt.is_root() 308 ( 0.00%) && let Some(macro_def_id) = ctxt.outer_expn_data().macro_def_id . && let Some(macro_def_id) = macro_def_id.as_local() 176 ( 0.00%) && (self.lint.warn_unsafe_macro_metavars_in_private_macros || is_public_macro(self.cx, macro_def_id)) . { . self.macro_unsafe_blocks.push(block.hir_id); . self.expn_depth += 1; . walk_block(self, block); . self.expn_depth -= 1; . self.macro_unsafe_blocks.pop(); 85,742 ( 0.00%) } else if ctxt.is_root() && self.expn_depth > 0 { . let unsafe_block = self.macro_unsafe_blocks.last().copied(); . 912 ( 0.00%) match (self.lint.metavar_expns.entry(e.span), unsafe_block) { 1,270 ( 0.00%) (Entry::Vacant(e), None) => { 254 ( 0.00%) e.insert(MetavarState::ReferencedInSafe); . }, . (Entry::Vacant(e), Some(unsafe_block)) => { . e.insert(MetavarState::ReferencedInUnsafe { . unsafe_blocks: vec![unsafe_block], . }); . }, . (Entry::Occupied(mut e), None) => { 606 ( 0.00%) if let MetavarState::ReferencedInUnsafe { .. } = *e.get() { . e.insert(MetavarState::ReferencedInSafe); . } . }, . (Entry::Occupied(mut e), Some(unsafe_block)) => { . if let MetavarState::ReferencedInUnsafe { unsafe_blocks } = e.get_mut() . && !unsafe_blocks.contains(&unsafe_block) . { . unsafe_blocks.push(unsafe_block); . } . }, . } . . // NB: No need to visit descendant nodes. They're guaranteed to represent the same . // metavariable . } else { 77,076 ( 0.00%) walk_expr(self, e); 3,200,148 ( 0.18%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: (1,980x) . } 209,184 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe { 17,820 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 15,840 ( 0.00%) if is_lint_allowed(cx, MACRO_METAVARS_IN_UNSAFE, body.value.hir_id) { 2,803,694 ( 0.16%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (1,980x) . return; . } . . // This BodyVisitor is separate and not part of the lint pass because there is no . // `check_stmt_post` on `(Late)LintPass`, which we'd need to detect when we're leaving a macro span . 11,880 ( 0.00%) let mut vis = BodyVisitor { . macro_unsafe_blocks: Vec::new(), . #[expect(clippy::bool_to_int_with_if)] // obfuscates the meaning 3,960 ( 0.00%) expn_depth: if body.value.span.from_expansion() { 1 } else { 0 }, . cx, . lint: self . }; . vis.visit_body(body); 13,860 ( 0.00%) } . . fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { . // Aggregate all unsafe blocks from all spans: . // ``` . // macro_rules! x { . // ($w:expr, $x:expr, $y:expr) => { $w; unsafe { $w; $x; }; unsafe { $x; $y; }; } . // } . // $w: [] (unsafe#0 is never added because it was referenced in a safe context) . // $x: [unsafe#0, unsafe#1] . // $y: [unsafe#1] . // ``` . // We want to lint unsafe blocks #0 and #1 . let bad_unsafe_blocks = self . .metavar_expns . .values() 254 ( 0.00%) .filter_map(|state| match state { . MetavarState::ReferencedInUnsafe { unsafe_blocks } => Some(unsafe_blocks.as_slice()), . MetavarState::ReferencedInSafe => None, . }) . .flatten() . .copied() . .inspect(|&unsafe_block| { . let level_spec = cx.tcx.lint_level_spec_at_node(MACRO_METAVARS_IN_UNSAFE, unsafe_block); . if level_spec.is_expect() { -- line 255 ---------------------------------------- -- line 266 ---------------------------------------- . // The invocation doesn't matter. Also we want to dedupe by the unsafe block and not by anything . // related to the callsite. . let span = cx.tcx.hir_span(id); . . (id, Span::new(span.lo(), span.hi(), SyntaxContext::root(), None)) . }) . .dedup_by(|&(_, a), &(_, b)| a == b); . 20 ( 0.00%) for (id, span) in bad_unsafe_blocks { 10,260 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/adaptors/coalesce.rs:, ::check_crate_post::{closure#0}>>>, ::check_crate_post::{closure#1}>, ::check_crate_post::{closure#2}>, itertools::adaptors::coalesce::DedupPred2CoalescePred<::check_crate_post::{closure#3}>, itertools::adaptors::coalesce::NoCount> as core::iter::traits::iterator::Iterator>::next (1x) . span_lint_hir_and_then( . cx, . MACRO_METAVARS_IN_UNSAFE, . id, . span, . "this macro expands metavariables in an unsafe block", . |diag| { . diag.note("this allows the user of the macro to write unsafe code outside of an unsafe block"); -- line 282 ---------------------------------------- -- line 284 ---------------------------------------- . "consider expanding any metavariables outside of this block, e.g. by storing them in a variable", . ); . diag.help( . "... or also expand referenced metavariables in a safe context to require an unsafe block at callsite", . ); . }, . ); . } 8 ( 0.00%) } . } 111,015 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs -------------------------------------------------------------------------------- Ir -- line 201 ---------------------------------------- . } . } . . pub struct LiteralDigitGrouping { . lint_fraction_readability: bool, . } . . impl EarlyLintPass for LiteralDigitGrouping { 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `NumericLiteral::from_lit_kind` only accepts integer and float literals. 46,824 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 6,864 ( 0.00%) && matches!(lit.kind, token::LitKind::Integer | token::LitKind::Float) 1,552 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . self.check_lit(cx, lit, expr.span); . } 178,144 ( 0.01%) } . } . . // Length of each UUID hyphenated group in hex digits. . const UUID_GROUP_LENS: [usize; 5] = [8, 4, 4, 4, 12]; . . impl LiteralDigitGrouping { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) lint_fraction_readability: conf.unreadable_literal_lint_fractions, . } . } . . fn check_lit(&self, cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { 2,716 ( 0.00%) if let Some(src) = span.get_text(cx) 3,104 ( 0.00%) && let Ok(lit_kind) = LitKind::from_token_lit(lit) 54,652 ( 0.00%) => ???:::from_token_lit (388x) 5,908 ( 0.00%) && let Some(mut num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 46,020 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (388x) 9,700 ( 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:::deref (388x) . { . if !Self::check_for_mistyped_suffix(cx, span, &mut num_lit) { . return; . } . . if Self::is_literal_uuid_formatted(&num_lit) { . return; . } . 744 ( 0.00%) let result = (|| { 4 ( 0.00%) let integral_group_size = Self::get_group_size(num_lit.integer.split('_'), num_lit.radix, true)?; 744 ( 0.00%) if let Some(fraction) = num_lit.fraction { . let fractional_group_size = . Self::get_group_size(fraction.rsplit('_'), num_lit.radix, self.lint_fraction_readability)?; . . let consistent = Self::parts_consistent( . integral_group_size, . fractional_group_size, . num_lit.integer.len(), . fraction.len(), -- line 253 ---------------------------------------- -- line 272 ---------------------------------------- . warning_type.display(&num_lit, cx, span); . } . } . } . } . . // Returns `false` if the check fails . fn check_for_mistyped_suffix(cx: &EarlyContext<'_>, span: Span, num_lit: &mut NumericLiteral<'_>) -> bool { 248 ( 0.00%) if num_lit.suffix.is_some() { . return true; . } . 738 ( 0.00%) let (part, mistyped_suffixes, is_float) = if let Some((_, exponent)) = &mut num_lit.exponent { . (exponent, &["32", "64"][..], true) 246 ( 0.00%) } else if num_lit.fraction.is_some() { . return true; . } else { . (&mut num_lit.integer, &["8", "16", "32", "64"][..], false) . }; . 492 ( 0.00%) let mut split = part.rsplit('_'); 492 ( 0.00%) let last_group = split.next().expect("At least one group"); 246 ( 0.00%) if split.next().is_some() && mistyped_suffixes.contains(&last_group) { . let main_part = &part[..part.len() - last_group.len()]; . let missing_char; . if is_float { . missing_char = 'f'; . } else { . let radix = match num_lit.radix { . Radix::Binary => 2, . Radix::Octal => 8, -- line 302 ---------------------------------------- -- line 336 ---------------------------------------- . } . } . . /// Checks whether the numeric literal matches the formatting of a UUID. . /// . /// Returns `true` if the radix is hexadecimal, and the groups match the . /// UUID format of 8-4-4-4-12. . fn is_literal_uuid_formatted(num_lit: &NumericLiteral<'_>) -> bool { 8 ( 0.00%) if num_lit.radix != Radix::Hexadecimal { . return false; . } . . // UUIDs should not have a fraction . if num_lit.fraction.is_some() { . return false; . } . 8 ( 0.00%) let group_sizes: Vec = num_lit.integer.split('_').map(str::len).collect(); 8 ( 0.00%) if UUID_GROUP_LENS.len() == group_sizes.len() { . iter::zip(&UUID_GROUP_LENS, &group_sizes).all(|(&a, &b)| a == b) . } else { . false . } . } . . /// Given the sizes of the digit groups of both integral and fractional . /// parts, and the length -- line 362 ---------------------------------------- -- line 386 ---------------------------------------- . groups: impl Iterator, . radix: Radix, . lint_unreadable: bool, . ) -> Result, WarningType> { . let mut groups = groups.map(str::len); . . let first = groups.next().expect("At least one group"); . 496 ( 0.00%) if (radix == Radix::Binary || radix == Radix::Octal || radix == Radix::Hexadecimal) . && let Some(second_size) = groups.next() . && (!groups.all(|i| i == second_size) || first > second_size) . { . return Err(WarningType::UnusualByteGroupings); . } . . if let Some(second) = groups.next() { . if !groups.all(|x| x == second) || first > second { . Err(WarningType::InconsistentDigitGrouping) . } else if second > 4 { . Err(WarningType::LargeDigitGroups) . } else { . Ok(Some(second)) . } 496 ( 0.00%) } else if first > 5 && lint_unreadable { . Err(WarningType::UnreadableLiteral) . } else { . Ok(None) . } . } . } . . pub struct DecimalLiteralRepresentation { . threshold: u64, . } . . impl EarlyLintPass for DecimalLiteralRepresentation { 155,876 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // Only integer tokens can produce `LitKind::Int`. 44,536 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind . && lit.kind == token::LitKind::Integer 1,164 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { 1,940 ( 0.00%) self.check_lit(cx, lit, expr.span); . } 178,144 ( 0.01%) } . } . . impl DecimalLiteralRepresentation { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) threshold: conf.literal_representation_threshold, . } . } . fn check_lit(&self, cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { . // Lint integral literals. 2,716 ( 0.00%) if let Ok(lit_kind) = LitKind::from_token_lit(lit) 54,652 ( 0.00%) => ???:::from_token_lit (388x) 1,552 ( 0.00%) && let LitKind::Int(val, _) = lit_kind 388 ( 0.00%) && val >= u128::from(self.threshold) . && let Some(src) = span.get_text(cx) . && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) . && num_lit.radix == Radix::Decimal . { . let hex = format!("{val:#X}"); . let num_lit = NumericLiteral::new(&hex, num_lit.suffix, false); . let _: Result<(), ()> = Self::do_lint(num_lit.integer).map_err(|warning_type| { . warning_type.display(&num_lit, cx, span); -- line 451 ---------------------------------------- 4,972 ( 0.00%) -------------------------------------------------------------------------------- The following files chosen for auto-annotation could not be found: -------------------------------------------------------------------------------- /rust/deps/hashbrown-0.17.0/src/control/bitmask.rs /rust/deps/hashbrown-0.17.0/src/control/tag.rs /rust/deps/hashbrown-0.17.0/src/raw.rs /rust/deps/hashbrown-0.17.0/src/table.rs /rust/deps/hashbrown-0.17.1/src/control/tag.rs /rust/deps/hashbrown-0.17.1/src/map.rs /rust/deps/hashbrown-0.17.1/src/raw.rs /rust/deps/hashbrown-0.17.1/src/set.rs /rust/deps/indexmap-2.14.0/src/inner.rs /rust/deps/indexmap-2.14.0/src/inner/entry.rs /rust/deps/indexmap-2.14.0/src/map.rs /rust/deps/indexmap-2.14.0/src/map/entry.rs /rust/deps/pulldown-cmark-0.11.3/src/parse.rs /rust/deps/pulldown-cmark-0.11.3/src/tree.rs /rust/deps/rustc-hash-2.1.1/src/lib.rs /rust/deps/scoped-tls-1.0.1/src/lib.rs /rust/deps/smallvec-1.15.1/src/lib.rs /rust/deps/thin-vec-0.2.19/src/lib.rs /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/emap.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/eset.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/extent.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/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/pac.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/sc.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 /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/thread_event.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/ehooks.h include/jemalloc/internal/emap.h include/jemalloc/internal/extent.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/pac.h include/jemalloc/internal/pai.h include/jemalloc/internal/ph.h include/jemalloc/internal/rtree.h include/jemalloc/internal/san.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/bitmap.c src/decay.c src/ehooks.c src/emap.c src/eset.c src/extent.c src/extent_dss.c src/hook.c src/pa.c src/pac.c src/pages.c src/sz.c src/tcache.c src/thread_event.c -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 218,221,747 (12.38%) events annotated