-------------------------------------------------------------------------------- Profile data file 'results/clgout-nightly-2026-08-14-stm32f4-0.15.1-Clippy-IncrPatched0-Threads1' (creator: callgrind-3.25.1) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 1393855438 Trigger: Program termination Profiled target: /home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver --crate-name stm32f4 --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg feature="cortex-m-rt" --cfg feature="default" --cfg feature="rt" --cfg feature="stm32f410" --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values("cortex-m-rt", "default", "rt", "stm32f401", "stm32f405", "stm32f407", "stm32f410", "stm32f411", "stm32f412", "stm32f413", "stm32f427", "stm32f429", "stm32f446", "stm32f469")) -C metadata=67076585a0c2e3bf -C extra-filename=-e2cb59e9596c0d0d --out-dir /tmp/.tmpxb1mQ0/target/debug/deps -L dependency=/tmp/.tmpxb1mQ0/target/debug/deps --extern bare_metal=/tmp/.tmpxb1mQ0/target/debug/deps/libbare_metal-fc275abd35ef58aa.rmeta --extern cortex_m=/tmp/.tmpxb1mQ0/target/debug/deps/libcortex_m-c9717a9a6bb9b86d.rmeta --extern cortex_m_rt=/tmp/.tmpxb1mQ0/target/debug/deps/libcortex_m_rt-9f606f0d36649ebf.rmeta --extern vcell=/tmp/.tmpxb1mQ0/target/debug/deps/libvcell-810cf13b6d253aa8.rmeta -C incremental=/tmp/.tmpxb1mQ0/incremental-state -Wclippy::all -L /tmp/.tmpxb1mQ0/target/debug/build/stm32f4-4833885001c4a57d/out -L /tmp/.tmpxb1mQ0/target/debug/build/cortex-m-rt-0ca6dec4c8f91d73/out -Zthreads=1 -Adeprecated -Aunknown-lints -Zincremental-verify-ich (PID 723043, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: on -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 7,974,413,758 (100.0%) PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 505,096,213 ( 6.33%) ???:::try_mark_previous_green'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 257,141,227 ( 3.22%) ???:::try_mark_previous_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,854,145 ( 1.70%) ???:::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,045,769 ( 1.69%) ???:::resolve_ident_in_scope_set_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,934,112 ( 1.68%) ???:0x0000000000173dc0 [/usr/lib/libc.so.6] 114,730,995 ( 1.44%) ???:::encode_def_ids'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,348,621 ( 1.16%) ???:::render [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,322,887 ( 1.15%) ???:::advance_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,797,030 ( 1.14%) ???:::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] 85,819,045 ( 1.08%) ???:::next_token_from_cursor [???] 80,706,539 ( 1.01%) ???: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] 74,774,324 ( 0.94%) ???:core::fmt::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,081,318 ( 0.89%) ???:::short_write_process_buffer::<8> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,789,872 ( 0.89%) ???:::stable_hash_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,841,182 ( 0.79%) ???:::lint_level_spec_at_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,663,640 ( 0.76%) ???:::lookup_char_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,531,520 ( 0.71%) 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] 56,168,377 ( 0.70%) include/jemalloc/internal/rtree.h:free 53,646,713 ( 0.67%) ???:::lower_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,142,707 ( 0.65%) ???:::resolve_path [???] 48,809,156 ( 0.61%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,618,581 ( 0.60%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,888,249 ( 0.58%) ???:::putc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,575,560 ( 0.57%) ???:>::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] 44,277,388 ( 0.56%) ???:::to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,940,911 ( 0.55%) ???:::from_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,698,630 ( 0.54%) ???:::encode_crate_root'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,199,996 ( 0.53%) ???:)>>::call_once [???] 41,268,202 ( 0.52%) ???:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,757,667 ( 0.51%) ???: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] 39,754,169 ( 0.50%) ???:::exec_cache_promotions'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,527,467 ( 0.46%) ???:> 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] 35,690,633 ( 0.45%) ???: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] 34,485,235 ( 0.43%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,051,792 ( 0.43%) ???:::alloc_and_color_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,030,547 ( 0.43%) ???:::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] 33,380,589 ( 0.42%) ???: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] 33,105,883 ( 0.42%) ???: 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] 32,924,455 ( 0.41%) /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 32,718,723 ( 0.41%) include/jemalloc/internal/jemalloc_internal_inlines_c.h:malloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,104,689 ( 0.40%) ???:<&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] 31,100,983 ( 0.39%) ???:::bump_minimal [???] 30,306,403 ( 0.38%) ???: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] 30,205,181 ( 0.38%) ???:rustc_ast_lowering::lower_to_hir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,142,648 ( 0.38%) ???:0x00000000001747c0 [/usr/lib/libc.so.6] 29,846,532 ( 0.37%) ???:::parent_hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,332,699 ( 0.37%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,008,326 ( 0.36%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,316,340 ( 0.34%) ???:::smart_resolve_path_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,127,818 ( 0.34%) ???:::write_char [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,974,996 ( 0.34%) ???:::lower_attrs_vec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,607,929 ( 0.33%) ???:::make_owner_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,201,658 ( 0.33%) ???:::hash_owner_nodes::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,118,791 ( 0.33%) ???: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] 26,011,508 ( 0.33%) ???:<[(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] 25,918,837 ( 0.33%) ???: as core::io::write::Write>::write_all [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,757,682 ( 0.32%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,664,039 ( 0.32%) ???:rustc_middle::ty::codec::encode_with_shorthand::::type_shorthands> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,496,501 ( 0.32%) ???: 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] 25,160,650 ( 0.32%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,524,189 ( 0.31%) ???: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] 24,392,660 ( 0.31%) ???:md5::compress::soft::compress [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,327,833 ( 0.31%) ???:::finish128_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,274,328 ( 0.30%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,015,491 ( 0.30%) ???:::take [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,004,321 ( 0.30%) ???:::hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,865,869 ( 0.30%) ???:::lex_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,059,029 ( 0.29%) include/jemalloc/internal/cache_bin.h:malloc 22,963,515 ( 0.29%) ???: as rustc_ast::visit::Visitor>::visit_id [???] 22,379,550 ( 0.28%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,794,665 ( 0.27%) include/jemalloc/internal/rtree.h:tcache_bin_flush_small 21,649,188 ( 0.27%) ???:::decode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,613,606 ( 0.27%) ???:::visit_item::{closure#0}::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,975,025 ( 0.26%) ???:::parse_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,865,123 ( 0.25%) ???: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] 19,718,415 ( 0.25%) include/jemalloc/internal/cache_bin.h:free 19,459,721 ( 0.24%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,454,345 ( 0.24%) ???:::intern_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,441,244 ( 0.23%) ???:::traits_in_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,048,719 ( 0.23%) ???:::hir_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,980,075 ( 0.23%) ???:::hir_body_const_context [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,809,298 ( 0.22%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,780,347 ( 0.22%) /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] 17,731,279 ( 0.22%) ???:::mark_live_symbols'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,613,528 ( 0.22%) ???:::hir_enclosing_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,140,940 ( 0.21%) ???: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] 17,062,605 ( 0.21%) ???:> 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] 16,962,179 ( 0.21%) ???: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] 16,882,516 ( 0.21%) ???:::span_data_to_lines_and_cols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,855,445 ( 0.21%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,334,130 ( 0.20%) include/jemalloc/internal/sz.h:malloc 16,318,288 ( 0.20%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,725,611 ( 0.20%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, &rustc_middle::ty::typeck_results::TypeckResults>::{closure#0} [???] 15,510,325 ( 0.19%) ???:::ensure_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,449,211 ( 0.19%) ???:annotate_snippets::renderer::render::normalize_whitespace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,422,624 ( 0.19%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,397,948 ( 0.19%) ???:::get_lint_level_spec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,215,216 ( 0.19%) ???: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] 15,030,592 ( 0.19%) ???: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] 14,661,262 ( 0.18%) ???:::short_write_process_buffer::<4> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 14,646,297 ( 0.18%) ???: 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] 14,398,114 ( 0.18%) ???:core::ptr::drop_glue::> [???] 14,251,322 ( 0.18%) 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] 13,449,763 ( 0.17%) ???:::opt_associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,340,526 ( 0.17%) ???: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] 13,281,401 ( 0.17%) ???: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] 13,254,616 ( 0.17%) ???:::in_external_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,204,982 ( 0.17%) ???: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] 13,188,532 ( 0.17%) ???:::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] 12,933,235 ( 0.16%) ???:annotate_snippets::renderer::render::render [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,731,080 ( 0.16%) ???:> 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] 12,622,984 ( 0.16%) ???:rustc_middle::ty::codec::encode_with_shorthand::::type_shorthands> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,604,706 ( 0.16%) ???:rustc_interface::callbacks::track_span_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,580,707 ( 0.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] 12,231,968 ( 0.15%) ???:::parse_path_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,126,569 ( 0.15%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,113,250 ( 0.15%) ???:::resolve_and_cache_rustdoc_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,046,705 ( 0.15%) ???: 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] 11,816,605 ( 0.15%) ???:rustc_passes::reachable::reachable_set'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,736,410 ( 0.15%) ???: as rustc_ast::visit::Visitor>::visit_expr'2 [???] 11,610,540 ( 0.15%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,548,412 ( 0.14%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,508,895 ( 0.14%) ???:::candidate_from_obligation_no_cache [???] 11,468,578 ( 0.14%) ???:annotate_snippets::renderer::render::char_width [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,387,110 ( 0.14%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,224,550 ( 0.14%) ???:::lower_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,219,147 ( 0.14%) ???:::parse_item_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,190,341 ( 0.14%) ???:::lower_expr_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,010,329 ( 0.14%) src/arena.c:malloc_default 10,910,364 ( 0.14%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,890,487 ( 0.14%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,803,357 ( 0.14%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,747,652 ( 0.13%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,724,881 ( 0.13%) ???:::is_conditionally_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,644,975 ( 0.13%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,437,829 ( 0.13%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,281,330 ( 0.13%) ???:rustc_passes::dead::live_symbols_and_ignored_derived_traits'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,152,296 ( 0.13%) ???:::lookup_byte_offset [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,122,230 ( 0.13%) include/jemalloc/internal/sz.h:realloc 10,105,206 ( 0.13%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,012,836 ( 0.13%) ???:>::reserve_rehash::>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,990,890 ( 0.13%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,951,814 ( 0.12%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,901,532 ( 0.12%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,880,438 ( 0.12%) ???:::slice_write_process_buffer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,839,121 ( 0.12%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,759,159 ( 0.12%) include/jemalloc/internal/thread_event.h:malloc 9,757,954 ( 0.12%) ???:::span_to_locations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,679,709 ( 0.12%) ???:::typeck_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,574,740 ( 0.12%) ???:::short_write_process_buffer::<1> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,472,462 ( 0.12%) ???:>>::walk_ref [???] 9,345,755 ( 0.12%) ???:::parse_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,224,751 ( 0.12%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,054,709 ( 0.11%) ???:::parse_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,032,896 ( 0.11%) include/jemalloc/internal/emap.h:tcache_bin_flush_small 9,012,191 ( 0.11%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,851,048 ( 0.11%) ???:::span_to_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,837,727 ( 0.11%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,835,531 ( 0.11%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,792,574 ( 0.11%) ???:::parse_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,753,838 ( 0.11%) ???:::extract_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,696,066 ( 0.11%) ???:0x0000000000173660 [/usr/lib/libc.so.6] 8,689,476 ( 0.11%) ???: as rustc_ast::visit::Visitor>::visit_expr [???] 8,669,725 ( 0.11%) ???:::fmt_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,544,969 ( 0.11%) ???:::hir_attrs'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,382,686 ( 0.11%) ???:::append [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,334,280 ( 0.10%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,182,348 ( 0.10%) ???:::decode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,170,875 ( 0.10%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,146,882 ( 0.10%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,113,413 ( 0.10%) ???:>::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,077,518 ( 0.10%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,057,928 ( 0.10%) site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 8,027,230 ( 0.10%) ???:::resolve_pattern_inner::{closure#0} [???] 7,967,536 ( 0.10%) ???:<&char as core::fmt::Display>::fmt [???] 7,960,437 ( 0.10%) include/jemalloc/internal/edata.h:tcache_bin_flush_small 7,921,000 ( 0.10%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,908,799 ( 0.10%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,868,690 ( 0.10%) ???:::lookup_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,832,367 ( 0.10%) ???:rustc_ty_utils::ty::param_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,821,257 ( 0.10%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,760,579 ( 0.10%) ???:::parse_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,687,450 ( 0.10%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,557,187 ( 0.09%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,518,654 ( 0.09%) ???:::desugaring_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,436,784 ( 0.09%) ???:::lower_qpath'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,333,814 ( 0.09%) ???:::hir_body_owner_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,294,968 ( 0.09%) ???:::is_exported [???] 7,249,671 ( 0.09%) ???:::visit_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,226,224 ( 0.09%) ???: 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] 7,118,728 ( 0.09%) ???: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] 7,105,224 ( 0.09%) ???:::lower_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,067,160 ( 0.09%) ???:::check_expr [???] 7,012,493 ( 0.09%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:realloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 6,968,536 ( 0.09%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,941,065 ( 0.09%) ???:rustc_errors::annotate_snippet_emitter_writer::collect_annotations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,921,733 ( 0.09%) ???:::lower_method_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,918,387 ( 0.09%) ???:::lex_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,885,594 ( 0.09%) ???: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] 6,867,975 ( 0.09%) src/arena.c:realloc 6,859,863 ( 0.09%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,791,449 ( 0.09%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,782,302 ( 0.09%) ???:::check_impl_or_impl_item_live [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,716,012 ( 0.08%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,691,561 ( 0.08%) ???: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] 6,611,573 ( 0.08%) ???:<[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] 6,604,386 ( 0.08%) include/jemalloc/internal/sz.h:free 6,597,024 ( 0.08%) ???:<&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] 6,563,773 ( 0.08%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,560,852 ( 0.08%) ???:alloc::fmt::format::format_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,509,704 ( 0.08%) ???: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] 6,494,260 ( 0.08%) ???:> 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] 6,431,229 ( 0.08%) ???:::bump [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,414,610 ( 0.08%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,407,054 ( 0.08%) ???:::candidate_from_obligation [???] 6,392,758 ( 0.08%) ???:::parse_item_kind'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,379,265 ( 0.08%) ???:::typeck_body'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,342,742 ( 0.08%) 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] 6,340,844 ( 0.08%) ???:::encode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,313,730 ( 0.08%) ???:> 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] 6,276,461 ( 0.08%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,274,687 ( 0.08%) ???:, 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] 6,243,971 ( 0.08%) ???:::update_decl_chain [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,215,783 ( 0.08%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,184,518 ( 0.08%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,183,512 ( 0.08%) ???:::parse_fn_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,157,413 ( 0.08%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,109,904 ( 0.08%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,040,153 ( 0.08%) ???:::alloc_and_color_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,020,330 ( 0.08%) ???: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] 5,986,473 ( 0.08%) ???:rustc_resolve::rustdoc::unindent_doc_fragments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,983,727 ( 0.08%) ???:::parse_expr_force_collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,933,288 ( 0.07%) ???:::check_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,933,136 ( 0.07%) ???: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] 5,863,029 ( 0.07%) ???:::fully_expand_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,851,197 ( 0.07%) ???: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] 5,841,187 ( 0.07%) ???:::resolve_path_with_ribs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,839,394 ( 0.07%) 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] 5,829,764 ( 0.07%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,815,593 ( 0.07%) ???:rustc_query_impl::query_impl::def_ident_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] 5,761,679 ( 0.07%) 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] 5,742,082 ( 0.07%) include/jemalloc/internal/arena_inlines_b.h:tcache_bin_flush_small 5,665,748 ( 0.07%) ???:::intern_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,602,730 ( 0.07%) ???:> 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] 5,566,028 ( 0.07%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item'2 [???] 5,528,664 ( 0.07%) ???:::expr_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,524,285 ( 0.07%) ???:::resolve_ident_in_lexical_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,523,868 ( 0.07%) ???:::get_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,511,724 ( 0.07%) ???:::resolve_doc_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,505,349 ( 0.07%) ???:::lower_pat_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,489,256 ( 0.07%) ???:rustc_privacy::effective_visibilities'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,468,867 ( 0.07%) ???: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] 5,463,408 ( 0.07%) ???:::mark_live_symbols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,374,903 ( 0.07%) ???:::resolve_crate::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,364,544 ( 0.07%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,347,496 ( 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] 5,346,418 ( 0.07%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,332,065 ( 0.07%) ???: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] 5,325,138 ( 0.07%) ???:stacker::remaining_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,324,491 ( 0.07%) ???:annotate_snippets::renderer::render::draw_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,235,694 ( 0.07%) 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] 5,212,200 ( 0.07%) ???:> 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] 5,211,269 ( 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] 5,179,509 ( 0.06%) ???:rustc_errors::formatting::format_fluent_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,172,732 ( 0.06%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,161,512 ( 0.06%) /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:: 5,147,446 ( 0.06%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,078,743 ( 0.06%) ???:rustc_lint::levels::shallow_lint_levels_on [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,053,677 ( 0.06%) ???:pthread_mutex_unlock [/usr/lib/libc.so.6] 5,033,556 ( 0.06%) ???:::brg_visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,992,497 ( 0.06%) ???:::hir_maybe_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,913,676 ( 0.06%) ???:::visit_nested_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,902,462 ( 0.06%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,882,065 ( 0.06%) ???:::evaluate_trait_predicate_recursively [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,870,490 ( 0.06%) ???:::parse_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,829,530 ( 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] 4,785,139 ( 0.06%) ???:::pad [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,770,873 ( 0.06%) /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] 4,769,670 ( 0.06%) ???:::lower_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,766,304 ( 0.06%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,741,392 ( 0.06%) ???:rustc_query_impl::query_impl::clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,736,841 ( 0.06%) include/jemalloc/internal/rtree.h:realloc 4,703,400 ( 0.06%) ???:::fallible_with_capacity:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,659,853 ( 0.06%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,638,390 ( 0.06%) ???:::lookup_line [???] 4,607,791 ( 0.06%) ???:::parse_ty_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,589,001 ( 0.06%) ???:::hash_expn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,585,869 ( 0.06%) ???:>::get_identifier [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,509,200 ( 0.06%) ???:::parse_item_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,443,490 ( 0.06%) ???:::expect_hir_owner_nodes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,407,481 ( 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] 4,403,120 ( 0.06%) include/jemalloc/internal/bitmap.h:tcache_bin_flush_small 4,379,934 ( 0.05%) ???:pthread_mutex_trylock [/usr/lib/libc.so.6] 4,340,780 ( 0.05%) ???:::get_extern_module_with_lock [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,316,936 ( 0.05%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,310,004 ( 0.05%) /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 4,306,568 ( 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 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,303,890 ( 0.05%) ???:>::get_pattern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,284,177 ( 0.05%) ???: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] 4,261,880 ( 0.05%) ???: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] 4,232,088 ( 0.05%) ???:::is_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,172,157 ( 0.05%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,142,651 ( 0.05%) ???:::lower_expr_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,118,112 ( 0.05%) ???:::get_diagnostic_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,100,800 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_expr'2 [???] 4,096,928 ( 0.05%) ???:::collect_tokens::::parse_stmt_without_recovery::{closure#4}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,067,296 ( 0.05%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,057,171 ( 0.05%) ???:::lookup_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,050,426 ( 0.05%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,048,643 ( 0.05%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,987,410 ( 0.05%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,957,167 ( 0.05%) ???:core::slice::memchr::memchr_aligned [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,945,087 ( 0.05%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,939,557 ( 0.05%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,930,402 ( 0.05%) ???:::par_hir_body_owners::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,915,274 ( 0.05%) /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] 3,914,156 ( 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 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,899,520 ( 0.05%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,894,506 ( 0.05%) ???:>, 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] 3,890,706 ( 0.05%) ???: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] 3,878,021 ( 0.05%) ???:::get_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,865,928 ( 0.05%) ???:::mk_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,827,385 ( 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 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,814,321 ( 0.05%) ???:::intern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,791,479 ( 0.05%) ???:::intern_region [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,775,026 ( 0.05%) ???:::collect_tokens_for_expr::<::parse_expr_dot_or_call::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,767,297 ( 0.05%) ???:::new_named_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,757,680 ( 0.05%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,744,532 ( 0.05%) ???:rustc_middle::hir::map::crate_hash'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,742,699 ( 0.05%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,738,616 ( 0.05%) ???: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] 3,737,469 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_path [???] 3,724,268 ( 0.05%) ???:rustc_query_impl::query_impl::lookup_deprecation_entry::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] 3,723,649 ( 0.05%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,723,572 ( 0.05%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,706,121 ( 0.05%) ???:>>::walk_ref'2 [???] 3,693,901 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,651,180 ( 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] 3,631,306 ( 0.05%) ???:::lang_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,606,214 ( 0.05%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}'2 [???] 3,602,876 ( 0.05%) ???:std::path::compare_components [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,588,452 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,573,326 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 3,547,027 ( 0.04%) ???:0x000000000000fb40 [/usr/lib/ld-linux-x86-64.so.2] 3,544,363 ( 0.04%) ???: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] 3,541,083 ( 0.04%) ???:>>::walk_ref [???] 3,492,787 ( 0.04%) ???: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] 3,491,644 ( 0.04%) ???:rustc_ast::visit::visit_assoc_items::> [???] 3,431,435 ( 0.04%) ???: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] 3,430,003 ( 0.04%) ???:::mk_type_list [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,412,578 ( 0.04%) ???:::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,401,262 ( 0.04%) ???:__rustc::__rust_alloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,400,602 ( 0.04%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,362,359 ( 0.04%) ???:rustc_ast::visit::visit_items::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,362,071 ( 0.04%) ???:::hir_get_parent_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,346,967 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,334,491 ( 0.04%) 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] 3,328,710 ( 0.04%) ???: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] 3,312,995 ( 0.04%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,304,137 ( 0.04%) include/jemalloc/internal/tsd_tls.h:free [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 3,304,136 ( 0.04%) include/jemalloc/internal/atomic.h:free 3,302,340 ( 0.04%) include/jemalloc/internal/div.h:tcache_bin_flush_small 3,274,442 ( 0.04%) include/jemalloc/internal/bit_util.h:malloc_default 3,257,877 ( 0.04%) ???:::{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] 3,237,756 ( 0.04%) ???:::from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,225,507 ( 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 3,223,785 ( 0.04%) ???:::lifetime_res_to_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,219,331 ( 0.04%) ???: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] 3,211,424 ( 0.04%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,194,332 ( 0.04%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,187,467 ( 0.04%) ???:::feed_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,185,856 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,178,295 ( 0.04%) ???:::match_impl::{closure#0} [???] 3,174,283 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,167,182 ( 0.04%) ???:::is_diagnostic_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,160,793 ( 0.04%) ???:::confirm_candidate [???] 3,152,060 ( 0.04%) ???:rustc_span::hygiene::decode_syntax_context::::decode_syntax_context::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,141,114 ( 0.04%) ???: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] 3,135,287 ( 0.04%) ???:::parse_block_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,128,138 ( 0.04%) 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] 3,120,538 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,113,770 ( 0.04%) ???:::serialize::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,106,098 ( 0.04%) ???:::parse_token_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,079,976 ( 0.04%) 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] 3,066,088 ( 0.04%) ???:::path_matches [???] 3,056,265 ( 0.04%) ???:::parse_stmt_without_recovery [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,049,878 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,041,570 ( 0.04%) ???:rustc_trait_selection::traits::normalize_param_env_or_error [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,026,050 ( 0.04%) ???: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] 3,024,323 ( 0.04%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,021,249 ( 0.04%) ???: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] 3,020,940 ( 0.04%) /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 3,020,940 ( 0.04%) /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 2,997,535 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,978,309 ( 0.04%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,970,467 ( 0.04%) ???:<&rustc_middle::ty::list::RawList as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,969,559 ( 0.04%) ???: 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] 2,938,912 ( 0.04%) /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 2,923,174 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,922,074 ( 0.04%) ???:rustc_interface::passes::emit_delayed_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,907,225 ( 0.04%) ???:::resolve_macro_invocation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,904,885 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,904,131 ( 0.04%) include/jemalloc/internal/thread_event.h:realloc 2,903,286 ( 0.04%) ???: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] 2,872,835 ( 0.04%) include/jemalloc/internal/ph.h:pa_alloc 2,842,737 ( 0.04%) 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] 2,840,976 ( 0.04%) ???:::parse_attr_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,826,098 ( 0.04%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,822,961 ( 0.04%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,820,873 ( 0.04%) ???:pulldown_cmark::firstpass::run_first_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,817,196 ( 0.04%) ???:::record_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,814,052 ( 0.04%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,811,723 ( 0.04%) ???: 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] 2,799,584 ( 0.04%) ???:::is_impl_trait_in_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,796,371 ( 0.04%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,795,617 ( 0.04%) ???: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] 2,791,924 ( 0.04%) ???: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] 2,790,108 ( 0.03%) ???:::try_new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,772,342 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,770,125 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,768,451 ( 0.03%) /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,762,253 ( 0.03%) ???:rustc_span::normalize_src [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,758,466 ( 0.03%) ???:rustc_query_impl::query_impl::evaluate_obligation::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,749,426 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,749,299 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,743,633 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::in_automatically_derived 2,730,352 ( 0.03%) ???:> 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] 2,729,108 ( 0.03%) ???:::finish_grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,711,528 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,702,190 ( 0.03%) include/jemalloc/internal/rtree.h:pa_alloc 2,698,923 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,694,241 ( 0.03%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,686,166 ( 0.03%) include/jemalloc/internal/arena_inlines_b.h:realloc 2,682,649 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,679,580 ( 0.03%) ???:rust_psm_stack_pointer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,678,240 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes 2,677,537 ( 0.03%) 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] 2,676,990 ( 0.03%) ???:>::reserve::do_reserve_and_handle:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,676,909 ( 0.03%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,654,617 ( 0.03%) ???:rustc_query_impl::execution::ensure_can_skip_execution::, rustc_middle::dep_graph::graph::DepNodeIndex>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,648,660 ( 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] 2,647,129 ( 0.03%) ???:::evaluate_trait_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,646,417 ( 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] 2,643,351 ( 0.03%) ???:::flat_map_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,634,000 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,630,449 ( 0.03%) ???:::path_all [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,630,014 ( 0.03%) ???:::resolve_anonymous_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,617,635 ( 0.03%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,615,271 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,613,227 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,610,666 ( 0.03%) ???:::visit_expr::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,607,814 ( 0.03%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,599,820 ( 0.03%) 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] 2,594,750 ( 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] 2,582,137 ( 0.03%) ???:::lower_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,580,468 ( 0.03%) ???:::parse_limited_sym [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,575,358 ( 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] 2,569,813 ( 0.03%) ???:::intern_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,557,295 ( 0.03%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,555,279 ( 0.03%) ???:::lower_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,554,423 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,554,247 ( 0.03%) ???:rustc_mir_transform::mir_keys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,546,245 ( 0.03%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,544,328 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,544,328 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post 2,543,167 ( 0.03%) ???:::check_case'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,542,381 ( 0.03%) ???: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] 2,541,916 ( 0.03%) ???:core::str::count::char_count_general_case [???] 2,533,702 ( 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] 2,531,898 ( 0.03%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,531,645 ( 0.03%) ???: 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] 2,531,215 ( 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] 2,525,657 ( 0.03%) ???: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] 2,522,750 ( 0.03%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,512,197 ( 0.03%) ???:::lower_fn_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,511,723 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,503,548 ( 0.03%) ???:core::str::count::do_count_chars [???] 2,500,139 ( 0.03%) ???:::visit_node:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,493,781 ( 0.03%) ???:::mk_bound_variable_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,488,488 ( 0.03%) ???:rustc_ast::visit::walk_item_inner::> [???] 2,475,172 ( 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] 2,461,184 ( 0.03%) include/jemalloc/internal/tcache_inlines.h:realloc 2,455,030 ( 0.03%) ???:>>::walk_ref [???] 2,443,627 ( 0.03%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,434,792 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,418,928 ( 0.03%) ???:::check_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,357,554 ( 0.03%) ???:::lower_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,354,023 ( 0.03%) ???:rustc_ast::visit::visit_stmts::> [???] 2,348,328 ( 0.03%) ???:::parse_expr_assoc_with [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,326,204 ( 0.03%) ???: 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] 2,315,987 ( 0.03%) ???: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] 2,312,103 ( 0.03%) ???:::lower [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,300,374 ( 0.03%) ???:rustc_hir_analysis::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,297,675 ( 0.03%) ???:annotate_snippets::renderer::render::style_substitution_highlights [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,295,110 ( 0.03%) ???:::intern_const [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,295,002 ( 0.03%) 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] 2,294,795 ( 0.03%) ???:::confirm_auto_impl_candidate::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,294,067 ( 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] 2,279,818 ( 0.03%) ???:>::grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,277,485 ( 0.03%) ???:rustc_ty_utils::assoc::associated_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,274,408 ( 0.03%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,266,137 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,266,074 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,241,349 ( 0.03%) 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] 2,226,311 ( 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] 2,215,197 ( 0.03%) ???:>::add_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,208,421 ( 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:::check_attributes 2,202,781 ( 0.03%) ???:::parent_hir_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,201,560 ( 0.03%) include/jemalloc/internal/util.h:tcache_bin_flush_small 2,200,798 ( 0.03%) ???:rustc_resolve::rustdoc::add_doc_fragment [???] 2,189,932 ( 0.03%) ???:, 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] 2,189,919 ( 0.03%) ???:::splice_lines::push_trailing [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,181,996 ( 0.03%) ???:>>::walk_ref [???] 2,178,285 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,176,586 ( 0.03%) ???:rustc_ast::util::comments::beautify_doc_string [???] 2,176,264 ( 0.03%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,174,687 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,165,587 ( 0.03%) include/jemalloc/internal/cache_bin.h:realloc 2,162,482 ( 0.03%) 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] 2,155,797 ( 0.03%) ???:<&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] 2,151,945 ( 0.03%) ???:>::rustc_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,148,894 ( 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:clippy_utils::method_chain_args 2,139,844 ( 0.03%) ???:rustc_traits::evaluate_obligation::evaluate_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,121,295 ( 0.03%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,115,726 ( 0.03%) ???:>>::walk_ref [???] 2,106,667 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,104,724 ( 0.03%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,102,864 ( 0.03%) ???:::is_path_start_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,099,806 ( 0.03%) ???:::expn_def_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,089,227 ( 0.03%) ???:::fmt [???] 2,087,322 ( 0.03%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,069,524 ( 0.03%) ???:::brg_visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,066,134 ( 0.03%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,059,365 ( 0.03%) 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] 2,056,173 ( 0.03%) ???:pulldown_cmark::parse::item_to_event [???] 2,050,311 ( 0.03%) ???: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] 2,050,004 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,049,020 ( 0.03%) include/jemalloc/internal/ph.h:tcache_bin_flush_small 2,047,672 ( 0.03%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [???] 2,045,015 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,035,542 ( 0.03%) ???: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,031,537 ( 0.03%) ???: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] 2,023,830 ( 0.03%) ???:::range_span [???] 2,015,381 ( 0.03%) ???:::add_import::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,012,728 ( 0.03%) ???:rustc_ast::visit::walk_fn::> [???] 2,008,680 ( 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] 2,007,192 ( 0.03%) include/jemalloc/internal/edata.h:pa_alloc 2,007,040 ( 0.03%) ???:::list_from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,002,948 ( 0.03%) ???:::instantiate_identity_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,001,188 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,997,631 ( 0.03%) ???:core::str::converts::from_utf8 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,994,497 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,994,497 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,990,192 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [???] 1,989,900 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,985,916 ( 0.02%) ???:::resolve_imports [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,984,685 ( 0.02%) ???:rustc_const_eval::const_eval::fn_queries::constness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,958,693 ( 0.02%) ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,958,156 ( 0.02%) include/jemalloc/internal/sz.h:pa_alloc 1,954,423 ( 0.02%) ???: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] 1,944,254 ( 0.02%) ???:::emit_messages_default'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,943,551 ( 0.02%) ???:rustc_ast::visit::walk_item_inner::>'2 [???] 1,940,377 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,937,494 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,933,005 ( 0.02%) ???:> 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,929,832 ( 0.02%) ???:::symbol_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,918,528 ( 0.02%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,915,657 ( 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] 1,915,573 ( 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] 1,915,499 ( 0.02%) ???:::try_mark_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,911,514 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,906,899 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,892,648 ( 0.02%) ???:::parse_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,889,180 ( 0.02%) ???:::lower_block_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,883,685 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::filter_map::FilterMap, clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,883,685 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,872,716 ( 0.02%) 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] 1,872,345 ( 0.02%) src/base.c:pa_alloc 1,872,028 ( 0.02%) ???: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] 1,868,120 ( 0.02%) ???:, 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,850,262 ( 0.02%) 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] 1,842,260 ( 0.02%) 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] 1,840,121 ( 0.02%) ???:::rollback_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,837,915 ( 0.02%) 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] 1,834,287 ( 0.02%) ???:::resolve_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,829,457 ( 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] 1,823,510 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_item'2 [???] 1,821,618 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,814,790 ( 0.02%) ???:::hir_owner_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,814,552 ( 0.02%) ???:::parse_path_segment'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,806,177 ( 0.02%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,796,795 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,780,889 ( 0.02%) ???:annotate_snippets::renderer::render::render_title [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,772,091 ( 0.02%) ???:>::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,757,759 ( 0.02%) 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] 1,754,138 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_item [???] 1,751,415 ( 0.02%) ???: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] 1,744,388 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_lints::doc::doc_suspicious_footnotes::check 1,743,992 ( 0.02%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> 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,740,856 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,739,106 ( 0.02%) ???:::is_imported [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,732,865 ( 0.02%) ???:>>::walk_ref [???] 1,731,360 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,731,096 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,731,010 ( 0.02%) 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] 1,728,847 ( 0.02%) ???: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] 1,724,472 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,716,273 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,716,135 ( 0.02%) 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] 1,706,823 ( 0.02%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,706,770 ( 0.02%) 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] 1,705,353 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,704,589 ( 0.02%) ???:::poly_select::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,702,942 ( 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] 1,700,298 ( 0.02%) ???:0x000000000000ba80 [/usr/lib/ld-linux-x86-64.so.2] 1,696,628 ( 0.02%) ???:::exec_cache_promotions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,696,404 ( 0.02%) ???: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,686,665 ( 0.02%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,685,853 ( 0.02%) 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] 1,685,407 ( 0.02%) ???:::check_target [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,684,564 ( 0.02%) 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] 1,682,916 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,682,096 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/double_parens.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,679,883 ( 0.02%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,677,174 ( 0.02%) ???:::parse_outer_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,675,513 ( 0.02%) ???:::encode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,674,630 ( 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] 1,670,656 ( 0.02%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_param::{closure#0}>::{closure#0} [???] 1,666,976 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_pat [???] 1,661,735 ( 0.02%) ???:::parse_constness_ [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,661,401 ( 0.02%) ???:::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] 1,652,379 ( 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> 1,651,787 ( 0.02%) ???:::typeck_root_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,648,386 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/precedence.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,643,783 ( 0.02%) ???:::visit_generic_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,637,161 ( 0.02%) ???: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] 1,630,867 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::root_macro_call 1,629,716 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,626,494 ( 0.02%) ???:rustc_passes::dead::mark_live_symbols_and_ignored_derived_traits'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,622,542 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,604,964 ( 0.02%) ???:::check_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,604,446 ( 0.02%) ???:rustc_query_impl::query_impl::codegen_fn_attrs::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,602,642 ( 0.02%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,601,676 ( 0.02%) ???:::parent_module_from_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,601,198 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,596,204 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,595,344 ( 0.02%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,590,542 ( 0.02%) ???:, 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] 1,590,378 ( 0.02%) ???:rustc_mir_transform::cross_crate_inline::cross_crate_inlinable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,587,491 ( 0.02%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,587,376 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,584,311 ( 0.02%) ???:::lower_maybe_coroutine_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,574,113 ( 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] 1,571,237 ( 0.02%) ???:::resolve_crate::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,570,320 ( 0.02%) 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] 1,570,320 ( 0.02%) 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] 1,570,320 ( 0.02%) 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] 1,565,411 ( 0.02%) 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] 1,560,716 ( 0.02%) ???:::get_diagnostic_name'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,560,665 ( 0.02%) ???:::evaluate_root_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,558,285 ( 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/tcache.c:tcache_bin_flush_stashed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,553,322 ( 0.02%) ???:::encode_info_for_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,553,123 ( 0.02%) ???:::lower_stmts [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,547,766 ( 0.02%) include/jemalloc/internal/cache_bin.h:malloc_default 1,539,370 ( 0.02%) ???:::hir_impl_item [???] 1,532,225 ( 0.02%) src/eset.c:pa_alloc 1,523,574 ( 0.02%) ???:::write_import_resolutions::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,518,214 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,515,410 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,514,822 ( 0.02%) 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] 1,511,622 ( 0.02%) ???:::doc_str [???] 1,510,855 ( 0.02%) ???:rustc_lint::levels::skippable_lints'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,507,297 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,503,259 ( 0.02%) 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] 1,502,394 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,500,916 ( 0.02%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,498,452 ( 0.02%) ???:::get_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,496,594 ( 0.02%) ???:rustc_ast::visit::walk_item_inner::> [???] 1,496,045 ( 0.02%) ???:rustc_ty_utils::assoc::associated_types_for_impl_traits_in_trait_or_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,494,466 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/bit_width.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,492,572 ( 0.02%) ???:::resolve_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,489,319 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes 1,489,319 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes_post 1,486,129 ( 0.02%) ???:rustc_privacy::effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,485,055 ( 0.02%) 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] 1,483,250 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/bool_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,479,988 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,475,114 ( 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] 1,471,957 ( 0.02%) ???: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] 1,458,774 ( 0.02%) ???:::flat_map_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,455,708 ( 0.02%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,449,353 ( 0.02%) ???:::span_labels [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,448,562 ( 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] 1,447,357 ( 0.02%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,447,029 ( 0.02%) ???: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] 1,446,583 ( 0.02%) ???:std::exception::~exception() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,445,808 ( 0.02%) ???:::meta [???] 1,443,950 ( 0.02%) ???: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] 1,442,928 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_main_separator_str.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,441,573 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,441,232 ( 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] 1,439,515 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,439,460 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/match_result_ok.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,428,504 ( 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] 1,423,765 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,419,290 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,413,049 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,413,049 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,413,049 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,408,834 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_mut_passed.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,405,862 ( 0.02%) ???:::prepare_to_combine [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,404,238 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,403,891 ( 0.02%) /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] 1,400,587 ( 0.02%) ???:::name [???] 1,398,738 ( 0.02%) ???:>>::walk_ref [???] 1,396,805 ( 0.02%) 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] 1,394,382 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,394,111 ( 0.02%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,389,901 ( 0.02%) ???:::hir_span_with_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,388,812 ( 0.02%) include/jemalloc/internal/atomic.h:tcache_bin_flush_small 1,387,726 ( 0.02%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,387,081 ( 0.02%) ???: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] 1,384,835 ( 0.02%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,383,342 ( 0.02%) ???:::check_case [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,376,546 ( 0.02%) ???:::walk_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,374,030 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,374,030 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,374,030 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,374,030 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,373,469 ( 0.02%) 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] 1,372,506 ( 0.02%) ???:::hir_expect_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,369,596 ( 0.02%) ???:rustc_query_impl::query_impl::asyncness::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,363,994 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,362,741 ( 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] 1,361,520 ( 0.02%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,353,096 ( 0.02%) 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] 1,353,024 ( 0.02%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,351,496 ( 0.02%) ???:::visit_node::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,350,377 ( 0.02%) ???:::ancestors [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,346,972 ( 0.02%) ???:>::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] 1,337,082 ( 0.02%) ???:::parse_path_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,336,732 ( 0.02%) /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] 1,335,690 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,335,219 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,332,858 ( 0.02%) ???:::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] 1,331,886 ( 0.02%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,330,888 ( 0.02%) ???:>>>>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,321,322 ( 0.02%) ???:::def_id_partial_cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,320,849 ( 0.02%) ???: 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] 1,320,430 ( 0.02%) ???:::parse_expr_assoc_with'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,320,052 ( 0.02%) ???:::encode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,319,141 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,318,953 ( 0.02%) ???:::parse_where_clause_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,317,913 ( 0.02%) ???: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] 1,317,628 ( 0.02%) ???:::meta_kind [???] 1,317,605 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,314,050 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,310,284 ( 0.02%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,310,198 ( 0.02%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,306,763 ( 0.02%) ???:rustc_ast::visit::visit_generic_params::> [???] 1,305,820 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,305,046 ( 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] 1,304,645 ( 0.02%) ???:::generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,287,932 ( 0.02%) ???:::end_point [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,287,127 ( 0.02%) ???:::trait_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,287,053 ( 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] 1,286,477 ( 0.02%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,283,975 ( 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 1,279,218 ( 0.02%) ???: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] 1,277,037 ( 0.02%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,276,720 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,276,326 ( 0.02%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,274,037 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,272,059 ( 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] 1,271,594 ( 0.02%) 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] 1,270,149 ( 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> 1,270,005 ( 0.02%) ???:::handle_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,268,825 ( 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] 1,268,797 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_fn [???] 1,267,863 ( 0.02%) ???:::create_derived_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,266,443 ( 0.02%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,261,861 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,261,370 ( 0.02%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,261,370 ( 0.02%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,261,370 ( 0.02%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,261,220 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,259,851 ( 0.02%) ???:<[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] 1,259,259 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,255,383 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,252,140 ( 0.02%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,250,590 ( 0.02%) ???:rustc_resolve::rustdoc::preprocess_link [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,246,865 ( 0.02%) ???: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] 1,246,396 ( 0.02%) include/jemalloc/internal/tsd.h:realloc 1,244,396 ( 0.02%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,243,685 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,243,181 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,242,726 ( 0.02%) ???:::is_desugaring [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,239,669 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,238,894 ( 0.02%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,238,070 ( 0.02%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,235,125 ( 0.02%) ???:::parse_expr_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,232,825 ( 0.02%) include/jemalloc/internal/rtree.h:ecache_evict 1,230,771 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,228,082 ( 0.02%) ???:::visit_expr::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,222,551 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,219,709 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,217,348 ( 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> 1,213,552 ( 0.02%) ???:::without_first_quote [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,211,837 ( 0.02%) ???:memchr::arch::x86_64::memchr::count_raw::find_avx2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,208,580 ( 0.02%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,208,339 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,206,622 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_ty 1,206,209 ( 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 1,203,687 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,203,338 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,203,272 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,201,312 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,201,294 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,195,857 ( 0.01%) ???: as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,192,924 ( 0.01%) ???:::visit_ast_fragment_with_placeholders [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,191,352 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,191,307 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,190,364 ( 0.01%) ???:::hir_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,189,606 ( 0.01%) ???:> as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,189,380 ( 0.01%) 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] 1,188,065 ( 0.01%) 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] 1,187,248 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,187,183 ( 0.01%) 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] 1,186,410 ( 0.01%) ???:::is_conditionally_const::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,185,490 ( 0.01%) 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] 1,183,760 ( 0.01%) ???:::prepend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,179,336 ( 0.01%) 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] 1,178,709 ( 0.01%) 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] 1,178,424 ( 0.01%) 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] 1,177,854 ( 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_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] 1,177,780 ( 0.01%) 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] 1,177,746 ( 0.01%) 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] 1,177,746 ( 0.01%) 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] 1,177,743 ( 0.01%) 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] 1,177,742 ( 0.01%) 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] 1,177,742 ( 0.01%) 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] 1,177,742 ( 0.01%) 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] 1,177,740 ( 0.01%) 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] 1,176,944 ( 0.01%) ???:::parse_expr_paren_seq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,175,757 ( 0.01%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,175,331 ( 0.01%) ???:::const_eval_poly [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,174,027 ( 0.01%) 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] 1,168,259 ( 0.01%) 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] 1,168,205 ( 0.01%) 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] 1,166,822 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_stmt::{closure#0} [???] 1,166,598 ( 0.01%) ???:::alloc_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,163,846 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,163,808 ( 0.01%) ???:::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] 1,162,872 ( 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] 1,160,595 ( 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] 1,159,777 ( 0.01%) include/jemalloc/internal/sz.h:malloc_default 1,159,763 ( 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] 1,157,971 ( 0.01%) 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] 1,155,020 ( 0.01%) 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] 1,154,965 ( 0.01%) 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] 1,151,979 ( 0.01%) 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] 1,151,520 ( 0.01%) 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] 1,148,606 ( 0.01%) 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] 1,144,857 ( 0.01%) ???:::contains [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,143,709 ( 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] 1,143,203 ( 0.01%) ???:::expand_ext [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,142,952 ( 0.01%) 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] 1,141,036 ( 0.01%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,139,670 ( 0.01%) 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] 1,135,836 ( 0.01%) ???:rustc_resolve::rustdoc::span_of_fragments [???] 1,135,277 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,135,277 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,133,930 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,133,923 ( 0.01%) ???:::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] 1,133,600 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [???] 1,133,362 ( 0.01%) 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] 1,130,754 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,126,719 ( 0.01%) 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] 1,125,356 ( 0.01%) 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] 1,123,548 ( 0.01%) 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] 1,123,484 ( 0.01%) 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] 1,118,833 ( 0.01%) 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] 1,118,833 ( 0.01%) 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] 1,117,375 ( 0.01%) 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] 1,116,368 ( 0.01%) 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] 1,115,766 ( 0.01%) 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] 1,115,766 ( 0.01%) 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] 1,115,766 ( 0.01%) 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] 1,115,698 ( 0.01%) 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] 1,114,035 ( 0.01%) 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] 1,113,450 ( 0.01%) 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] 1,112,823 ( 0.01%) 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] 1,112,385 ( 0.01%) 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] 1,112,351 ( 0.01%) 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] 1,112,321 ( 0.01%) 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] 1,112,317 ( 0.01%) 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] 1,112,313 ( 0.01%) 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] 1,112,312 ( 0.01%) 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] 1,112,310 ( 0.01%) 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] 1,112,310 ( 0.01%) 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] 1,109,718 ( 0.01%) ???:::into_outputs [???] 1,109,069 ( 0.01%) ???:rustc_hir::intravisit::walk_qpath::> [???] 1,108,095 ( 0.01%) 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] 1,108,050 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 1,107,532 ( 0.01%) ???:0x000000000000aec0 [/usr/lib/ld-linux-x86-64.so.2] 1,096,813 ( 0.01%) ???:::finalize_import::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,095,595 ( 0.01%) ???:rustc_hir::intravisit::walk_ty::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,094,497 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,094,008 ( 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] 1,091,476 ( 0.01%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,090,275 ( 0.01%) ???:::expn_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,087,796 ( 0.01%) include/jemalloc/internal/fb.h:pa_alloc 1,087,380 ( 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] 1,080,188 ( 0.01%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,075,950 ( 0.01%) ???:rustc_query_impl::query_impl::variances_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,064,043 ( 0.01%) ???: 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] 1,063,641 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,057,365 ( 0.01%) ???: as rustc_serialize::serialize::Encodable>::encode [???] 1,054,743 ( 0.01%) ???:rustc_hir::intravisit::walk_item:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,052,362 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,052,362 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,989 ( 0.01%) ???:::set_bindings_effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,519 ( 0.01%) 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] 1,046,882 ( 0.01%) 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] 1,045,843 ( 0.01%) 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] 1,044,100 ( 0.01%) 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] 1,041,915 ( 0.01%) include/jemalloc/internal/arena_inlines_b.h:malloc_default 1,041,693 ( 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] 1,041,627 ( 0.01%) ???:::intern_valtree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,041,600 ( 0.01%) ???: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] 1,039,520 ( 0.01%) ???:::pat_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,037,608 ( 0.01%) ???:::expect_hir_owner_nodes'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,035,043 ( 0.01%) ???:::resolve_crate_root [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,031,018 ( 0.01%) ???:::lower_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,030,798 ( 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] 1,027,324 ( 0.01%) src/hook.c:realloc 1,025,178 ( 0.01%) 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] 1,023,667 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generics [???] 1,021,176 ( 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] 1,020,247 ( 0.01%) ???:::parse_self_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,020,226 ( 0.01%) ???:::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] 1,020,204 ( 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] 1,019,930 ( 0.01%) ???:::edition [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,019,687 ( 0.01%) ???:rustc_hir::hir::is_range_literal [???] 1,019,577 ( 0.01%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,019,261 ( 0.01%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,019,241 ( 0.01%) ???: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] 1,018,835 ( 0.01%) ???:::trait_impl_of_assoc'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,009,346 ( 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] 1,008,912 ( 0.01%) 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] 1,007,896 ( 0.01%) ???:::from_self [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,006,267 ( 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] 1,003,249 ( 0.01%) ???:::requires_monomorphization [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,000,829 ( 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] 999,672 ( 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] 998,839 ( 0.01%) ???:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 997,245 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 993,922 ( 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] 990,904 ( 0.01%) ???:>>::walk_ref'2 [???] 989,867 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 988,220 ( 0.01%) 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] 987,973 ( 0.01%) 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] 986,854 ( 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] 986,737 ( 0.01%) ???:::parse_item_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 984,908 ( 0.01%) 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] 981,450 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 981,116 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 978,662 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 976,080 ( 0.01%) ???:rustc_ast::attr::mk_attr_word [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 974,970 ( 0.01%) 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] 974,337 ( 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] 972,181 ( 0.01%) ???:::hir_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 972,055 ( 0.01%) ???:::hir_item [???] 971,729 ( 0.01%) ???:::is_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 969,430 ( 0.01%) ???:::evaluate_obligation [???] 967,842 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::trim_matches::<::is_whitespace> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 964,370 ( 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: 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] 962,920 ( 0.01%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 954,587 ( 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}> [???] 950,640 ( 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] 946,836 ( 0.01%) 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] 944,015 ( 0.01%) ???:rustc_hir_analysis::coherence::inherent_impls::crate_inherent_impls [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 943,116 ( 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] 940,065 ( 0.01%) ???:>>::walk_ref [???] 939,708 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 929,252 ( 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] 924,448 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 924,364 ( 0.01%) ???: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] 922,160 ( 0.01%) ???:::span_to_location_info [???] 922,023 ( 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] 920,456 ( 0.01%) ???:> 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] 919,887 ( 0.01%) ???:::type_dependent_def [???] 917,326 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 916,262 ( 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] 914,555 ( 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] 913,664 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_fn [???] 910,650 ( 0.01%) ???:::serialize::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 908,762 ( 0.01%) /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::> 908,599 ( 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] 907,742 ( 0.01%) /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] 906,081 ( 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] 905,657 ( 0.01%) ???:::emit_diagnostic::{closure#3} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 904,804 ( 0.01%) ???:::resolve_doc_links'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 903,873 ( 0.01%) ???:::mk_canonical_var_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 902,817 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0} [???] 901,191 ( 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} 900,720 ( 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] 898,894 ( 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] 895,670 ( 0.01%) ???:::check_item [???] 894,648 ( 0.01%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 894,153 ( 0.01%) ???:::record_lifetime_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 889,725 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 884,175 ( 0.01%) ???:::parse_param_general::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 881,858 ( 0.01%) src/extent.c:pa_alloc 880,018 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 874,695 ( 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] 874,032 ( 0.01%) ???:::node [???] 872,270 ( 0.01%) ???:, 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] 871,448 ( 0.01%) 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] 870,627 ( 0.01%) ???:>::tys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 870,249 ( 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] 869,498 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 869,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] 866,810 ( 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] 863,086 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 860,255 ( 0.01%) ???:::deref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 858,945 ( 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] 857,844 ( 0.01%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 856,346 ( 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] 856,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] 855,776 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 855,218 ( 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 855,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 853,994 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 853,651 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 853,555 ( 0.01%) ???:>::tys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 851,999 ( 0.01%) 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] 850,888 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_update.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 850,623 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 850,261 ( 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] 849,235 ( 0.01%) ???: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] 844,468 ( 0.01%) ???:::from_errors_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 840,922 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 840,292 ( 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] 839,732 ( 0.01%) ???:::parse_ident_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 839,694 ( 0.01%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 839,358 ( 0.01%) ???:::walk::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 839,224 ( 0.01%) ???:::parent_module'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 834,746 ( 0.01%) ???:>>::walk_ref [???] 833,381 ( 0.01%) include/jemalloc/internal/tcache_inlines.h:malloc_default 832,849 ( 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] 832,072 ( 0.01%) ???:>, ())>>::reserve_rehash::>, (), [rustc_middle::ty::generic_args::GenericArg]>::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 831,770 ( 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] 830,259 ( 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] 829,657 ( 0.01%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 828,150 ( 0.01%) ???:rustc_query_impl::query_impl::expn_that_defined::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] 827,704 ( 0.01%) include/jemalloc/internal/atomic.h:realloc 826,881 ( 0.01%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 826,618 ( 0.01%) ???:::trait_def_id [???] 825,235 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 824,716 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:realloc 823,222 ( 0.01%) ???:::body_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 820,452 ( 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] 820,338 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 818,426 ( 0.01%) ???:::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] 817,979 ( 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] 815,242 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 812,017 ( 0.01%) ???:::build_reduced_graph_for_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 811,098 ( 0.01%) ???:rustc_query_impl::query_impl::expn_that_defined::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] 810,706 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 808,487 ( 0.01%) ???:>, ::emit_messages_default::{closure#8}> 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] 807,561 ( 0.01%) ???: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] 807,500 ( 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] 807,390 ( 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] 806,720 ( 0.01%) ???:::parse_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 805,987 ( 0.01%) ???:rustc_query_impl::plumbing::verify_query_key_hashes_inner::, rustc_middle::query::erase::ErasedData<[u8; 24]>>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 803,296 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 802,864 ( 0.01%) ???:::visit_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 801,331 ( 0.01%) ???:>::reserve_rehash::, ()>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 801,300 ( 0.01%) ???:rustc_query_impl::query_impl::fn_arg_idents::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] 801,009 ( 0.01%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 800,925 ( 0.01%) ???:rustc_query_impl::query_impl::intrinsic_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] 799,824 ( 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] 797,686 ( 0.01%) ???:::ensure_source_file_source_present [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 791,904 ( 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] 790,983 ( 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 788,272 ( 0.01%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 788,072 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_block [???] 786,594 ( 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] 785,160 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 783,816 ( 0.01%) ???:, 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] 779,670 ( 0.01%) ???:::hir_span_with_body'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 779,518 ( 0.01%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 779,495 ( 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] 779,245 ( 0.01%) ???:::evaluate_predicate_recursively [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 779,150 ( 0.01%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:::check_attributes 776,630 ( 0.01%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 772,167 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 771,661 ( 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] 769,531 ( 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::::check::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 769,357 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 766,304 ( 0.01%) ???:::build_with_typing_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 765,501 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 765,234 ( 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] 764,520 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unicode.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 761,112 ( 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] 760,724 ( 0.01%) ???: 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] 760,565 ( 0.01%) ???:rustc_ast::visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 760,133 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::ty::ImplTraitHeader>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 758,393 ( 0.01%) ???:::parse_pat_with_range_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 758,209 ( 0.01%) ???:rustc_query_impl::query_impl::asyncness::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] 758,027 ( 0.01%) ???:rustc_ast::visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 756,800 ( 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] 756,607 ( 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/structural_impls.rs:>::super_fold_with::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 756,392 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 753,997 ( 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] 753,651 ( 0.01%) ???:::insert'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 750,563 ( 0.01%) ???:>::append_text [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 748,135 ( 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_expr 747,891 ( 0.01%) ???:>, ())>>::reserve_rehash::>, (), [rustc_middle::ty::Ty]>::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 746,852 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 746,682 ( 0.01%) ???:::parse_safety [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 746,029 ( 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> 745,713 ( 0.01%) ???:rustc_mir_transform::mir_keys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 744,720 ( 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] 743,840 ( 0.01%) ???:rustc_query_impl::query_impl::cross_crate_inlinable::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] 743,696 ( 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] 743,003 ( 0.01%) ???:::start_point'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 742,698 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 742,445 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 739,955 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 24]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 739,115 ( 0.01%) /rust/deps/pulldown-cmark-0.11.3/src/scanners.rs:pulldown_cmark::scanners::unescape::<&str> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 738,314 ( 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 737,391 ( 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] 733,619 ( 0.01%) ???:>, 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] 733,544 ( 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] 731,907 ( 0.01%) /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] 731,646 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_ty 730,880 ( 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] 730,620 ( 0.01%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 730,134 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 729,258 ( 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 728,922 ( 0.01%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 723,366 ( 0.01%) ???:::parent_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 722,185 ( 0.01%) 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] 721,140 ( 0.01%) 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> 719,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::eq_op::check_assert 719,730 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 719,075 ( 0.01%) ???:>>::walk_ref'2 [???] 718,204 ( 0.01%) ???:::from_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 718,144 ( 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] 717,362 ( 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] 716,298 ( 0.01%) /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 716,298 ( 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_utils::method_chain_args 715,529 ( 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 715,290 ( 0.01%) ???:::parse_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 711,315 ( 0.01%) ???:::parse_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 711,310 ( 0.01%) ???:::break_and_eat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 710,848 ( 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 709,694 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 707,810 ( 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] 706,070 ( 0.01%) ???: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] 705,342 ( 0.01%) ???:rustc_middle::ty::trait_def::traits_provider [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 704,432 ( 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] 704,020 ( 0.01%) 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] 699,928 ( 0.01%) include/jemalloc/internal/edata.h:ecache_evict 699,424 ( 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] 699,266 ( 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: as core::iter::traits::iterator::Iterator>::next 698,334 ( 0.01%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 697,527 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 696,600 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 696,456 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 695,903 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 693,653 ( 0.01%) ???:::eat_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 692,278 ( 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_lints::doc::doc_suspicious_footnotes::check 690,869 ( 0.01%) ???: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] 690,772 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 689,909 ( 0.01%) ???:::send_new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 687,418 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 685,972 ( 0.01%) ???:, 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] 681,992 ( 0.01%) ???:::to_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 681,515 ( 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] 679,545 ( 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] 677,324 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_small 676,000 ( 0.01%) ???:::is_valid_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 674,731 ( 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 673,663 ( 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] 673,451 ( 0.01%) ???:::visit_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 672,132 ( 0.01%) ???:::create_method [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 667,245 ( 0.01%) ???:dladdr [/usr/lib/libc.so.6] 666,400 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 666,247 ( 0.01%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 665,426 ( 0.01%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 664,871 ( 0.01%) ???:::visit_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 662,597 ( 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] 661,416 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 660,840 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 660,670 ( 0.01%) ???:::expr_adjustments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 659,241 ( 0.01%) ???:> 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] 657,170 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes 657,170 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes_post 654,742 ( 0.01%) 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] 653,516 ( 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] 652,861 ( 0.01%) ???:::lower_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 651,241 ( 0.01%) ???:::parse_dot_suffix_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 650,067 ( 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] 648,586 ( 0.01%) ???: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] 647,844 ( 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 646,668 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 645,966 ( 0.01%) ???:::instantiate_identity_into'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 643,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] 641,708 ( 0.01%) ???:::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] 641,682 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 640,436 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 638,486 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 637,673 ( 0.01%) ???:::try_mark_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 637,286 ( 0.01%) ???:rustc_resolve::rustdoc::prepare_to_doc_link_resolution [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 636,980 ( 0.01%) /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] 635,549 ( 0.01%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 635,122 ( 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] 634,833 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 631,923 ( 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] 629,328 ( 0.01%) ???:>>,)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 626,481 ( 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] 623,527 ( 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: as rustc_type_ir::fold::TypeFolder>::fold_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 622,420 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 621,185 ( 0.01%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 619,382 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 618,716 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 618,555 ( 0.01%) include/jemalloc/internal/tsd_tls.h:realloc 617,804 ( 0.01%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 617,357 ( 0.01%) ???:rustc_resolve::rustdoc::parse_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 615,383 ( 0.01%) include/jemalloc/internal/ph.h:eset_remove 614,945 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 613,470 ( 0.01%) ???:>>::walk_ref [???] 613,197 ( 0.01%) 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] 612,394 ( 0.01%) ???:::trait_impl_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 611,638 ( 0.01%) ???:::trim_matches::<::is_whitespace> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 611,228 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 610,568 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 610,508 ( 0.01%) ???:::path_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 608,572 ( 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 607,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] 604,791 ( 0.01%) ???:::ident [???] 604,374 ( 0.01%) ???:::hir_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 603,542 ( 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:::next_match 603,290 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:::check_attributes 602,106 ( 0.01%) ???:::mut_visit_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 598,616 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_expr 598,113 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 598,041 ( 0.01%) ???:>>>::set [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 597,994 ( 0.01%) ???:::walk [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 597,553 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 597,514 ( 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] 596,915 ( 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:clippy_utils::method_chain_args 595,531 ( 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] 595,076 ( 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] 592,545 ( 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] 592,425 ( 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] 592,256 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_generic_param::{closure#0} [???] 589,656 ( 0.01%) include/jemalloc/internal/thread_event.h:malloc_default 588,716 ( 0.01%) /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 588,300 ( 0.01%) ???:rustc_query_impl::query_impl::associated_types_for_impl_traits_in_trait_or_impl::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] 588,023 ( 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] 587,205 ( 0.01%) ???:::parse_expr_prefix'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 582,036 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 579,414 ( 0.01%) ???:::type_dependent_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 578,257 ( 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] 577,187 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 577,039 ( 0.01%) ???:::lower_attrs_with_extra [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 575,027 ( 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] 574,966 ( 0.01%) ???:>>>, ())>>::reserve_rehash::>>>, (), rustc_type_ir::binder::Binder>>::{closure#1}> [???] 574,105 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_stashed 572,678 ( 0.01%) ???:::lazy::>, rustc_hash::FxBuildHasher>, &indexmap::map::IndexMap<(rustc_span::symbol::Symbol, rustc_hir::def::Namespace), core::option::Option>, rustc_hash::FxBuildHasher>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 571,909 ( 0.01%) ???:::parse_footnote [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 570,266 ( 0.01%) ???:::visit_expr [???] 569,996 ( 0.01%) 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] 569,538 ( 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] 569,066 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 566,833 ( 0.01%) ???: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] 566,464 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 566,334 ( 0.01%) ???:::typeck_root_def_id_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 563,736 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 559,902 ( 0.01%) ???:::annotated_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 559,431 ( 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] 558,460 ( 0.01%) ???:>>, ())>>::reserve_rehash::>>, (), [rustc_type_ir::binder::BoundVariableKind]>::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 555,748 ( 0.01%) ???:::annotated_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 555,064 ( 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] 554,025 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes 551,118 ( 0.01%) ???:::has_typeck_results'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 550,014 ( 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] 549,117 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 545,648 ( 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] 544,947 ( 0.01%) ???:::expr_ty_opt [???] 544,047 ( 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] 543,221 ( 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] 542,070 ( 0.01%) ???:>::univariant::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 541,577 ( 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] 541,530 ( 0.01%) ???:::visit_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 540,872 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 538,777 ( 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 538,020 ( 0.01%) ???:::filter_map_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 535,648 ( 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 535,648 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes_post 534,955 ( 0.01%) 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] 534,877 ( 0.01%) ???:::check_args_compatible_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 534,560 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::finish_grow 533,792 ( 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] 533,561 ( 0.01%) ???:<&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] 533,015 ( 0.01%) ???:::lower_expr_mut::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 532,341 ( 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:>::reserve::do_reserve_and_handle:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 531,597 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::hir::ModuleItems>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 531,253 ( 0.01%) ???:> 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] 528,338 ( 0.01%) ???:::node_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 528,312 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 527,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_post 527,561 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 524,631 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 524,587 ( 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] 524,190 ( 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 523,550 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 523,263 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 522,678 ( 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] 522,150 ( 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] 521,900 ( 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] 520,844 ( 0.01%) ???:::get_module_children::{closure#0}, core::result::Result::Ok>, core::result::Result> as core::iter::traits::iterator::Iterator>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 520,128 ( 0.01%) ???: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] 518,787 ( 0.01%) ???:::load_side_effect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 517,272 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 517,209 ( 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] 516,005 ( 0.01%) ???:<(&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] 514,841 ( 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] 514,548 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 514,364 ( 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] 514,108 ( 0.01%) ???:::resolve_macro_or_delegation_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 512,307 ( 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:: 511,795 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 511,394 ( 0.01%) ???:::resolve_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 510,724 ( 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] 509,459 ( 0.01%) ???:rustc_hir::intravisit::walk_pat::> [???] 509,355 ( 0.01%) ???:::typing_env [???] 509,131 ( 0.01%) include/jemalloc/internal/mutex.h:pa_alloc 509,124 ( 0.01%) 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] 507,184 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 506,406 ( 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] 506,184 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 506,001 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_path'2 [???] 504,966 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_args [???] 504,594 ( 0.01%) ???:::drop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 504,383 ( 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] 504,120 ( 0.01%) 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] 504,080 ( 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] 503,940 ( 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 503,430 ( 0.01%) ???:>>::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] 502,003 ( 0.01%) ???:::update [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 501,544 ( 0.01%) 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] 500,728 ( 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] 499,698 ( 0.01%) ???:::span_to_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,697 ( 0.01%) ???:rustc_query_impl::query_impl::lower_to_hir::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,623 ( 0.01%) ???:::check_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 499,207 ( 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] 498,930 ( 0.01%) ???:, 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] 498,448 ( 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] 496,920 ( 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 496,582 ( 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] 496,215 ( 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] 496,042 ( 0.01%) include/jemalloc/internal/ph.h:ecache_evict 495,876 ( 0.01%) ???:::features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 494,551 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 493,937 ( 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] 493,855 ( 0.01%) ???:>::complete::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 493,269 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> 490,716 ( 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_attributes 490,716 ( 0.01%) ???:::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 490,625 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_expr 488,423 ( 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 487,975 ( 0.01%) ???:>::visit_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 487,080 ( 0.01%) ???:::parse_coroutine_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 486,532 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 486,393 ( 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] 485,481 ( 0.01%) ???:::lower_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 484,734 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 484,351 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 484,099 ( 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] 480,805 ( 0.01%) ???:::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] 480,717 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 480,682 ( 0.01%) ???: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] 480,555 ( 0.01%) ???:rustc_middle::ty::util::intrinsic_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 479,526 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 478,588 ( 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] 477,532 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:clippy_utils::method_chain_args 477,317 ( 0.01%) ???:::lower_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 476,630 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 475,415 ( 0.01%) ???:<::expand_abstract_consts::Expander as rustc_type_ir::fold::TypeFolder>::fold_const [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 475,182 ( 0.01%) include/jemalloc/internal/bit_util.h:pa_alloc 475,020 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 474,912 ( 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] 474,912 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 474,469 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,448 ( 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 474,012 ( 0.01%) 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] 473,952 ( 0.01%) src/sz.c:pa_alloc 473,467 ( 0.01%) 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] 471,770 ( 0.01%) ???:>, ())>>::reserve_rehash::>, (), rustc_hash::FxBuildHasher>::{closure#0}> [???] 470,737 ( 0.01%) include/jemalloc/internal/sz.h:eset_remove 469,872 ( 0.01%) ???:::hir_owner_parent'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,606 ( 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] 468,714 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::iter::traits::iterator::Iterator>::next 468,316 ( 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] 468,280 ( 0.01%) ???:::source_callee [???] 467,685 ( 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] 467,039 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::finish_grow 466,686 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 466,333 ( 0.01%) ???:__rustc::__rdl_dealloc [???] 464,695 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs:clippy_lints::doc::check_doc::> 462,078 ( 0.01%) include/jemalloc/internal/edata.h:eset_remove 461,953 ( 0.01%) ???:::check_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 461,696 ( 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] 460,401 ( 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] 460,217 ( 0.01%) 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] 459,557 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 459,072 ( 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> 458,404 ( 0.01%) ???:::hash_owner_nodes::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 458,345 ( 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] 458,010 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr_post 457,418 ( 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] 456,719 ( 0.01%) 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] 455,864 ( 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::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 455,818 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 454,733 ( 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] 454,203 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_item_kind 453,592 ( 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:core::ptr::drop_glue:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 452,101 ( 0.01%) ???:::local_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 451,926 ( 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] 451,579 ( 0.01%) /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 450,937 ( 0.01%) ???:::visit_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,724 ( 0.01%) src/tcache.c:free_default 449,004 ( 0.01%) 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] 448,596 ( 0.01%) ???: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] 448,592 ( 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] 448,369 ( 0.01%) /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] 448,118 ( 0.01%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 448,034 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 447,592 ( 0.01%) /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] 446,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_lints::functions::must_use::check_impl_item 446,589 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 446,298 ( 0.01%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 446,000 ( 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] 445,951 ( 0.01%) ???:rustc_query_impl::query_impl::impl_is_fully_generic_for_reflection::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] 445,400 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 445,395 ( 0.01%) ???: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] 445,126 ( 0.01%) include/jemalloc/internal/edata.h:malloc_default 444,682 ( 0.01%) ???:<&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] 444,327 ( 0.01%) ???:::visit_invoc_in_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 443,981 ( 0.01%) ???:::parse_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 443,220 ( 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 443,220 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes_post 443,019 ( 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] 442,770 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/too_many_lines.rs:::check_fn 442,422 ( 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] 442,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] 442,037 ( 0.01%) ???:>), rustc_middle::traits::cache::WithDepNode)>>::reserve_rehash::>), rustc_middle::traits::cache::WithDepNode, rustc_hash::FxBuildHasher>::{closure#0}> [???] 440,965 ( 0.01%) /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:: 440,873 ( 0.01%) 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] 440,639 ( 0.01%) ???:llvm::cl::Option::addArgument() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 440,424 ( 0.01%) ???:::typing_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 439,944 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 438,584 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 438,393 ( 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 438,110 ( 0.01%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 438,002 ( 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_fn::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 437,798 ( 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] 437,510 ( 0.01%) 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] 437,486 ( 0.01%) src/tcache.c:malloc_default 437,387 ( 0.01%) ???:rustc_hir::intravisit::walk_generic_args:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 437,312 ( 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:>::next_back [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 436,750 ( 0.01%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 435,424 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 434,822 ( 0.01%) ???:>, (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}> [???] 433,827 ( 0.01%) ???:::impl_or_trait_obligations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 433,284 ( 0.01%) ???:__tls_get_addr [/usr/lib/ld-linux-x86-64.so.2] 432,343 ( 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 432,119 ( 0.01%) ???:::load_side_effect'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,543 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,543 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,543 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 431,543 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 430,389 ( 0.01%) ???:::into_string:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 430,296 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,609 ( 0.01%) include/jemalloc/internal/rtree.h:pa_dalloc 428,520 ( 0.01%) ???:core::slice::memchr::memrchr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 427,584 ( 0.01%) ???:::as_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 427,383 ( 0.01%) ???:::resolve_anon_const_manual::<::visit_generic_arg::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 425,432 ( 0.01%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/extent.c:ecache_evict [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 425,211 ( 0.01%) ???:rustc_passes::dead::has_allow_dead_code_or_lang_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 424,516 ( 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] 424,085 ( 0.01%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 423,937 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::GenericParam; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 422,457 ( 0.01%) ???:>::from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 421,736 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 421,712 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 421,388 ( 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 421,266 ( 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 421,061 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::WherePredicate; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 421,012 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 420,846 ( 0.01%) include/jemalloc/internal/sz.h:tcache_bin_flush_small 418,220 ( 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] 418,114 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 417,527 ( 0.01%) ???:::hir_span'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 417,197 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 416,221 ( 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] 416,100 ( 0.01%) ???:<::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] 415,921 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 415,877 ( 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] 415,548 ( 0.01%) ???:>::get_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 415,220 ( 0.01%) ???: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] 415,213 ( 0.01%) ???:rustc_middle::ty::trait_def::trait_impls_of_provider [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 414,871 ( 0.01%) ???:::schedule_expn_data_for_encoding [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 414,605 ( 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] 414,405 ( 0.01%) ???:::call_once_force::<>, rustc_hash::FxBuildHasher>>>::initialize<>, rustc_hash::FxBuildHasher>>>::get_or_init<::resolutions::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 413,148 ( 0.01%) /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] 413,136 ( 0.01%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 412,505 ( 0.01%) ???: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] 412,047 ( 0.01%) include/jemalloc/internal/atomic.h:pa_alloc 411,306 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 411,159 ( 0.01%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 411,035 ( 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_fn:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 410,670 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_param [???] 410,226 ( 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] 410,226 ( 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] 410,226 ( 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] 410,226 ( 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] 410,226 ( 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] 409,018 ( 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 408,751 ( 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] 408,000 ( 0.01%) ???:rustc_errors::formatting::format_diag_messages [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 407,898 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 407,518 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 406,840 ( 0.01%) ???:::check_expr_post [???] 405,877 ( 0.01%) ???: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] 405,331 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 404,039 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 403,859 ( 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:>::handle_inline_pass1 403,858 ( 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] 403,187 ( 0.01%) ???:::requires_monomorphization'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 403,040 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 402,441 ( 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 401,929 ( 0.01%) ???: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] 401,182 ( 0.01%) ???:::is_automatically_derived [???] 401,050 ( 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:core::ptr::drop_glue:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 399,695 ( 0.01%) ???:rustc_mir_transform::ffi_unwind_calls::required_panic_strategy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 399,660 ( 0.01%) ???:, 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] 399,516 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::finish_grow 399,315 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 398,777 ( 0.01%) ???:::between [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 398,730 ( 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 396,740 ( 0.00%) 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] 396,071 ( 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::casts::cast_slice_different_sizes::expr_cast_chain_tys 395,765 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 394,504 ( 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] 394,157 ( 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] 392,580 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_expr 392,580 ( 0.00%) 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] 392,579 ( 0.00%) include/jemalloc/internal/ph.h:malloc_default 392,539 ( 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] 392,429 ( 0.00%) ???:::visit_pat [???] 392,252 ( 0.00%) ???:::insert_field_idents [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 391,199 ( 0.00%) ???:::walk::<::check_consistent_bindings::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 391,128 ( 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] 390,712 ( 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> 390,615 ( 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] 390,414 ( 0.00%) ???:::check_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 389,654 ( 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] 388,761 ( 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] 386,848 ( 0.00%) ???:::implicit_self [???] 386,704 ( 0.00%) ???:annotate_snippets::renderer::render::render'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 386,142 ( 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] 384,541 ( 0.00%) ???:rustc_passes::reachable::reachable_set [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 384,385 ( 0.00%) ???:rustc_ast::visit::visit_arms::> [???] 384,275 ( 0.00%) include/jemalloc/internal/rtree.h:free_default 384,161 ( 0.00%) ???:::flat_map_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 383,776 ( 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] 383,415 ( 0.00%) 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] 382,630 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 381,539 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_fn_decl [???] 380,919 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,332 ( 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 379,090 ( 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] 378,611 ( 0.00%) ???:::lower_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 378,528 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Arm; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 378,206 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 377,952 ( 0.00%) ???:0x0000000000029600 [/usr/lib/ld-linux-x86-64.so.2] 376,943 ( 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] 376,829 ( 0.00%) 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] 376,808 ( 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] 376,782 ( 0.00%) 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] 375,840 ( 0.00%) ???:::unescape_1 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 375,472 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::root_macro_call 375,309 ( 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] 375,070 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 374,620 ( 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 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 373,464 ( 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] 373,260 ( 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] 373,178 ( 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] 372,894 ( 0.00%) ???:::ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 372,686 ( 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] 371,025 ( 0.00%) ???:>>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 370,987 ( 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] 370,738 ( 0.00%) ???:::render_multispans_macro_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 370,684 ( 0.00%) ???:::check_args_compatible_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 370,422 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derivable_impls.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 370,017 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 369,997 ( 0.00%) 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] 369,339 ( 0.00%) ???:<[rustc_middle::ty::generic_args::GenericArg] as rustc_serialize::serialize::Encodable>::encode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 369,028 ( 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] 368,898 ( 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] 368,764 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 368,084 ( 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 368,037 ( 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 367,811 ( 0.00%) ???:::parse_arm::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 367,765 ( 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::is_in_test 367,414 ( 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] 367,265 ( 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::is_in_test 365,615 ( 0.00%) ???:::parse_item_enum [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 365,080 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 364,750 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 364,724 ( 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] 364,201 ( 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] 363,501 ( 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] 362,322 ( 0.00%) ???:::meta [???] 361,045 ( 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::doc::missing_headers::check 360,869 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 360,721 ( 0.00%) ???:rustc_query_impl::query_impl::layout_of::execute_query_incr::__rust_end_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 360,649 ( 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 359,506 ( 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] 359,482 ( 0.00%) ???:::to_vec_in::ConvertVec>::to_vec:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,421 ( 0.00%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:malloc_default 358,992 ( 0.00%) ???: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] 358,943 ( 0.00%) ???:::check_stmt [???] 358,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_expr:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 358,152 ( 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::> 358,149 ( 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 358,149 ( 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 358,092 ( 0.00%) ???:::with_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 357,700 ( 0.00%) ???:::advance_left [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 357,644 ( 0.00%) 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] 357,287 ( 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] 356,642 ( 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] 356,580 ( 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] 356,208 ( 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] 355,157 ( 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] 355,071 ( 0.00%) ???:rustc_ast_lowering::lower_to_hir'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 353,346 ( 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 352,931 ( 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> 352,832 ( 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] 352,734 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:free_default [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 352,440 ( 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] 352,335 ( 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] 352,044 ( 0.00%) src/thread_event.c:malloc_default 351,970 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 351,406 ( 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 351,181 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 351,112 ( 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] 350,843 ( 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::sugg::has_enclosing_paren:: 349,603 ( 0.00%) ???:::visit_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 348,730 ( 0.00%) ???:rustc_traits::normalize_projection_ty::normalize_canonicalized_projection [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 346,291 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::check_attributes 345,402 ( 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] 345,386 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 345,386 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 345,386 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 345,304 ( 0.00%) ???:::mk_layout [???] 345,031 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty'2 [???] 343,778 ( 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] 343,104 ( 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] 342,482 ( 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] 342,420 ( 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::macros::first_node_in_macro:: 342,192 ( 0.00%) 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] 341,726 ( 0.00%) 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] 341,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_pat::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 341,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_pat:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 341,412 ( 0.00%) ???:::define_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 340,642 ( 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::doc::missing_headers::check 340,284 ( 0.00%) include/jemalloc/internal/edata.h:pa_dalloc 339,679 ( 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::> 339,204 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_type_ir::sty::Region>>::new 339,109 ( 0.00%) ???:::walk:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 338,622 ( 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] 338,601 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/include_in_doc_without_cfg.rs:::check_attributes 337,822 ( 0.00%) ???:::parse_borrowed_pointee [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,546 ( 0.00%) ???:::flat_map_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,353 ( 0.00%) ???:pulldown_cmark::firstpass::scan_paragraph_interrupt_no_table [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,214 ( 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] 337,032 ( 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] 336,905 ( 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/eset.c:eset_remove [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 336,590 ( 0.00%) ???:::make_canonicalized_query_response:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 336,009 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 335,904 ( 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] 335,075 ( 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] 335,025 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 335,025 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 334,543 ( 0.00%) ???:::from_span_label [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 334,500 ( 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] 334,224 ( 0.00%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 334,214 ( 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 332,415 ( 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 332,415 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 332,415 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::doc::suspicious_doc_comments::check 331,984 ( 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] 331,687 ( 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] 331,285 ( 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 331,257 ( 0.00%) include/jemalloc/internal/mutex.h:tcache_bin_flush_small 331,041 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 330,708 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::check_attributes 330,088 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 329,715 ( 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] 329,134 ( 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_expr 329,107 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::visit_expr'2 329,059 ( 0.00%) ???:::lower_use_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,034 ( 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] 328,372 ( 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] 328,019 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 327,655 ( 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 327,598 ( 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 327,579 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 327,378 ( 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::operators::float_cmp::check_assert 327,352 ( 0.00%) src/thread_event.c:free_default 327,315 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 327,150 ( 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_expr 327,150 ( 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_expr 327,150 ( 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_expr 327,150 ( 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_expr 327,150 ( 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_expr 327,150 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_expr 327,150 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:::check_expr 326,887 ( 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] 326,832 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait_with_env [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 326,690 ( 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 326,690 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::meets 326,502 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 326,486 ( 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] 326,062 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased:: 325,846 ( 0.00%) ???:::fill_well_known'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 325,253 ( 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] 325,176 ( 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:::trim_start_matches::<::is_whitespace> 325,148 ( 0.00%) ???:::from_multispan [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 324,402 ( 0.00%) ???:::visit_body [???] 324,280 ( 0.00%) ???:>>::walk_ref [???] 323,850 ( 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] 323,664 ( 0.00%) include/jemalloc/internal/mutex.h:malloc_default 322,989 ( 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] 322,901 ( 0.00%) ???: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] 322,569 ( 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] 321,972 ( 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] 321,936 ( 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] 321,587 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 321,277 ( 0.00%) ???:::alloc_ctxt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 321,026 ( 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 319,241 ( 0.00%) ???:::visit_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 318,384 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_path 317,714 ( 0.00%) include/jemalloc/internal/rtree.h:extent_try_coalesce_impl.llvm.9305427869391012685 317,610 ( 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] 317,518 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 317,207 ( 0.00%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 316,346 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:::check_expr 315,483 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 315,209 ( 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 314,902 ( 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 314,902 ( 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 314,902 ( 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 314,902 ( 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 314,882 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast 314,697 ( 0.00%) 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] 314,153 ( 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] 313,769 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_non_exhaustive.rs:::check_expr 313,732 ( 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] 313,044 ( 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 311,845 ( 0.00%) ???:::lazy_array::, &rustc_span::def_id::DefId> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 311,661 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 310,133 ( 0.00%) ???:annotate_snippets::renderer::render::draw_code_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,540 ( 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] 308,902 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 308,902 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 308,902 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 308,266 ( 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] 307,982 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check 307,381 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs:::check_expr 307,142 ( 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] 306,963 ( 0.00%) ???:::add_early_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 306,300 ( 0.00%) ???:rustc_query_impl::query_impl::thir_abstract_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] 305,813 ( 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] 305,486 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 305,388 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 305,377 ( 0.00%) 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] 304,338 ( 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] 303,394 ( 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] 302,148 ( 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] 301,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::macros::matching_root_macro_call 301,588 ( 0.00%) src/emap.c:pa_alloc 301,210 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 301,210 ( 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] 301,200 ( 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] 300,895 ( 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 300,335 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,234 ( 0.00%) ???:::leak_check [???] 298,925 ( 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] 298,188 ( 0.00%) ???:::resolve_lifetime_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 297,711 ( 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_attributes 296,980 ( 0.00%) ???:::resolve_and_cache_rustdoc_path'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 296,308 ( 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::> 295,602 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 295,282 ( 0.00%) 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] 295,218 ( 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] 294,795 ( 0.00%) ???:>::super_visit_with::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 294,692 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 294,672 ( 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] 294,672 ( 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] 294,672 ( 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] 294,228 ( 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_fn 293,964 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/lint.rs:rustc_middle::lint::emit_lint_base::::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 293,891 ( 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] 293,656 ( 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] 293,135 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 292,466 ( 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] 292,209 ( 0.00%) ???:::name [???] 291,222 ( 0.00%) 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] 290,894 ( 0.00%) ???:::defaultness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 290,273 ( 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:::check_fn 289,815 ( 0.00%) ???:rustc_lint::unused::must_use::is_ty_must_use'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,138 ( 0.00%) ???:::future_proof_import [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,006 ( 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] 288,827 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 288,810 ( 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] 288,716 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 288,582 ( 0.00%) ???:rustc_span::hygiene::decode_syntax_context::::decode_syntax_context::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 288,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/vec_cache.rs:::check_fn 287,912 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 287,403 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 287,034 ( 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] 286,870 ( 0.00%) ???:::expr_ty_adjusted [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 286,723 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 286,646 ( 0.00%) include/jemalloc/internal/ph.h:pa_dalloc 286,512 ( 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] 286,301 ( 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 286,128 ( 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] 285,876 ( 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] 285,425 ( 0.00%) ???:>::instantiate_supertrait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 285,240 ( 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] 285,056 ( 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}>::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 284,875 ( 0.00%) 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] 284,500 ( 0.00%) src/emap.c:ecache_evict 284,111 ( 0.00%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 284,007 ( 0.00%) ???:0x00000000000947c0 [/usr/lib/libc.so.6] 283,924 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 283,294 ( 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] 282,840 ( 0.00%) include/jemalloc/internal/tsd.h:malloc_default 282,689 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_use_tree [???] 282,428 ( 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] 282,209 ( 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] 281,900 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 281,880 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 281,724 ( 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] 281,714 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,510 ( 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] 280,494 ( 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] 280,296 ( 0.00%) ???:::expect_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,191 ( 0.00%) ???:::parse_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,153 ( 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::> 279,594 ( 0.00%) 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] 279,594 ( 0.00%) 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] 279,594 ( 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] 278,808 ( 0.00%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 278,726 ( 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] 278,096 ( 0.00%) ???:::fix_multispan_in_extern_macros [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 277,973 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 277,958 ( 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] 277,631 ( 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] 276,976 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 276,370 ( 0.00%) ???:getenv [/usr/lib/libc.so.6] 276,213 ( 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] 275,643 ( 0.00%) ???:::item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 275,464 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 274,891 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/impl_trait_in_params.rs:::check_impl_item 274,790 ( 0.00%) ???:::update_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,026 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 273,426 ( 0.00%) ???:::has_typeck_results [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 273,275 ( 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 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 272,677 ( 0.00%) ???:::is_inhabited_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 272,655 ( 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] 272,085 ( 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] 271,837 ( 0.00%) ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,802 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,671 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,089 ( 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 270,596 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,987 ( 0.00%) ???:rustc_data_structures::outline::<::lines::{closure#0}, &[rustc_span::RelativeBytePos]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,335 ( 0.00%) ???:::opt_rpitit_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,226 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,132 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 269,110 ( 0.00%) ???:>)>>, ::encode_impls::{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] 269,055 ( 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] 268,974 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/large_enum_variant.rs:::check_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 268,752 ( 0.00%) include/jemalloc/internal/ticker.h:malloc_default 268,644 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 268,635 ( 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] 268,617 ( 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_attributes 268,275 ( 0.00%) ???:annotate_snippets::renderer::render::maybe_anonymized [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 268,096 ( 0.00%) src/extent.c:tcache_bin_flush_small 267,985 ( 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] 267,824 ( 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 267,745 ( 0.00%) ???:>::tys::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 267,732 ( 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] 267,450 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 267,341 ( 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 267,078 ( 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] 266,975 ( 0.00%) ???:rustc_query_impl::query_impl::intrinsic_raw::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] 266,847 ( 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 266,817 ( 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] 266,355 ( 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 266,039 ( 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] 265,947 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,323 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,169 ( 0.00%) ???:::send_and_color [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 265,092 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 264,782 ( 0.00%) ???:::hir_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 264,223 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 264,061 ( 0.00%) 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] 263,093 ( 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 262,963 ( 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] 262,904 ( 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] 262,645 ( 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] 262,627 ( 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] 262,073 ( 0.00%) ???:pulldown_cmark::firstpass::delim_run_can_close [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,916 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_expr 261,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:::hir 261,476 ( 0.00%) ???:::emit_diagnostic::{closure#3}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,289 ( 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] 261,126 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 260,888 ( 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] 260,470 ( 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] 260,344 ( 0.00%) ???:rustc_query_impl::query_impl::cross_crate_inlinable::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] 260,170 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::attrs_for_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 260,008 ( 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] 259,203 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/utils.rs:clippy_lints::attrs::utils::is_relevant_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 258,889 ( 0.00%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 258,499 ( 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] 258,278 ( 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 257,861 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 257,288 ( 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 257,171 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 256,271 ( 0.00%) ???:>::fold_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 256,228 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 256,224 ( 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] 256,056 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_arm::{closure#0} [???] 256,026 ( 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] 255,577 ( 0.00%) ???:::extract_arg_details [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 255,475 ( 0.00%) ???:>, core::iter::adapters::map::Map, ::fix_multispan_in_extern_macros::{closure#1}>>, ::fix_multispan_in_extern_macros::{closure#2}> 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] 255,456 ( 0.00%) ???:::fix_multispan_in_extern_macros::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 255,168 ( 0.00%) ???:rustc_query_impl::query_impl::mir_const_qualif::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] 254,802 ( 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_try_coalesce_impl.llvm.9305427869391012685 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 254,048 ( 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 253,946 ( 0.00%) ???:::read_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 253,810 ( 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] 253,766 ( 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] 253,208 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 252,805 ( 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] 252,738 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 252,297 ( 0.00%) ???:<[(rustc_error_messages::DiagMessage, rustc_errors::Style)] as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 251,719 ( 0.00%) ???:::resolve_derives [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 251,344 ( 0.00%) ???:__cxa_finalize [/usr/lib/libc.so.6] 250,737 ( 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] 250,685 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/utils.rs:clippy_lints::attrs::utils::is_relevant_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 250,412 ( 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] 250,200 ( 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] 249,890 ( 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] 249,510 ( 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] 249,508 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 249,501 ( 0.00%) ???:::pad_integral [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 249,437 ( 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] 249,396 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_ty 249,328 ( 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:: 249,040 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::option::Option>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,999 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,681 ( 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] 247,760 ( 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] 247,744 ( 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 247,222 ( 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] 246,919 ( 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:: 246,880 ( 0.00%) ???:::prepare_to_combine'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 246,669 ( 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:: 246,335 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 246,000 ( 0.00%) ???:>>::upcast_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 245,621 ( 0.00%) src/arena.c:tcache_bin_flush_small 245,268 ( 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] 245,255 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 244,998 ( 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::doc::missing_headers::check 244,741 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:rustc_middle::ty::util::fold_list::, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>, rustc_middle::ty::generic_args::GenericArg, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with>::{closure#0}> 244,149 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 243,915 ( 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] 243,822 ( 0.00%) ???: 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] 243,300 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 243,106 ( 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] 242,798 ( 0.00%) ???:>::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,755 ( 0.00%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,640 ( 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] 242,443 ( 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] 242,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:::check_attributes 241,928 ( 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] 241,769 ( 0.00%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 241,031 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,907 ( 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] 240,735 ( 0.00%) ???:<::check_impl_trait::ImplTraitVisitor as rustc_ast::visit::Visitor>::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,264 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::trim_start_matches::<::is_whitespace> 239,165 ( 0.00%) ???:rustc_lint::nonstandard_style::char_has_case [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,030 ( 0.00%) ???:::find_ancestor_inside [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 238,944 ( 0.00%) ???:::until [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 238,803 ( 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] 238,750 ( 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] 238,744 ( 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] 238,731 ( 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] 238,362 ( 0.00%) 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] 237,862 ( 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] 237,330 ( 0.00%) ???:::meta_item_list [???] 237,272 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 236,754 ( 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] 235,917 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::insert 235,884 ( 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}> 235,611 ( 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 235,580 ( 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] 235,560 ( 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 235,350 ( 0.00%) ???:rustc_query_impl::query_impl::associated_types_for_impl_traits_in_trait_or_impl::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] 235,205 ( 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] 234,889 ( 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] 234,127 ( 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 234,058 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 233,745 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/doc_comment_double_space_linebreaks.rs:clippy_lints::doc::doc_comment_double_space_linebreaks::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 233,729 ( 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] 233,208 ( 0.00%) ???:rustc_hir::intravisit::walk_qpath::>'2 [???] 233,178 ( 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] 233,178 ( 0.00%) include/jemalloc/internal/thread_event.h:free_default 233,001 ( 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] 232,995 ( 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] 232,995 ( 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] 232,414 ( 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] 232,095 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 231,510 ( 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] 231,506 ( 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] 230,626 ( 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 230,293 ( 0.00%) ???:::maybe_report_lifetime_uses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 230,142 ( 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] 229,926 ( 0.00%) ???:::expect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 229,725 ( 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 229,093 ( 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] 229,040 ( 0.00%) ???:, ::expand::{closure#0}::{closure#0}>, ::expand::{closure#0}::{closure#1}>, ::expand::{closure#0}::{closure#2}> 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] 228,936 ( 0.00%) ???:>>::or_default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,902 ( 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] 228,591 ( 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 228,351 ( 0.00%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,280 ( 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:clippy_utils::macros::first_node_in_macro:: 228,068 ( 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] 227,674 ( 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 227,559 ( 0.00%) include/jemalloc/internal/tsd_tls.h:malloc_default 227,382 ( 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] 227,181 ( 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] 226,895 ( 0.00%) ???:::parse_next_component_back [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 226,422 ( 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] 226,125 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/rustc_entry.rs:>::rustc_entry [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 225,533 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 225,517 ( 0.00%) ???:::with_def_site_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 225,363 ( 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] 225,288 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,976 ( 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] 224,620 ( 0.00%) ???:rustc_query_impl::query_impl::thir_abstract_const::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,572 ( 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::is_in_test 224,530 ( 0.00%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,512 ( 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] 224,506 ( 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] 224,481 ( 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] 224,473 ( 0.00%) ???:rustc_query_impl::query_impl::eval_to_const_value_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] 224,399 ( 0.00%) include/jemalloc/internal/atomic.h:ecache_evict 224,280 ( 0.00%) ???:, serde_json::ser::CompactFormatter> as serde_core::ser::SerializeStruct>::serialize_field::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,239 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 223,350 ( 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] 223,337 ( 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::> 223,200 ( 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] 222,714 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 222,334 ( 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 222,210 ( 0.00%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 222,178 ( 0.00%) ???:::new_import_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 221,918 ( 0.00%) ???:rustc_ty_utils::representability::params_in_repr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 221,656 ( 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] 221,610 ( 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 221,567 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body 221,375 ( 0.00%) ???:::visit_attribute [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 221,228 ( 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 221,100 ( 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] 220,050 ( 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] 219,937 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs:clippy_lints::suspicious_trait_impl::check_expr_inner [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,764 ( 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 219,504 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs:clippy_lints::misc_early::literal_suffix::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,296 ( 0.00%) ???:<[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] 219,266 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 218,938 ( 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::> 218,177 ( 0.00%) ???:__rustc::__rust_realloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 218,068 ( 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 218,052 ( 0.00%) ???:<[(rustc_hir_id::ItemLocalId, rustc_middle::middle::resolve_bound_vars::ResolvedArg)] 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] 217,342 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_attributes 216,890 ( 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] 216,865 ( 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] 216,572 ( 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 216,456 ( 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: 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> 216,342 ( 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: 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> 216,153 ( 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 215,874 ( 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] 215,520 ( 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] 214,942 ( 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 214,925 ( 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 214,850 ( 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::> 214,725 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,718 ( 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] 214,368 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,283 ( 0.00%) ???:::register_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,140 ( 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] 213,600 ( 0.00%) include/jemalloc/internal/rtree.h:emap_merge_prepare 213,272 ( 0.00%) ???:pulldown_cmark::parse::body_to_tag_end [???] 213,243 ( 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 212,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] 212,565 ( 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] 212,565 ( 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] 212,535 ( 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] 212,500 ( 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] 212,398 ( 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] 212,302 ( 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] 212,106 ( 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] 211,898 ( 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 211,814 ( 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] 211,644 ( 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] 211,572 ( 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] 211,280 ( 0.00%) ???:::cancel [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,234 ( 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] 210,940 ( 0.00%) ???:::node_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 210,900 ( 0.00%) ???:ioctl [/usr/lib/libc.so.6] 210,651 ( 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] 210,647 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 210,480 ( 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 210,480 ( 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 209,820 ( 0.00%) ???:::alias_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,391 ( 0.00%) ???:::to_string_lossy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,189 ( 0.00%) ???:rustc_query_impl::query_impl::impl_item_implementor_ids::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] 209,110 ( 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 209,110 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets 209,097 ( 0.00%) ???: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,088 ( 0.00%) ???:::replace_region [???] 208,754 ( 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] 207,894 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr_post 206,963 ( 0.00%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,939 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,625 ( 0.00%) include/jemalloc/internal/tcache_inlines.h:free_default 206,367 ( 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] 205,994 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 205,768 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 205,660 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 205,223 ( 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] 205,162 ( 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] 204,953 ( 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::> 204,899 ( 0.00%) src/emap.c:extent_try_coalesce_impl.llvm.9305427869391012685 204,844 ( 0.00%) ???:::parse_meta_seq_top [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 204,534 ( 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::> 204,510 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 204,306 ( 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] 204,244 ( 0.00%) ???:::insert_field_visibilities_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 203,655 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:clippy_lints::lifetimes::could_use_elision 203,258 ( 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] 202,971 ( 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] 202,318 ( 0.00%) ???:::parse_pat_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 201,994 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 201,875 ( 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 201,271 ( 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 201,222 ( 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}> [???] 201,221 ( 0.00%) ???:::visit_expr'2 [???] 200,950 ( 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] 200,860 ( 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] 200,572 ( 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 200,220 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,096 ( 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] 199,749 ( 0.00%) ???:::visit_impl_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,504 ( 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:: 199,025 ( 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 198,796 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,678 ( 0.00%) ???:::source_callsite [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,595 ( 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 198,563 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 198,429 ( 0.00%) ???:rustc_ast_lowering::item::add_ty_alias_where_clause [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,411 ( 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] 197,886 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 197,068 ( 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:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 197,037 ( 0.00%) ???:::parse_inner_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,703 ( 0.00%) ???:>>::from [???] 196,678 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs:clippy_lints::operators::cmp_owned::check_op [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,518 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 196,461 ( 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> 196,448 ( 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 196,440 ( 0.00%) ???:rustc_query_impl::query_impl::source_span::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,396 ( 0.00%) ???:::expand::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,333 ( 0.00%) ???:::check_arm [???] 196,297 ( 0.00%) ???:::evaluate_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,290 ( 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 196,290 ( 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 196,112 ( 0.00%) ???:::print_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,096 ( 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] 195,939 ( 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] 195,912 ( 0.00%) ???:annotate_snippets::renderer::render::render_origin [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 195,888 ( 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] 195,841 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::attrs::mixed_attributes_style::check 195,738 ( 0.00%) ???:0x000000000000ad20 [/usr/lib/ld-linux-x86-64.so.2] 195,263 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::check_item 195,021 ( 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] 194,397 ( 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 194,340 ( 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] 194,325 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 194,148 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::is_in_const_context 193,979 ( 0.00%) ???:::check_impl_trait::ImplTraitVisitor>>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 193,970 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_impl_item 193,548 ( 0.00%) include/jemalloc/internal/bit_util.h:realloc 193,467 ( 0.00%) include/jemalloc/internal/cache_bin.h:free_default 193,296 ( 0.00%) ???:rustc_const_eval::const_eval::fn_queries::constness'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 193,182 ( 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] 192,971 ( 0.00%) ???:core::ptr::drop_glue::>>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 192,726 ( 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] 192,340 ( 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:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 192,304 ( 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_utils::macros::first_node_in_macro:: 191,937 ( 0.00%) ???:::add_annotation_to_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 191,904 ( 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] 191,888 ( 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] 191,310 ( 0.00%) ???:::parse_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 191,250 ( 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] 191,233 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:::check_fn 190,752 ( 0.00%) ???:::pop_all [???] 190,621 ( 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] 189,758 ( 0.00%) ???:::allocate_cow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,733 ( 0.00%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,624 ( 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 189,525 ( 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] 189,421 ( 0.00%) ???:::collect_tokens::, ::collect_tokens_for_expr<::parse_expr_prefix::{closure#8}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,232 ( 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:::trim_start_matches::<::is_whitespace> 189,129 ( 0.00%) include/jemalloc/internal/edata.h:pac_decay_to_limit.llvm.9344053299937794623 188,430 ( 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] 188,289 ( 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 187,694 ( 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] 187,261 ( 0.00%) ???:rustc_hir::intravisit::walk_qpath:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,793 ( 0.00%) ???:::lower_variant_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,768 ( 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] 186,759 ( 0.00%) ???:::visit_variant_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,685 ( 0.00%) ???:::record_use'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,152 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,033 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 185,875 ( 0.00%) include/jemalloc/internal/tsd.h:pa_alloc 185,673 ( 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] 185,656 ( 0.00%) ???:::ensure_lines'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 185,585 ( 0.00%) ???:realpath [/usr/lib/libc.so.6] 185,329 ( 0.00%) ???:::start_point [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 185,264 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 184,491 ( 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] 184,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:rustc_hir::intravisit::walk_qpath:: 184,275 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 184,166 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 183,781 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::functions::duplicate_underscore_argument::check 183,630 ( 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 183,541 ( 0.00%) 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] 182,988 ( 0.00%) ???:rustc_query_impl::query_impl::param_env_normalized_for_post_analysis::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,727 ( 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 182,691 ( 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 182,623 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_item 182,419 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_item 182,223 ( 0.00%) ???:::check_expr [???] 182,203 ( 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 182,028 ( 0.00%) ???:::from_utf8_lossy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 181,593 ( 0.00%) ???:rustc_query_impl::query_impl::fn_arg_idents::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] 181,537 ( 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 181,195 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 180,392 ( 0.00%) ???:0x0000000000177c20 [/usr/lib/libc.so.6] 180,098 ( 0.00%) ???:>::tys::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 179,895 ( 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] 179,829 ( 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 179,758 ( 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] 179,280 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::check_fn 178,723 ( 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] 178,682 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::swap_remove:: 178,450 ( 0.00%) ???:::new_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,434 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,416 ( 0.00%) ???:::map_ctxt::<::with_ctxt::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,238 ( 0.00%) src/emap.c:tcache_bin_flush_small 178,226 ( 0.00%) ???:::record_partial_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,127 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 177,856 ( 0.00%) ???:::adjust [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 177,276 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr_post 177,272 ( 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] 177,134 ( 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:: 176,913 ( 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}> 176,404 ( 0.00%) ???:rustc_ast::visit::visit_field_defs::> [???] 176,268 ( 0.00%) include/jemalloc/internal/ph.h:edata_cache_put 176,085 ( 0.00%) ???:, rustc_builtin_macros::deriving::debug::show_fieldless_enum::{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] 175,972 ( 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] 175,935 ( 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] 175,920 ( 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 175,168 ( 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 174,650 ( 0.00%) ???:::decode_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,702 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,694 ( 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] 173,688 ( 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] 173,196 ( 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] 173,189 ( 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] 173,176 ( 0.00%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 172,414 ( 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] 172,238 ( 0.00%) include/jemalloc/internal/arena_inlines_b.h:free_default 172,006 ( 0.00%) include/jemalloc/internal/edata.h:extent_try_coalesce_impl.llvm.9305427869391012685 171,804 ( 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 171,485 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 171,395 ( 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> 171,312 ( 0.00%) ???:::check_block [???] 171,290 ( 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] 171,171 ( 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] 170,825 ( 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] 170,615 ( 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] 170,343 ( 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] 170,200 ( 0.00%) ???:::new [???] 170,164 ( 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::> 170,115 ( 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_lints::doc::missing_headers::check 170,052 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::casts::needless_type_cast::check 169,550 ( 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] 169,478 ( 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] 169,474 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,445 ( 0.00%) ???:<&str as core::fmt::Display>::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,199 ( 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 169,194 ( 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 169,052 ( 0.00%) ???:>::rebase_onto [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,895 ( 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::is_expn_of 168,744 ( 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 168,643 ( 0.00%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,135 ( 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] 167,900 ( 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 167,790 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/tree.rs: as core::iter::traits::iterator::Iterator>::next 167,250 ( 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] 167,001 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/decimal_bitwise_operands.rs:clippy_lints::operators::decimal_bitwise_operands::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 166,496 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::in_automatically_derived 166,453 ( 0.00%) ???:rustc_builtin_macros::deriving::partial_eq::expand_deriving_partial_eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,301 ( 0.00%) ???:rustc_hir::intravisit::walk_ty::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,756 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,728 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,300 ( 0.00%) ???:::from_errors_diagnostic::BufWriter> as core::fmt::Write>::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,166 ( 0.00%) ???:rustc_query_impl::query_impl::layout_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] 165,075 ( 0.00%) ???:::expand_enum_method_body::{closure#1} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 164,280 ( 0.00%) ???:rustc_ast::attr::mk_attr_nested_word [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 164,236 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::>'2 164,207 ( 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 164,207 ( 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 164,192 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 163,992 ( 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] 163,835 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 163,774 ( 0.00%) ???:::is_keyword_ahead [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 163,489 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 163,392 ( 0.00%) ???:::new [???] 163,303 ( 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 162,884 ( 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 162,792 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert_no_grow [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 162,418 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/borrowed_box.rs:clippy_lints::types::borrowed_box::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 162,106 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs [???] 162,062 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs:clippy_lints::derive::derive_partial_eq_without_eq::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 161,846 ( 0.00%) ???:::ty_is_opaque_future [???] 161,794 ( 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] 161,761 ( 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] 161,760 ( 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 161,586 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:rustc_hir::intravisit::walk_expr::>'2 161,476 ( 0.00%) ???:rustc_builtin_macros::deriving::clone::expand_deriving_clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 161,307 ( 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> 161,307 ( 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> 161,307 ( 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> 161,217 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_empty_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 160,776 ( 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] 160,605 ( 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] 160,530 ( 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 160,510 ( 0.00%) ???:, rustc_hash::FxBuildHasher>>::swap_remove:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,240 ( 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_attributes 160,218 ( 0.00%) ???:<::check_impl_trait::ImplTraitVisitor 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] 159,819 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/lint.rs:rustc_middle::lint::emit_lint_base::::{closure#0}>, rustc_middle::lint::LevelSpec> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 159,650 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/option_env_unwrap.rs:::check_expr 159,375 ( 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 159,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/ty/context/tls.rs:::check_fn 159,352 ( 0.00%) ???:::choose_generics_over_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 159,207 ( 0.00%) ???:rustc_trait_selection::traits::project::confirm_candidate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,623 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,471 ( 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 158,304 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,296 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,696 ( 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] 157,414 ( 0.00%) ???:::visit_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,366 ( 0.00%) ???:::get_or_insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,243 ( 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 157,159 ( 0.00%) ???:::drop [???] 157,015 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output [???] 156,828 ( 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 156,607 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs: as rustc_hir::intravisit::Visitor>::visit_expr 156,174 ( 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 156,165 ( 0.00%) ???:> 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] 156,150 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 156,109 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::doc::check_doc::> 156,076 ( 0.00%) include/jemalloc/internal/edata.h:extent_record 155,864 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_field_def::{closure#0} [???] 155,330 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_wildcard_pattern.rs:::check_pat 155,283 ( 0.00%) ???:>::reserve_rehash::, alloc::vec::Vec>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 155,250 ( 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] 154,976 ( 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}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 154,976 ( 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] 154,930 ( 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} 154,648 ( 0.00%) ???:::parse_pat_no_top_guard_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 154,638 ( 0.00%) ???:rustc_query_impl::query_impl::type_alias_is_checked::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] 154,371 ( 0.00%) include/jemalloc/internal/ph.h:extent_record 154,352 ( 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] 154,347 ( 0.00%) ???:rustc_query_impl::query_impl::resolve_bound_vars::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] 154,341 ( 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::> 154,200 ( 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_expr 154,144 ( 0.00%) ???:, (rustc_middle::query::erase::ErasedData<[u8; 24]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, (rustc_middle::query::erase::ErasedData<[u8; 24]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [???] 154,023 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body_post 153,864 ( 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] 153,723 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::rustc_entry 153,672 ( 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] 153,408 ( 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 152,746 ( 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] 152,690 ( 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] 152,544 ( 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] 152,405 ( 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] 152,217 ( 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] 152,021 ( 0.00%) ???:<&usize as core::fmt::Display>::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 151,757 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 151,740 ( 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 151,489 ( 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 151,488 ( 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] 151,143 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_eq.rs:clippy_lints::ptr::ptr_eq::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 151,092 ( 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 151,001 ( 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] 150,995 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,556 ( 0.00%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,116 ( 0.00%) ???:>>::walk_ref [???] 149,886 ( 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] 149,797 ( 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] 149,691 ( 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] 149,659 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/else_if_without_else.rs:::check_expr 149,535 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 149,110 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 148,796 ( 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] 148,552 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 147,977 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 147,801 ( 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::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 147,801 ( 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::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 147,801 ( 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::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 147,721 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 147,709 ( 0.00%) ???:>>, core::iter::adapters::map::Map, ::create_derived_impl::{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] 147,449 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 147,288 ( 0.00%) ???:::from_bytes_with_nul [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,260 ( 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 147,162 ( 0.00%) ???:::next_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,758 ( 0.00%) ???:::from_sub_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,322 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/asm_syntax.rs:::check_expr 146,317 ( 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] 146,250 ( 0.00%) ???:::parse_match_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,195 ( 0.00%) ???:rustc_lint::unused::must_use::is_ty_must_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 146,140 ( 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 145,944 ( 0.00%) ???:::expr_ty_adjusted_opt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,823 ( 0.00%) ???:rustc_builtin_macros::deriving::debug::expand_deriving_debug::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,634 ( 0.00%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,380 ( 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 144,992 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,984 ( 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_utils::macros::first_node_in_macro:: 144,640 ( 0.00%) ???:::opt_span_lint:: [???] 144,575 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,434 ( 0.00%) ???:::resolve_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,226 ( 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] 143,874 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,561 ( 0.00%) ???:::fn_sig'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,559 ( 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] 143,506 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/float_equality_without_abs.rs:clippy_lints::operators::float_equality_without_abs::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 143,493 ( 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] 143,323 ( 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 143,098 ( 0.00%) src/pac.c:tcache_bin_flush_small 143,001 ( 0.00%) ???:rustc_privacy::check_mod_privacy [???] 142,989 ( 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:>::next_back 142,978 ( 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] 142,847 ( 0.00%) ???:::next_back [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,738 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,614 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,528 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 142,500 ( 0.00%) ???:termize::platform::unix::dimensions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,163 ( 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] 141,892 ( 0.00%) ???:::clear [???] 141,495 ( 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] 141,464 ( 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_expr 141,100 ( 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 141,100 ( 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> 141,084 ( 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 140,939 ( 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 140,934 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_generics 140,804 ( 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 140,734 ( 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 140,497 ( 0.00%) ???:::std_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,412 ( 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] 140,131 ( 0.00%) ???:::seed [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 140,030 ( 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] 140,024 ( 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] 139,182 ( 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] 139,160 ( 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] 138,848 ( 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] 138,690 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_impl_item 138,675 ( 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] 138,599 ( 0.00%) ???:rustc_hir::intravisit::walk_qpath::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,516 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,355 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_body 138,099 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_block::> 138,066 ( 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::> 138,063 ( 0.00%) /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:: 137,760 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,721 ( 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] 137,344 ( 0.00%) ???:<[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] 137,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_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 137,246 ( 0.00%) src/pac.c:pa_alloc 137,230 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::query::erase::ErasedData<[u8; 24]>>, core::result::Result>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,120 ( 0.00%) ???:::open_c [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 136,842 ( 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::operators::cmp_owned::check_op 136,781 ( 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 136,716 ( 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:::with_source_text::::{closure#0}> 136,266 ( 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 136,260 ( 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 136,180 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test_function [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 136,180 ( 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] 135,913 ( 0.00%) ???:::check_item_post [???] 135,843 ( 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 135,814 ( 0.00%) src/decay.c:tcache_bin_flush_small 135,758 ( 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 135,591 ( 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::attrs::duplicated_attributes::check_duplicated_attr 135,582 ( 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_attributes 135,485 ( 0.00%) ???:::to_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,443 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 135,309 ( 0.00%) ???:::check_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,980 ( 0.00%) ???:::smart_resolve_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,823 ( 0.00%) ???:::check_lint_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,705 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,917 ( 0.00%) ???:::check_ident [???] 133,912 ( 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:: 133,771 ( 0.00%) include/jemalloc/internal/bit_util.h:tcache_bin_flush_small 133,769 ( 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] 133,700 ( 0.00%) include/jemalloc/internal/sz.h:ecache_evict 133,620 ( 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::macros::root_macro_call 133,304 ( 0.00%) include/jemalloc/internal/bit_util.h:eset_remove 133,134 ( 0.00%) ???:::break_two_token_op [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,987 ( 0.00%) include/jemalloc/internal/sz.h:pa_dalloc 132,778 ( 0.00%) ???:::visit_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,594 ( 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] 132,582 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,582 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,249 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/cmp_null.rs:clippy_lints::ptr::cmp_null::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 132,245 ( 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] 132,053 ( 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] 131,154 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/needless_bitwise_bool.rs:clippy_lints::operators::needless_bitwise_bool::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 131,106 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/temporary_assignment.rs:::check_expr 131,102 ( 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'2 130,974 ( 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 130,872 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,871 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::check_expr 130,869 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 130,865 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_expr_post 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 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 130,860 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_expr 130,860 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/pointers_in_nomem_asm_block.rs:::check_expr 130,860 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 130,860 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::eq_op::check_assert 130,860 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::float_cmp::check_assert 130,635 ( 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 130,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/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_const [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 130,301 ( 0.00%) ???:>::types_may_unify_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,186 ( 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 129,846 ( 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 129,402 ( 0.00%) ???:rustc_builtin_macros::deriving::debug::expand_deriving_debug [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,289 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,112 ( 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] 128,970 ( 0.00%) ???:0x00000000000a07c0 [/usr/lib/libc.so.6] 128,955 ( 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 128,955 ( 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 128,922 ( 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 128,449 ( 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 128,412 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 128,400 ( 0.00%) ???:rustc_query_impl::query_impl::normalize_canonicalized_projection::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] 127,795 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 127,766 ( 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 127,707 ( 0.00%) ???:::with::<::visit_nested_body::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 127,488 ( 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 127,372 ( 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] 127,264 ( 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 127,022 ( 0.00%) ???:::lower_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 126,966 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::rustc_entry 126,857 ( 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] 126,826 ( 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 126,797 ( 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 126,619 ( 0.00%) ???:rustc_query_impl::query_impl::inhabited_predicate_type::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] 126,522 ( 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 126,455 ( 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 126,416 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 126,387 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_item 126,290 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 126,288 ( 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] 126,095 ( 0.00%) src/bitmap.c:malloc_default 125,819 ( 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 125,790 ( 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] 125,786 ( 0.00%) ???:::parse_unsuffixed_meta_item_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,649 ( 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] 125,560 ( 0.00%) ???:::check_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,533 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> 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] 125,496 ( 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 125,474 ( 0.00%) ???:__cxa_atexit [/usr/lib/libc.so.6] 125,200 ( 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 124,994 ( 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] 124,922 ( 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 124,810 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue::::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 124,698 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs:::check_ty 124,644 ( 0.00%) ???:::descent_to_ambiguity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,316 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_type_ir::sty::Region>>::insert_unique 124,205 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::numeric_cast_precast_bounds [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 124,123 ( 0.00%) ???:::resolution [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,959 ( 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 123,937 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/integer_division_remainder_used.rs:clippy_lints::operators::integer_division_remainder_used::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 123,800 ( 0.00%) ???:rustc_query_impl::query_impl::enforce_impl_non_lifetime_params_are_constrained::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] 123,783 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 123,783 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 123,783 ( 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::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 123,675 ( 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] 123,424 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,372 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,120 ( 0.00%) ???:rustc_span::hygiene::walk_chain [???] 122,994 ( 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] 122,892 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 122,722 ( 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 122,673 ( 0.00%) 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] 122,634 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 122,570 ( 0.00%) ???:::parse_const_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,562 ( 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:::non_body_analysis:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 122,541 ( 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] 122,254 ( 0.00%) ???:::flat_map_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,681 ( 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 121,632 ( 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/const_kind.rs:>::super_fold_with::> 121,448 ( 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] 121,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_attribute 120,832 ( 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:: 120,814 ( 0.00%) src/sz.c:eset_remove 120,808 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,640 ( 0.00%) ???:rustc_query_impl::query_impl::constness::execute_query_incr::__rust_end_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,567 ( 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 120,530 ( 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> 120,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/vec_cache.rs:clippy_lints::functions::result::result_err_ty 120,168 ( 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::> 120,158 ( 0.00%) ???:rustc_ty_utils::layout::layout_of'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,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_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 119,564 ( 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 119,502 ( 0.00%) ???:::expand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,418 ( 0.00%) ???:>::fill_item::<>::identity_for_item::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,383 ( 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::method_chain_args 119,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] 119,099 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_item 119,077 ( 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 119,048 ( 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] 119,048 ( 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] 118,895 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,890 ( 0.00%) include/jemalloc/internal/rtree.h:extent_record 118,888 ( 0.00%) ???:::parse_field_def::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,657 ( 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 118,612 ( 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 118,378 ( 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] 118,321 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_impl_item 118,160 ( 0.00%) ???:core::ptr::drop_glue::]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,138 ( 0.00%) ???:>::try_fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,998 ( 0.00%) ???:::lower_const_path_to_const_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,920 ( 0.00%) ???:::guess_print_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,749 ( 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_impl_item 117,666 ( 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] 117,655 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>> 117,495 ( 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] 117,479 ( 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 117,464 ( 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:::typeck:: 117,414 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/manual_div_ceil.rs:clippy_lints::operators::manual_div_ceil::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 116,875 ( 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 116,655 ( 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> 116,616 ( 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] 116,560 ( 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 116,473 ( 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 116,453 ( 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 116,211 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/double_comparison.rs:clippy_lints::operators::double_comparison::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 116,207 ( 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] 116,162 ( 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] 116,106 ( 0.00%) ???:>::flush_buf [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 116,059 ( 0.00%) include/jemalloc/internal/extent.h:ecache_evict 115,884 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 115,827 ( 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::test_item_names 115,804 ( 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::diagnostics::span_lint_and_then::::{closure#0}> 115,690 ( 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 115,655 ( 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::ptr::ptr_arg::check_body 115,515 ( 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] 115,435 ( 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 114,984 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, core::option::Option>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,917 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,717 ( 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 114,655 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,416 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/to_string_trait_impl.rs:::check_item 114,140 ( 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:: 113,946 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,919 ( 0.00%) 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] 113,838 ( 0.00%) ???:::extend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,635 ( 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:: 113,475 ( 0.00%) ???:rustc_query_impl::query_impl::param_env_normalized_for_post_analysis::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] 113,348 ( 0.00%) ???:::parse_expr_dot_or_call_with [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,291 ( 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] 113,089 ( 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 112,966 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,948 ( 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 112,732 ( 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 112,420 ( 0.00%) ???:::scan_begin [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,362 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_item 112,346 ( 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] 112,256 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs:::check_item_post 112,095 ( 0.00%) ???:::clone::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,047 ( 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 111,903 ( 0.00%) ???:::check_stability_allow_unstable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,835 ( 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_post 111,800 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block 111,800 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block_post 111,781 ( 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:: 111,780 ( 0.00%) ???:::apply_inner::::apply_revealing_opaque<::apply::{closure#0}>::{closure#0}, ::apply::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,751 ( 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:: 111,363 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,202 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,124 ( 0.00%) src/emap.c:pa_dalloc 110,955 ( 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 110,805 ( 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 110,805 ( 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 110,805 ( 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 110,634 ( 0.00%) ???:::expand::{closure#1} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,618 ( 0.00%) ???:rustc_query_impl::query_impl::named_variable_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] 110,476 ( 0.00%) ???:rustc_query_impl::query_impl::resolve_bound_vars::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] 109,978 ( 0.00%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,711 ( 0.00%) src/eset.c:tcache_bin_flush_small 109,655 ( 0.00%) ???:rustc_lint::early::check_ast_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,230 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/erasing_op.rs:clippy_lints::operators::erasing_op::check_op [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 109,165 ( 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_ 109,128 ( 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] 109,116 ( 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] 109,081 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/array/mod.rs:::check_attributes 109,008 ( 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:, 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 109,008 ( 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_fn::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, ::check_fn::{closure#0}>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_hir_id::HirId, ()), as core::iter::traits::collect::Extend<(rustc_hir_id::HirId, ())>>::extend, ::check_fn::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, ::check_fn::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 109,008 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::check_fn 109,008 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::check_impl_item 108,977 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased::> 108,800 ( 0.00%) ???:::lower_expr_within_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,800 ( 0.00%) ???:rustc_query_impl::query_impl::resolve_bound_vars::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] 108,532 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,451 ( 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} 108,445 ( 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 108,304 ( 0.00%) ???:::named_bound_var [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,150 ( 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 108,007 ( 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 107,936 ( 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] 107,911 ( 0.00%) src/sz.c:tcache_bin_flush_small 107,865 ( 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:: 107,800 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/too_long_first_doc_paragraph.rs:::check_attributes 107,669 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 107,664 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 107,661 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 107,661 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 107,652 ( 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 107,652 ( 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 107,652 ( 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 107,652 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_expr 107,652 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_lints::loops::while_let_on_iterator::check 107,439 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_utils::test_item_names 107,322 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 107,079 ( 0.00%) ???:::is_trivially_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 107,070 ( 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] 107,058 ( 0.00%) ???:::is_lang_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,980 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:core::ptr::drop_glue::::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec>::{closure#0}> 106,976 ( 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: as rustc_hir::intravisit::Visitor>::visit_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 106,896 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:rustc_middle::lint::emit_lint_base::::{closure#0}>::{closure#0}>, rustc_middle::lint::LevelSpec> 106,598 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_variant_data [???] 106,470 ( 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:: 106,350 ( 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] 106,326 ( 0.00%) ???:::parse_const_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,255 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_body 106,248 ( 0.00%) ???:::asyncness [???] 106,241 ( 0.00%) ???:rustc_middle::dep_graph::graph::hash_result::>, rustc_type_ir::solve::NoSolution>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,240 ( 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 106,208 ( 0.00%) ???:<> as rustc_attr_parsing::attributes::AttributeParser>::ATTRIBUTES::{closure#0} as core::ops::function::FnOnce<(&mut rustc_attr_parsing::attributes::Single>, &mut rustc_attr_parsing::context::AcceptContext, &rustc_attr_parsing::parser::ArgParser)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,156 ( 0.00%) ???:::filter_by_name_unhygienic [???] 106,125 ( 0.00%) ???:rustc_query_impl::query_impl::adt_async_destructor::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,125 ( 0.00%) ???:rustc_query_impl::query_impl::adt_destructor::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,050 ( 0.00%) ???:>>::walk_ref'2 [???] 106,050 ( 0.00%) ???:rustc_query_impl::query_impl::params_in_repr::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] 105,915 ( 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:>::insert 105,831 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 105,789 ( 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::utils::author::check_item 105,564 ( 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_fn 105,561 ( 0.00%) ???:::check_param [???] 105,552 ( 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 105,336 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_last_cmp.rs:::check_expr 105,336 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 105,321 ( 0.00%) ???:llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag, llvm::cl::OptionHidden) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 105,251 ( 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] 105,144 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 104,976 ( 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:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 104,897 ( 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 104,867 ( 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] 104,837 ( 0.00%) src/extent.c:pa_dalloc 104,693 ( 0.00%) include/jemalloc/internal/sz.h:extent_record 104,368 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs:clippy_lints::operators::const_comparisons::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 104,368 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/duration_subsec.rs:clippy_lints::operators::duration_subsec::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 104,368 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/integer_division.rs:clippy_lints::operators::integer_division::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 104,368 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/modulo_arithmetic.rs:clippy_lints::operators::modulo_arithmetic::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 104,358 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_impl_item 104,231 ( 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 103,994 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 103,878 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_fn::> 103,867 ( 0.00%) ???:::try_to_bits_for_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 103,809 ( 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_body 103,760 ( 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 103,760 ( 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 103,560 ( 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 103,420 ( 0.00%) ???:0x0000000000094850 [/usr/lib/libc.so.6] 103,230 ( 0.00%) ???:, core::slice::iter::Iter>>, ::expand_enum_method_body::{closure#1}::{closure#2}> 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] 102,944 ( 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] 102,908 ( 0.00%) ???:>::dying_next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,738 ( 0.00%) ???:::pad_integral::write_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,713 ( 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] 102,382 ( 0.00%) ???:rustc_ast_pretty::pprust::ty_to_string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,340 ( 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_item 102,238 ( 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] 102,115 ( 0.00%) ???:::_join [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,984 ( 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] 101,924 ( 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 101,910 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_attribute 101,880 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,792 ( 0.00%) ???:>>::walk_ref [???] 101,376 ( 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] 101,215 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,179 ( 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] 101,079 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,677 ( 0.00%) ???:rustc_interface::callbacks::track_diagnostic::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,581 ( 0.00%) ???:::check_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,560 ( 0.00%) src/thread_event.c:realloc 100,506 ( 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] 100,397 ( 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_expr 100,286 ( 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 100,239 ( 0.00%) ???:::parse_item_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,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] 99,814 ( 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}> [???] 99,748 ( 0.00%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_local::{closure#0}>::{closure#0} [???] 99,472 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,441 ( 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 99,394 ( 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] 99,333 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_ty::> 99,230 ( 0.00%) ???:0x0000000000067b30 [/usr/lib/libc.so.6] 99,103 ( 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] 99,040 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,000 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,924 ( 0.00%) ???:>::relate:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,904 ( 0.00%) ???:<&std::io::stdio::Stderr as core::io::write::Write>::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,595 ( 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 98,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:clippy_utils::check_proc_macro::span_matches_pat 98,332 ( 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 98,332 ( 0.00%) include/jemalloc/internal/mutex.h:ecache_evict 98,224 ( 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 98,218 ( 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_sig 98,154 ( 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] 98,093 ( 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] 97,908 ( 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] 97,736 ( 0.00%) ???:>::process_mod'2 [???] 97,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:::check_item 97,588 ( 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 97,474 ( 0.00%) ???:0x0000000000040520 [/usr/lib/libc.so.6] 97,395 ( 0.00%) ???:::allocate_link [???] 97,393 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/derived_hash_with_manual_eq.rs:::check_item 97,004 ( 0.00%) ???: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] 96,986 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,900 ( 0.00%) ???:rustc_errors::annotate_snippet_emitter_writer::emit_to_destination [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,792 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,722 ( 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: 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> 96,704 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq_expr 96,654 ( 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 96,481 ( 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] 96,376 ( 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] 96,350 ( 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::sugg::has_enclosing_paren:: 96,134 ( 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 96,117 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,823 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,766 ( 0.00%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,749 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,688 ( 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 95,200 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:>::walk_ref'2 95,159 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,038 ( 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 94,912 ( 0.00%) ???:::expr_call_global [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,846 ( 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 94,690 ( 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:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 94,581 ( 0.00%) ???:::collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,580 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 94,539 ( 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] 94,486 ( 0.00%) ???:rustc_hir_analysis::collect::resolve_bound_vars::is_late_bound_map [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,248 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,215 ( 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] 93,930 ( 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 93,571 ( 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::root_macro_call 93,394 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs:::check_expr 93,315 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/slice.rs: as core::clone::Clone>::clone 93,100 ( 0.00%) ???:rustc_ast::visit::walk_item_inner:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,097 ( 0.00%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,043 ( 0.00%) ???:>::process_obligations:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,026 ( 0.00%) ???:rustc_hir::intravisit::walk_pat_expr::> [???] 92,978 ( 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:::eq [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 92,765 ( 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] 92,570 ( 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] 92,507 ( 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] 92,406 ( 0.00%) ???:rustc_errors::emitter::is_different [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,391 ( 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 92,276 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,248 ( 0.00%) ???: as alloc::vec::spec_from_iter_nested::SpecFromIterNested::macro_backtrace::{closure#0}>>>::from_iter [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,159 ( 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 92,110 ( 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 91,957 ( 0.00%) src/tcache.c:realloc 91,909 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,626 ( 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 91,620 ( 0.00%) ???:::with_span_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,516 ( 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 91,516 ( 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 91,454 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,375 ( 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] 91,334 ( 0.00%) ???:::check_trait_item::<::resolve_impl_item::{closure#0}::{closure#0}::{closure#0}>::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,280 ( 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::return_ty 91,178 ( 0.00%) ???: 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] 91,040 ( 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 90,846 ( 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 90,763 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,706 ( 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_expr 90,681 ( 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 90,480 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:>::scan_inline_link::{closure#0} [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 90,410 ( 0.00%) ???:::meta_item_list [???] 90,363 ( 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_attributes 90,363 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:clippy_utils::attrs::check_clippy_attr:: 90,362 ( 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] 90,341 ( 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::sugg::has_enclosing_paren:: 90,060 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 89,872 ( 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}>> 89,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/dep_graph/graph.rs:::check_impl_item 89,495 ( 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 89,136 ( 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::renamed_function_params::check_impl_item 89,080 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_error_messages/src/lib.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> 89,058 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,828 ( 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 88,806 ( 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 88,764 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_item::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 88,636 ( 0.00%) ???:>::try_fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,569 ( 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::ptr::ptr_arg::check_body 88,265 ( 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:: 87,948 ( 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_ty 87,526 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map/entry.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 87,444 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::opt_must_use_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 87,248 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,195 ( 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 87,174 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 87,016 ( 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 87,007 ( 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] 86,944 ( 0.00%) ???:::clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,930 ( 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 86,880 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/consts/int.rs:>::super_fold_with::> 86,835 ( 0.00%) ???:>::with_lint_attrs::::{closure#0}>::{closure#0} [???] 86,808 ( 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_fn::> 86,734 ( 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 86,680 ( 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 86,471 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,379 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/too_many_arguments.rs:::check_fn 86,363 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,312 ( 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 86,294 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/derive/unsafe_derive_deserialize.rs:clippy_lints::derive::unsafe_derive_deserialize::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 86,240 ( 0.00%) ???:::components [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,190 ( 0.00%) ???:<(&rustc_span::def_id::LocalDefId, &indexmap::set::IndexSet) 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] 86,113 ( 0.00%) ???:::fn_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,020 ( 0.00%) include/jemalloc/internal/edata.h:realloc 85,970 ( 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 85,970 ( 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 85,970 ( 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 85,970 ( 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 85,494 ( 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 85,428 ( 0.00%) ???:rustc_interface::passes::analysis [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,335 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,237 ( 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_ty::> 85,230 ( 0.00%) ???:::next_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,208 ( 0.00%) ???:>::super_fold_with::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,179 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,165 ( 0.00%) ???:::parse_inner_attributes'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,026 ( 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 85,000 ( 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 84,755 ( 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_expr 84,745 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 84,744 ( 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] 84,681 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,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/query/inner.rs:::hir_body_owner_kind:: 84,469 ( 0.00%) ???:::visit_anon_const [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,320 ( 0.00%) ???:::parse_literal_maybe_minus [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,243 ( 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_or_unification_node 84,192 ( 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 84,094 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,015 ( 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] 83,962 ( 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:: 83,843 ( 0.00%) include/jemalloc/internal/extent.h:extent_try_coalesce_impl.llvm.9305427869391012685 83,769 ( 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] 83,392 ( 0.00%) ???:::def_key:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,280 ( 0.00%) ???:::decode_span'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,270 ( 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] 83,249 ( 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}> 83,187 ( 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:::new 82,878 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,862 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 82,862 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,431 ( 0.00%) ???:::expect_any_with_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,358 ( 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] 82,251 ( 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 82,251 ( 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 82,251 ( 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_expr 82,129 ( 0.00%) ???:core::ptr::drop_glue::, rustc_error_messages::DiagArgValue>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,103 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_param 82,099 ( 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 82,096 ( 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 82,034 ( 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] 81,996 ( 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::> 81,996 ( 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::ops::drop::Drop>::drop [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,933 ( 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 81,930 ( 0.00%) ???:rustc_hir::intravisit::walk_generic_args:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,880 ( 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] 81,868 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,756 ( 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::ptr::ptr_arg::check_body 81,701 ( 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::methods::should_implement_trait::check_impl_item 81,688 ( 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 81,657 ( 0.00%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,453 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,351 ( 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'2 81,351 ( 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::attrs::duplicated_attributes::check_duplicated_attr'2 81,318 ( 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] 81,288 ( 0.00%) ???:std::sys::fs::metadata [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,989 ( 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] 80,882 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert_full 80,880 ( 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_body 80,879 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,822 ( 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 80,784 ( 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 80,676 ( 0.00%) ???:::parse_tuple_struct_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,517 ( 0.00%) ???:::non_blanket_impls_for_ty [???] 80,467 ( 0.00%) ???:rustc_ty_utils::representability::params_in_repr_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,451 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::check_fn 80,445 ( 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] 80,331 ( 0.00%) ???:::has_trivial_sizedness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,271 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_pat 80,130 ( 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 80,085 ( 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 79,582 ( 0.00%) ???:rustc_hir::intravisit::walk_const_arg::> [???] 79,545 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,459 ( 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::returns::needless_return::check_final_expr 79,368 ( 0.00%) ???:rustc_hir::intravisit::walk_generic_args:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,357 ( 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_must_use_candidate 79,302 ( 0.00%) ???:::hir_body_param_idents [???] 79,290 ( 0.00%) ???:<[rustc_ast::tokenstream::TokenTree] as rustc_serialize::serialize::Encodable>::encode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,182 ( 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] 79,010 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::deref 79,010 ( 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 78,923 ( 0.00%) ???:rustc_hir::intravisit::walk_generic_args::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,845 ( 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 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,791 ( 0.00%) include/jemalloc/internal/tsd.h:free_default 78,702 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,628 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:>::reserve_rehash::::{closure#0}> 78,628 ( 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:>::reserve_rehash::::{closure#0}> 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,441 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,320 ( 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 78,256 ( 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 78,256 ( 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 78,240 ( 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::return_ty 78,211 ( 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:: 78,036 ( 0.00%) ???:::record_lifetime_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,994 ( 0.00%) include/jemalloc/internal/atomic.h:pa_dalloc 77,993 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:clippy_lints::manual_ignore_case_cmp::get_ascii_type [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 77,950 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,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/span_encoding.rs:clippy_lints::ptr::ptr_eq::check 77,915 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/tree.rs:::check_attributes 77,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] 77,700 ( 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 77,670 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,550 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,520 ( 0.00%) ???:::maybe_recover_trailing_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,465 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 77,293 ( 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 77,104 ( 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] 77,042 ( 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 77,038 ( 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::attrs::mixed_attributes_style::check 76,936 ( 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> 76,912 ( 0.00%) ???:::short_write_process_buffer::<2> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,800 ( 0.00%) ???:::visit_qpath [???] 76,694 ( 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,466 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::check_item 76,374 ( 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 76,318 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert_full 76,313 ( 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}> 76,260 ( 0.00%) ???:::stmt_let_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,190 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 76,000 ( 0.00%) ???:<::from_errors_diagnostic::BufWriter as core::io::write::Write>::write_fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,734 ( 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_param 75,640 ( 0.00%) ???:::find_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,576 ( 0.00%) include/jemalloc/internal/tsd_tls.h:free_default 75,342 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/nonzero.rs:clippy_utils::trait_ref_of_method 75,306 ( 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,253 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,246 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,012 ( 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] 74,973 ( 0.00%) ???:rustc_query_impl::query_impl::named_variable_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] 74,827 ( 0.00%) ???:::check_expr_post [???] 74,787 ( 0.00%) ???:>>::walk_ref [???] 74,696 ( 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 74,469 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::insert 74,239 ( 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_const_arg::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 74,094 ( 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:::hir_body_owner_kind:: 73,880 ( 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] 73,816 ( 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] 73,738 ( 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] 73,660 ( 0.00%) ???:::flat_map_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,572 ( 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,564 ( 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_ty 73,564 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::check_ty 73,385 ( 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] 73,290 ( 0.00%) ???:>::fold_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,150 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_last_cmp_with_unwrap.rs:clippy_lints::methods::chars_last_cmp_with_unwrap::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 73,150 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:::check_expr 73,125 ( 0.00%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,112 ( 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 73,086 ( 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}>> 73,063 ( 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] 72,956 ( 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::> 72,900 ( 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] 72,874 ( 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:: 72,792 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:::check_body 72,780 ( 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_must_use_candidate 72,734 ( 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] 72,456 ( 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:: 72,418 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 72,406 ( 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 72,398 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,260 ( 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 72,204 ( 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] 72,162 ( 0.00%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,120 ( 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] 72,114 ( 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> 71,958 ( 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 71,953 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/neg_multiply.rs:::check_expr 71,850 ( 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] 71,748 ( 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 71,729 ( 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] 71,661 ( 0.00%) ???:::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,540 ( 0.00%) ???:::eof [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,402 ( 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 71,380 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,367 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,325 ( 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] 71,264 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::emit_span_lint::::{closure#0}>::{closure#0}>> 71,077 ( 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] 71,070 ( 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] 71,025 ( 0.00%) ???:rustc_query_impl::query_impl::impl_item_implementor_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] 70,938 ( 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::doc::missing_headers::check 70,931 ( 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:::non_body_analysis:: 70,907 ( 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] 70,876 ( 0.00%) ???:::param_def_id_to_index [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,856 ( 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 70,855 ( 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 70,855 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_lints::casts::needless_type_cast::check 70,845 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,774 ( 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 70,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:::check_ty 70,595 ( 0.00%) ???:rustc_builtin_macros::deriving::clone::cs_clone_simple [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,592 ( 0.00%) ???:rustc_middle::ty::inhabitedness::inhabited_predicate_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,482 ( 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 70,467 ( 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}> 70,416 ( 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_fn 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,368 ( 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 70,366 ( 0.00%) ???:::emit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,338 ( 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 70,322 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_scheme 70,262 ( 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 70,256 ( 0.00%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,239 ( 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 70,215 ( 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 70,204 ( 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_ty:: 70,160 ( 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 70,160 ( 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}> 70,160 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_item 69,973 ( 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_back 69,890 ( 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] 69,878 ( 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:: 69,700 ( 0.00%) ???:::check_unused_delims_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,655 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::diagnostic_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,632 ( 0.00%) ???:<(&rustc_span::def_id::DefId, &rustc_middle::traits::specialization_graph::Children) 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] 69,536 ( 0.00%) ???:::is_inhabited_from'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:>::super_fold_with::> 69,317 ( 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::result::result_err_ty 69,116 ( 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 core::iter::traits::iterator::Iterator>::next 68,907 ( 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] 68,904 ( 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:::check_sig 68,820 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,748 ( 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 68,748 ( 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 68,607 ( 0.00%) /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}> 68,491 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,472 ( 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 68,291 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,281 ( 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 68,090 ( 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:clippy_utils::ty::implements_trait_with_env 67,989 ( 0.00%) ???: as core::hash::Hash>::hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,963 ( 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] 67,915 ( 0.00%) ???:::recover_vcs_conflict_marker [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,860 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/scanners.rs:>::scan_inline_link::{closure#0} 67,854 ( 0.00%) ???:::report_unsafe:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,826 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::peel_refs [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,802 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:rustc_middle::lint::emit_lint_base::::{closure#0}>, rustc_middle::lint::LevelSpec> 67,802 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue::::{closure#0}>, rustc_middle::lint::LevelSpec>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,651 ( 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::> 67,584 ( 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:::typeck:: 67,560 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,410 ( 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] 67,319 ( 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> 67,275 ( 0.00%) ???:::check_fn [???] 67,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_expr 67,113 ( 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:::with_source_text::::{closure#0}> 67,095 ( 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] 66,882 ( 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,822 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,753 ( 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 66,724 ( 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 66,668 ( 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:clippy_lints::operators::identity_op::check 66,645 ( 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:: 66,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:, rustc_hash::FxBuildHasher> as core::iter::traits::collect::FromIterator<(rustc_span::def_id::LocalDefId, alloc::vec::Vec)>>::from_iter::, >::new::{closure#0}>> 66,525 ( 0.00%) ???:< as rustc_attr_parsing::attributes::AttributeParser>::ATTRIBUTES::{closure#0} as core::ops::function::FnOnce<(&mut rustc_attr_parsing::attributes::Combine, &mut rustc_attr_parsing::context::AcceptContext, &rustc_attr_parsing::parser::ArgParser)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,500 ( 0.00%) ???:<::from_errors_diagnostic::BufWriter as core::io::write::Write>::flush [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,450 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,406 ( 0.00%) ???:::collect_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,385 ( 0.00%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,355 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,276 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:core::ptr::drop_glue:: 66,238 ( 0.00%) ???:::write_all_cold_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,197 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:core::ptr::drop_glue::> 65,988 ( 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 65,856 ( 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 65,755 ( 0.00%) ???:rustc_expand::mbe::quoted::parse'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,709 ( 0.00%) include/jemalloc/internal/extent.h:tcache_bin_flush_small 65,708 ( 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] 65,706 ( 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 65,681 ( 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_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 65,679 ( 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] 65,637 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 65,631 ( 0.00%) ???:>>>, (rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<>>>, (rustc_middle::query::erase::ErasedData<[u8; 8]>, 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] 65,628 ( 0.00%) ???:rustc_ast::visit::walk_item_inner:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,520 ( 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] 65,451 ( 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:>::swap_remove:: 65,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:::check_expr 65,430 ( 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 65,430 ( 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 65,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:::check_expr 65,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:::check_expr 65,430 ( 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 65,430 ( 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 65,430 ( 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] 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 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 65,430 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_expr 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,204 ( 0.00%) ???:open [/usr/lib/libc.so.6] 65,174 ( 0.00%) ???:::visit:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,055 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,944 ( 0.00%) ???:::is_conditionally_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,941 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_url [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,888 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,801 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 64,743 ( 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_impl_item::> 64,704 ( 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}> 64,668 ( 0.00%) ???:<&std::io::stdio::Stderr as core::io::write::Write>::flush [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,656 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::from_lit_kind 64,535 ( 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_impl_item 64,490 ( 0.00%) ???: as rustc_type_ir::visit::TypeVisitor>::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,396 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,393 ( 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 64,272 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 64,242 ( 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 64,242 ( 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 64,193 ( 0.00%) include/jemalloc/internal/extent.h:pa_dalloc 64,111 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:<::parse_fragment::FragmentPartIter as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,080 ( 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] 63,973 ( 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_expr 63,882 ( 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:: 63,881 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:clippy_lints::unconditional_recursion::get_impl_trait_def_id [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,750 ( 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 63,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/dep_graph/graph.rs:::get_all_attrs:: 63,750 ( 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 63,749 ( 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 63,744 ( 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 63,744 ( 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 63,576 ( 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 63,504 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_ty::> 63,485 ( 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 63,382 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::mir_to_const [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,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:::expr'2 63,342 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/escape.rs:, ::check_fn::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, ::check_fn::{closure#0}>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_hir_id::HirId, ()), as core::iter::traits::collect::Extend<(rustc_hir_id::HirId, ())>>::extend, ::check_fn::{closure#0}>, as core::iter::traits::collect::FromIterator>::from_iter, ::check_fn::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> 63,336 ( 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:>::scan_inline_link::{closure#0} 63,329 ( 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 63,291 ( 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 itertools::Itertools>::join 63,288 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 63,106 ( 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:>::handle_inline_pass1 63,061 ( 0.00%) ???:, ::create_derived_impl::{closure#1}>, ::create_derived_impl::{closure#2}> 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,042 ( 0.00%) ???:::to_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,977 ( 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] 62,839 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::init_default_impl_for_type_if_needed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,802 ( 0.00%) ???:> 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] 62,748 ( 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 62,727 ( 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 62,720 ( 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:>::get:: 62,667 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,574 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:::check_fn 62,571 ( 0.00%) ???:::visit_attribute [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,552 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>> 62,402 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_item 62,390 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::read_explicit_enum_value [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,356 ( 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::diagnostics::span_lint_and_then::::{closure#0}> 62,332 ( 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:core::ptr::drop_glue:: 62,332 ( 0.00%) ???:::new [???] 62,288 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,248 ( 0.00%) ???:::can_lower_expr_to_const_arg_direct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,244 ( 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::functions::not_unsafe_ptr_arg_deref::check_raw_ptr 62,214 ( 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::report_extra_lifetimes 62,173 ( 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 62,153 ( 0.00%) ???:>::with::::new::{closure#0}::{closure#0}>::{closure#0}, u32> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,132 ( 0.00%) ???:::check_pat_post [???] 62,132 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_pat 62,111 ( 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 62,082 ( 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 62,014 ( 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::utils::is_relevant_expr 61,992 ( 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] 61,967 ( 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] 61,925 ( 0.00%) ???:>::get_index_of:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,852 ( 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:::init_default_impl_for_type_if_needed 61,712 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,712 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,712 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,712 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,712 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,712 ( 0.00%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,680 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::check_expr 61,438 ( 0.00%) ???:::recover_after_dot [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] -------------------------------------------------------------------------------- -- 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 { 96,363 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { 10,707 ( 0.00%) let ctxt = block.span.ctxt(); 64,242 ( 0.00%) if !ctxt.in_external_macro(cx.tcx.sess.source_map()) { 1,097,603 ( 0.01%) => ???:::in_external_macro (10,707x) 27,141 ( 0.00%) for [stmt1, stmt2] in block.stmts.array_windows::<2>() { 7 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt2.kind 2 ( 0.00%) && stmt1.span.ctxt() == ctxt 2 ( 0.00%) && stmt2.span.ctxt() == ctxt 2 ( 0.00%) && expr.span.ctxt() == ctxt . { 4 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt1, expr); 62 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (1x) . } . } . 780 ( 0.00%) if let (Some(stmt), Some(expr)) = (block.stmts.last(), block.expr) 514 ( 0.00%) && stmt.span.ctxt() == ctxt 514 ( 0.00%) && expr.span.ctxt() == ctxt . { 2,827 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt, expr); 36,280 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (257x) . } . } 83,600 ( 0.00%) } . } . 2,580 ( 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>, . ) { 516 ( 0.00%) if let Some(vec) = extract_init_or_reserve_target(cx, maybe_init_or_reserve) . && 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() { -- line 103 ---------------------------------------- -- 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", . ); . } . } 2,064 ( 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> { 776 ( 0.00%) match stmt.kind { . StmtKind::Let(local) => { 3 ( 0.00%) if let Some(init_expr) = local.init 8 ( 0.00%) && let PatKind::Binding(_, hir_id, _, None) = local.pat.kind 5 ( 0.00%) && let Some(init_kind) = get_vec_init_kind(cx, init_expr) 19 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (1x) . { . return Some(TargetVec { . location: VecLocation::Local(hir_id), . init_kind: Some(init_kind), . }); . } . }, 1,263 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => match expr.kind { 22 ( 0.00%) ExprKind::Assign(lhs, rhs, _span) => { 55 ( 0.00%) if let Some(init_kind) = get_vec_init_kind(cx, rhs) { 209 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (11x) . return Some(TargetVec { . location: VecLocation::Expr(lhs), . init_kind: Some(init_kind), . }); . } . }, 2,420 ( 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() 242 ( 0.00%) .expr_ty(self_expr) 9,680 ( 0.00%) => ???:::expr_ty (242x) . .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() }` -- line 205 ---------------------------------------- 55,511 ( 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),* $(,)?)) => { 8,778,055 ( 0.11%) rustc_lint::EarlyLintPass::$name(&mut $self.$field, $($arg),*); 9,998,844 ( 0.13%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item (14,032x) 7,546,908 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/module_style.rs:::check_item (14,032x) 3,416,871 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/duplicate_mod.rs:::check_item (14,032x) 1,094,496 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_item (14,032x) 861,106 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/definition_in_module_root.rs:::check_item (14,032x) 255,504 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/partial_pub_fields.rs:::check_item (14,032x) 243,107 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unnecessary_self_imports.rs:::check_item (14,032x) 126,300 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/crate_in_macro_def.rs:::check_item (14,032x) 42,096 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/visibility.rs:::check_item (14,032x) . }; . } . . /// 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),*);)*]) => ( 3,989,022 ( 0.05%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::EarlyContext<'_>, $($param: $arg),*) { . $crate::expand_combined_early_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 1,568,173 ( 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 ---------------------------------------- 14,032 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs -------------------------------------------------------------------------------- Ir -- line 82 ---------------------------------------- . declare_lint_pass!(EvalOrderDependence => [ . DIVERGING_SUB_EXPRESSION, . MIXED_READ_WRITE_IN_EXPRESSION, . ]); . . impl<'tcx> LateLintPass<'tcx> for EvalOrderDependence { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Find a write to a local variable. 261,731 ( 0.00%) let var = if let ExprKind::Assign(lhs, ..) | ExprKind::AssignOp(_, lhs, _) = expr.kind . && let Some(var) = lhs.res_local_id() . && expr.span.desugaring_kind().is_none() . { . var . } else { . return; . }; . let mut visitor = ReadVisitor { . cx, . var, . write_expr: expr, . last_expr: expr, . }; . check_for_unsequenced_reads(&mut visitor); 65,430 ( 0.00%) } . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 6,626 ( 0.00%) match stmt.kind { 931 ( 0.00%) StmtKind::Let(local) => { 2,793 ( 0.00%) if let LetStmt { init: Some(e), .. } = local { 2,793 ( 0.00%) DivergenceVisitor { cx }.visit_expr(e); 2,153,286 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr (931x) . } . }, 1,300 ( 0.00%) StmtKind::Expr(e) | StmtKind::Semi(e) => DivergenceVisitor { cx }.maybe_walk_expr(e), 117,831 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr (260x) . StmtKind::Item(..) => {}, . } . } . } . . struct DivergenceVisitor<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . } . . impl<'tcx> DivergenceVisitor<'_, 'tcx> { 20,065 ( 0.00%) fn maybe_walk_expr(&mut self, e: &'tcx Expr<'_>) { 32,104 ( 0.00%) match e.kind { . ExprKind::Closure(..) | ExprKind::If(..) | ExprKind::Loop(..) => {}, . ExprKind::Match(e, arms, _) => { . self.visit_expr(e); . for arm in arms { . if let Some(if_expr) = arm.guard { . self.visit_expr(if_expr); . } . // make sure top level arm expressions aren't linted . self.maybe_walk_expr(arm.body); . } . }, 28,091 ( 0.00%) _ => walk_expr(self, e), 367,404 ( 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:: (1,191x) . } . } . . fn report_diverging_sub_expr(&self, e: &Expr<'_>) { . if let Some(macro_call) = root_macro_call_first_node(self.cx, e) . && self.cx.tcx.is_diagnostic_item(sym::todo_macro, macro_call.def_id) . { . return; -- line 145 ---------------------------------------- -- line 148 ---------------------------------------- . } . } . . fn stmt_might_diverge(stmt: &Stmt<'_>) -> bool { . !matches!(stmt.kind, StmtKind::Item(..)) . } . . impl<'tcx> Visitor<'tcx> for DivergenceVisitor<'_, 'tcx> { 26,271 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { 26,259 ( 0.00%) match e.kind { . // fix #10776 108 ( 0.00%) ExprKind::Block(block, ..) => match (block.stmts, block.expr) { . (stmts, Some(e)) if stmts.iter().all(|stmt| !stmt_might_diverge(stmt)) => { . self.visit_expr(e); 18 ( 0.00%) }, . ([first @ .., stmt], None) . if first.iter().all(|stmt| !stmt_might_diverge(stmt)) . && let StmtKind::Expr(e) | StmtKind::Semi(e) = stmt.kind => . { . self.visit_expr(e); . }, . _ => {}, . }, . ExprKind::Continue(_) | ExprKind::Break(_, _) | ExprKind::Ret(_) => self.report_diverging_sub_expr(e), 946 ( 0.00%) ExprKind::Call(func, _) => { 1,892 ( 0.00%) let typ = self.cx.typeck_results().expr_ty(func); 37,200 ( 0.00%) => ???:::expr_ty (930x) . if typ.is_fn() { 5,658 ( 0.00%) let sig = typ.fn_sig(self.cx.tcx); 787,200 ( 0.01%) => ???:::fn_sig (930x) 7,544 ( 0.00%) if self.cx.tcx.instantiate_bound_regions_with_erased(sig).output().kind() == &ty::Never { 995,639 ( 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::> (930x) . self.report_diverging_sub_expr(e); . } . } . }, . ExprKind::MethodCall(..) => { 3 ( 0.00%) let borrowed_table = self.cx.typeck_results(); 12 ( 0.00%) if borrowed_table.expr_ty(e).is_never() { 40 ( 0.00%) => ???:::expr_ty (1x) . self.report_diverging_sub_expr(e); . } . }, . _ => { . // do not lint expressions referencing objects of type `!`, as that required a . // diverging expression . // to begin with . }, . } 11,259 ( 0.00%) self.maybe_walk_expr(e); 274,584 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr (931x) 88,889 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr'2 (512x) 22,518 ( 0.00%) } . fn visit_block(&mut self, _: &'tcx Block<'_>) { . // don't continue over blocks, LateLintPass already does that . } . } . . /// Walks up the AST from the given write expression (`vis.write_expr`) looking . /// for reads to the same variable that are unsequenced relative to the write. . /// -- line 202 ---------------------------------------- 7,952 ( 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(); 18,033 ( 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; 4 ( 0.00%) while idx < len { . // SAFETY: idx < len, so both are in-bounds and readable 12 ( 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); 1,059,466 ( 0.01%) compare_bytes(lhs as _, rhs as _, size) == 0 1,220 ( 0.00%) => ???:0x0000000000173660 (122x) . } . } . } . . #[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 { 2 ( 0.00%) x.iter().any(|y| *y == *self) 59 ( 0.00%) } . } . . 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 . // be read as bytes. -- line 399 ---------------------------------------- 162,233 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs -------------------------------------------------------------------------------- Ir -- line 157 ---------------------------------------- . path.ident.span, . ); . } . } . . /// Checks function call exprs: . /// - `>::try_from(0i32)` . /// - `<_ as TryInto>::try_into(0i32)` 27,972 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>, callee: &Expr<'_>) { 11,988 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind 27,972 ( 0.00%) && let Some(item_def_id) = cx.qpath_res(qpath, callee.hir_id).opt_def_id() 274,453 ( 0.00%) => ???:::qpath_res (3,996x) 19,965 ( 0.00%) && let Some(trait_def_id) = cx.tcx.trait_of_assoc(item_def_id) 523,921 ( 0.01%) => ???:::trait_of_assoc (3,993x) . { 16 ( 0.00%) let qpath_spans = match qpath { . QPath::Resolved(_, path) => { . if let [trait_seg, fn_seg] = path.segments { . Some(SpansKind::TraitFn { . trait_span: trait_seg.ident.span, . fn_span: fn_seg.ident.span, . }) . } else { . None . } . }, . QPath::TypeRelative(_, seg) => Some(SpansKind::Fn { 32 ( 0.00%) fn_span: seg.ident.span, . }), . }; . . check( . cx, . expr, 32 ( 0.00%) cx.typeck_results().node_args(callee.hir_id), 312 ( 0.00%) => ???:::node_args (8x) 88 ( 0.00%) match cx.tcx.get_diagnostic_name(trait_def_id) { 628 ( 0.00%) => ???:::get_diagnostic_name (8x) . Some(sym::TryFrom) => FunctionKind::TryFromFunction(qpath_spans), . Some(sym::TryInto) => FunctionKind::TryIntoFunction(qpath_spans), . _ => return, . }, . callee.span, . ); . } 31,968 ( 0.00%) } 12,020 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/sugg.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . /// Literal constant `0`, for convenience. . pub const ZERO: Sugg<'static> = Sugg::NonParen(Cow::Borrowed("0")); . /// Literal constant `1`, for convenience. . pub const ONE: Sugg<'static> = Sugg::NonParen(Cow::Borrowed("1")); . /// a constant represents an empty string, for convenience. . pub const EMPTY: Sugg<'static> = Sugg::NonParen(Cow::Borrowed("")); . . impl Display for Sugg<'_> { 324 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { 216 ( 0.00%) match self { . Sugg::NonParen(s) | Sugg::MaybeParen(s) => s.fmt(f), . Sugg::BinOp(op, lhs, rhs) => binop_to_string(*op, lhs, rhs).fmt(f), . Sugg::UnOp(op, inner) => write!(f, "{}{}", op.as_str(), inner.clone().maybe_inner_paren()), . } . } . } . . #[expect(clippy::wrong_self_convention)] // ok, because of the function `as_ty` method . impl<'a> Sugg<'a> { . /// Prepare a suggestion from an expression. 120 ( 0.00%) pub fn hir_opt(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> Option { 12 ( 0.00%) let ctxt = expr.span.ctxt(); 12 ( 0.00%) let get_snippet = |span| snippet_with_context(cx, span, ctxt, "", &mut Applicability::Unspecified).0; . snippet_opt(cx, expr.span).map(|_| Self::hir_from_snippet(cx, expr, get_snippet)) 108 ( 0.00%) } . . /// Convenience function around `hir_opt` for suggestions with a default . /// text. . pub fn hir(cx: &LateContext<'_>, expr: &hir::Expr<'_>, default: &'a str) -> Self { . Self::hir_opt(cx, expr).unwrap_or(Sugg::NonParen(Cow::Borrowed(default))) . } . . /// Same as `hir`, but it adapts the applicability level by following rules: . /// . /// - Applicability level `Unspecified` will never be changed. . /// - If the span is inside a macro, change the applicability level to `MaybeIncorrect`. . /// - If the default value is used and the applicability level is `MachineApplicable`, change it . /// to `HasPlaceholders` 120 ( 0.00%) pub fn hir_with_applicability( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . default: &'a str, . applicability: &mut Applicability, . ) -> Self { 36 ( 0.00%) if *applicability != Applicability::Unspecified && expr.span.from_expansion() { . *applicability = Applicability::MaybeIncorrect; . } 12 ( 0.00%) Self::hir_opt(cx, expr).unwrap_or_else(|| { 16,656 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir_opt (12x) . if *applicability == Applicability::MachineApplicable { . *applicability = Applicability::HasPlaceholders; . } . Sugg::NonParen(Cow::Borrowed(default)) . }) 96 ( 0.00%) } . . /// 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![]`. 288 ( 0.00%) pub fn hir_with_context( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . ctxt: SyntaxContext, . default: &'a str, . applicability: &mut Applicability, . ) -> Self { 48 ( 0.00%) if expr.span.ctxt() == ctxt { 84 ( 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 { 168 ( 0.00%) Self::hir_from_snippet(cx, expr, |span| { 180 ( 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) . } 216 ( 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 { 228 ( 0.00%) if let Some(range) = higher::Range::hir(cx, expr) { 540 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (12x) . 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); . } . 156 ( 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 108 ( 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( . AssocOp::Binary(op.node), . get_snippet(lhs.span), . get_snippet(rhs.span), . ), . ExprKind::Cast(lhs, ty) | . //FIXME(chenyukang), remove this after type ascription is removed from AST 96 ( 0.00%) ExprKind::Type(lhs, ty) => Sugg::BinOp(AssocOp::Cast, get_snippet(lhs.span), get_snippet(ty.span)), . } . } . . /// Prepare a suggestion from an expression. . pub fn ast( . cx: &EarlyContext<'_>, . expr: &ast::Expr, . default: &'a str, -- line 200 ---------------------------------------- -- line 353 ---------------------------------------- . pub fn range(self, end: &Self, limits: ast::RangeLimits) -> Sugg<'static> { . make_assoc(AssocOp::Range(limits), &self, end) . } . . /// Adds parentheses to any expression that might need them. Suitable to the . /// `self` argument of a method call . /// (e.g., to build `bar.foo()` or `(1 + 2).foo()`). . #[must_use] 216 ( 0.00%) pub fn maybe_paren(self) -> Self { 264 ( 0.00%) match self { 108 ( 0.00%) Sugg::NonParen(..) => self, . // `(x)` and `(x).y()` both don't need additional parens. . Sugg::MaybeParen(sugg) => { . if has_enclosing_paren(&sugg) { . Sugg::MaybeParen(sugg) . } else { . Sugg::NonParen(format!("({sugg})").into()) . } . }, 60 ( 0.00%) Sugg::BinOp(op, lhs, rhs) => { 96 ( 0.00%) let sugg = binop_to_string(op, &lhs, &rhs); 9,699 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::binop_to_string (12x) 60 ( 0.00%) Sugg::NonParen(format!("({sugg})").into()) . }, . Sugg::UnOp(op, inner) => Sugg::NonParen(format!("({}{})", op.as_str(), inner.maybe_inner_paren()).into()), . } 240 ( 0.00%) } . . /// Strip enclosing parentheses if present. This method must be called when . /// it is known that removing those will not change the meaning. For example, . /// if `self` is known to represent a reference and the suggestion will be . /// used as the argument of a function call, it is safe to remove the enclosing . /// parentheses. It would not be safe to do so for an expression that might . /// represent a tuple. . #[must_use] -- line 386 ---------------------------------------- -- line 415 ---------------------------------------- . self . } else { . self.maybe_paren() . } . } . } . . /// Generates a string from the operator and both sides. 72 ( 0.00%) fn binop_to_string(op: AssocOp, lhs: &str, rhs: &str) -> String { 60 ( 0.00%) match op { . AssocOp::Binary(op) => format!("{lhs} {} {rhs}", op.as_str()), . AssocOp::Assign => format!("{lhs} = {rhs}"), . AssocOp::AssignOp(op) => format!("{lhs} {} {rhs}", op.as_str()), 72 ( 0.00%) AssocOp::Cast => format!("{lhs} as {rhs}"), . AssocOp::Range(limits) => format!("{lhs}{}{rhs}", limits.as_str()), . } 24 ( 0.00%) } . . /// Returns `true` if `sugg` is enclosed in parenthesis. 24,036 ( 0.00%) pub fn has_enclosing_paren(sugg: impl AsRef) -> bool { 6,009 ( 0.00%) let mut chars = sugg.as_ref().chars(); 150,225 ( 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 (6,009x) 7,820 ( 0.00%) if chars.next() == Some('(') { . let mut depth = 1; . for c in &mut chars { 318,084 ( 0.00%) if c == '(' { 2,452 ( 0.00%) depth += 1; 6,650 ( 0.00%) } else if c == ')' { 6,650 ( 0.00%) depth -= 1; . } 160,268 ( 0.00%) if depth == 0 { . break; . } . } . chars.next().is_none() . } else { . false . } 30,045 ( 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 ---------------------------------------- 93,100 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs -------------------------------------------------------------------------------- Ir -- line 53 ---------------------------------------- . pub ZOMBIE_PROCESSES, . suspicious, . "not waiting on a spawned child process" . } . . declare_lint_pass!(ZombieProcesses => [ZOMBIE_PROCESSES]); . . impl<'tcx> LateLintPass<'tcx> for ZombieProcesses { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 261,720 ( 0.00%) if let ExprKind::Call(..) | ExprKind::MethodCall(..) = expr.kind 14,418 ( 0.00%) && let child_ty = cx.typeck_results().expr_ty(expr) 288,384 ( 0.00%) => ???:::expr_ty (7,209x) 9,240 ( 0.00%) && child_ty.is_diag_item(cx, sym::Child) . { . match cx.tcx.parent_hir_node(expr.hir_id) { . Node::LetStmt(local) . if let PatKind::Binding(_, local_id, ..) = local.pat.kind . && let Some(enclosing_block) = get_enclosing_block(cx, expr.hir_id) => . { . let mut vis = WaitFinder { . cx, -- line 72 ---------------------------------------- -- line 110 ---------------------------------------- . .. . }) => { . // Immediately dropped. E.g. `std::process::Command::new("echo").spawn().unwrap();` . check(cx, expr, Cause::NeverWait, true); . }, . _ => {}, . } . } 523,440 ( 0.01%) } . } . . struct MaybeWait(Span); . . /// A visitor responsible for finding a `wait()` call on a local variable. . /// . /// Note that this visitor does NOT explicitly look for `wait()` calls directly, but rather does the . /// inverse -- checking if all uses of the local are either: -- line 126 ---------------------------------------- 7,209 ( 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, . ) { 53,121 ( 0.00%) let safety = match kind { . intravisit::FnKind::ItemFn(_, _, header) => header.safety(), . intravisit::FnKind::Method(_, sig) => sig.header.safety(), . intravisit::FnKind::Closure => return, . }; . 74,368 ( 0.00%) check_raw_ptr(cx, safety, decl, body, def_id); 2,106,190 ( 0.03%) => 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 (10,624x) . } . . pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 1 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Provided(eid)) = item.kind { . let body = cx.tcx.hir_body(eid); . check_raw_ptr(cx, sig.header.safety(), sig.decl, body, item.owner_id.def_id); . } . } . 53,120 ( 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, . ) { 73,138 ( 0.00%) if safety.is_safe() && cx.effective_visibilities.is_exported(def_id) { 591,546 ( 0.01%) => ???:::is_exported (10,378x) . let raw_ptrs = iter_input_pats(decl, body) . .filter_map(|arg| raw_ptr_arg(cx, arg)) . .collect::(); . 10,374 ( 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(()) . }); . } . } 63,744 ( 0.00%) } . . fn raw_ptr_arg(cx: &LateContext<'_>, arg: &hir::Param<'_>) -> Option { 44,936 ( 0.00%) if let (&hir::PatKind::Binding(_, id, _, _), Some(&ty::RawPtr(_, _))) = ( . &arg.pat.kind, 11,234 ( 0.00%) cx.typeck_results 22,468 ( 0.00%) .map(|typeck_results| typeck_results.pat_ty(arg.pat).kind()), 449,360 ( 0.01%) => ???:::pat_ty (11,234x) . ) { . Some(id) . } else { . None . } . } . . fn check_arg(cx: &LateContext<'_>, raw_ptrs: &HirIdSet, arg: &hir::Expr<'_>) { -- line 90 ---------------------------------------- 106,112 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 124,264 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 31,066 ( 0.00%) if let PatKind::Struct(_, ref npat, ref pfields, _) = pat.kind { . let mut wilds = 0; . let type_name = npat . .segments . .last() . .expect("A path must have at least one segment") . .ident . .name; . -- line 18 ---------------------------------------- -- line 69 ---------------------------------------- . )); . }, . ); . } . } . } . } . } 124,264 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 141,946 ( 0.00%) if let ExprKind::Call(iter_expr, []) = &expr.kind 20 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, _)) = &iter_expr.kind 12 ( 0.00%) && let TyKind::Path(ty_path) = &ty.kind 14 ( 0.00%) && let QPath::Resolved(None, path) = ty_path 9 ( 0.00%) && let def::Res::Def(_, def_id) = &path.res 30 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::IterEmpty, *def_id) 162 ( 0.00%) => ???:::is_diagnostic_item (3x) . && 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, . ); . } 523,440 ( 0.01%) } . } . . fn make_sugg( . cx: &LateContext<'_>, . ty_path: &QPath<'_>, . ctxt: SyntaxContext, . applicability: &mut Applicability, . path: &str, -- line 67 ---------------------------------------- 3 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 302,950 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 90,885 ( 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 98,212 ( 0.00%) && let Some(doc) = attr.doc_str() 7,972,412 ( 0.10%) => ???:::doc_str (24,553x) 31,000 ( 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 . )); . }, . ); . } 242,360 ( 0.00%) } . } 64,852 ( 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 { 392,580 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 143,108 ( 0.00%) if !e.span.from_expansion() 4,255 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, deref_target) = e.kind 2,834 ( 0.00%) && !deref_target.span.from_expansion() 2,834 ( 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, . ); . } 392,580 ( 0.00%) } . } . . /// 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 ---------------------------------------- 107,652 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs -------------------------------------------------------------------------------- Ir -- line 191 ---------------------------------------- . (Self::Maybe, _) | (_, Self::Maybe) => Some(Self::Maybe), . (Self::Yes, Self::Yes) => Some(Self::Yes), . }) . .unwrap_or(Self::No) . } . . /// Checks if this is definitely `Freeze`. . fn is_freeze(self) -> bool { 45 ( 0.00%) matches!(self, Self::Yes) . } . . /// Checks if this is definitely not `Freeze`. . fn is_not_freeze(self) -> bool { . matches!(self, Self::No) . } . } . -- line 207 ---------------------------------------- -- line 259 ---------------------------------------- . ignore_tys: DefIdSet, . // Cache checked types. We can recurse through a type multiple times so this . // can be hit quite frequently. . freeze_tys: FxHashMap, IsFreeze>, . } . . impl<'tcx> NonCopyConst<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf) -> Self { 4 ( 0.00%) Self { . ignore_tys: conf . .ignore_interior_mutability . .iter() 16 ( 0.00%) .flat_map(|ignored_ty| lookup_path_str(tcx, PathNS::Type, ignored_ty)) 220,917 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/paths.rs:clippy_utils::paths::lookup_path_str (4x) . .collect(), . freeze_tys: FxHashMap::default(), . } . } . . /// Checks if a value of the given type is `Freeze`, or may be depending on the value. 1,284 ( 0.00%) fn is_ty_freeze(&mut self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ty: Ty<'tcx>) -> IsFreeze { . // FIXME: this should probably be using the trait solver . let ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)) . .unwrap_or(ty); . match self.freeze_tys.entry(ty) { 144 ( 0.00%) Entry::Occupied(e) => *e.get(), . Entry::Vacant(e) => { . let e = e.insert(IsFreeze::Yes); 210 ( 0.00%) if ty.is_freeze(tcx, typing_env) { 1,260 ( 0.00%) => ???:::is_freeze (35x) . return IsFreeze::Yes; . } . let is_freeze = match *ty.kind() { . ty::Adt(adt, _) if adt.is_unsafe_cell() => { . *e = IsFreeze::No; . return IsFreeze::No; . }, . ty::Adt(adt, _) if self.ignore_tys.contains(&adt.did()) => return IsFreeze::Yes, -- line 295 ---------------------------------------- -- line 331 ---------------------------------------- . }, . }; . if !is_freeze.is_freeze() { . self.freeze_tys.insert(ty, is_freeze); . } . is_freeze . }, . } 856 ( 0.00%) } . . /// Checks if the given constant value is `Freeze`. Returns `Err` if the constant . /// cannot be read, but the result depends on the value. . fn is_value_freeze( . &mut self, . tcx: TyCtxt<'tcx>, . typing_env: TypingEnv<'tcx>, . ty: Ty<'tcx>, -- line 347 ---------------------------------------- -- line 709 ---------------------------------------- . _ => return None, . }; . src_expr = use_expr; . } . } . } . . impl<'tcx> LateLintPass<'tcx> for NonCopyConst<'tcx> { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 28,086 ( 0.00%) if let ItemKind::Const(ident, .., ct_rhs) = item.kind 1 ( 0.00%) && !ident.is_special() 6 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 10 ( 0.00%) && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { 59 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::is_ty_freeze (1x) 21 ( 0.00%) => ???:::typing_env (1x) . IsFreeze::No => true, . IsFreeze::Yes => false, . IsFreeze::Maybe => match cx.tcx.const_eval_poly(item.owner_id.to_def_id()) { . Ok(val) if let Ok(is_freeze) = self.is_value_freeze(cx.tcx, cx.typing_env(), ty, val) => !is_freeze, . // FIXME: we just assume mgca rhs's are freeze . _ => const_item_rhs_to_expr(cx.tcx, ct_rhs).is_some_and(|e| !self.is_init_expr_freeze( . cx.tcx, . cx.typing_env(), -- line 729 ---------------------------------------- -- line 749 ---------------------------------------- . if implements_trait(cx, ty, sync_trait, &[]) { . diag.help("did you mean to make this a `static` item"); . } else { . diag.help("did you mean to make this a `thread_local!` item"); . } . }, . ); . } 112,344 ( 0.00%) } . 32 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 8 ( 0.00%) if let TraitItemKind::Const(_, ct_rhs_opt) = item.kind . && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { . IsFreeze::No => true, . IsFreeze::Maybe if let Some(ct_rhs) = ct_rhs_opt => { . match cx.tcx.const_eval_poly(item.owner_id.to_def_id()) { . Ok(val) if let Ok(is_freeze) = self.is_value_freeze(cx.tcx, cx.typing_env(), ty, val) => { . !is_freeze . }, -- line 768 ---------------------------------------- -- line 784 ---------------------------------------- . { . span_lint( . cx, . DECLARE_INTERIOR_MUTABLE_CONST, . item.ident.span, . "named constant with interior mutability", . ); . } 32 ( 0.00%) } . 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 23,986 ( 0.00%) if let ImplItemKind::Const(_, ct_rhs) = item.kind 183 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 915 ( 0.00%) && match self.is_ty_freeze(cx.tcx, cx.typing_env(), ty) { 9,430 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::is_ty_freeze (61x) 1,281 ( 0.00%) => ???:::typing_env (61x) . IsFreeze::Yes => false, . IsFreeze::No => { . // If this is a trait impl, check if the trait definition is the source . // of the cell. . if let Node::Item(parent_item) = cx.tcx.parent_hir_node(item.hir_id()) . && let ItemKind::Impl(impl_block) = parent_item.kind . && let Some(of_trait) = impl_block.of_trait . && let Some(trait_id) = of_trait.trait_ref.trait_def_id() -- line 805 ---------------------------------------- -- line 843 ---------------------------------------- . { . span_lint( . cx, . DECLARE_INTERIOR_MUTABLE_CONST, . item.ident.span, . "named constant with interior mutability", . ); . } 95,944 ( 0.00%) } . 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 153,278 ( 0.00%) if let ExprKind::Path(qpath) = &e.kind . && let typeck = cx.typeck_results() 344,898 ( 0.00%) && let Res::Def(DefKind::Const { .. } | DefKind::AssocConst { .. }, did) = typeck.qpath_res(qpath, e.hir_id) 542,658 ( 0.01%) => ???:::qpath_res (22,418x) . // As of `1.80` constant contexts can't borrow any type with interior mutability 360 ( 0.00%) && !is_in_const_context(cx) 34,546 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (90x) 675 ( 0.00%) && !self.is_ty_freeze(cx.tcx, cx.typing_env(), typeck.expr_ty(e)).is_freeze() 2,655 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::is_ty_freeze (45x) 1,800 ( 0.00%) => ???:::expr_ty (45x) 1,350 ( 0.00%) => ???:::typing_env (45x) . && let Some(borrow_src) = { . // The extra block helps formatting a lot. . if let Ok(val) = cx.tcx.const_eval_resolve( . cx.typing_env(), . UnevaluatedConst::new(did, typeck.node_args(e.hir_id)), . DUMMY_SP, . ) && let Ok(src) = self.is_non_freeze_val_borrowed(cx.tcx, cx.typing_env(), typeck, e, val) . { -- line 867 ---------------------------------------- -- line 884 ---------------------------------------- . |diag| { . if let Some(note) = borrow_src.cause.note() { . diag.note(note); . } . diag.help("this lint can be silenced by assigning the value to a local variable before borrowing"); . }, . ); . } 523,440 ( 0.01%) } . } . . struct ReplaceAssocFolder<'tcx> { . tcx: TyCtxt<'tcx>, . trait_id: DefId, . self_ty: Ty<'tcx>, . } . impl<'tcx> TypeFolder> for ReplaceAssocFolder<'tcx> { -- line 900 ---------------------------------------- 22,773 ( 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 { 261,720 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 146,931 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 6,644 ( 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", . ); . } 327,150 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs -------------------------------------------------------------------------------- Ir . use rustc_ast::ast::{LitFloatType, LitIntType, LitKind}; . use std::iter; . . /// Represents the base of a numeric literal, used for parsing and formatting. 27,619 ( 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`. 83,160 ( 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); 27,720 ( 0.00%) let float = matches!(lit_kind, LitKind::Float(..)); 36,960 ( 0.00%) Some(NumericLiteral::new(unsuffixed, suffix, float)) 596,328 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (9,240x) . } else { . None . } 73,920 ( 0.00%) } . . /// Parses a raw numeric literal string into its structured `NumericLiteral` parts. . #[must_use] 64,701 ( 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. 2,220 ( 0.00%) let radix = if unsigned_lit.starts_with("0x") { . Radix::Hexadecimal 1,782 ( 0.00%) } else if unsigned_lit.starts_with("0b") { . Radix::Binary 1,782 ( 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) . }; . 18,048 ( 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); . 138,645 ( 0.00%) Self { . radix, . prefix, . integer, . fraction, . exponent, . suffix, . } 83,187 ( 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; . 18,486 ( 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()); 18,480 ( 0.00%) let suffix = match lit_kind { 36,960 ( 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 ---------------------------------------- 37,050 ( 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) { 151,320 ( 0.00%) if let ExprKind::MethodCall(MethodCall { seg, receiver, .. }) = &expr.kind 8,330 ( 0.00%) && matches!(seg.ident.name, sym::expect | sym::unwrap) . && is_direct_expn_of(receiver.span, sym::option_env).is_some() . { . 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, -- line 47 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,860 ( 0.00%) if !expr.span.from_expansion() . && let Some(if_expr) = If::hir(expr) . && let Some(r#else) = if_expr.r#else 2 ( 0.00%) && let ExprKind::Binary(op, rhs, lhs) = if_expr.cond.kind . && let (BinOpKind::Gt | BinOpKind::Ge, mut a, mut b) | (BinOpKind::Lt | BinOpKind::Le, mut b, mut a) = . (op.node, rhs, lhs) . && let Some((ty, b_n_refs)) = self.are_ty_eligible(cx, a, b) . && is_sub_expr(cx, if_expr.then, a, b, ty) . && is_sub_expr(cx, r#else, b, a, ty) . { . span_lint_and_then( . cx, -- line 69 ---------------------------------------- -- 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); . }, . ); . } 523,440 ( 0.01%) } . } . . impl ManualAbsDiff { . /// Returns a type if `a` and `b` are both of it, and this lint can be applied to that . /// type (currently, any primitive int, or a `Duration`) . fn are_ty_eligible<'tcx>(&self, cx: &LateContext<'tcx>, a: &Expr<'_>, b: &Expr<'_>) -> Option<(Ty<'tcx>, usize)> { . let is_int = |ty: Ty<'_>| matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) && self.msrv.meets(cx, msrvs::ABS_DIFF); . let is_duration = -- line 102 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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; . 72,108 ( 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, . ) { 36,054 ( 0.00%) if msrv.meets(cx, msrvs::UNSIGNED_IS_MULTIPLE_OF) 90,135 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (6,009x) 6,009 ( 0.00%) && let Some(operand) = uint_compare_to_zero(cx, expr, op, lhs, rhs) . && let ExprKind::Binary(operand_op, operand_left, operand_right) = operand.kind 1,115 ( 0.00%) && operand_op.node == BinOpKind::Rem . && matches!( . cx.typeck_results().expr_ty_adjusted(operand_left).peel_refs().kind(), . ty::Uint(_) . ) . && matches!( . cx.typeck_results().expr_ty_adjusted(operand_right).peel_refs().kind(), . ty::Uint(_) . ) -- line 33 ---------------------------------------- -- 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, . ); . } 48,072 ( 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>, . ) -> Option<&'tcx Expr<'tcx>> { 12,018 ( 0.00%) let operand = if matches!(lhs.kind, ExprKind::Binary(..)) 5,086 ( 0.00%) && matches!(op, BinOpKind::Eq | BinOpKind::Ne | BinOpKind::Gt) 1,115 ( 0.00%) && is_zero_integer_const(cx, rhs, e.span.ctxt()) . { . lhs 9,788 ( 0.00%) } else if matches!(rhs.kind, ExprKind::Binary(..)) . && matches!(op, BinOpKind::Eq | BinOpKind::Ne | BinOpKind::Lt) . && is_zero_integer_const(cx, lhs, e.span.ctxt()) . { . rhs . } else { . return None; . }; . 4,460 ( 0.00%) matches!(cx.typeck_results().expr_ty_adjusted(operand).kind(), ty::Uint(_)).then_some(operand) 84,740 ( 0.00%) => ???:::expr_ty_adjusted (1,115x) . } . . fn deref_sugg<'a>(sugg: Sugg<'a>, ty: Ty<'_>) -> Sugg<'a> { . if let ty::Ref(_, target_ty, _) = ty.kind() { . deref_sugg(sugg.deref(), *target_ty) . } else { . sugg . } -- line 87 ---------------------------------------- 15,747 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unneeded_struct_pattern.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub UNNEEDED_STRUCT_PATTERN, . style, . "using struct pattern to match against unit variant" . } . . declare_lint_pass!(UnneededStructPattern => [UNNEEDED_STRUCT_PATTERN]); . . impl LateLintPass<'_> for UnneededStructPattern { 108,731 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { 31,066 ( 0.00%) if !pat.span.from_expansion() 31,221 ( 0.00%) && let PatKind::Struct(path, [], _) = &pat.kind . && let QPath::Resolved(_, path) = path . && let Res::Def(DefKind::Variant, did) = path.res . { . let enum_did = cx.tcx.parent(did); . let variant = cx.tcx.adt_def(enum_did).variant_with_id(did); . . let has_only_fields_brackets = variant.ctor.is_some() && variant.fields.is_empty(); . let non_exhaustive_activated = variant.field_list_has_applicable_non_exhaustive(); -- line 54 ---------------------------------------- -- line 67 ---------------------------------------- . brackets_span, . "struct pattern is not needed for a unit variant", . "remove the struct pattern", . String::new(), . Applicability::MachineApplicable, . ); . } . } 124,264 ( 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, . { 59,287 ( 0.00%) match cache.lookup(&key) { 10,530 ( 0.00%) Some((value, index)) => { . tcx.prof.query_cache_hit(index.into()); . tcx.dep_graph.read_index(index); 21,516 ( 0.00%) Some(value) . } . None => None, . } 70,068 ( 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, . { 5,010 ( 0.00%) match try_get_cached(tcx, &query.cache, key) { . Some(value) => value, 95,728 ( 0.00%) None => (query.execute_query_fn)(tcx, span, key, QueryMode::Get).unwrap(), 17,894 ( 0.00%) => ???:rustc_query_impl::query_impl::clauses_of::execute_query_incr::__rust_end_short_backtrace (3x) . } . } . . /// 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 ---------------------------------------- 559,641 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/missing_enforced_import_rename.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . .map(move |id| (id, rename)) . }) . .collect(), . } . } . } . . impl LateLintPass<'_> for ImportRename { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 32,668 ( 0.00%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind { . // use `present_items` because it could be in any of type_ns, value_ns, macro_ns 38,896 ( 0.00%) for res in path.res.present_items() { . if let Res::Def(_, id) = res . && let Some(name) = self.renames.get(&id) . // Remove semicolon since it is not present for nested imports . && let span_without_semi = cx.sess().source_map().span_until_char(item.span, ';') . && let Some(snip) = span_without_semi.get_text(cx) . && let Some(import) = match snip.split_once(" as ") { . None => Some(snip.as_str()), . Some((import, rename)) => { -- line 84 ---------------------------------------- -- line 98 ---------------------------------------- . "this import should be renamed", . "try", . format!("{import} as {name}"), . Applicability::MachineApplicable, . ); . } . } . } 112,344 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_update.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . pub NEEDLESS_UPDATE, . complexity, . "using `Foo { ..base }` when there are no missing fields" . } . . declare_lint_pass!(NeedlessUpdate => [NEEDLESS_UPDATE]); . . impl<'tcx> LateLintPass<'tcx> for NeedlessUpdate { 327,150 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 131,158 ( 0.00%) if let ExprKind::Struct(_, fields, StructTailExpr::Base(base)) = expr.kind { . let ty = cx.typeck_results().expr_ty(expr); . if let ty::Adt(def, _) = ty.kind() . && fields.len() == def.non_enum_variant().fields.len() . && !def.variant(0_usize.into()).is_field_list_non_exhaustive() . { . span_lint( . cx, . NEEDLESS_UPDATE, . base.span, . "struct update has no effect, all the fields in the struct have already been specified", . ); . } . } 392,580 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 130,860 ( 0.00%) if e.span.from_expansion() { . // Issue #11268 . return; . } . 261,138 ( 0.00%) match e.kind { 7,992 ( 0.00%) ExprKind::Call(fn_expr, arguments) => { 7,992 ( 0.00%) if let ExprKind::Path(ref path) = fn_expr.kind . && arguments.iter().any(is_mut_ref_arg) . { 27 ( 0.00%) check_arguments( . cx, . &mut arguments.iter(), 6 ( 0.00%) cx.typeck_results().expr_ty(fn_expr), 120 ( 0.00%) => ???:::expr_ty (3x) . #[allow(trivial_casts)] 6 ( 0.00%) &|| { . rustc_hir_pretty::qpath_to_string( . &(&cx.tcx as &dyn intravisit::HirTyCtxt<'_>) as &dyn PpAnn, . path, . ) . }, . "function", . ); . } . }, . ExprKind::MethodCall(path, receiver, arguments, _) 4,908 ( 0.00%) if iter::once(receiver).chain(arguments.iter()).any(is_mut_ref_arg) . && let Some(def_id) = cx.typeck_results().type_dependent_def_id(e.hir_id) => . { . let args = cx.typeck_results().node_args(e.hir_id); . let method_type = cx.tcx.type_of(def_id).instantiate(cx.tcx, args).skip_norm_wip(); . check_arguments( . cx, . &mut iter::once(receiver).chain(arguments.iter()), . method_type, . &|| path.ident.as_str().to_owned(), . "method", . ); . }, . _ => (), . } 523,440 ( 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 { 14,446 ( 0.00%) matches!(argument.kind, ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _)) . } . 36 ( 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() { . let parameters = type_definition.fn_sig(cx.tcx).skip_binder().inputs(); -- line 100 ---------------------------------------- -- 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); . }, . ); . } . } . } 24 ( 0.00%) } 9 ( 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) { 32,040 ( 0.00%) duplicate_underscore_argument::check(cx, fn_kind); 8,299,443 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs:clippy_lints::functions::duplicate_underscore_argument::check (10,680x) . } . } . . 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 { 127,500 ( 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, . ) { 10,625 ( 0.00%) let hir_id = cx.tcx.local_def_id_to_hir_id(def_id); 106,250 ( 0.00%) too_many_arguments::check_fn(cx, kind, decl, hir_id, def_id, self.too_many_arguments_threshold); 42,500 ( 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); 138,125 ( 0.00%) misnamed_getters::check_fn(cx, kind, decl, body, span); 1,149,824 ( 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 (10,625x) . impl_trait_in_params::check_fn(cx, &kind, body, hir_id); 138,125 ( 0.00%) ref_option::check_fn( 918,447 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn (10,625x) . cx, . kind, . decl, . span, . hir_id, . def_id, . body, 21,250 ( 0.00%) self.avoid_breaking_exported_api, . ); 74,375 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 42,129 ( 0.00%) must_use::check_item(cx, item); 2,559,753 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item (14,043x) 42,129 ( 0.00%) result::check_item( 266,817 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item (14,043x) . cx, . item, 14,043 ( 0.00%) self.large_error_threshold, 14,043 ( 0.00%) &self.large_error_ignored, 14,043 ( 0.00%) self.msrv, . ); . } . 119,930 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 35,979 ( 0.00%) must_use::check_impl_item(cx, item); 84,056,988 ( 1.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item (11,993x) 35,979 ( 0.00%) result::check_impl_item( 6,637,423 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item (11,993x) . cx, . item, 11,993 ( 0.00%) self.large_error_threshold, 11,993 ( 0.00%) &self.large_error_ignored, 11,993 ( 0.00%) self.msrv, . ); . impl_trait_in_params::check_impl_item(cx, item); 59,965 ( 0.00%) renamed_function_params::check_impl_item(cx, item, &self.trait_ids); 2,518,639 ( 0.03%) => /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 (11,993x) 95,944 ( 0.00%) } . 40 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 1 ( 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); 12 ( 0.00%) must_use::check_trait_item(cx, item); 369 ( 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 (4x) 12 ( 0.00%) result::check_trait_item( 465 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_trait_item (4x) . cx, . item, 4 ( 0.00%) self.large_error_threshold, 4 ( 0.00%) &self.large_error_ignored, 4 ( 0.00%) self.msrv, . ); 4 ( 0.00%) impl_trait_in_params::check_trait_item(cx, item, self.avoid_breaking_exported_api); 16 ( 0.00%) ref_option::check_trait_item(cx, item, self.avoid_breaking_exported_api); 624 ( 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 (4x) 32 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 327,150 ( 0.00%) result::check_expr(cx, expr, self.large_error_threshold, &self.large_error_ignored); 1,112,409 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr (65,430x) . } . } 148,750 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . (Some(con), _) => Some((cmp_op.reverse(), right, left, con, typeck.expr_ty(left))), . _ => None, . } . } else { . None . } . } . 45,661 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . and_op: Spanned, . left_cond: &'tcx Expr<'tcx>, . right_cond: &'tcx Expr<'tcx>, . span: Span, . ) { 6,523 ( 0.00%) if and_op.node == BinOpKind::And . // Ensure that the binary operator is && . . // Check that both operands to '&&' are themselves a binary operation . // The `comparison_to_const` step also checks this, so this step is just an optimization . && let ExprKind::Binary(_, _, _) = left_cond.kind . && let ExprKind::Binary(_, _, _) = right_cond.kind . . && let typeck = cx.typeck_results() -- line 55 ---------------------------------------- -- line 123 ---------------------------------------- . IMPOSSIBLE_COMPARISONS, . span, . "boolean expression will never evaluate to 'true'", . None, . note, . ); . } . } 52,184 ( 0.00%) } . . fn left_side_is_useless(left_cmp_op: CmpOp, ordering: Ordering) -> bool { . // Special-case for equal constants with an inclusive comparison . if ordering == Ordering::Equal { . match left_cmp_op { . CmpOp::Lt | CmpOp::Gt => false, . CmpOp::Le | CmpOp::Ge => true, . } -- line 139 ---------------------------------------- -------------------------------------------------------------------------------- -- 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; . } . 8,939 ( 0.00%) let mut cc = 1u64; 8,939 ( 0.00%) let mut returns = 0u64; 8,939 ( 0.00%) let mut prev_expr: Option<&ExprKind<'tcx>> = None; . let _: Option = for_each_expr_without_closures(expr, |e| { 484,113 ( 0.01%) match e.kind { . ExprKind::If(_, _, _) => { . cc += 1; . }, 992 ( 0.00%) ExprKind::Match(_, arms, _) => { 992 ( 0.00%) if arms.len() > 1 { 992 ( 0.00%) cc += 1; . } . cc += arms.iter().filter(|arm| arm.guard.is_some()).count() as u64; . }, . ExprKind::Ret(_) if !matches!(prev_expr, Some(ExprKind::Ret(_))) => { . returns += 1; . }, . _ => {}, . } 100,460 ( 0.00%) prev_expr = Some(&e.kind); . ControlFlow::Continue(()) . }); . 26,817 ( 0.00%) let ret_ty = cx.typeck_results().node_type(expr.hir_id); 366,499 ( 0.00%) => ???:::node_type (8,939x) 8,704 ( 0.00%) let ret_adjust = if ret_ty.is_diag_item(cx, sym::Result) { 41 ( 0.00%) returns . } else { . #[expect(clippy::integer_division)] 17,796 ( 0.00%) (returns / 2) . }; . . // prevent degenerate cases where unreachable code contains `return` statements 44,695 ( 0.00%) if cc >= ret_adjust { 17,878 ( 0.00%) cc -= ret_adjust; . } . 17,878 ( 0.00%) if cc > self.limit.limit() { . 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) . }) { -- line 114 ---------------------------------------- -- line 130 ---------------------------------------- . None, . "you could split it up into multiple smaller functions", . ); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for CognitiveComplexity { 159,375 ( 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)] 10,625 ( 0.00%) if cx.tcx.get_attrs(def_id, sym::test).next().is_none() { 116,875 ( 0.00%) let expr = if kind.asyncness().is_async() { 106,248 ( 0.00%) => ???:::asyncness (10,625x) . match get_async_fn_body(cx.tcx, body) { . Some(b) => b, . None => { . return; . }, . } . } else { 10,625 ( 0.00%) body.value . }; . 53,125 ( 0.00%) self.check(cx, kind, decl, expr, span); . } 85,000 ( 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 ---------------------------------------- 78,149 ( 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; . 204,368 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, attr: &Attribute, msrv: &MsrvStack) { . // check cfg_attr . if attr.has_name(sym::cfg_attr) . && let Some(items) = attr.meta_item_list() . && items.len() == 2 . && let Some(feature_item) = items[0].meta_item() . { . // check for `rustfmt` . if feature_item.has_name(sym::rustfmt) -- line 17 ---------------------------------------- -- line 42 ---------------------------------------- . ); . } else { . check_deprecated_cfg_recursively(cx, feature_item); . if let Some(behind_cfg_attr) = items[1].meta_item() { . unnecessary_clippy_cfg::check(cx, feature_item, behind_cfg_attr, attr); . } . } . } 153,276 ( 0.00%) } . 204,368 ( 0.00%) pub(super) fn check_clippy(cx: &EarlyContext<'_>, attr: &Attribute) { . if attr.has_name(sym::cfg) 90 ( 0.00%) && let Some(list) = attr.meta_item_list() 8,410 ( 0.00%) => ???:::meta_item_list (15x) . { 60 ( 0.00%) for item in list.iter().filter_map(|item| item.meta_item()) { 45 ( 0.00%) check_deprecated_cfg_recursively(cx, item); 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 (15x) . } . } 178,822 ( 0.00%) } . 105 ( 0.00%) fn check_deprecated_cfg_recursively(cx: &EarlyContext<'_>, attr: &rustc_ast::MetaItem) { 120 ( 0.00%) if let Some(ident) = attr.ident() { 135 ( 0.00%) => ???:::ident (15x) . if matches!(ident.name, sym::any | sym::all | sym::not) { . let Some(list) = attr.meta_item_list() else { return }; . for item in list.iter().filter_map(|item| item.meta_item()) { . check_deprecated_cfg_recursively(cx, item); . } . } else { . check_cargo_clippy_attr(cx, attr); . } . } 75 ( 0.00%) } . . fn check_cargo_clippy_attr(cx: &EarlyContext<'_>, item: &rustc_ast::MetaItem) { 75 ( 0.00%) if item.has_name(sym::feature) && item.value_str() == Some(sym::cargo_clippy) { 120 ( 0.00%) => ???:::has_name (15x) . 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 ---------------------------------------- 30 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs -------------------------------------------------------------------------------- Ir -- line 127 ---------------------------------------- . } . . into_iter_span . } . . /// Extracts the receiver of a `.into_iter()` method call. . fn into_iter_call<'hir>(cx: &LateContext<'_>, expr: &'hir Expr<'hir>) -> Option<&'hir Expr<'hir>> { . if let ExprKind::MethodCall(name, recv, [], _) = expr.kind 49 ( 0.00%) && name.ident.name == sym::into_iter . && cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::IntoIterator) . { . Some(recv) . } else { . None . } . } . -- line 143 ---------------------------------------- -- line 150 ---------------------------------------- . expr = recv; . depth += 1; . } . (expr, depth) . } . . #[expect(clippy::too_many_lines)] . impl<'tcx> LateLintPass<'tcx> for UselessConversion { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 130,860 ( 0.00%) if e.span.from_expansion() { 34,812 ( 0.00%) if e.span.desugaring_kind().is_none() { 1,158,414 ( 0.01%) => ???:::desugaring_kind (11,604x) 11,604 ( 0.00%) self.expn_depth += 1; . } . return; . } . . if Some(&e.hir_id) == self.try_desugar_arm.last() { . return; . } . 372,518 ( 0.00%) match e.kind { . ExprKind::Match(_, arms, MatchSource::TryDesugar(_)) => { . let (ExprKind::Ret(Some(e)) | ExprKind::Break(_, Some(e))) = arms[0].body.kind else { . return; . }; . if let ExprKind::Call(_, [arg, ..]) = e.kind { . self.try_desugar_arm.push(arg.hir_id); . } . }, . 12,843 ( 0.00%) ExprKind::MethodCall(path, recv, [arg], _) => { . if matches!( 1,587 ( 0.00%) path.ident.name, 9,522 ( 0.00%) sym::map | sym::map_err | sym::map_break | sym::map_continue . ) && has_eligible_receiver(cx, recv, e) . && matches!( . arg.res(cx).assoc_parent(cx).opt_diag_name(cx), . Some(sym::Into | sym::From) . ) . && let ty::FnDef(_, args) = cx.typeck_results().expr_ty(arg).kind() . && let &[from_ty, to_ty] = args.no_bound_vars().unwrap().into_type_list(cx.tcx).as_slice() . && same_type_modulo_regions(from_ty, to_ty) -- line 191 ---------------------------------------- -- line 202 ---------------------------------------- . "consider removing", . Applicability::MachineApplicable, . ); . }, . ); . } . }, . 98 ( 0.00%) ExprKind::MethodCall(name, recv, [], _) => { 91 ( 0.00%) if name.ident.name == sym::into && cx.ty_based_def(e).opt_parent(cx).is_diag_item(cx, sym::Into) { 348 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs: as clippy_utils::res::MaybeDef>::opt_parent:: (3x) 15 ( 0.00%) let a = cx.typeck_results().expr_ty(e); 120 ( 0.00%) => ???:::expr_ty (3x) 12 ( 0.00%) let b = cx.typeck_results().expr_ty(recv); 120 ( 0.00%) => ???:::expr_ty (3x) 15 ( 0.00%) if same_type_modulo_regions(a, b) { 60 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::same_type_modulo_regions (3x) . let mut app = Applicability::MachineApplicable; . let sugg = snippet_with_context(cx, recv.span, e.span.ctxt(), "", &mut app).0; . span_lint_and_sugg( . cx, . USELESS_CONVERSION, . e.span, . format!("useless conversion to the same type: `{b}`"), . "consider removing `.into()`", . sugg.into_owned(), . app, . ); . } . } 138 ( 0.00%) if let Some(into_iter_recv) = into_iter_call(cx, e) . // Make sure that there is no parent expression, or if there is, make sure it's not a `.into_iter()` call. . // The reason for that is that we only want to lint once (the outermost call) . // in cases like `foo.into_iter().into_iter()` . && get_parent_expr(cx, e) . .and_then(|parent| into_iter_call(cx, parent)) . .is_none() . { . if let Some(parent) = get_parent_expr(cx, e) { -- line 236 ---------------------------------------- -- line 388 ---------------------------------------- . e.span, . format!("useless conversion to the same type: `{into_iter_ty}`"), . "consider removing `.into_iter()`", . sugg, . applicability, . ); . } . } 49 ( 0.00%) if name.ident.name == sym::try_into . && cx.ty_based_def(e).opt_parent(cx).is_diag_item(cx, sym::TryInto) . && let a = cx.typeck_results().expr_ty(e) . && let b = cx.typeck_results().expr_ty(recv) . && a.is_diag_item(cx, sym::Result) . && let ty::Adt(_, args) = a.kind() . && let Some(a_type) = args.types().next() . && same_type_modulo_regions(a_type, b) . { -- line 404 ---------------------------------------- -- line 408 ---------------------------------------- . e.span, . format!("useless conversion to the same type: `{b}`"), . None, . "consider removing `.try_into()`", . ); . } . }, . 11,983 ( 0.00%) ExprKind::Call(path, [arg]) => { 11,973 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind 23,946 ( 0.00%) && !is_ty_alias(qpath) 110,318 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias (3,991x) 3,405 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 15,938 ( 0.00%) => ???:::qpath_res (681x) 4,074 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(def_id) 40,882 ( 0.00%) => ???:::get_diagnostic_name (679x) . { 15 ( 0.00%) let a = cx.typeck_results().expr_ty(e); 200 ( 0.00%) => ???:::expr_ty (5x) 20 ( 0.00%) let b = cx.typeck_results().expr_ty(arg); 200 ( 0.00%) => ???:::expr_ty (5x) 10 ( 0.00%) if name == sym::try_from_fn . && a.is_diag_item(cx, sym::Result) . && let ty::Adt(_, args) = a.kind() . && let Some(a_type) = args.types().next() . && same_type_modulo_regions(a_type, b) . { . let hint = format!("consider removing `{}()`", snippet(cx, path.span, "TryFrom::try_from")); . span_lint_and_help( . cx, . USELESS_CONVERSION, . e.span, . format!("useless conversion to the same type: `{b}`"), . None, . hint, . ); 20 ( 0.00%) } else if name == sym::from_fn && same_type_modulo_regions(a, b) { 100 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::same_type_modulo_regions (5x) . let mut app = Applicability::MachineApplicable; . let sugg = Sugg::hir_with_context(cx, arg, e.span.ctxt(), "", &mut app).maybe_paren(); . let sugg_msg = format!("consider removing `{}()`", snippet(cx, path.span, "From::from")); . span_lint_and_sugg( . cx, . USELESS_CONVERSION, . e.span, . format!("useless conversion to the same type: `{b}`"), -- line 447 ---------------------------------------- -- line 450 ---------------------------------------- . app, . ); . } . } . }, . . _ => {}, . } 523,440 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . if Some(&e.hir_id) == self.try_desugar_arm.last() { . self.try_desugar_arm.pop(); . } 165,672 ( 0.00%) if e.span.from_expansion() && e.span.desugaring_kind().is_none() { 1,158,414 ( 0.01%) => ???:::desugaring_kind (11,604x) 11,604 ( 0.00%) self.expn_depth -= 1; . } . } . } . . fn has_eligible_receiver(cx: &LateContext<'_>, recv: &Expr<'_>, expr: &Expr<'_>) -> bool { . if cx.ty_based_def(expr).opt_parent(cx).is_impl(cx) { . matches!( . cx.typeck_results().expr_ty(recv).opt_diag_name(cx), -- line 473 ---------------------------------------- 8,025 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . #[clippy::version = "1.74.0"] . pub RESERVE_AFTER_INITIALIZATION, . complexity, . "`reserve` called immediately after `Vec` creation" . } . . impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]); . 1 ( 0.00%) #[derive(Default)] . pub struct ReserveAfterInitialization { . searcher: Option, . } . . struct VecReserveSearcher { . local_id: HirId, . err_span: Span, . init_part: String, -- line 45 ---------------------------------------- -- line 62 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 10,707 ( 0.00%) self.searcher = None; . } . 5,586 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 2,793 ( 0.00%) if let Some(init_expr) = local.init 6,517 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, _, None) = local.pat.kind . && !local.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, init_expr) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { . self.searcher = Some(VecReserveSearcher { -- line 83 ---------------------------------------- -- line 90 ---------------------------------------- . .shrink_to_lo() . .to(init_expr.span.source_callsite().shrink_to_lo()), . "..", . ) . .into_owned(), . space_hint: String::new(), . }); . } 6,517 ( 0.00%) } . 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if self.searcher.is_none() 11 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 27 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 2 ( 0.00%) && let Res::Local(id) = path.res . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, right) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { . self.searcher = Some(VecReserveSearcher { -- line 112 ---------------------------------------- -- 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(), . }); . } 523,440 ( 0.01%) } . 8,337 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 2,382 ( 0.00%) if let Some(searcher) = self.searcher.take() { . if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind . && let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::reserve . && !is_from_proc_macro(cx, expr) . { . 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); . } . } 9,528 ( 0.00%) } . 42,828 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 21,414 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } 42,828 ( 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, . } . 113,368 ( 0.00%) pub(super) fn check<'a>(cx: &LateContext<'a>, body: &Body<'a>) { . let mut bindings: FxHashMap> = FxHashMap::default(); . 14,171 ( 0.00%) for_each_expr_without_closures(body.value, |expr| { 306,667 ( 0.00%) match expr.kind { 10,707 ( 0.00%) ExprKind::Block(block, _) => { 10,707 ( 0.00%) for stmt in block.stmts { 3,313 ( 0.00%) if let StmtKind::Let(let_stmt) = stmt.kind { 2,793 ( 0.00%) collect_binding_from_local(cx, let_stmt, &mut bindings); 16,758 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::collect_binding_from_local (931x) . } . } . }, . ExprKind::Let(let_expr) => { . collect_binding_from_let(cx, let_expr, &mut bindings); . }, . _ => {}, . } . ControlFlow::<()>::Continue(()) . }); . . #[allow(rustc::potential_query_instability)] 42,513 ( 0.00%) let mut binding_vec: Vec<_> = bindings.into_iter().collect(); . binding_vec.sort_by_key(|(_, info)| info.ty_span.lo()); . 14,171 ( 0.00%) for (hir_id, binding_info) in binding_vec { . check_binding_usages(cx, body, hir_id, &binding_info); . } 113,368 ( 0.00%) } . . fn collect_binding_from_let<'a>( . cx: &LateContext<'a>, . let_expr: &rustc_hir::LetExpr<'a>, . bindings: &mut FxHashMap>, . ) { . if let_expr.ty.is_none() . || let_expr.span.from_expansion() -- line 62 ---------------------------------------- -- line 78 ---------------------------------------- . ty_span: ty_hir.span, . init: Some(let_expr.init), . }, . ); . } . } . } . 6,517 ( 0.00%) fn collect_binding_from_local<'a>( . cx: &LateContext<'a>, . let_stmt: &LetStmt<'a>, . bindings: &mut FxHashMap>, . ) { 931 ( 0.00%) if let_stmt.ty.is_none() . || let_stmt.span.from_expansion() . || let_stmt . .init . .is_some_and(|init| has_generic_return_type(cx, init) || contains_unsafe(init)) . { . return; . } . -- line 99 ---------------------------------------- -- line 107 ---------------------------------------- . BindingInfo { . source_ty: ty, . ty_span: ty_hir.span, . init: let_stmt.init, . }, . ); . } . } 7,448 ( 0.00%) } . . fn contains_unsafe(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { . if let ExprKind::Block(block, _) = e.kind . && let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules . { . return ControlFlow::Break(()); . } -- line 123 ---------------------------------------- 37,111 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_checked_ops.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . . #[derive(Copy, Clone)] . enum NonZeroBranch { . Then, . Else, . } . . impl LateLintPass<'_> for ManualCheckedOps { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 130,863 ( 0.00%) if let ExprKind::If(cond, then, r#else) = expr.kind 2 ( 0.00%) && !expr.span.from_expansion() . && let Some((divisor, branch)) = divisor_from_condition(cond) . // This lint is intended for unsigned integers only. . // . // For signed integers, the most direct refactor to `checked_div` is often not . // semantically equivalent to the original guard. For example, `rhs > 0` deliberately . // excludes negative divisors, while `checked_div` would return `Some` for `rhs = -2`. . // Also, `checked_div` can return `None` for `MIN / -1`, which requires additional . // handling beyond the zero check. -- line 59 ---------------------------------------- -- line 118 ---------------------------------------- . diag.span_label(*first, "division performed here"); . if !rest.is_empty() { . diag.span_labels(rest.to_vec(), "... and here"); . } . } . diag.help("consider using `checked_div`"); . }); . } 523,440 ( 0.01%) } . } . . #[derive(Copy, Clone, Eq, PartialEq)] . enum UseKind { . Division, . Other, . } . . fn divisor_from_condition<'tcx>(cond: &'tcx Expr<'tcx>) -> Option<(&'tcx Expr<'tcx>, NonZeroBranch)> { 2 ( 0.00%) let ExprKind::Binary(binop, lhs, rhs) = cond.kind else { . return None; . }; . . match binop.node { . BinOpKind::Ne | BinOpKind::Lt if is_zero(lhs) => Some((rhs, NonZeroBranch::Then)), . BinOpKind::Ne | BinOpKind::Gt if is_zero(rhs) => Some((lhs, NonZeroBranch::Then)), . BinOpKind::Eq if is_zero(lhs) => Some((rhs, NonZeroBranch::Else)), . BinOpKind::Eq if is_zero(rhs) => Some((lhs, NonZeroBranch::Else)), -- line 144 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs -------------------------------------------------------------------------------- Ir -- line 28 ---------------------------------------- . pub USELESS_CONCAT, . complexity, . "checks that the `concat` macro has at least two arguments" . } . . declare_lint_pass!(UselessConcat => [USELESS_CONCAT]); . . impl LateLintPass<'_> for UselessConcat { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // Check that the expression is generated by a macro. 143,108 ( 0.00%) if expr.span.from_expansion() . // Check that it's a string literal. 1,531 ( 0.00%) && let ExprKind::Lit(lit) = expr.kind 4,827 ( 0.00%) && let LitKind::Str(lit_s, _) = lit.node . // Get the direct parent of the expression. 7,655 ( 0.00%) && let Some(macro_call) = macro_backtrace(expr.span).next() . // Check if the `concat` macro from the `core` library. 10,717 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::macro_concat, macro_call.def_id) 153,100 ( 0.00%) => ???:::is_diagnostic_item (1,531x) . // We get the original code to parse it. . && let Some(original_code) = snippet_opt(cx, macro_call.span) . // This check allows us to ensure that the code snippet: . // 1. Doesn't come from proc-macro expansion. . // 2. Doesn't come from foreign macro expansion. . // . // It works as follows: if the snippet we get doesn't contain `concat!(`, then it . // means it's not code written in the current crate so we shouldn't lint. -- line 53 ---------------------------------------- -- line 94 ---------------------------------------- . macro_call.span, . "unneeded use of `concat!` macro", . "replace with", . format!("{lit_s:?}"), . Applicability::MachineApplicable, . ); . } . } 523,440 ( 0.01%) } . } 24,739 ( 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/interner.rs -------------------------------------------------------------------------------- Ir -- line 561 ---------------------------------------- . F: FnOnce(&[T]) -> R; . } . . /// The blanket impl that always collects all elements and applies `f`. . impl CollectAndApply for T { . type Output = R; . . /// Equivalent to `f(&iter.collect::>())`. 51,695 ( 0.00%) fn collect_and_apply(mut iter: I, f: F) -> R . where . I: Iterator, . F: FnOnce(&[T]) -> R, . { . // This code is hot enough that it's worth specializing for the most . // common length lists, to avoid the overhead of `Vec` creation. . . let Some(t0) = iter.next() else { 552 ( 0.00%) return f(&[]); . }; . . let Some(t1) = iter.next() else { 13,664 ( 0.00%) return f(&[t0]); . }; . . let Some(t2) = iter.next() else { 3 ( 0.00%) return f(&[t0, t1]); . }; . . let Some(t3) = iter.next() else { . return f(&[t0, t1, t2]); . }; . . let Some(t4) = iter.next() else { . return f(&[t0, t1, t2, t3]); -- line 594 ---------------------------------------- -- line 606 ---------------------------------------- . return f(&[t0, t1, t2, t3, t4, t5, t6]); . }; . . let Some(t8) = iter.next() else { . return f(&[t0, t1, t2, t3, t4, t5, t6, t7]); . }; . . f(&[t0, t1, t2, t3, t4, t5, t6, t7, t8].into_iter().chain(iter).collect::>()) 47,831 ( 0.00%) } . } . . /// A fallible impl that will fail, without calling `f`, if there are any . /// errors during collection. . impl CollectAndApply for Result { . type Output = Result; . . /// Equivalent to `Ok(f(&iter.collect::>>()?))`. -- line 622 ---------------------------------------- 6,833 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs -------------------------------------------------------------------------------- Ir -- line 19 ---------------------------------------- . self, ClauseKind, GenericArg, GenericArgKind, GenericArgsRef, ParamTy, ProjectionPredicate, TraitPredicate, Ty, . }; . use rustc_span::Symbol; . use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; . use rustc_trait_selection::traits::{Obligation, ObligationCause}; . . use super::UNNECESSARY_TO_OWNED; . 14,724 ( 0.00%) pub fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . method_name: Symbol, . receiver: &'tcx Expr<'_>, . args: &'tcx [Expr<'_>], . msrv: Msrv, . ) { 21,268 ( 0.00%) if let Some(method_parent_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id).opt_parent(cx) 83,436 ( 0.00%) => ???:::type_dependent_def_id (1,636x) . && args.is_empty() . { . if is_cloned_or_copied(cx, method_name, method_parent_id) { . unnecessary_iter_cloned::check(cx, expr, method_name, receiver); . } else if is_to_owned_like(cx, expr, method_name, method_parent_id) { . if check_split_call_arg(cx, expr, method_name, receiver) { . return; . } -- line 43 ---------------------------------------- -- line 54 ---------------------------------------- . if check_string_from_utf8(cx, expr, receiver) { . return; . } . check_other_call_arg(cx, expr, method_name, receiver); . } . } else { . check_borrow_predicate(cx, expr); . } 13,088 ( 0.00%) } . . /// Checks whether `expr` is a referent in an `AddrOf` expression and, if so, determines whether its . /// call of a `to_owned`-like function is unnecessary. . #[expect(clippy::too_many_lines)] . fn check_addr_of_expr( . cx: &LateContext<'_>, . expr: &Expr<'_>, . method_name: Symbol, -- line 70 ---------------------------------------- -- line 607 ---------------------------------------- . } . . fn has_lifetime(ty: Ty<'_>) -> bool { . ty.walk().any(|t| matches!(t.kind(), GenericArgKind::Lifetime(_))) . } . . /// Returns true if the named method is `Iterator::cloned` or `Iterator::copied`. . fn is_cloned_or_copied(cx: &LateContext<'_>, method_name: Symbol, method_parent_id: DefId) -> bool { 196 ( 0.00%) matches!(method_name, sym::cloned | sym::copied) && method_parent_id.is_diag_item(cx, sym::Iterator) . } . . /// Returns true if the named method can be used to convert the receiver to its "owned" . /// representation. . fn is_to_owned_like<'a>( . cx: &LateContext<'a>, . call_expr: &Expr<'a>, . method_name: Symbol, . method_parent_id: DefId, . ) -> bool { 392 ( 0.00%) is_cow_into_owned(cx, method_name, method_parent_id) 784 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::is_cow_into_owned (49x) 392 ( 0.00%) || (method_name != sym::to_string && is_clone_like(cx, method_name, method_parent_id)) 494 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/implicit_clone.rs:clippy_lints::methods::implicit_clone::is_clone_like (49x) . || is_to_string_on_string_like(cx, call_expr, method_name, method_parent_id) . } . . /// Returns true if the named method is `Cow::into_owned`. 294 ( 0.00%) fn is_cow_into_owned(cx: &LateContext<'_>, method_name: Symbol, method_parent_id: DefId) -> bool { 49 ( 0.00%) method_name == sym::into_owned && method_parent_id.opt_impl_ty(cx).is_diag_item(cx, sym::Cow) 343 ( 0.00%) } . . /// Returns true if the named method is `ToString::to_string` and it's called on a type that . /// is string-like i.e. implements `AsRef` or `Deref`. . fn is_to_string_on_string_like<'a>( . cx: &LateContext<'_>, . call_expr: &'a Expr<'a>, . method_name: Symbol, . method_parent_id: DefId, -- line 642 ---------------------------------------- -- line 728 ---------------------------------------- . . // In std "map types", the getters all expect a `Borrow` generic argument. So in here, we . // check that: . // 1. This is a method with only one argument that doesn't come from a trait. . // 2. That it has `Borrow` in its generic predicates. . // 3. `Self` is a std "map type" (ie `HashSet`, `HashMap`, `BTreeSet`, `BTreeMap`). . // 4. The key to the "map type" is not a reference. . fn check_borrow_predicate<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 23,805 ( 0.00%) if let ExprKind::MethodCall(_, caller, &[arg], _) = expr.kind 7,935 ( 0.00%) && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) 80,937 ( 0.00%) => ???:::type_dependent_def_id (1,587x) 4,761 ( 0.00%) && cx.tcx.trait_of_assoc(method_def_id).is_none() 250,851 ( 0.00%) => ???:::trait_of_assoc (1,587x) 7,920 ( 0.00%) && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) 167,904 ( 0.00%) => ???:::get_diagnostic_item (1,584x) . && cx.tcx.clauses_of(method_def_id).clauses.iter().any(|(clause, _)| { 80 ( 0.00%) if let ClauseKind::Trait(trait_pred) = clause.kind().skip_binder() 224 ( 0.00%) => ???:::kind (16x) . && trait_pred.polarity == ty::PredicatePolarity::Positive . && trait_pred.trait_ref.def_id == borrow_id . { . true . } else { . false . } . }) -- line 749 ---------------------------------------- 19,358 ( 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; 911,262 ( 0.01%) &__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(); 33 ( 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: /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, . } . 586,192 ( 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) { 910,376 ( 0.01%) if let Some(ref data) = self.data { . read_deps(|task_deps| { 901,191 ( 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 ---------------------------------------- 248,562 ( 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; _]); 24 ( 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) { 94 ( 0.00%) sym::alloc => res.0[0] = Some(krate), . sym::core => res.0[1] = Some(krate), . sym::core_arch => res.0[2] = Some(krate), . sym::proc_macro => res.0[3] = Some(krate), . sym::std => res.0[4] = Some(krate), . sym::std_detect => res.0[5] = Some(krate), . _ => {}, . } . } -- line 99 ---------------------------------------- -- line 112 ---------------------------------------- . std_crates: StdCrates, . . // The most recently called path. Used to skip checking the path after it's . // been checked when visiting the call expression. . called_path: Option, . } . . impl IncompatibleMsrv { 9 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 19 ( 0.00%) Self { 2 ( 0.00%) msrv: conf.msrv.into(), . availability_cache: FxHashMap::default(), 1 ( 0.00%) check_in_tests: conf.check_incompatible_msrv_in_tests, . std_crates: StdCrates::new(tcx), . called_path: None, . } 8 ( 0.00%) } . . /// Returns the availability of `def_id`, whether it is enabled through a feature or . /// available since a given version (the default being Rust 1.0.0). `needs_const` requires . /// the `const`-stability to be looked up instead of the stability in non-`const` contexts. . fn get_def_id_availability(&mut self, tcx: TyCtxt<'_>, def_id: DefId, needs_const: bool) -> Availability { . if let Some(availability) = self.availability_cache.get(&(def_id, needs_const)) { . return *availability; . } -- line 136 ---------------------------------------- -- line 161 ---------------------------------------- . patch: 0, . }) . }; . self.availability_cache.insert((def_id, needs_const), version); . version . } . . /// Emit lint if `def_id`, associated with `node` and `span`, is below the current MSRV. 617,865 ( 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(); 19,338 ( 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, 3,223 ( 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. 5,016 ( 0.00%) if let Some(current) = self.msrv.current(cx) 6,270 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::current (627x) . && let Availability::Since(version) = self.get_def_id_availability(cx.tcx, def_id, needs_const) . && version > current . && (self.check_in_tests || !is_in_test(cx.tcx, node)) . { . span_lint_and_then( . cx, . INCOMPATIBLE_MSRV, . span, -- line 206 ---------------------------------------- -- 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"); . } . }, . ); . } 329,528 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 432,506 ( 0.01%) match expr.kind { . ExprKind::MethodCall(_, _, _, span) => { 11,662 ( 0.00%) if let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 84,966 ( 0.00%) => ???:::type_dependent_def_id (1,666x) 19,992 ( 0.00%) self.emit_lint_if_under_msrv(cx, is_in_const_context(cx), method_did, expr.hir_id, span); 603,630 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (1,666x) 62,869 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (1,666x) . } . }, 38,801 ( 0.00%) ExprKind::Call(callee, _) if let ExprKind::Path(qpath) = callee.kind => { 11,086 ( 0.00%) self.called_path = Some(callee.hir_id); 16,629 ( 0.00%) let needs_const = is_in_const_context(cx); 2,012,306 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (5,543x) 33,258 ( 0.00%) let def_id = if let Some(def_id) = cx.qpath_res(&qpath, callee.hir_id).opt_def_id() { 340,834 ( 0.00%) => ???:::qpath_res (5,543x) . def_id 6 ( 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; . }; 38,780 ( 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. 22,418 ( 0.00%) ExprKind::Path(qpath) 201,762 ( 0.00%) if let Some(path_def_id) = cx.qpath_res(&qpath, expr.hir_id).opt_def_id() 733,909 ( 0.01%) => ???:::qpath_res (22,418x) . && self.called_path != Some(expr.hir_id) => . { 30,093 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, path_def_id, expr.hir_id, expr.span); . }, . _ => {}, . } 523,440 ( 0.01%) } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, hir_ty: &'tcx hir::Ty<'tcx, AmbigArg>) { 327,014 ( 0.00%) if let hir::TyKind::Path(qpath) = hir_ty.kind 404,632 ( 0.01%) && let Some(ty_def_id) = cx.qpath_res(&qpath, hir_ty.hir_id).opt_def_id() 1,183,474 ( 0.01%) => ???:::qpath_res (50,579x) . // `CStr` and `CString` have been moved around but have been available since Rust 1.0.0 207,802 ( 0.00%) && !matches!(cx.tcx.get_diagnostic_name(ty_def_id), Some(sym::cstr_type | sym::cstring_type)) 1,632,104 ( 0.02%) => ???:::get_diagnostic_name (29,686x) . { 267,174 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, ty_def_id, hir_ty.hir_id, hir_ty.span); 1,253,471 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (29,686x) . } . } . } . . /// 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 ---------------------------------------- 31,886 ( 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 { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Loosened from `root_macro_call_first_node` so the lint also fires when `format!` is . // the tail of a block emitted by another macro. The `!= macro_call.expn` check filters . // HIR nodes inside `format!`'s own expansion (its outer block's tail, its nested . // `format_args!`), which would otherwise also pass `first_node_in_macro` and cause the . // lint to fire multiple times per call. 327,150 ( 0.00%) if let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::format_macro) 7,830,882 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (65,430x) . && first_node_in_macro(cx, expr).is_some_and(|p_expn| p_expn != macro_call.expn) . && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) . { . let mut applicability = Applicability::MachineApplicable; . let call_site = macro_call.span; . . match (format_args.arguments.all_args(), &format_args.template[..]) { . ([], []) => span_useless_format_empty(cx, call_site, "String::new()".to_owned(), applicability), -- line 69 ---------------------------------------- -- line 101 ---------------------------------------- . format!("{}.to_string()", sugg.maybe_paren()) . }; . span_useless_format(cx, call_site, sugg, applicability); . } . }, . _ => {}, . } . } 523,440 ( 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 ---------------------------------------- 65,430 ( 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; . 27,972 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'tcx>, args: &[Expr<'_>], msrv: Msrv) { 15,984 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, segment)) = func.kind 9,949 ( 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"); . }); . } . } 31,968 ( 0.00%) } 6,634 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs -------------------------------------------------------------------------------- Ir -- line 17 ---------------------------------------- . use rustc_middle::hir::nested_filter; . use rustc_middle::ty::{self, Binder, ClauseKind, ExistentialPredicate, List, PredicateKind, Ty}; . use rustc_span::Span; . use rustc_span::symbol::Symbol; . use rustc_trait_selection::infer::InferCtxtExt as _; . use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; . use std::{fmt, iter}; . 61,317 ( 0.00%) pub(super) fn check_body<'tcx>( . cx: &LateContext<'tcx>, . body: &Body<'tcx>, . item_id: OwnerId, . sig: &FnSig<'tcx>, . is_trait_item: bool, . ) { 13,626 ( 0.00%) if !matches!(sig.header.abi, ExternAbi::Rust) { . // Ignore `extern` functions with non-Rust calling conventions . return; . } . . let decl = sig.decl; 6,813 ( 0.00%) let sig = cx . .tcx . .fn_sig(item_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); 40,878 ( 0.00%) let lint_args: Vec<_> = check_fn_args(cx, sig, decl.inputs, body.params) . .filter(|arg| !is_trait_item || arg.mutability() == Mutability::Not) . .collect(); . let results = check_ptr_arg_usage(cx, body, &lint_args); . . for (result, args) in iter::zip(&results, &lint_args).filter(|(r, _)| !r.skip) { . span_lint_hir_and_then(cx, PTR_ARG, args.emission_id, args.span, args.build_msg(), |diag| { . diag.multipart_suggestion( . "change this to", -- line 52 ---------------------------------------- -- line 57 ---------------------------------------- . format!("{}{}", r.self_span.get_text(cx).unwrap(), r.replacement), . ) . })) . .collect(), . Applicability::Unspecified, . ); . }); . } 54,504 ( 0.00%) } . 7 ( 0.00%) pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item_id: OwnerId, sig: &FnSig<'tcx>) { 2 ( 0.00%) if !matches!(sig.header.abi, ExternAbi::Rust) { . // Ignore `extern` functions with non-Rust calling conventions . return; . } . . for arg in check_fn_args( . cx, 1 ( 0.00%) cx.tcx . .fn_sig(item_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(), 3 ( 0.00%) sig.decl.inputs, . &[], . ) . .filter(|arg| arg.mutability() == Mutability::Not) . { . span_lint_hir_and_then(cx, PTR_ARG, arg.emission_id, arg.span, arg.build_msg(), |diag| { . diag.span_suggestion( . arg.span, . "change this to", . format!("{}{}", arg.ref_prefix, arg.deref_ty.display(cx)), . Applicability::Unspecified, . ); . }); . } 8 ( 0.00%) } . . #[derive(Default)] . struct PtrArgResult { . skip: bool, . replacements: Vec, . } . . struct PtrArgReplacement { -- line 102 ---------------------------------------- -- line 200 ---------------------------------------- . cx: &'cx LateContext<'tcx>, . fn_sig: ty::FnSig<'tcx>, . hir_tys: &'tcx [hir::Ty<'tcx>], . params: &'tcx [Param<'tcx>], . ) -> impl Iterator> + 'cx { . iter::zip(fn_sig.inputs(), hir_tys) . .enumerate() . .filter_map(move |(i, (ty, hir_ty))| { 37,497 ( 0.00%) if let ty::Ref(_, ty, mutability) = *ty.kind() 10,922 ( 0.00%) && let ty::Adt(adt, args) = *ty.kind() 10,918 ( 0.00%) && let TyKind::Ref(lt, ref ty) = hir_ty.kind 43,672 ( 0.00%) && let TyKind::Path(QPath::Resolved(None, path)) = ty.ty.kind . // Check that the name as typed matches the actual name of the type. . // e.g. `fn foo(_: &Foo)` shouldn't trigger the lint when `Foo` is an alias for `Vec` 21,836 ( 0.00%) && let [.., name] = path.segments 21,836 ( 0.00%) && cx.tcx.item_name(adt.did()) == name.ident.name . { . let emission_id = params.get(i).map_or(hir_ty.hir_id, |param| param.hir_id); . let (method_renames, deref_ty) = match cx.tcx.get_diagnostic_name(adt.did()) { . Some(sym::Vec) => ( . [(sym::clone, ".to_owned()")].as_slice(), . DerefTy::Slice( . if let Some(name_args) = name.args . && let [GenericArg::Type(ty), ..] = name_args.args -- line 223 ---------------------------------------- -- line 322 ---------------------------------------- . impl<'tcx> Visitor<'tcx> for V<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.cx.tcx . } . . fn visit_anon_const(&mut self, _: &'tcx AnonConst) {} . 47,691 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { 20,439 ( 0.00%) if self.skip_count == self.args.len() { . return; . } . . // Check if this is local we care about . let Some(&args_idx) = e.res_local_id().and_then(|id| self.bindings.get(&id)) else { . return walk_expr(self, e); . }; . let args = &self.args[args_idx]; -- line 339 ---------------------------------------- -- line 409 ---------------------------------------- . { . return; . } . . set_skip_flag(); . }, . _ => set_skip_flag(), . } 54,504 ( 0.00%) } . } . 6,813 ( 0.00%) let mut skip_count = 0; 13,626 ( 0.00%) let mut results = args.iter().map(|_| PtrArgResult::default()).collect::>(); 88,569 ( 0.00%) let mut v = V { . cx, . bindings: args . .iter() . .enumerate() . .filter_map(|(i, arg)| { . let param = &body.params[arg.idx]; . match param.pat.kind { . PatKind::Binding(BindingMode::NONE, id, ident, None) -- line 430 ---------------------------------------- -- line 441 ---------------------------------------- . skip_count += 1; . results[i].skip = true; . None . }, . } . }) . .collect(), . args, 27,252 ( 0.00%) results, 6,813 ( 0.00%) skip_count, . }; 20,439 ( 0.00%) v.visit_expr(body.value); 122,634 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:::visit_expr (6,813x) 27,252 ( 0.00%) v.results . } . . fn matches_preds<'tcx>( . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . preds: &'tcx [ty::PolyExistentialPredicate<'tcx>], . ) -> bool { . let infcx = cx.tcx.infer_ctxt().build(cx.typing_mode()); -- line 461 ---------------------------------------- 80,846 ( 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; . 1,250 ( 0.00%) fn docs_link(diag: &mut Diag<'_, ()>, lint: &'static Lint) { 500 ( 0.00%) if env::var("CLIPPY_DISABLE_DOCS_LINKS").is_err() 1,000 ( 0.00%) && let Some(lint) = lint.name_lower().strip_prefix("clippy::") 33,182 ( 0.00%) => ???:::name_lower (250x) . { 1,500 ( 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", 750 ( 0.00%) _ => "main", . } . )); . } 1,000 ( 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) { 55,163 ( 0.00%) span_lint_and_then(cx, lint, sp, msg, |_| {}); 46,568,727 ( 0.58%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (245x) . } . . /// 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, . ) { 2,782 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 164,484 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (214x) . 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] 250,953 ( 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); . . impl<'a, F: FnOnce(&mut Diag<'_, ()>)> Diagnostic<'a, ()> for ClippyDiag { 3,237 ( 0.00%) fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> { . let mut lint = Diag::new(dcx, level, ""); . (self.0)(&mut lint); 996 ( 0.00%) lint 2,241 ( 0.00%) } . } . . let sp = sp.into(); . #[expect(clippy::disallowed_methods)] 36,896 ( 0.00%) cx.emit_span_lint( 60,871 ( 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::::check_raw_string::{closure#0}>::{closure#0}>> (122x) . lint, . sp.clone(), 403,546 ( 0.01%) ClippyDiag(|diag: &mut Diag<'_, ()>| { 502 ( 0.00%) diag.primary_message(msg); 502 ( 0.00%) diag.span(sp); 172 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_errors/src/diagnostic.rs:>::span:: (4x) 28 ( 0.00%) f(diag); 996 ( 0.00%) docs_link(diag, lint); 11,610 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::docs_link (4x) . . #[cfg(debug_assertions)] . validate_diag(diag); . }), . ); 148,496 ( 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 325 ---------------------------------------- . cx: &LateContext<'_>, . lint: &'static Lint, . hir_id: HirId, . sp: impl Into, . msg: impl Into, . f: impl FnOnce(&mut Diag<'_, ()>), . ) { . #[expect(clippy::disallowed_methods)] 2,209 ( 0.00%) cx.tcx.emit_node_span_lint( 493,457 ( 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:::emit_node_span_lint::::{closure#0}>> (552x) . lint, . hir_id, . sp, 4,428 ( 0.00%) rustc_errors::DiagDecorator(|diag| { . diag.primary_message(msg); . f(diag); 3 ( 0.00%) docs_link(diag, lint); 2,908 ( 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,130 ( 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, . ) { 405 ( 0.00%) span_lint_and_then(cx, lint, sp, msg.into(), |diag| { 4 ( 0.00%) 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(()); . }); 648 ( 0.00%) } 131,732 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::{BinOpKind, Expr, ExprKind, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::ty::Ty; . . use super::CMP_OWNED; . . pub(super) fn check(cx: &LateContext<'_>, e: &Expr<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>) { . if op.is_comparison() { 16,955 ( 0.00%) check_op(cx, e, lhs, rhs, true); 176,933 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs:clippy_lints::operators::cmp_owned::check_op (3,391x) 20,346 ( 0.00%) check_op(cx, e, rhs, lhs, false); 176,933 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs:clippy_lints::operators::cmp_owned::check_op (3,391x) . } . } . . #[derive(Default)] . struct EqImpl { . ty_eq_other: bool, . other_eq_ty: bool, . } -- line 24 ---------------------------------------- -- line 30 ---------------------------------------- . . fn symmetric_partial_eq<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, other: Ty<'tcx>) -> Option { . cx.tcx.lang_items().eq_trait().map(|def_id| EqImpl { . ty_eq_other: implements_trait(cx, ty, def_id, &[other.into()]), . other_eq_ty: implements_trait(cx, other, def_id, &[ty.into()]), . }) . } . 61,038 ( 0.00%) fn check_op(cx: &LateContext<'_>, outer: &Expr<'_>, expr: &Expr<'_>, other: &Expr<'_>, left: bool) { 6,782 ( 0.00%) if !outer.span.eq_ctxt(expr.span) { . return; . } . . let typeck = cx.typeck_results(); 33,910 ( 0.00%) let (arg, arg_span) = match expr.kind { . ExprKind::MethodCall(_, arg, [], _) . if typeck . .type_dependent_def_id(expr.hir_id) . .and_then(|id| cx.tcx.trait_of_assoc(id)) . .is_some_and(|id| matches!(cx.tcx.get_diagnostic_name(id), Some(sym::ToString | sym::ToOwned))) => . { . (arg, arg.span) . }, -- line 52 ---------------------------------------- -- line 126 ---------------------------------------- . } else { . (span, format!("{other_snippet}{cmp_snippet}{expr_snip}")) . } . }; . . diag.span_suggestion(span, "try", hint, applicability); . }, . ); 54,256 ( 0.00%) } 40,692 ( 0.00%) -------------------------------------------------------------------------------- -- 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) { 149,654 ( 0.00%) if let ExprKind::Range(Some(start), Some(end), RangeLimits::HalfOpen) = &e.kind . && is_incomplete_range(start, end) . && !e.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . e.span, . "almost complete ascii range", -- line 52 ---------------------------------------- -- line 61 ---------------------------------------- . "use an inclusive range", . "..=".to_owned(), . Applicability::MaybeIncorrect, . ); . } . }, . ); . } 74,827 ( 0.00%) } . 93,198 ( 0.00%) fn check_pat(&mut self, cx: &EarlyContext<'_>, p: &Pat) { 31,066 ( 0.00%) if let PatKind::Range(Some(start), Some(end), kind) = &p.kind . && matches!(kind.node, RangeEnd::Excluded) . && is_incomplete_range(start, end) . && !p.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_then( . cx, . ALMOST_COMPLETE_RANGE, . p.span, -- line 80 ---------------------------------------- -- line 88 ---------------------------------------- . } else { . "...".to_owned() . }, . Applicability::MaybeIncorrect, . ); . }, . ); . } 108,731 ( 0.00%) } . . extract_msrv_attr!(); . } . . fn is_incomplete_range(start: &Expr, end: &Expr) -> bool { . match (&start.peel_parens().kind, &end.peel_parens().kind) { . (&ExprKind::Lit(start_lit), &ExprKind::Lit(end_lit)) => { . matches!( -- line 104 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/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 { 56,575 ( 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 { 32,352 ( 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. . 160,119 ( 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 { 59,138 ( 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. . 119,361 ( 0.00%) if self < rhs { . None . } else { . // SAFETY: just checked this can't overflow 40,545 ( 0.00%) Some(unsafe { intrinsics::unchecked_sub(self, rhs) }) . } . } . . /// Strict integer subtraction. Computes `self - rhs`, panicking if . /// overflow occurred. . /// . /// # Panics . /// -- line 1064 ---------------------------------------- -- line 1353 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_mul(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 556,434 ( 0.01%) 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 { 4,604 ( 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 { 79,234 ( 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 { 160,866 ( 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 { 120,587 ( 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 { 363,761 ( 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) { 6 ( 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) { 909,715 ( 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 3740 ---------------------------------------- . /// ``` . #[stable(feature = "int_roundings1", since = "1.73.0")] . #[rustc_const_stable(feature = "int_roundings1", since = "1.73.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline] . #[track_caller] . pub const fn div_ceil(self, rhs: Self) -> Self { 15 ( 0.00%) let d = self / rhs; 28 ( 0.00%) let r = self % rhs; 28 ( 0.00%) if r > 0 { . d + 1 . } else { . d . } . } . . /// Calculates the smallest value greater than or equal to `self` that . /// is a multiple of `rhs`. -- line 3758 ---------------------------------------- -- line 3844 ---------------------------------------- . #[doc = concat!("assert!(16", stringify!($SelfT), ".is_power_of_two());")] . #[doc = concat!("assert!(!10", stringify!($SelfT), ".is_power_of_two());")] . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_is_power_of_two", since = "1.32.0")] . #[inline(always)] . pub const fn is_power_of_two(self) -> bool { 1,180 ( 0.00%) self.count_ones() == 1 . } . . // Returns one less than next power of two. . // (For 8u8 next power of two is 8u8 and for 6u8 it is 8u8) . // . // 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 { . if self <= 1 { return 0; } . 18 ( 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. 9 ( 0.00%) let z = unsafe { intrinsics::ctlz_nonzero(p) }; 18 ( 0.00%) <$SelfT>::MAX >> z . } . . /// Returns the smallest power of two greater than or equal to `self`. . /// . /// When return value overflows (i.e., `self > (1 << (N-1))` for type . /// `uN`), it panics in debug mode and the return value is wrapped to 0 in . /// release mode (the only situation in which this method can return 0). . /// -- line 3882 ---------------------------------------- -- line 4010 ---------------------------------------- . without modifying the original"] . #[allow(unnecessary_transmutes)] . // SAFETY: const sound because integers are plain old datatypes so we can always . // transmute them to arrays of bytes . #[inline] . pub const fn to_ne_bytes(self) -> [u8; size_of::()] { . // SAFETY: integers are plain old datatypes so we can always transmute them to . // arrays of bytes 32 ( 0.00%) unsafe { mem::transmute(self) } . } . . /// Creates a native endian integer value from its representation . /// as a byte array in big endian. . /// . #[doc = $from_xe_bytes_doc] . /// . /// # Examples -- line 4026 ---------------------------------------- 538,719 ( 0.01%) -------------------------------------------------------------------------------- -- 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}; . 166,243 ( 0.00%) pub fn check(cx: &LateContext<'_>, doc: &str, range: Range, fragments: &Fragments<'_>, attrs: &[Attribute]) { . for i in doc[range.clone()] . .bytes() . .enumerate() 597,282 ( 0.01%) .filter_map(|(i, c)| if c == b'[' { Some(i) } else { None }) . { 80 ( 0.00%) let start = i + range.start; 120 ( 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, . ); . } . } . }, . ); . } . } 189,992 ( 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 ---------------------------------------- 189,992 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/module_style.rs -------------------------------------------------------------------------------- Ir -- line 109 ---------------------------------------- . mod_file: Arc, . mod_ident: Ident, . path_from_working_dir: Option, . contains_external: bool, . has_path_attr: bool, . is_cfg_test: bool, . } . 7 ( 0.00%) #[derive(Default)] . pub struct ModStyle { . working_dir: Option, . regular_mod_stack: Vec, . inline_mod_stack: Vec, . } . . impl ModStyle { . fn inside_cfg_test_inline_mod(&self) -> bool { -- line 125 ---------------------------------------- -- line 128 ---------------------------------------- . . fn get_relative_path_from_working_dir(&self, file: &SourceFile) -> Option { . try_trim_file_path_prefix(file, self.working_dir.as_ref()?).map(Path::to_path_buf) . } . } . . impl EarlyLintPass for ModStyle { . fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) { 3 ( 0.00%) self.working_dir = cx.sess().source_map().working_dir().local_path().map(Path::to_path_buf); . } . 140,320 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 14,032 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 14,032 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 14,032 ( 0.00%) && cx.builder.lint_level_spec(INLINE_MODULES).is_allow() . { . return; . } . if let ItemKind::Mod(_, mod_ident, ModKind::Loaded(_, inline_or_not, mod_spans, ..)) = &item.kind { . let has_path_attr = item.attrs.iter().any(|attr| attr.has_name(sym::path)); . let mod_file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); . let path_from_working_dir = self.get_relative_path_from_working_dir(&mod_file); . let current = ModState { -- line 150 ---------------------------------------- -- line 184 ---------------------------------------- . Inline::No { .. } => { . if !has_path_attr && let Some(last) = self.regular_mod_stack.last_mut() { . last.contains_external = true; . } . self.regular_mod_stack.push(current); . }, . } . } 112,256 ( 0.00%) } . 140,320 ( 0.00%) fn check_item_post(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 14,032 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 14,032 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 14,032 ( 0.00%) && cx.builder.lint_level_spec(INLINE_MODULES).is_allow() . { . return; . } . . if let ItemKind::Mod(.., ModKind::Loaded(_, inline_or_not, ..)) = &item.kind { . match inline_or_not { . Inline::Yes => { . self.inline_mod_stack.pop(); -- line 205 ---------------------------------------- -- line 212 ---------------------------------------- . if current.contains_external { . check_self_named_module(cx, path, ¤t.mod_file); . } . check_mod_module(cx, path, ¤t.mod_file); . } . }, . } . } 112,256 ( 0.00%) } . } . . fn check_self_named_module(cx: &EarlyContext<'_>, path: &Path, file: &SourceFile) { . if !path.ends_with("mod.rs") { . let mut mod_folder = path.with_extension(""); . span_lint_and_then( . cx, . SELF_NAMED_MODULE_FILES, -- line 228 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_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>) { 35,926 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. 15,680 ( 0.00%) }) = it.kind 18,843 ( 0.00%) && let Some(trait_did) = of_trait.trait_ref.trait_def_id() 81,653 ( 0.00%) => ???:::trait_def_id (6,281x) 37,686 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::ToString, trait_did) 485,894 ( 0.01%) => ???:::is_diagnostic_item (6,281x) . { . span_lint_and_help( . cx, . TO_STRING_TRAIT_IMPL, . it.span, . "direct implementation of `ToString`", . None, . "prefer implementing `Display` instead", -- line 63 ---------------------------------------- 6,281 ( 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 130,864 ( 0.00%) if let ExprKind::If(cond, then, Some(otherwise)) = expr.kind 2 ( 0.00%) && let ExprKind::Path(_) = cond.kind . && let ExprKind::Block( . Block { . stmts: [stmt], . expr: Some(then_expr), . .. . }, . .., . ) = then.kind -- line 66 ---------------------------------------- -- line 98 ---------------------------------------- . expr.span, . "use", . format!("{negate}{std_or_core}::mem::take(&mut {taken})"), . app, . ); . }, . ); . } 523,440 ( 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_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>) { 7,008 ( 0.00%) lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); 571,262 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::lint_cast_ptr_alignment (1,168x) . } . 327,130 ( 0.00%) pub(super) fn check_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 134,184 ( 0.00%) if let ExprKind::MethodCall(method_path, self_arg, [], _) = &expr.kind 124 ( 0.00%) && method_path.ident.name == sym::cast . && let Some(generic_args) = method_path.args . && let [GenericArg::Type(cast_to)] = generic_args.args . // There probably is no obvious reason to do this, just to be consistent with `as` cases. . && !is_hir_ty_cfg_dependant(cx, cast_to.as_unambig_ty()) . { . let (cast_from, cast_to) = (cx.typeck_results().expr_ty(self_arg), cx.typeck_results().expr_ty(expr)); . lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); . } 392,556 ( 0.00%) } . 9,344 ( 0.00%) fn lint_cast_ptr_alignment<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { 2,336 ( 0.00%) if let ty::RawPtr(from_ptr_ty, _) = *cast_from.kind() 72 ( 0.00%) && let ty::RawPtr(to_ptr_ty, _) = *cast_to.kind() 72 ( 0.00%) && let Ok(from_layout) = cx.layout_of(from_ptr_ty) 72 ( 0.00%) && let Ok(to_layout) = cx.layout_of(to_ptr_ty) 24 ( 0.00%) && from_layout.align.abi < to_layout.align.abi . // with c_void, we inherently need to trust the user 60 ( 0.00%) && !is_c_void(cx, from_ptr_ty) 48 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_c_void (12x) . // when casting from a ZST, we don't know enough to properly lint . && !from_layout.is_zst() 60 ( 0.00%) && !is_used_as_unaligned(cx, expr) 1,884 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::is_used_as_unaligned (12x) 84 ( 0.00%) && !expr.span.in_external_macro(cx.tcx.sess.source_map()) 1,404 ( 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 (12x) . { . span_lint( . cx, . CAST_PTR_ALIGNMENT, . expr.span, 156 ( 0.00%) format!( . "casting from `{cast_from}` to a more-strictly-aligned pointer (`{cast_to}`) ({} < {} bytes)", 12 ( 0.00%) from_layout.align.bytes(), 12 ( 0.00%) to_layout.align.bytes(), . ), . ); . } 8,176 ( 0.00%) } . 96 ( 0.00%) fn is_used_as_unaligned(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 36 ( 0.00%) let Some(parent) = get_parent_expr(cx, e) else { 1,596 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (12x) . return false; . }; 60 ( 0.00%) 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) . && let Some(def_id) = cx.typeck_results().type_dependent_def_id(parent.hir_id) . && let Some(def_id) = cx.tcx.impl_of_assoc(def_id) . && cx . .tcx . .type_of(def_id) . .instantiate_identity() -- line 66 ---------------------------------------- -- line 86 ---------------------------------------- . { . true . } else { . false . } . }, . _ => false, . } 84 ( 0.00%) } 120 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs -------------------------------------------------------------------------------- Ir -- line 118 ---------------------------------------- . return true; . } . inner = i; . } . false . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessBool { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use self::Expression::{Bool, RetBool}; 130,860 ( 0.00%) if !e.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: Some(else_expr), . }) = higher::If::hir(e) 2 ( 0.00%) && !span_contains_comment(cx, e.span) . { . let reduce = |ret, not| { . span_lint_and_then( . cx, . NEEDLESS_BOOL, . e.span, . "this if-then-else expression returns a bool literal", . |diag| { -- line 142 ---------------------------------------- -- line 159 ---------------------------------------- . { . snip = snip.maybe_paren(); . } . . diag.span_suggestion(e.span, "you can reduce it to", snip.to_string(), applicability); . }, . ); . }; 4 ( 0.00%) if let Some(a) = fetch_bool_block(then) 45 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_lints::needless_bool::fetch_bool_block (1x) . && let Some(b) = fetch_bool_block(else_expr) . { . match (a, b) { . (RetBool(true), RetBool(true)) | (Bool(true), Bool(true)) => { . span_lint( . cx, . NEEDLESS_BOOL, . e.span, -- line 175 ---------------------------------------- -- line 186 ---------------------------------------- . }, . (RetBool(true), RetBool(false)) => reduce(true, false), . (Bool(true), Bool(false)) => reduce(false, false), . (RetBool(false), RetBool(true)) => reduce(true, true), . (Bool(false), Bool(true)) => reduce(false, true), . _ => (), . } . } 5 ( 0.00%) if let Some((lhs_a, a)) = fetch_assign(then) 23 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_lints::needless_bool::fetch_assign (1x) . && let Some((lhs_b, b)) = fetch_assign(else_expr) . && SpanlessEq::new(cx).eq_expr(SyntaxContext::root(), lhs_a, lhs_b) . { . let mut applicability = Applicability::MachineApplicable; . let cond = Sugg::hir_with_context(cx, cond, e.span.ctxt(), "..", &mut applicability); . let (lhs, _) = snippet_with_context(cx, lhs_a.span, e.span.ctxt(), "..", &mut applicability); . let mut sugg = if a == b { . format!("{cond}; {lhs} = {a:?};") -- line 202 ---------------------------------------- -- line 214 ---------------------------------------- . e.span, . "this if-then-else expression assigns a bool literal", . "you can reduce it to", . sugg, . applicability, . ); . } . } 523,440 ( 0.01%) } . 74,949 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . // Detect the early-return form: . // if c { . // return Ok(true); . // } . // Ok(false) . // and reduce it to `Ok(c)`. The optional `Ok(..)` wrapper can be any tuple-like . // constructor (or absent), as long as the guard and the trailing expression use the . // same one. Constructors are pure, so folding the condition in keeps the behavior. 32,121 ( 0.00%) if let Some(tail) = block.expr 21,406 ( 0.00%) && !tail.span.from_expansion() 27,239 ( 0.00%) && let [.., last_stmt] = block.stmts 1,240 ( 0.00%) && let StmtKind::Semi(if_expr) | StmtKind::Expr(if_expr) = last_stmt.kind 496 ( 0.00%) && !if_expr.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: None, . }) = higher::If::hir(if_expr) . && let ExprKind::Ret(Some(ret)) = peel_blocks_with_stmt(then).kind . && let Some((then_func, then_val)) = fetch_bool_and_wrapper(ret) . && let Some((tail_func, tail_val)) = fetch_bool_and_wrapper(tail) -- line 245 ---------------------------------------- -- line 274 ---------------------------------------- . NEEDLESS_BOOL, . span, . "this `if` guard returns a bool literal and is followed by another", . "you can reduce it to", . sugg, . applicability, . ); . } 85,656 ( 0.00%) } . } . . /// Returns the optional constructor call wrapping a bool literal (e.g. the `Ok` in `Ok(true)`) . /// along with the bool value. The constructor is returned as the unresolved callee expression; . /// resolving it to a `DefId` (via [`wrapper_ctors_match`]) needs `qpath_res`, which is . /// comparatively expensive, so callers should only do that once the cheap bool-value comparison . /// has passed. A bare bool literal yields `None`. . fn fetch_bool_and_wrapper<'tcx>(expr: &'tcx Expr<'tcx>) -> Option<(Option<&'tcx Expr<'tcx>>, bool)> { -- line 290 ---------------------------------------- -- line 319 ---------------------------------------- . } . . enum Expression { . Bool(bool), . RetBool(bool), . } . . fn fetch_bool_block(expr: &Expr<'_>) -> Option { 3 ( 0.00%) match peel_blocks_with_stmt(expr).kind { . ExprKind::Ret(Some(ret)) => Some(Expression::RetBool(fetch_bool_expr(ret)?)), . _ => Some(Expression::Bool(fetch_bool_expr(expr)?)), . } 1 ( 0.00%) } . . fn fetch_bool_expr(expr: &Expr<'_>) -> Option { . if let ExprKind::Lit(lit_ptr) = peel_blocks(expr).kind . && let LitKind::Bool(value) = lit_ptr.node . { . return Some(value); . } . None . } . . fn fetch_assign<'tcx>(expr: &'tcx Expr<'tcx>) -> Option<(&'tcx Expr<'tcx>, bool)> { 4 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = peel_blocks_with_stmt(expr).kind { . fetch_bool_expr(rhs).map(|b| (lhs, b)) . } else { . None . } 1 ( 0.00%) } . . fn is_as_argument(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . matches!(get_parent_expr(cx, e).map(|e| e.kind), Some(ExprKind::Cast(_, _))) . } . . fn is_operand_of_binary_or_unary(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . matches!( . get_parent_expr(cx, e).map(|e| e.kind), -- line 356 ---------------------------------------- 10,704 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/erasing_op.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { . let tck = cx.typeck_results(); 36,054 ( 0.00%) match op { . BinOpKind::Mul | BinOpKind::BitAnd => { 9,930 ( 0.00%) check_op(cx, tck, left, right, e); 481,972 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/erasing_op.rs:clippy_lints::operators::erasing_op::check_op (1,655x) 9,930 ( 0.00%) check_op(cx, tck, right, left, e); 524,635 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/erasing_op.rs:clippy_lints::operators::erasing_op::check_op (1,655x) . }, . BinOpKind::Div => check_op(cx, tck, left, right, e), . _ => (), . } . } . . fn different_types(tck: &TypeckResults<'_>, input: &Expr<'_>, output: &Expr<'_>) -> bool { . let input_ty = tck.expr_ty(input).peel_refs(); . let output_ty = tck.expr_ty(output).peel_refs(); . !same_type_modulo_regions(input_ty, output_ty) . } . 39,720 ( 0.00%) fn check_op<'tcx>( . cx: &LateContext<'tcx>, . tck: &'tcx TypeckResults<'tcx>, . op: &Expr<'tcx>, . other: &Expr<'tcx>, . parent: &Expr<'tcx>, . ) { 23,170 ( 0.00%) if ConstEvalCtxt::with_env(cx.tcx, cx.typing_env(), tck).eval_local(op, parent.span.ctxt()) 635,887 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (3,310x) 99,300 ( 0.00%) => ???:::typing_env (3,310x) . == Some(Constant::Int(0)) . { . if different_types(tck, other, parent) { . return; . } . span_lint( . cx, . ERASING_OP, . parent.span, . "this operation will always return zero. This is likely not the intended outcome", . ); . } 26,480 ( 0.00%) } 19,860 ( 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/boxed.rs -------------------------------------------------------------------------------- Ir -- line 243 ---------------------------------------- . // The is a separate function to avoid doing it in every generic version, but it . // looks small to the mir inliner (particularly in panic=abort) so leave it to . // the backend to decide whether pulling it in everywhere is worth doing. . #[rustc_no_mir_inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[cfg(not(no_global_oom_handling))] . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const fn box_new_uninit(layout: Layout) -> *mut u8 { 59,955 ( 0.00%) match Global.allocate(layout) { . Ok(ptr) => ptr.as_mut_ptr(), . Err(_) => handle_alloc_error(layout), . } . } . . /// Helper for `vec!`. . /// . /// This is unsafe, but has to be marked as safe or else we couldn't use it in `vec!`. -- line 259 ---------------------------------------- -- line 285 ---------------------------------------- . #[must_use] . #[rustc_diagnostic_item = "box_new"] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub fn new(x: T) -> Self { . // This is `Box::new_uninit` but inlined to avoid build time regressions. . let ptr = box_new_uninit(::LAYOUT) as *mut T; . // Nothing below can panic so we do not have to worry about deallocating `ptr`. . // SAFETY: we just allocated the box to store `x`. 205,433 ( 0.00%) unsafe { core::intrinsics::write_via_move(ptr, x) }; 120 ( 0.00%) => ???:0x0000000000173dc0 (4x) . // SAFETY: we just initialized the memory `ptr` points to. . unsafe { mem::transmute(ptr) } . } . . /// Constructs a new box with uninitialized contents. . /// . /// # Examples . /// -- line 301 ---------------------------------------- -- line 578 ---------------------------------------- . #[must_use] . pub fn new_uninit_in(alloc: A) -> Box, A> . where . A: Allocator, . { . let layout = Layout::new::>(); . // NOTE: Prefer match over unwrap_or_else since closure sometimes not inlineable. . // That would make code size bigger. 88 ( 0.00%) match Box::try_new_uninit_in(alloc) { . Ok(m) => m, . Err(_) => handle_alloc_error(layout), . } . } . . /// Constructs a new box with uninitialized contents in the provided allocator, . /// returning an error if the allocation fails . /// -- line 594 ---------------------------------------- -- line 1990 ---------------------------------------- . #[inline] . fn drop(&mut self) { . // the T in the Box is dropped by the compiler before the destructor is run . . let ptr = self.0; . . unsafe { . let layout = Layout::for_value_raw(ptr.as_ptr()); 2 ( 0.00%) if layout.size() != 0 { . self.1.deallocate(From::from(ptr.cast()), layout); . } . } . } . } . . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] -- line 2006 ---------------------------------------- -- line 2386 ---------------------------------------- . fn borrow_mut(&mut self) -> &mut T { . &mut **self . } . } . . #[stable(since = "1.5.0", feature = "smart_ptr_as_ref")] . impl AsRef for Box { . fn as_ref(&self) -> &T { 4 ( 0.00%) &**self . } . } . . #[stable(since = "1.5.0", feature = "smart_ptr_as_ref")] . impl AsMut for Box { . fn as_mut(&mut self) -> &mut T { . &mut **self . } -- line 2402 ---------------------------------------- 850 ( 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 { 2,212 ( 0.00%) match cx.tcx.get_diagnostic_name(did)? { 88,480 ( 0.00%) => ???:::get_diagnostic_name (1,106x) . sym::slice_from_raw_parts => Some(RawPartsKind::Immutable), . sym::slice_from_raw_parts_mut => Some(RawPartsKind::Mutable), . _ => None, . } . } . 9,344 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_to: Ty<'_>, msrv: Msrv) { 2,336 ( 0.00%) if let ty::RawPtr(ptrty, _) = cast_to.kind() 231 ( 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, . ); . } 9,344 ( 0.00%) } . . /// Checks for implicit cast from slice reference to raw slice pointer. 523,408 ( 0.01%) pub(super) fn check_implicit_cast(cx: &LateContext<'_>, expr: &Expr<'_>) { 20,923 ( 0.00%) if let ExprKind::Call(fun, [ptr_arg, len_arg]) = expr.peel_blocks().kind 3,321 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 4,428 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 86,291 ( 0.00%) => ???:::qpath_res (1,107x) 3,318 ( 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, . ); . } 523,408 ( 0.01%) } 70,961 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/doc_comment_double_space_linebreaks.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use rustc_errors::Applicability; . use rustc_lint::LateContext; . use rustc_span::{BytePos, Span}; . . use super::DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS; . 93,498 ( 0.00%) pub fn check(cx: &LateContext<'_>, collected_breaks: &[Span]) { 31,166 ( 0.00%) if collected_breaks.is_empty() { . return; . } . . let breaks: Vec<_> = collected_breaks . .iter() . .map(|span| span.with_hi(span.lo() + BytePos(2))) . .collect(); . -- line 17 ---------------------------------------- -- line 25 ---------------------------------------- . diag.tool_only_multipart_suggestion( . "replace this double space with a backslash:", . suggs, . Applicability::MachineApplicable, . ); . diag.help("replace this double space with a backslash: `\\`"); . }, . ); 109,081 ( 0.00%) } -------------------------------------------------------------------------------- -- 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 { 33,660 ( 0.00%) visitor.$f(self) 11,090,998 ( 0.14%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr (4,859x) . } . } . }; . } . visitable_ref!(Arm, visit_arm); . visitable_ref!(Block, visit_block); . visitable_ref!(Body, visit_body); . visitable_ref!(Expr, visit_expr); -- line 103 ---------------------------------------- -- line 110 ---------------------------------------- . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V { . f: F, . } . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V { . type Result = ControlFlow; . 316,963 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 104,441 ( 0.00%) match (self.f)(e) { 496,148 ( 0.01%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 158,300 ( 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::> (9x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 287,752 ( 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(()) . } . } 93,114 ( 0.00%) let mut v = V { f }; . node.visit(&mut v).break_value() . } . . /// Calls the given function once for each expression contained. This will enter bodies, but not . /// nested items. . pub fn for_each_expr<'tcx, B, C: Continue>( . tcx: TyCtxt<'tcx>, . node: impl Visitable<'tcx>, -- line 149 ---------------------------------------- -- line 156 ---------------------------------------- . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V<'tcx, F> { . type NestedFilter = nested_filter::OnlyBodies; . type Result = ControlFlow; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.tcx . } . 378,090 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { . match (self.f)(e) { 126,030 ( 0.00%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 38,637,297 ( 0.48%) => /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::> (6,809x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 336,080 ( 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(()) . } . } 40,854 ( 0.00%) let mut v = V { tcx, f }; . node.visit(&mut v).break_value() . } . . /// returns `true` if expr contains match expr desugared from try . fn contains_try(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { . if matches!(e.kind, ExprKind::Match(_, _, hir::MatchSource::TryDesugar(_))) { . ControlFlow::Break(()) -- line 199 ---------------------------------------- 68,298 ( 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>) { 28,086 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind { . self.check_sig(cx, item.owner_id.def_id, sig.decl); . } . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'tcx>) { 23,986 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, ..) = item.kind 53,120 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 1,661,939 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (10,624x) . { 27,252 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 4,925,066 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (6,813x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'tcx>) { 8 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, ..) = item.kind { 4 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 162 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (1x) . } . } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &hir::LetStmt<'tcx>) { 2,793 ( 0.00%) if let hir::PatKind::Wild = local.pat.kind { . return; . } 6,517 ( 0.00%) self.check_ty_(cx, local.span, cx.typeck_results().pat_ty(local.pat)); 37,240 ( 0.00%) => ???:::pat_ty (931x) 17,689 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (931x) . } . } . . 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) . } . } . 74,954 ( 0.00%) fn check_sig(&mut self, cx: &LateContext<'tcx>, fn_def_id: LocalDefId, decl: &hir::FnDecl<'tcx>) { 6,814 ( 0.00%) let fn_sig = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip(); 34,026 ( 0.00%) for (hir_ty, ty) in iter::zip(decl.inputs, fn_sig.inputs().skip_binder()) { 35,190 ( 0.00%) self.check_ty_(cx, hir_ty.span, *ty); 607,583 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (7,038x) . } 34,070 ( 0.00%) self.check_ty_( 494,575 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (6,814x) . cx, . decl.output.span(), 20,442 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(fn_sig.output()), 2,907,328 ( 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/fold.rs:::instantiate_bound_regions_with_erased:: (6,814x) . ); 54,512 ( 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). 118,264 ( 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() 60,705 ( 0.00%) && matches!( 48,564 ( 0.00%) cx.tcx.get_diagnostic_name(def.did()), 645,887 ( 0.01%) => ???:::get_diagnostic_name (12,141x) . 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" . ))); . } . }); . } . } 88,698 ( 0.00%) } . } 12,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_middle/src/ty/fold.rs -------------------------------------------------------------------------------- Ir -- line 97 ---------------------------------------- . . /// This cache only tracks the `DebruijnIndex` and assumes that it does not matter . /// for the delegate how often its methods get used. . cache: DelayedMap<(ty::DebruijnIndex, Ty<'tcx>), Ty<'tcx>>, . } . . impl<'tcx, D: BoundVarReplacerDelegate<'tcx>> BoundVarReplacer<'tcx, D> { . fn new(tcx: TyCtxt<'tcx>, delegate: D) -> Self { 246,660 ( 0.00%) BoundVarReplacer { tcx, current_index: ty::INNERMOST, delegate, cache: Default::default() } . } . } . . impl<'tcx, D> TypeFolder> for BoundVarReplacer<'tcx, D> . where . D: BoundVarReplacerDelegate<'tcx>, . { . fn cx(&self) -> TyCtxt<'tcx> { -- line 113 ---------------------------------------- -- line 119 ---------------------------------------- . t: ty::Binder<'tcx, T>, . ) -> ty::Binder<'tcx, T> { . self.current_index.shift_in(1); . let t = t.super_fold_with(self); . self.current_index.shift_out(1); . t . } . 280,344 ( 0.00%) fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> { 140,172 ( 0.00%) match *t.kind() { . ty::Bound(ty::BoundVarIndexKind::Bound(debruijn), bound_ty) . if debruijn == self.current_index => . { . let ty = self.delegate.replace_ty(bound_ty); . debug_assert!(!ty.has_vars_bound_above(ty::INNERMOST)); . ty::shift_vars(self.tcx, ty, self.current_index.as_u32()) . } . _ => { 140,172 ( 0.00%) if !t.has_vars_bound_at_or_above(self.current_index) { . t 34,848 ( 0.00%) } else if let Some(&t) = self.cache.get(&(self.current_index, t)) { . t . } else { 52,272 ( 0.00%) let res = t.super_fold_with(self); 15,460,639 ( 0.19%) => /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::> (17,383x) . assert!(self.cache.insert((self.current_index, t), res)); . res . } . } . } 280,344 ( 0.00%) } . . fn fold_region(&mut self, r: ty::Region<'tcx>) -> ty::Region<'tcx> { 104,544 ( 0.00%) match r.kind() { . ty::ReBound(ty::BoundVarIndexKind::Bound(debruijn), br) 17,424 ( 0.00%) if debruijn == self.current_index => . { 63,059 ( 0.00%) let region = self.delegate.replace_region(br); 4,732,656 ( 0.06%) => ???:::replace_region (10,787x) 104,544 ( 0.00%) if let ty::ReBound(ty::BoundVarIndexKind::Bound(debruijn1), br) = region.kind() { . // If the callback returns a bound region, . // that region should always use the INNERMOST . // debruijn index. Then we adjust it to the . // correct depth. . assert_eq!(debruijn1, ty::INNERMOST); . ty::Region::new_bound(self.tcx, debruijn, br) . } else { . region . } . } . _ => r, . } . } . 26,064 ( 0.00%) fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { 60,816 ( 0.00%) match ct.kind() { . ty::ConstKind::Bound(ty::BoundVarIndexKind::Bound(debruijn), bound_const) . if debruijn == self.current_index => . { . let ct = self.delegate.replace_const(bound_const); . debug_assert!(!ct.has_vars_bound_above(ty::INNERMOST)); . ty::shift_vars(self.tcx, ct, self.current_index.as_u32()) . } 43,440 ( 0.00%) _ => ct.super_fold_with(self), 764,544 ( 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/structural_impls.rs:>::super_fold_with::> (8,688x) . } . } . . fn fold_predicate(&mut self, p: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> { . if p.has_vars_bound_at_or_above(self.current_index) { p.super_fold_with(self) } else { p } . } . . fn fold_clauses(&mut self, c: ty::Clauses<'tcx>) -> ty::Clauses<'tcx> { -- line 188 ---------------------------------------- -- line 210 ---------------------------------------- . mut fld_r: F, . ) -> (T, FxIndexMap, ty::Region<'tcx>>) . where . F: FnMut(ty::BoundRegion<'tcx>) -> ty::Region<'tcx>, . T: TypeFoldable>, . { . let mut region_map = FxIndexMap::default(); . let real_fld_r = 206,372 ( 0.00%) |br: ty::BoundRegion<'tcx>| *region_map.entry(br).or_insert_with(|| fld_r(br)); . let value = self.instantiate_bound_regions_uncached(value, real_fld_r); 51,087 ( 0.00%) (value, region_map) . } . . pub fn instantiate_bound_regions_uncached( . self, . value: Binder<'tcx, T>, . mut replace_regions: F, . ) -> T . where . F: FnMut(ty::BoundRegion<'tcx>) -> ty::Region<'tcx>, . T: TypeFoldable>, . { . let value = value.skip_binder(); 32,331 ( 0.00%) if !value.has_escaping_bound_vars() { 24,201 ( 0.00%) value . } else { . let delegate = FnMutDelegate { . regions: &mut replace_regions, . types: &mut |b| bug!("unexpected bound ty in binder: {b:?}"), . consts: &mut |b| bug!("unexpected bound ct in binder: {b:?}"), . }; . let mut replacer = BoundVarReplacer::new(self, delegate); . value.fold_with(&mut replacer) 1,931 ( 0.00%) } . } . . /// Replaces all escaping bound vars. The `fld_r` closure replaces escaping . /// bound regions; the `fld_t` closure replaces escaping bound types and the `fld_c` . /// closure replaces escaping bound consts. . pub fn replace_escaping_bound_vars_uncached>>( . self, . value: T, -- line 251 ---------------------------------------- -- line 312 ---------------------------------------- . ty::Const::new_bound(self, ty::INNERMOST, ty::BoundConst::new(shift_bv(c.var))) . }, . }, . ) . } . . /// Replaces any late-bound regions bound in `value` with `'erased`. Useful in codegen but also . /// method lookup and a few other places where precise region relationships are not required. 346,113 ( 0.00%) pub fn instantiate_bound_regions_with_erased(self, value: Binder<'tcx, T>) -> T . where . T: TypeFoldable>, . { 106,170 ( 0.00%) self.instantiate_bound_regions(value, |_| self.lifetimes.re_erased).0 267,015 ( 0.00%) } . . /// Anonymize all bound variables in `value`, this is mostly used to improve caching. . pub fn anonymize_bound_vars(self, value: Binder<'tcx, T>) -> Binder<'tcx, T> . where . T: TypeFoldable>, . { . struct Anonymize<'a, 'tcx> { . tcx: TyCtxt<'tcx>, -- line 333 ---------------------------------------- 118,782 ( 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. 151,481 ( 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. 108,120 ( 0.00%) #[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 { 41,261 ( 0.00%) HygieneData::with(|data| data.expn_data(self).clone()) 618,915 ( 0.01%) => ???:::expn_data (41,261x) . } . . #[inline] . pub fn is_descendant_of(self, ancestor: ExpnId) -> bool { . // a few "fast path" cases to avoid locking HygieneData 11,962 ( 0.00%) if ancestor == ExpnId::root() || ancestor == self { . return true; . } . if ancestor.krate != self.krate { . return false; . } . HygieneData::with(|data| data.is_descendant_of(self, ancestor)) . } . -- line 308 ---------------------------------------- -- 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 { 149,412 ( 0.00%) 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 { 117,768 ( 0.00%) 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 { 291,228 ( 0.00%) 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,617 ( 0.00%) HygieneData::with(|data| data.expn_data(data.outer_expn(self)).clone()) 144,255 ( 0.00%) => ???:::expn_data (9,617x) . } . . /// 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. 610,536 ( 0.01%) #[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. 50,878 ( 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. 50,878 ( 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. 50,878 ( 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. . Macro(MacroKind, Symbol), . /// Transform done by the compiler on the AST. . AstPass(AstPass), . /// Desugaring done by the compiler during AST lowering. -- line 1139 ---------------------------------------- 40,272 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/duration_subsec.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use clippy_utils::sym; . use rustc_errors::Applicability; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . . use super::DURATION_SUBSEC; . 45,661 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 6,523 ( 0.00%) if op == BinOpKind::Div . && let ExprKind::MethodCall(method_path, self_arg, [], _) = left.kind . && cx . .typeck_results() . .expr_ty(self_arg) . .peel_refs() . .is_diag_item(cx, sym::Duration) . && let Some(Constant::Int(divisor)) = ConstEvalCtxt::new(cx).eval_local(right, expr.span.ctxt()) . { -- line 27 ---------------------------------------- -- line 39 ---------------------------------------- . "try", . format!( . "{}.{suggested_fn}()", . snippet_with_applicability(cx, self_arg.span, "_", &mut applicability) . ), . applicability, . ); . } 52,184 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/utils.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . } . } . . pub(super) fn is_lint_level(symbol: Symbol) -> bool { . Level::from_symbol(symbol).is_some() . } . . fn is_relevant_block(cx: &LateContext<'_>, block: &Block<'_>) -> bool { 250 ( 0.00%) block.stmts.first().map_or_else( . || block.expr.as_ref().is_some_and(|e| is_relevant_expr(cx, e)), 1,002 ( 0.00%) |stmt| match &stmt.kind { . StmtKind::Let(_) => true, 498 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => is_relevant_expr(cx, expr), . StmtKind::Item(_) => false, . }, . ) . } . 160,614 ( 0.00%) pub(super) fn is_relevant_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 53,538 ( 0.00%) if macro_backtrace(expr.span).last().is_some_and(|macro_call| { . is_panic(cx, macro_call.def_id) || cx.tcx.item_name(macro_call.def_id) == sym::unreachable . }) { . return false; . } 106,960 ( 0.00%) match &expr.kind { 8,952 ( 0.00%) ExprKind::Block(block, _) => is_relevant_block(cx, block), . ExprKind::Ret(Some(e)) => is_relevant_expr(cx, e), . ExprKind::Ret(None) | ExprKind::Break(_, None) => false, . _ => true, . } 142,768 ( 0.00%) } . . /// Returns the lint name if it is clippy lint. . pub(super) fn extract_clippy_lint(lint: &MetaItemInner) -> Option { . match namespace_and_lint(lint) { . (Some(sym::clippy), name) => name, . _ => None, . } . } -- line 51 ---------------------------------------- 35,306 ( 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; . 85,440 ( 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 { 105,555 ( 0.00%) if let PatKind::Ident(_, ident, None) = arg.pat.kind { . let arg_name = ident.to_string(); . . 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 { 58,640 ( 0.00%) registered_names.insert(arg_name, arg.pat.span); . } . } . } 85,440 ( 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) { 149,657 ( 0.00%) if let ExprKind::If(_, then_block, Some(else_clause)) = &expr.kind 2 ( 0.00%) && let ExprKind::Block(block, _) = &else_clause.kind 2 ( 0.00%) && !expr.span.from_expansion() 2 ( 0.00%) && !else_clause.span.from_expansion() 2 ( 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, . ); . } 74,827 ( 0.00%) } . } 14 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs -------------------------------------------------------------------------------- Ir -- line 243 ---------------------------------------- . /// . /// Unlike [`next()`][Searcher::next], there is no guarantee that the returned ranges . /// of this and [`next_reject`][Searcher::next_reject] will overlap. This will return . /// `(start_match, end_match)`, where start_match is the index of where . /// the match begins, and end_match is the index after the end of the match. . #[inline] . fn next_match(&mut self) -> Option<(usize, usize)> { . loop { 14,080 ( 0.00%) match self.next() { . SearchStep::Match(a, b) => return Some((a, b)), . SearchStep::Done => return None, . _ => continue, . } . } . } . . /// Finds the next [`Reject`][SearchStep::Reject] result. See [`next()`][Searcher::next] . /// and [`next_match()`][Searcher::next_match]. . /// . /// Unlike [`next()`][Searcher::next], there is no guarantee that the returned ranges . /// of this and [`next_match`][Searcher::next_match] will overlap. . #[inline] . fn next_reject(&mut self) -> Option<(usize, usize)> { 46,215 ( 0.00%) loop { 10,291 ( 0.00%) match self.next() { . SearchStep::Reject(a, b) => return Some((a, b)), . SearchStep::Done => return None, . _ => continue, . } . } . } . } . -- line 275 ---------------------------------------- -- line 324 ---------------------------------------- . } . } . . /// Finds the next [`Reject`][SearchStep::Reject] result. . /// See [`next_back()`][ReverseSearcher::next_back]. . #[inline] . fn next_reject_back(&mut self) -> Option<(usize, usize)> { . loop { 71,056 ( 0.00%) match self.next_back() { . SearchStep::Reject(a, b) => return Some((a, b)), . SearchStep::Done => return None, . _ => continue, . } . } . } . } . -- line 340 ---------------------------------------- -- line 416 ---------------------------------------- . // starts at the end and only decreases . let slice = unsafe { self.haystack.get_unchecked(old_finger..self.finger_back) }; . let mut iter = slice.chars(); . let old_len = iter.iter.len(); . if let Some(ch) = iter.next() { . // add byte offset of current character . // without re-encoding as utf-8 . self.finger += old_len - iter.iter.len(); 9,243 ( 0.00%) if ch == self.needle { . SearchStep::Match(old_finger, self.finger) . } else { . SearchStep::Reject(old_finger, self.finger) . } . } else { . SearchStep::Done . } . } . #[inline] . fn next_match(&mut self) -> Option<(usize, usize)> { . loop { . // get the haystack after the last character found . let bytes = self.haystack.as_bytes().get(self.finger..self.finger_back)?; . // the last byte of the utf8 encoded needle . // SAFETY: we have an invariant that `utf8_size < 5` 1,836 ( 0.00%) let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size() - 1) }; 54,567 ( 0.00%) if let Some(index) = memchr::memchr(last_byte, bytes) { . // The new finger is the index of the byte we found, . // plus one, since we memchr'd for the last byte of the character. . // . // Note that this doesn't always give us a finger on a UTF8 boundary. . // If we *didn't* find our character . // we may have indexed to the non-last byte of a 3-byte or 4-byte character. . // We can't just skip to the next valid starting byte because a character like . // ꁁ (U+A041 YI SYLLABLE PA), utf-8 `EA 81 81` will have us always find -- line 449 ---------------------------------------- -- line 451 ---------------------------------------- . // . // However, this is totally okay. While we have the invariant that . // self.finger is on a UTF8 boundary, this invariant is not relied upon . // within this method (it is relied upon in CharSearcher::next()). . // . // We only exit this method when we reach the end of the string, or if we . // find something. When we find something the `finger` will be set . // to a UTF8 boundary. 5,462 ( 0.00%) self.finger += index + 1; 13,171 ( 0.00%) if self.finger >= self.utf8_size() { . let found_char = self.finger - self.utf8_size(); . if let Some(slice) = self.haystack.as_bytes().get(found_char..self.finger) { 5,209 ( 0.00%) if slice == &self.utf8_encoded[0..self.utf8_size()] { . return Some((found_char, self.finger)); . } . } . } . } else { . // found nothing, exit 279 ( 0.00%) self.finger = self.finger_back; . return None; . } . } . } . . // let next_reject use the default implementation from the Searcher trait . } . -- line 478 ---------------------------------------- -- line 501 ---------------------------------------- . fn next_match_back(&mut self) -> Option<(usize, usize)> { . let haystack = self.haystack.as_bytes(); . loop { . // get the haystack up to but not including the last character searched . let bytes = haystack.get(self.finger..self.finger_back)?; . // the last byte of the utf8 encoded needle . // SAFETY: we have an invariant that `utf8_size < 5` . let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size() - 1) }; 56,790 ( 0.00%) if let Some(index) = memchr::memrchr(last_byte, bytes) { 428,520 ( 0.01%) => ???:core::slice::memchr::memrchr (9,465x) . // we searched a slice that was offset by self.finger, . // add self.finger to recoup the original index 338 ( 0.00%) let index = self.finger + index; . // memrchr will return the index of the byte we wish to . // find. In case of an ASCII character, this is indeed . // were we wish our new finger to be ("after" the found . // char in the paradigm of reverse iteration). For . // multibyte chars we need to skip down by the number of more . // bytes they have than ASCII . let shift = self.utf8_size() - 1; 1,352 ( 0.00%) if index >= shift { . let found_char = index - shift; 1,014 ( 0.00%) if let Some(slice) = haystack.get(found_char..(found_char + self.utf8_size())) { 338 ( 0.00%) if slice == &self.utf8_encoded[0..self.utf8_size()] { . // move finger to before the character found (i.e., at its start index) 338 ( 0.00%) self.finger_back = found_char; . return Some((self.finger_back, self.finger_back + self.utf8_size())); . } . } . } . // We can't use finger_back = index - size + 1 here. If we found the last char . // of a different-sized character (or the middle byte of a different character) . // we need to bump the finger_back down to `index`. This similarly makes . // `finger_back` have the potential to no longer be on a boundary, -- line 533 ---------------------------------------- -- line 535 ---------------------------------------- . // or when the haystack has been searched completely. . // . // Unlike next_match this does not . // have the problem of repeated bytes in utf-8 because . // we're searching for the last byte, and we can only have . // found the last byte when searching in reverse. . self.finger_back = index; . } else { 9,127 ( 0.00%) self.finger_back = self.finger; . // found nothing, exit . return None; . } . } . } . . // let next_reject_back use the default implementation from the Searcher trait . } -- line 551 ---------------------------------------- -- line 584 ---------------------------------------- . #[inline] . fn is_contained_in(self, haystack: &str) -> bool { . if (self as u32) < 128 { . haystack.as_bytes().contains(&(self as u8)) . } else { . let mut buffer = [0u8; 4]; . self.encode_utf8(&mut buffer).is_contained_in(haystack) . } 1 ( 0.00%) } . . #[inline] . fn is_prefix_of(self, haystack: &str) -> bool { . self.encode_utf8(&mut [0u8; 4]).is_prefix_of(haystack) . } . . #[inline] . fn strip_prefix_of(self, haystack: &str) -> Option<&str> { -- line 600 ---------------------------------------- -- line 691 ---------------------------------------- . fn next(&mut self) -> SearchStep { . let s = &mut self.char_indices; . // Compare lengths of the internal byte slice iterator . // to find length of current char . let pre_len = s.iter.iter.len(); . if let Some((i, c)) = s.next() { . let len = s.iter.iter.len(); . let char_len = pre_len - len; 28,188 ( 0.00%) if self.char_eq.matches(c) { . return SearchStep::Match(i, i + char_len); . } else { . return SearchStep::Reject(i, i + char_len); . } . } . SearchStep::Done . } . } -- line 707 ---------------------------------------- -- line 970 ---------------------------------------- . /// ``` . /// assert_eq!("Hello world".find("world"), Some(6)); . /// ``` . impl<'b> Pattern for &'b str { . type Searcher<'a> = StrSearcher<'a, 'b>; . . #[inline] . fn into_searcher(self, haystack: &str) -> StrSearcher<'_, 'b> { 160,017 ( 0.00%) StrSearcher::new(haystack, self) 219 ( 0.00%) => ???:::new (1x) . } . . /// Checks whether the pattern matches at the front of the haystack. . #[inline] . fn is_prefix_of(self, haystack: &str) -> bool { . haystack.as_bytes().starts_with(self.as_bytes()) . } . . /// Checks whether the pattern matches anywhere in the haystack . #[inline] 45,460 ( 0.00%) fn is_contained_in(self, haystack: &str) -> bool { . if self.len() == 0 { . return true; . } . 9,094 ( 0.00%) match self.len().cmp(&haystack.len()) { . Ordering::Less => { . if self.len() == 1 { . return haystack.as_bytes().contains(&self.as_bytes()[0]); . } . . #[cfg(any( . all(target_arch = "x86_64", target_feature = "sse2"), . all(target_arch = "loongarch64", target_feature = "lsx"), -- line 1002 ---------------------------------------- -- line 1007 ---------------------------------------- . return result; . } . } . . self.into_searcher(haystack).next_match().is_some() . } . _ => self == haystack, . } 36,368 ( 0.00%) } . . /// Removes the pattern from the front of haystack, if it matches. . #[inline] . fn strip_prefix_of(self, haystack: &str) -> Option<&str> { 12,646 ( 0.00%) if self.is_prefix_of(haystack) { . // SAFETY: prefix was just verified to exist. . unsafe { Some(haystack.get_unchecked(self.as_bytes().len()..)) } . } else { . None . } . } . . /// Checks whether the pattern matches at the back of the haystack. -- line 1028 ---------------------------------------- -- line 1035 ---------------------------------------- . } . . /// Removes the pattern from the back of haystack, if it matches. . #[inline] . fn strip_suffix_of<'a>(self, haystack: &'a str) -> Option<&'a str> . where . Self::Searcher<'a>: ReverseSearcher<'a>, . { 9,526 ( 0.00%) if self.is_suffix_of(haystack) { 330 ( 0.00%) let i = haystack.len() - self.as_bytes().len(); . // SAFETY: suffix was just verified to exist. . unsafe { Some(haystack.get_unchecked(..i)) } . } else { . None . } . } . . #[inline] -- line 1052 ---------------------------------------- -- line 1165 ---------------------------------------- . } . otherwise => otherwise, . } . } . } . } . . #[inline] 160,072 ( 0.00%) fn next_match(&mut self) -> Option<(usize, usize)> { 45,746 ( 0.00%) match self.searcher { . StrSearcherImpl::Empty(..) => loop { . match self.next() { . SearchStep::Match(a, b) => return Some((a, b)), . SearchStep::Done => return None, . SearchStep::Reject(..) => {} . } . }, . StrSearcherImpl::TwoWay(ref mut searcher) => { 45,747 ( 0.00%) let is_long = searcher.memory == usize::MAX; . // write out `true` and `false` cases to encourage the compiler . // to specialize the two cases separately. 22,874 ( 0.00%) if is_long { . searcher.next::( . self.haystack.as_bytes(), . self.needle.as_bytes(), . true, . ) . } else { . searcher.next::( . self.haystack.as_bytes(), . self.needle.as_bytes(), . false, . ) . } . } . } 182,864 ( 0.00%) } . } . . unsafe impl<'a, 'b> ReverseSearcher<'a> for StrSearcher<'a, 'b> { . #[inline] . fn next_back(&mut self) -> SearchStep { . match self.searcher { . StrSearcherImpl::Empty(ref mut searcher) => { . if searcher.is_finished { -- line 1209 ---------------------------------------- -- line 1446 ---------------------------------------- . . #[inline] . fn byteset_create(bytes: &[u8]) -> u64 { . bytes.iter().fold(0, |a, &b| (1 << (b & 0x3f)) | a) . } . . #[inline] . fn byteset_contains(&self, byte: u8) -> bool { 603,759 ( 0.01%) (self.byteset >> ((byte & 0x3f) as usize)) & 1 != 0 . } . . // One of the main ideas of Two-Way is that we factorize the needle into . // two halves, (u, v), and begin trying to find v in the haystack by scanning . // left to right. If v matches, we try to match u by scanning right to left. . // How far we can jump when we encounter a mismatch is all based on the fact . // that (u, v) is a critical factorization for the needle. . #[inline] . fn next(&mut self, haystack: &[u8], needle: &[u8], long_period: bool) -> S::Output . where . S: TwoWayStrategy, . { . // `next()` uses `self.position` as its cursor . let old_pos = self.position; 22,873 ( 0.00%) let needle_last = needle.len() - 1; . 'search: loop { . // Check that we have room to search in . // position + needle_last can not overflow if we assume slices . // are bounded by isize's range. 264,412 ( 0.00%) let tail_byte = match haystack.get(self.position + needle_last) { . Some(&b) => b, . None => { 22,854 ( 0.00%) self.position = haystack.len(); . return S::rejecting(old_pos, self.position); . } . }; . . if S::use_early_reject() && old_pos != self.position { . return S::rejecting(old_pos, self.position); . } . . // Quickly skip by large portions unrelated to our substring 444,219 ( 0.01%) if !self.byteset_contains(tail_byte) { 360,557 ( 0.00%) self.position += needle.len(); . if !long_period { . self.memory = 0; . } . continue 'search; . } . . // See if the right part of the needle matches . let start = -- line 1496 ---------------------------------------- -- line 1497 ---------------------------------------- . if long_period { self.crit_pos } else { cmp::max(self.crit_pos, self.memory) }; . for i in start..needle.len() { . // SAFETY: on every iteration of `'search`, the `haystack.get(self.position + needle_last)` . // check returned `Some`, so `self.position + needle_last < haystack.len()`. . // Since `i < needle.len()` implies `i <= needle_last`, we have . // `self.position + i < haystack.len()`. . // Every path that mutates `self.position` below either returns or re-enters `'search`, . // which re-runs the check before reaching the loop again. 6,492 ( 0.00%) if needle[i] != unsafe { *haystack.get_unchecked(self.position + i) } { 1,842 ( 0.00%) self.position += i - self.crit_pos + 1; 2,441 ( 0.00%) if !long_period { . self.memory = 0; . } . continue 'search; . } . } . . // See if the left part of the needle matches . let start = if long_period { 0 } else { self.memory }; . for i in (start..self.crit_pos).rev() { . // SAFETY: on every iteration of `'search`, the `haystack.get(self.position + needle_last)` . // check returned `Some`, so `self.position + needle_last < haystack.len()`. . // Since `i < self.crit_pos <= needle.len()`, we have `i <= needle_last`, and thus . // `self.position + i <= self.position + needle_last < haystack.len()`. . // Every path that mutates `self.position` below either returns or re-enters `'search`, . // which re-runs the check before reaching the loop again. 208 ( 0.00%) if needle[i] != unsafe { *haystack.get_unchecked(self.position + i) } { 80 ( 0.00%) self.position += self.period; 649 ( 0.00%) if !long_period { . self.memory = needle.len() - self.period; . } . continue 'search; . } . } . . // We have found a match! . let match_pos = self.position; . . // Note: add self.period instead of needle.len() to have overlapping matches 40 ( 0.00%) self.position += needle.len(); . if !long_period { 28 ( 0.00%) self.memory = 0; // set to needle.len() - self.period for overlapping matches . } . . return S::matching(match_pos, match_pos + needle.len()); . } . } . . // Follows the ideas in `next()`. . // -- line 1546 ---------------------------------------- -- line 1759 ---------------------------------------- . false . } . #[inline] . fn rejecting(_a: usize, _b: usize) -> Self::Output { . None . } . #[inline] . fn matching(a: usize, b: usize) -> Self::Output { 33 ( 0.00%) Some((a, b)) . } . } . . /// Emit Rejects regularly . enum RejectAndMatch {} . . impl TwoWayStrategy for RejectAndMatch { . type Output = SearchStep; -- line 1775 ---------------------------------------- -- line 1818 ---------------------------------------- . let haystack = haystack.as_bytes(); . . debug_assert!(needle.len() > 1); . . use crate::ops::BitAnd; . use crate::simd::cmp::SimdPartialEq; . use crate::simd::{mask8x16 as Mask, u8x16 as Block}; . 2,344 ( 0.00%) let first_probe = needle[0]; 2,344 ( 0.00%) let last_byte_offset = needle.len() - 1; . . // the offset used for the 2nd vector 4,688 ( 0.00%) let second_probe_offset = if needle.len() == 2 { . // never bail out on len=2 needles because the probes will fully cover them and have . // no degenerate cases. . 1 . } else { . // try a few bytes in case first and last byte of the needle are the same . let Some(second_probe_offset) = 7,032 ( 0.00%) (needle.len().saturating_sub(4)..needle.len()).rfind(|&idx| needle[idx] != first_probe) . else { . // fall back to other search methods if we can't find any different bytes . // since we could otherwise hit some degenerate cases . return None; . }; . second_probe_offset . }; . . // do a naive search if the haystack is too small to fit 7,032 ( 0.00%) if haystack.len() < Block::LEN + last_byte_offset { . return Some(haystack.windows(needle.len()).any(|c| c == needle)); . } . . let first_probe: Block = Block::splat(first_probe); . let second_probe: Block = Block::splat(needle[second_probe_offset]); . // first byte are already checked by the outer loop. to verify a match only the . // remainder has to be compared. . let trimmed_needle = &needle[1..]; -- line 1855 ---------------------------------------- 798,429 ( 0.01%) -------------------------------------------------------------------------------- -- 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!`) 399 ( 0.00%) pub fn is_format_macro(cx: &LateContext<'_>, macro_def_id: DefId) -> bool { 1,026 ( 0.00%) if let Some(name) = cx.tcx.get_diagnostic_name(macro_def_id) { 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . 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 . get_unique_builtin_attr( . cx.sess(), . #[allow(deprecated)] . cx.tcx.get_all_attrs(macro_def_id), . sym::format_args, . ) . .is_some() . } 342 ( 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(); 52,191 ( 0.00%) if ctxt == SyntaxContext::root() { . return None; . } 77,922 ( 0.00%) let expn = ctxt.outer_expn(); 79,460 ( 0.00%) let data = expn.expn_data(); 63,996 ( 0.00%) span = data.call_site; 397,300 ( 0.00%) Some((expn, data)) . }) . } . . /// Checks whether the span is from the root expansion or a locally defined macro 13,125 ( 0.00%) pub fn span_is_local(span: Span) -> bool { 6,124 ( 0.00%) !span.from_expansion() || expn_is_local(span.ctxt().outer_expn()) 270,987 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::expn_is_local (1,531x) 3,282 ( 0.00%) } . . /// Checks whether the expansion is the root expansion or a locally defined macro 4,593 ( 0.00%) pub fn expn_is_local(expn: ExpnId) -> bool { . if expn == ExpnId::root() { . return true; . } 3,062 ( 0.00%) let data = expn.expn_data(); 1,531 ( 0.00%) let backtrace = expn_backtrace(data.call_site); . std::iter::once((expn, data)) . .chain(backtrace) 18,372 ( 0.00%) .find_map(|(_, data)| data.macro_def_id) . .is_none_or(DefId::is_local) 6,124 ( 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 { 199,207 ( 0.00%) expn_backtrace(span).filter_map(|(expn, data)| match data { . ExpnData { 61,894 ( 0.00%) kind: ExpnKind::Macro(kind, _), 63,197 ( 0.00%) macro_def_id: Some(def_id), 141,743 ( 0.00%) 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. 735,317 ( 0.01%) pub fn root_macro_call(span: Span) -> Option { . macro_backtrace(span).last() 534,776 ( 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. 597,519 ( 0.01%) pub fn matching_root_macro_call(cx: &LateContext<'_>, span: Span, name: Symbol) -> Option { 193,127 ( 0.00%) root_macro_call(span).filter(|mc| cx.tcx.is_diagnostic_item(name, mc.def_id)) 5,494,869 ( 0.07%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (66,391x) 988,760 ( 0.01%) => ???:::is_diagnostic_item (12,069x) 464,737 ( 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 { 1,367,964 ( 0.02%) if first_node_in_macro(cx, node) != Some(ExpnId::root()) { 2,284,258 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (65,430x) . return None; . } 1,368 ( 0.00%) root_macro_call(node.span()) 25,992 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (57x) . } . . /// 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 { 130,860 ( 0.00%) let span = node.span(); 130,860 ( 0.00%) first_node_in_macro(cx, node) 2,284,258 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (65,430x) . .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. 5,280,264 ( 0.07%) 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. 2,933,480 ( 0.04%) if !node.span().from_expansion() { . return None; . } . . // The macro lints each query this for the node currently being visited, and the combined late . // pass runs all their `check_*` callbacks on that node back to back, so the redundant queries . // are consecutive. A single-slot memo of the last node collapses them to one backtrace walk in . // O(1) memory. The result is a pure function of the `HirId` (the HIR is frozen during lint . // passes), so returning the stored value on a key match is always correct. . let hir_id = node.hir_id(); 228,280 ( 0.00%) if let Some((cached_id, cached)) = LAST_FIRST_NODE_IN_MACRO.get() . && cached_id == hir_id . { . return cached; . } 12,076 ( 0.00%) let result = first_node_in_macro_uncached(cx, node); . LAST_FIRST_NODE_IN_MACRO.set(Some((hir_id, result))); . result 5,280,264 ( 0.07%) } . . 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()); 24,152 ( 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 48,304 ( 0.00%) let parent_span = cx.tcx.hir_span(parent_id); 1,828,736 ( 0.02%) => ???:::hir_span (12,076x) . let Some(parent_macro_call) = macro_backtrace(parent_span).next() else { . // the parent node is not in a macro . return Some(ExpnId::root()); . }; . . if parent_macro_call.expn.is_descendant_of(expn) { . // `node` is input to a macro call . return None; -- line 235 ---------------------------------------- -- line 236 ---------------------------------------- . } . . Some(parent_macro_call.expn) . } . . /* Specific Macro Utils */ . . /// Is `def_id` of `std::panic`, `core::panic` or any inner implementation macros 57 ( 0.00%) pub fn is_panic(cx: &LateContext<'_>, def_id: DefId) -> bool { 570 ( 0.00%) let Some(name) = cx.tcx.get_diagnostic_name(def_id) else { 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . 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 . ) 114 ( 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 426 ---------------------------------------- . match result { . ControlFlow::Break(is_assert_arg) => is_assert_arg, . ControlFlow::Continue(()) => true, . } . } . . /// Stores AST [`FormatArgs`] nodes for use in late lint passes, as they are in a desugared form in . /// the HIR 1 ( 0.00%) #[derive(Default, Clone)] . pub struct FormatArgsStorage(Arc>>); . . impl FormatArgsStorage { . /// Returns an AST [`FormatArgs`] node if a `format_args` expansion is found as a descendant of . /// `expn_id` . /// . /// See also [`find_format_arg_expr`] . pub fn get(&self, cx: &LateContext<'_>, start: &Expr<'_>, expn_id: ExpnId) -> Option<&FormatArgs> { -- line 442 ---------------------------------------- -- line 457 ---------------------------------------- . })?; . . debug_assert!(self.0.get().is_some(), "`FormatArgsStorage` not yet populated"); . . self.0.get()?.get(&format_args_expr.span.with_parent(None)) . } . . /// Should only be called by `FormatArgsCollector` 2 ( 0.00%) pub fn set(&self, format_args: FxHashMap) { . self.0 . .set(format_args) . .expect("`FormatArgsStorage::set` should only be called once"); 3 ( 0.00%) } . } . . /// Attempt to find the [`rustc_hir::Expr`] that corresponds to the [`FormatArgument`]'s value . pub fn find_format_arg_expr<'hir>(start: &'hir Expr<'hir>, target: &FormatArgument) -> Option<&'hir Expr<'hir>> { . let SpanData { . lo, . hi, . ctxt, -- line 477 ---------------------------------------- 444,673 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/cloned_ref_to_slice_refs.rs -------------------------------------------------------------------------------- Ir -- line 58 ---------------------------------------- . } . impl ClonedRefToSliceRefs { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ClonedRefToSliceRefs { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . // `&[foo.clone()]` expressions 132,514 ( 0.00%) if let ExprKind::AddrOf(_, mutability, arr) = &expr.kind . // mutable references would have a different meaning . && mutability.is_not() . . // check for single item arrays 1,734 ( 0.00%) && let ExprKind::Array([item]) = &arr.kind . . // check for clones . && let ExprKind::MethodCall(path, recv, _, _) = item.kind . . && self.msrv.meets(cx, { . if is_in_const_context(cx) { . msrvs::CONST_SLICE_FROM_REF . } else { -- line 81 ---------------------------------------- -- line 101 ---------------------------------------- . "unnecessary use of `{}` to create a slice from a reference", . path.ident.name . ), . "try", . format!("{builtin_crate}::slice::from_ref({adjustment}{sugg})"), . applicability, . ); . } 523,440 ( 0.01%) } . } . . /// Checks if a method call is a needless clone or equivalent. If so, returns the necessary . /// adjustments to use the method receiver directly without cloning. . /// For example, in the code below: . /// ```rust,no_run . /// use std::path::PathBuf; . /// -- line 117 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /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. 26,334 ( 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). . 734,274 ( 0.01%) let result = crate::intrinsics::read_via_copy(dest); 756,599 ( 0.01%) crate::intrinsics::write_via_move(dest, src); . result . } . } . . /// Disposes of a value. . /// . /// This effectively does nothing for types which implement `Copy`, e.g. . /// integers. Such values are copied and _then_ moved into the function, so the -- line 984 ---------------------------------------- -- 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 { 52,471 ( 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 ---------------------------------------- 94,535 ( 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 { 312,348 ( 0.00%) fn new(kind: ItemKindDescr, ident: Option, span: Span, mod_items: Option) -> Self { 208,232 ( 0.00%) Self { . kind, . name: ident.map(|ident| ident.name), . span: match ident { 15,908 ( 0.00%) Some(ident) => span.with_hi(ident.span.hi()), . None => span.shrink_to_lo(), . }, . mod_items, . } 208,232 ( 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 { 68,637 ( 0.00%) let SpanData { lo, hi, .. } = attr.span.data(); 91,516 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(lo); 3,408,971 ( 0.04%) => ???:::lookup_source_file (22,879x) . 22,879 ( 0.00%) Some(Self { . span: attr.span, 91,516 ( 0.00%) kind: match attr.kind { . AttrKind::Normal(_) | AttrKind::Synthetic(_) => StopKind::Attr, . AttrKind::DocComment(comment_kind, _) => StopKind::Doc(comment_kind), . }, 68,637 ( 0.00%) first: file.lookup_line(file.relative_position(lo))?, 2,319,195 ( 0.03%) => ???:::lookup_line (22,879x) 45,758 ( 0.00%) last: file.lookup_line(file.relative_position(hi))?, 2,319,195 ( 0.03%) => ???:::lookup_line (22,879x) 45,758 ( 0.00%) name: attr.name(), 205,386 ( 0.00%) => ???:::name (22,879x) . }) . } . } . . /// Represents a set of attrs/doc comments separated by 1 or more empty lines . /// . /// ```ignore . /// /// chunk 1 docs -- line 267 ---------------------------------------- -- line 282 ---------------------------------------- . /// The chunk that includes [`prev_stop`](Self::prev_stop) . prev_chunk: &'a [Stop], . } . . impl<'a> Gap<'a> { . fn new(cx: &EarlyContext<'_>, prev_chunk: &'a [Stop], next_chunk: &'a [Stop]) -> Option { . let prev_stop = prev_chunk.last()?; . let next_stop = next_chunk.first()?; 2,765 ( 0.00%) let gap_span = prev_stop.span.between(next_stop.span); 59,171 ( 0.00%) => ???:::between (553x) . let gap_snippet = gap_span.get_text(cx)?; . . let mut has_comment = false; . let mut empty_lines = Vec::new(); . 7,189 ( 0.00%) for (token, source, inner_span) in tokenize_with_text(&gap_snippet) { 13,825 ( 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 (553x) 4,424 ( 0.00%) match token { . TokenKind::BlockComment { . doc_style: None, . terminated: true, . } . | TokenKind::LineComment { doc_style: None } => has_comment = true, . TokenKind::Whitespace => { 1,106 ( 0.00%) let newlines = source.bytes().positions(|b| b == b'\n'); . empty_lines.extend( . newlines . .tuple_windows() . .map(|(a, b)| InnerSpan::new(inner_span.start + a + 1, inner_span.start + b)) . .map(|inner_span| gap_span.from_inner(inner_span)), . ); . }, . // Ignore cfg_attr'd out attributes as they may contain empty lines, could also be from macro -- line 312 ---------------------------------------- -- line 453 ---------------------------------------- . StopKind::Doc(_) => format!("if the comment should document the {desc} use an inner doc comment"), . }, . suggestions, . Applicability::MaybeIncorrect, . ); . } . } . 338,377 ( 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() 56,998 ( 0.00%) .filter(|attr| attr.style == AttrStyle::Outer && !attr.span.from_expansion()) 22,879 ( 0.00%) .map(|attr| Stop::from_attr(cx, attr)) . .collect::>>() . .unwrap_or_default(); . 26,029 ( 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 47,643 ( 0.00%) let span = self.items.last().unwrap().span; . if !span.from_expansion() 142,929 ( 0.00%) && let Ok(line) = cx.sess().source_map().lookup_line(span.lo()) 4,057,171 ( 0.05%) => ???:::lookup_line (15,881x) . { . 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, . }); 31,762 ( 0.00%) } . . let mut gaps = Vec::new(); . let mut last = 0; . for pos in outer . .array_windows() 22,879 ( 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; 7,742 ( 0.00%) if let Some(gap) = Gap::new(cx, &outer[last..pos], &outer[pos..]) { . last = pos; . gaps.push(gap); . } . } . . self.check_gaps(cx, &gaps, id); 208,232 ( 0.00%) } . } . . fn assoc_item_descr(kind: &AssocItemKind) -> &'static str { 59,985 ( 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(); . } . 95,976 ( 0.00%) fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 47,988 ( 0.00%) let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); 71,982 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); 875,781 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (11,997x) 59,985 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 12,854,856 ( 0.16%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (11,997x) 71,982 ( 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); . } . 140,320 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 70,775 ( 0.00%) let (kind, mod_items) = match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, _, _)) => { . let first = items . .iter() 1,228 ( 0.00%) .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) 921 ( 0.00%) .map(|i| i.id) . .next(); . (ItemKindDescr::Module, first) . }, . ItemKind::Mod(..) => (ItemKindDescr::Module, None), 54,900 ( 0.00%) _ => (ItemKindDescr::Other(item.kind.descr()), None), . }; 70,160 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, mod_items); 791,553 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (14,032x) 70,160 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 8,463,827 ( 0.11%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (14,032x) 112,256 ( 0.00%) } . } 262,941 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/float_equality_without_abs.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_hir::def::{DefKind, Res}; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::Spanned; . . use super::FLOAT_EQUALITY_WITHOUT_ABS; . 58,707 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 32,615 ( 0.00%) let (lhs, rhs) = match op { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . }; . . if let ExprKind::Binary( . // left hand side is a subtraction . Spanned { -- line 28 ---------------------------------------- -- line 58 ---------------------------------------- . FLOAT_EQUALITY_WITHOUT_ABS, . expr.span, . "float equality check without `.abs()`", . |diag| { . diag.span_suggestion(lhs.span, "add `.abs()`", suggestion, Applicability::MaybeIncorrect); . }, . ); . } 52,184 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs -------------------------------------------------------------------------------- Ir -- line 105 ---------------------------------------- . . impl UnitTypes { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for UnitTypes { 10,241 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { . let_unit_value::check(cx, &self.format_args, local); 7,448 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 196,290 ( 0.00%) unit_cmp::check(cx, expr); 12,082,288 ( 0.15%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check (65,430x) 196,290 ( 0.00%) unit_arg::check(cx, expr); 10,994,304 ( 0.14%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs:clippy_lints::unit_types::unit_arg::check (65,430x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs -------------------------------------------------------------------------------- Ir -- line 147 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for VecInitThenPush { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 10,707 ( 0.00%) self.searcher = None; . } . 6,517 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 2,793 ( 0.00%) if let Some(init_expr) = local.init 6,517 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, name, None) = local.pat.kind . && !local.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, init_expr) . && !matches!(init, VecInitKind::WithExprCapacity(_)) . { . self.searcher = Some(VecPushSearcher { . local_id: id, . init, . lhs_is_let: true, . let_ty_span: local.ty.map(|ty| ty.span), . name: name.name, . err_span: local.span, . found: 0, . last_push_expr: init_expr.hir_id, . }); . } 7,448 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if self.searcher.is_none() 11 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 27 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 2 ( 0.00%) && let [name] = &path.segments 2 ( 0.00%) && let Res::Local(id) = path.res . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(init) = get_vec_init_kind(cx, right) . && !matches!(init, VecInitKind::WithExprCapacity(_)) . { . 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, . }); . } 65,430 ( 0.00%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 2,382 ( 0.00%) if let Some(searcher) = self.searcher.take() { . if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind . && !stmt.span.from_expansion() . && let ExprKind::MethodCall(name, self_arg, [_], _) = expr.kind . && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::push . { . self.searcher = Some(VecPushSearcher { . err_span: searcher.err_span.to(stmt.span), -- line 210 ---------------------------------------- -- line 211 ---------------------------------------- . found: searcher.found + 1, . last_push_expr: expr.hir_id, . ..searcher . }); . } else { . searcher.display_err(cx); . } . } 1,191 ( 0.00%) } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 21,414 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } . } . } 154 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . trait_bound: &'tcx PolyTraitRef<'tcx>, . . predicate_pos: usize, . bound_pos: usize, . } . . /// Finds all of the [`Bound`]s that refer to a type parameter and are not from a macro expansion . fn type_param_bounds<'tcx>(generics: &'tcx Generics<'tcx>) -> impl Iterator> { 70,467 ( 0.00%) generics . .predicates . .iter() . .enumerate() . .filter_map(|(predicate_pos, predicate)| { 336 ( 0.00%) let WherePredicateKind::BoundPredicate(bound_predicate) = &predicate.kind else { . return None; . }; . 168 ( 0.00%) let (param, ident) = bound_predicate.bounded_ty.as_generic_param()?; . . Some( 243 ( 0.00%) bound_predicate . .bounds . .iter() . .enumerate() 585 ( 0.00%) .filter_map(move |(bound_pos, bound)| match bound { . GenericBound::Trait(trait_bound) => Some(Bound { . param, . ident, . trait_bound, . predicate_pos, . bound_pos, . }), . GenericBound::Outlives(_) | GenericBound::Use(..) => None, -- line 77 ---------------------------------------- -- line 80 ---------------------------------------- . ) . }) . .flatten() . } . . /// Searches the supertraits of the trait referred to by `trait_bound` recursively, returning the . /// path taken to find a `Sized` bound if one is found . fn path_to_sized_bound(cx: &LateContext<'_>, trait_bound: &PolyTraitRef<'_>) -> Option> { 28 ( 0.00%) fn search(cx: &LateContext<'_>, path: &mut Vec) -> bool { 8 ( 0.00%) let trait_def_id = *path.last().unwrap(); . 12 ( 0.00%) if Some(trait_def_id) == cx.tcx.lang_items().sized_trait() { 80 ( 0.00%) => ???:::lang_items (2x) . return true; . } . . for (clause, _) in cx . .tcx . .explicit_super_clauses_of(trait_def_id) . .iter_identity_copied() . .map(Unnormalized::skip_norm_wip) . { 10 ( 0.00%) if let ClauseKind::Trait(trait_predicate) = clause.kind().skip_binder() 28 ( 0.00%) => ???:::kind (2x) . && trait_predicate.polarity == PredicatePolarity::Positive . && !path.contains(&trait_predicate.def_id()) . { . path.push(trait_predicate.def_id()); 8 ( 0.00%) if search(cx, path) { 1,359 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs:clippy_lints::needless_maybe_sized::path_to_sized_bound::search'2 (2x) . return true; . } . path.pop(); . } . } . . false 32 ( 0.00%) } . 8 ( 0.00%) let mut path = vec![trait_bound.trait_ref.trait_def_id()?]; 26 ( 0.00%) => ???:::trait_def_id (2x) 4 ( 0.00%) search(cx, &mut path).then_some(path) 7,174 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_maybe_sized.rs:clippy_lints::needless_maybe_sized::path_to_sized_bound::search (2x) . } . . impl LateLintPass<'_> for NeedlessMaybeSized { 211,401 ( 0.00%) fn check_generics(&mut self, cx: &LateContext<'_>, generics: &Generics<'_>) { 140,934 ( 0.00%) let Some(sized_trait) = cx.tcx.lang_items().sized_trait() else { 939,560 ( 0.01%) => ???:::lang_items (23,489x) . return; . }; . . let maybe_sized_params: DefIdMap<_> = type_param_bounds(generics) . .filter(|bound| { 140 ( 0.00%) bound.trait_bound.trait_ref.trait_def_id() == Some(sized_trait) 598 ( 0.00%) => ???:::trait_def_id (46x) 2 ( 0.00%) && matches!(bound.trait_bound.modifiers.polarity, BoundPolarity::Maybe(_)) . }) . .map(|bound| (bound.param, bound)) . .collect(); . . for bound in type_param_bounds(generics) { 134 ( 0.00%) if bound.trait_bound.modifiers == TraitBoundModifiers::NONE . && let Some(sized_bound) = maybe_sized_params.get(&bound.param) . && let Some(path) = path_to_sized_bound(cx, bound.trait_bound) . && !is_from_proc_macro(cx, bound.trait_bound) . { . span_lint_and_then( . cx, . NEEDLESS_MAYBE_SIZED, . sized_bound.trait_bound.span, -- line 143 ---------------------------------------- -- line 162 ---------------------------------------- . Applicability::MaybeIncorrect, . ); . }, . ); . . return; . } . } 187,912 ( 0.00%) } . } 23,517 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = expr.kind 6,523 ( 0.00%) && matches!( 13,046 ( 0.00%) op.node, . BinOpKind::And | BinOpKind::BitAnd | BinOpKind::Or | BinOpKind::BitOr . ) 10,092 ( 0.00%) && self.msrv.meets(cx, msrvs::RANGE_CONTAINS) 25,230 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,682x) 6,728 ( 0.00%) && !is_in_const_context(cx) 607,342 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (1,682x) . { 11,774 ( 0.00%) check_possible_range_contains(cx, op.node, l, r, expr, expr.span); 194,416 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains (1,682x) . } . 392,580 ( 0.00%) if let Some(range) = higher::Range::hir(cx, expr) { 2,981,965 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . check_exclusive_range_plus_one(cx, expr, &range); . check_inclusive_range_minus_one(cx, expr, &range); . check_reversed_empty_range(cx, expr, &range); . } 523,440 ( 0.01%) } . } . 15,138 ( 0.00%) fn check_possible_range_contains( . cx: &LateContext<'_>, . op: BinOpKind, . left: &Expr<'_>, . right: &Expr<'_>, . expr: &Expr<'_>, . span: Span, . ) { 16,820 ( 0.00%) let combine_and = match op { . BinOpKind::And | BinOpKind::BitAnd => true, . BinOpKind::Or | BinOpKind::BitOr => false, . _ => return, . }; . // value, name, order (higher/lower), inclusiveness 53,824 ( 0.00%) if let (Some(l), Some(r)) = (check_range_bounds(cx, left), check_range_bounds(cx, right)) { 72,120 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_range_bounds (3,364x) . // 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, . ); . } 3,364 ( 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 3,364 ( 0.00%) if let ExprKind::Binary(ref lhs_op, _left, new_lhs) = left.kind 1,437 ( 0.00%) && op == lhs_op.node . && 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 . src.matches('(').count() == src.matches(')').count() . }) . { . check_possible_range_contains(cx, op, new_lhs, right, expr, new_span); . } 13,456 ( 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 23,548 ( 0.00%) fn check_range_bounds<'a>(cx: &'a LateContext<'_>, ex: &'a Expr<'_>) -> Option> { 6,728 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = ex.kind { 11,568 ( 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() { . if let Some(c) = ConstEvalCtxt::new(cx).eval(r) { -- line 338 ---------------------------------------- -- line 356 ---------------------------------------- . name_span: r.span, . val_span: l.span, . ord: ordering.reverse(), . inc: inclusive, . }); . } . } . None 26,912 ( 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. . fn can_switch_ranges<'tcx>( -- line 372 ---------------------------------------- 87,302 ( 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 { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 130,860 ( 0.00%) let (target, _) = peel_hir_expr_refs(expr); 333,766 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (65,430x) 134,263 ( 0.00%) if let ExprKind::MethodCall(path, receiver, &[], _) = target.kind 65 ( 0.00%) && path.ident.name == sym::to_string . && let ExprKind::Path(QPath::Resolved(None, path)) = receiver.kind . && let Res::Def(DefKind::Const { .. }, receiver_def_id) = path.res . && cx.ty_based_def(target).opt_parent(cx).is_diag_item(cx, sym::ToString) . && cx.tcx.is_diagnostic_item(sym::path_main_separator, receiver_def_id) . && let ty::Ref(_, ty, Mutability::Not) = cx.typeck_results().expr_ty_adjusted(expr).kind() . && ty.is_str() . && self.msrv.meets(cx, msrvs::PATH_MAIN_SEPARATOR_STR) . { -- line 60 ---------------------------------------- -- 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, . ); . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/result.rs -------------------------------------------------------------------------------- Ir -- line 10 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint_and_help, span_lint_and_then}; . use clippy_utils::ty::{AdtVariantInfo, approx_ty_size}; . use clippy_utils::{is_no_std_crate, trait_ref_of_method}; . . use super::{RESULT_LARGE_ERR, RESULT_UNIT_ERR}; . . /// The type of the `Err`-variant in a `std::result::Result` returned by the . /// given `FnDecl` 116,875 ( 0.00%) fn result_err_ty<'tcx>( . cx: &LateContext<'tcx>, . decl: &hir::FnDecl<'tcx>, . id: hir::def_id::LocalDefId, . item_span: Span, . ) -> Option<(&'tcx hir::Ty<'tcx>, Ty<'tcx>)> { 42,500 ( 0.00%) if !item_span.in_external_macro(cx.sess().source_map()) . && let hir::FnRetTy::Return(hir_ty) = decl.output . { . let mut ty = cx . .tcx 44,805 ( 0.00%) .instantiate_bound_regions_with_erased(cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip().output()); 3,611,169 ( 0.05%) => /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:: (8,961x) . . // for async functions, peel through `impl Future` to get `T` 44,805 ( 0.00%) if cx.tcx.ty_is_opaque_future(ty) 161,846 ( 0.00%) => ???:::ty_is_opaque_future (8,961x) . && let Some(future_output_ty) = cx.tcx.get_impl_future_output_ty(ty) . { . ty = future_output_ty; . } . 17,922 ( 0.00%) if let ty::Adt(adt_def, args) = ty.kind() 26,106 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Result, adt_def.did()) 240,229 ( 0.00%) => ???:::is_diagnostic_item (4,351x) . { 41 ( 0.00%) let err_ty = args.type_at(1); . return Some((hir_ty, err_ty)); . } . } . None 95,625 ( 0.00%) } . 126,387 ( 0.00%) pub(super) fn check_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::Item<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { 28,086 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind . && let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) . { . if cx.effective_visibilities.is_exported(item.owner_id.def_id) { . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . check_result_unit_err(cx, err_ty, fn_header_span, msrv); . } . check_result_large_err(cx, err_ty, hir_ty.span, large_err_threshold, large_err_ignored, false); . } 112,344 ( 0.00%) } . 107,937 ( 0.00%) pub(super) fn check_impl_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::ImplItem<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { . // Don't lint if method is a trait's implementation, we can't do anything about those 23,986 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, _) = item.kind 127,488 ( 0.00%) && let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) 6,254,187 ( 0.08%) => site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::result_err_ty (10,624x) 164 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 6,387 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (41x) . { . if cx.effective_visibilities.is_exported(item.owner_id.def_id) { . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . check_result_unit_err(cx, err_ty, fn_header_span, msrv); . } . check_result_large_err(cx, err_ty, hir_ty.span, large_err_threshold, large_err_ignored, false); . } 95,944 ( 0.00%) } . 40 ( 0.00%) pub(super) fn check_trait_item<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::TraitItem<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . msrv: Msrv, . ) { 8 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, _) = item.kind { 2 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); 11 ( 0.00%) if let Some((hir_ty, err_ty)) = result_err_ty(cx, sig.decl, item.owner_id.def_id, item.span) { 261 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::result_err_ty (1x) . if cx.effective_visibilities.is_exported(item.owner_id.def_id) { . check_result_unit_err(cx, err_ty, fn_header_span, msrv); . } . check_result_large_err(cx, err_ty, hir_ty.span, large_err_threshold, large_err_ignored, false); . } . } 32 ( 0.00%) } . . fn check_result_unit_err(cx: &LateContext<'_>, err_ty: Ty<'_>, fn_header_span: Span, msrv: Msrv) { . if err_ty.is_unit() && (!is_no_std_crate(cx) || msrv.meets(cx, msrvs::ERROR_IN_CORE)) { . span_lint_and_help( . cx, . RESULT_UNIT_ERR, . fn_header_span, . "this returns a `Result<_, ()>`", -- line 110 ---------------------------------------- -- line 178 ---------------------------------------- . diag.span_label(hir_ty_span, format!("the `Err`-variant is at least {ty_size} bytes")); . diag.help(format!("try reducing the size of `{err_ty}`, for example by boxing large elements or replacing it with `Box<{err_ty}>`")); . }, . ); . } . } . } . 458,010 ( 0.01%) pub(super) fn check_expr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx hir::Expr<'tcx>, . large_err_threshold: u64, . large_err_ignored: &DefIdSet, . ) { 130,860 ( 0.00%) if let hir::ExprKind::Closure(closure) = expr.kind 3 ( 0.00%) && let ty::Closure(_, args) = cx.typeck_results().expr_ty(expr).kind() 40 ( 0.00%) => ???:::expr_ty (1x) 1 ( 0.00%) && let closure_sig = args.as_closure().sig() . && let Ok(err_binder) = closure_sig.output().try_map_bound(|output_ty| { 2 ( 0.00%) if let ty::Adt(adt, args) = output_ty.kind() 3 ( 0.00%) && let [_, err_arg] = args.as_slice() . && let Some(err_ty) = err_arg.as_type() . && adt.is_diag_item(cx, sym::Result) . { . return Ok(err_ty); . } . . Err(()) . }) -- line 205 ---------------------------------------- -- line 206 ---------------------------------------- . { . let err_ty = cx.tcx.instantiate_bound_regions_with_erased(err_binder); . let hir_ty_span = match closure.fn_decl.output { . hir::FnRetTy::Return(hir_ty) => hir_ty.span, . hir::FnRetTy::DefaultReturn(_) => expr.span, . }; . check_result_large_err(cx, err_ty, hir_ty_span, large_err_threshold, large_err_ignored, true); . } 523,440 ( 0.01%) } 21,374 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . use clippy_utils::visitors::for_each_expr_without_closures; . use clippy_utils::{is_entrypoint_fn, return_ty, trait_ref_of_method}; . use rustc_span::Symbol; . . use core::ops::ControlFlow; . . use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT}; . 126,387 ( 0.00%) pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 88,032 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 946,062 ( 0.01%) => ???:::hir_attrs (14,043x) 150,017 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 970,374 ( 0.01%) => ???:>::get_attrs (14,043x) 42,129 ( 0.00%) if let hir::ItemKind::Fn { . ref sig, . body: ref body_id, . ident, . .. . } = item.kind . { . let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); . let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); -- line 34 ---------------------------------------- -- line 51 ---------------------------------------- . cx.tcx.hir_body(*body_id), . item.span, . ident.span, . item.owner_id, . "this function could have a `#[must_use]` attribute", . ); . } . } 112,344 ( 0.00%) } . . pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 35,979 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, ref body_id) = item.kind { 42,496 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 605,568 ( 0.01%) => ???:::is_exported (10,624x) 21,248 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); 95,616 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 723,679 ( 0.01%) => ???:::hir_attrs (10,624x) 77,406 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 744,886 ( 0.01%) => ???:>::get_attrs (10,624x) . if let Some((attr_span, reason)) = attr { . check_needless_must_use( . cx, . sig.decl, . item.owner_id, . item.span, . fn_header_span, . *attr_span, . *reason, . attrs, . sig, . ); 95,600 ( 0.00%) } else if is_public && !is_proc_macro(attrs) && trait_ref_of_method(cx, item.owner_id).is_none() { 1,661,359 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (10,620x) 88,517 ( 0.00%) check_must_use_candidate( 77,128,862 ( 0.97%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate (6,809x) . cx, . sig.decl, 27,236 ( 0.00%) cx.tcx.hir_body(*body_id), 485,970 ( 0.01%) => ???:::hir_body (6,809x) . item.span, 13,618 ( 0.00%) item.ident.span, . item.owner_id, . "this method could have a `#[must_use]` attribute", . ); . } . } 11,993 ( 0.00%) } . . pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 12 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, ref eid) = item.kind { 4 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 57 ( 0.00%) => ???:::is_exported (1x) 2 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . 9 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 62 ( 0.00%) => ???:::hir_attrs (1x) 6 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 64 ( 0.00%) => ???:>::get_attrs (1x) . if let Some((attr_span, reason)) = attr { . check_needless_must_use( . cx, . sig.decl, . item.owner_id, . item.span, . fn_header_span, . *attr_span, . *reason, . attrs, . sig, . ); 4 ( 0.00%) } else if let hir::TraitFn::Provided(eid) = *eid { . let body = cx.tcx.hir_body(eid); . if attr.is_none() && is_public && !is_proc_macro(attrs) { . check_must_use_candidate( . cx, . sig.decl, . body, . item.span, . item.ident.span, . item.owner_id, . "this method could have a `#[must_use]` attribute", . ); . } . } . } 4 ( 0.00%) } . . // FIXME: needs to be an EARLY LINT. all attribute lints should be . #[expect(clippy::too_many_arguments)] . fn check_needless_must_use( . cx: &LateContext<'_>, . decl: &hir::FnDecl<'_>, . item_id: hir::OwnerId, . item_span: Span, -- line 135 ---------------------------------------- -- line 199 ---------------------------------------- . diag.span_help(attr_span, "remove `must_use`"); . } . diag.note("alternatively, you may add an explicit reason to the `must_use` attribute"); . }, . ); . } . } . 95,326 ( 0.00%) fn check_must_use_candidate<'tcx>( . cx: &LateContext<'tcx>, . decl: &'tcx hir::FnDecl<'_>, . body: &'tcx hir::Body<'_>, . item_span: Span, . ident_span: Span, . item_id: hir::OwnerId, . msg: &'static str, . ) { 20,427 ( 0.00%) if has_mutable_arg(cx, body) 14,577 ( 0.00%) || mutates_static(cx, body) 19,432 ( 0.00%) || item_span.in_external_macro(cx.sess().source_map()) . || returns_unit(decl) 24,290 ( 0.00%) || !cx.effective_visibilities.is_exported(item_id.def_id) 276,906 ( 0.00%) => ???:::is_exported (4,858x) 38,864 ( 0.00%) || opt_must_use_path(cx, return_ty(cx, item_id)).is_some() 4,576,712 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::opt_must_use_path (4,858x) 544,922 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (4,858x) . || item_span.from_expansion() 29,058 ( 0.00%) || is_entrypoint_fn(cx, item_id.def_id.to_def_id()) 309,952 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn (4,843x) . { . return; . } 53,273 ( 0.00%) span_lint_and_then(cx, MUST_USE_CANDIDATE, ident_span, msg, |diag| { 6,042,804 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (4,843x) . let indent = snippet_indent(cx, item_span).unwrap_or_default(); . diag.span_suggestion( . item_span.shrink_to_lo(), . "add the attribute", . format!("#[must_use]\n{indent}"), . Applicability::MachineApplicable, . ); . }); 54,472 ( 0.00%) } . . fn returns_unit(decl: &hir::FnDecl<'_>) -> bool { . match decl.output { . hir::FnRetTy::DefaultReturn(_) => true, 24,290 ( 0.00%) hir::FnRetTy::Return(ty) => match ty.kind { . hir::TyKind::Tup(tys) => tys.is_empty(), . hir::TyKind::Never => true, . _ => false, . }, . } . } . . fn has_mutable_arg(cx: &LateContext<'_>, body: &hir::Body<'_>) -> bool { . let mut tys = DefIdSet::default(); . body.params.iter().any(|param| is_mutable_pat(cx, param.pat, &mut tys)) . } . . fn is_mutable_pat(cx: &LateContext<'_>, pat: &hir::Pat<'_>, tys: &mut DefIdSet) -> bool { 13,568 ( 0.00%) if let hir::PatKind::Wild = pat.kind { . return false; // ignore `_` patterns . } 40,704 ( 0.00%) if cx.tcx.has_typeck_results(pat.hir_id.owner.def_id) { 1,676,280 ( 0.02%) => ???:::has_typeck_results (6,784x) 61,056 ( 0.00%) is_mutable_ty(cx, cx.tcx.typeck(pat.hir_id.owner.def_id).pat_ty(pat), tys) 49,784,141 ( 0.62%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (6,784x) 1,012,552 ( 0.01%) => /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:: (6,784x) 271,360 ( 0.00%) => ???:::pat_ty (6,784x) . } else { . false . } . } . 112,640 ( 0.00%) fn is_mutable_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, tys: &mut DefIdSet) -> bool { 89,294 ( 0.00%) match *ty.kind() { . // primitive types are never mutable . ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => false, 15,232 ( 0.00%) ty::Adt(adt, args) => { 76,160 ( 0.00%) tys.insert(adt.did()) && !ty.is_freeze(cx.tcx, cx.typing_env()) 54,163,646 ( 0.68%) => ???:::is_freeze (7,616x) 159,936 ( 0.00%) => ???:::typing_env (7,616x) 37,865 ( 0.00%) || matches!(cx.tcx.get_diagnostic_name(adt.did()), Some(sym::Rc | sym::Arc)) 401,369 ( 0.01%) => ???:::get_diagnostic_name (7,573x) . && args.types().any(|ty| is_mutable_ty(cx, ty, tys)) . }, . ty::Tuple(args) => args.iter().any(|ty| is_mutable_ty(cx, ty, tys)), . ty::Array(ty, _) | ty::Slice(ty) => is_mutable_ty(cx, ty, tys), 20,176 ( 0.00%) ty::RawPtr(ty, mutbl) | ty::Ref(_, ty, mutbl) => mutbl == hir::Mutability::Mut || is_mutable_ty(cx, ty, tys), . // calling something constitutes a side effect, so return true on all callables . // also never calls need not be used, so return true for them, too . _ => true, . } 90,112 ( 0.00%) } . . fn is_mutated_static(e: &hir::Expr<'_>) -> bool { . use hir::ExprKind::{Field, Index, Path}; . 134 ( 0.00%) match e.kind { 16 ( 0.00%) Path(QPath::Resolved(_, path)) => !matches!(path.res, Res::Local(_)), . Path(_) => true, . Field(inner, _) | Index(inner, _, _) => is_mutated_static(inner), . _ => false, . } . } . . fn mutates_static<'tcx>(cx: &LateContext<'tcx>, body: &'tcx hir::Body<'_>) -> bool { . for_each_expr_without_closures(body.value, |e| { . use hir::ExprKind::{AddrOf, Assign, AssignOp, Call, MethodCall}; . 233,828 ( 0.00%) match e.kind { 5,700 ( 0.00%) Call(_, args) => { . let mut tys = DefIdSet::default(); . for arg in args { 9,500 ( 0.00%) if cx.tcx.has_typeck_results(arg.hir_id.owner.def_id) 468,880 ( 0.01%) => ???:::has_typeck_results (1,900x) 22,800 ( 0.00%) && is_mutable_ty(cx, cx.tcx.typeck(arg.hir_id.owner.def_id).expr_ty(arg), &mut tys) 809,664 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (1,900x) 283,228 ( 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:: (1,900x) 76,000 ( 0.00%) => ???:::expr_ty (1,900x) . && is_mutated_static(arg) . { . return ControlFlow::Break(()); . } . tys.clear(); . } . ControlFlow::Continue(()) . }, 5,164 ( 0.00%) MethodCall(_, receiver, args, _) => { . let mut tys = DefIdSet::default(); . for arg in std::iter::once(receiver).chain(args.iter()) { 12,900 ( 0.00%) if cx.tcx.has_typeck_results(arg.hir_id.owner.def_id) 638,640 ( 0.01%) => ???:::has_typeck_results (2,580x) 33,540 ( 0.00%) && is_mutable_ty(cx, cx.tcx.typeck(arg.hir_id.owner.def_id).expr_ty(arg), &mut tys) 6,105,948 ( 0.08%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (2,580x) 385,764 ( 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:: (2,580x) 103,200 ( 0.00%) => ???:::expr_ty (2,580x) . && is_mutated_static(arg) . { . return ControlFlow::Break(()); . } . tys.clear(); . } . ControlFlow::Continue(()) 1,291 ( 0.00%) }, . Assign(target, ..) | AssignOp(_, target, _) | AddrOf(_, hir::Mutability::Mut, target) 31 ( 0.00%) if is_mutated_static(target) => . { . ControlFlow::Break(()) . }, . _ => ControlFlow::Continue(()), . } . }) . .is_some() . } -- line 334 ---------------------------------------- 384,421 ( 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 { 357,429 ( 0.00%) 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 { 277 ( 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 { 301,770 ( 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] 54,504 ( 0.00%) fn next(&mut self) -> Option { . self.iter.find(&mut self.predicate) 54,504 ( 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 { 984 ( 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, . { 2 ( 0.00%) self.iter.try_fold(init, filter_try_fold(&mut self.predicate, fold)) 284 ( 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>> (1x) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 44,859 ( 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 ---------------------------------------- 180,195 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/consts.rs -------------------------------------------------------------------------------- Ir -- line 120 ---------------------------------------- . IntTy::I64 => 64, . IntTy::I128 => 128, . IntTy::Isize => isize::BITS.into(), . } . } . } . . impl PartialEq for Constant { 20,196 ( 0.00%) fn eq(&self, other: &Self) -> bool { 25,245 ( 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, 6,732 ( 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() . }, . (&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, . } 10,098 ( 0.00%) } . } . . impl Hash for Constant { . fn hash(&self, state: &mut H) . where . H: Hasher, . { . std::mem::discriminant(self).hash(state); -- line 157 ---------------------------------------- -- 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. 1,190 ( 0.00%) pub fn int_value(&self, tcx: TyCtxt<'_>, val_type: Ty<'_>) -> Option { 2,380 ( 0.00%) if let Constant::Int(const_int) = *self { 2,975 ( 0.00%) match *val_type.kind() { . ty::Int(ity) => Some(FullInt::S(sext(tcx, const_int, ity))), 2,380 ( 0.00%) ty::Uint(_) => Some(FullInt::U(const_int)), . _ => None, . } . } else { . None . } 1,785 ( 0.00%) } . . #[must_use] 24,664 ( 0.00%) pub fn peel_refs(mut self) -> Self { 9,249 ( 0.00%) while let Constant::Ref(r) = self { . self = *r; . } 12,332 ( 0.00%) self 21,581 ( 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 410 ---------------------------------------- . Constant::F32(x) => x == f32::NEG_INFINITY, . Constant::F64(x) => x == f64::NEG_INFINITY, . _ => false, . } . } . } . . /// Parses a `LitKind` to a `Constant`. 101,976 ( 0.00%) pub fn lit_to_mir_constant(lit: &LitKind, ty: Option>) -> Constant { 72,840 ( 0.00%) match *lit { . LitKind::Str(ref is, _) => Constant::Str(is.to_string()), . LitKind::Byte(b) => Constant::Int(u128::from(b)), . LitKind::ByteStr(ref s, _) | LitKind::CStr(ref s, _) => Constant::Binary(s.as_byte_str().to_vec()), . LitKind::Char(c) => Constant::Char(c), 29,134 ( 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!(), . }, 5 ( 0.00%) LitKind::Bool(b) => Constant::Bool(b), . LitKind::Err(_) => Constant::Err, . } 116,544 ( 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 1,190 ( 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)) . } . 20,520 ( 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(), . } 1,090 ( 0.00%) } . } . . /// Evaluates an expression if it's a builtin integer type. . pub fn eval_int(cx: &LateContext<'_>, e: &Expr<'_>) -> Option { . match e.kind { . 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 -- line 505 ---------------------------------------- -- 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()`). 80,124 ( 0.00%) pub fn new(cx: &LateContext<'tcx>) -> Self { 113,522 ( 0.00%) Self { 28,938 ( 0.00%) tcx: cx.tcx, 14,469 ( 0.00%) typing_env: cx.typing_env(), 33,450 ( 0.00%) => ???:::typing_env (1,115x) . typeck: cx.typeck_results(), . source: Cell::new(ConstantSource::Local), . ctxt: Cell::new(SyntaxContext::root()), . } 80,124 ( 0.00%) } . . /// Creates an evaluation context. . pub fn with_env(tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>, typeck: &'tcx TypeckResults<'tcx>) -> Self { 57,652 ( 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); 25,086 ( 0.00%) self.expr(e).map(|c| (c, self.source.get())) 1,188,449 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr (6,758x) . } . . /// Attempts to evaluate the expression. . pub fn eval(&self, e: &Expr<'_>) -> Option { 6,860 ( 0.00%) self.expr(e) 1,068,820 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr (6,860x) . } . . /// 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. 40,240 ( 0.00%) pub fn eval_local(&self, e: &Expr<'_>, ctxt: SyntaxContext) -> Option { 54,870 ( 0.00%) match self.eval_with_source(e, ctxt) { 39,844 ( 0.00%) Some((x, ConstantSource::Local)) => Some(x), 6,981 ( 0.00%) _ => None, 7,416 ( 0.00%) } 40,240 ( 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. . pub fn eval_full_int(&self, e: &Expr<'_>, ctxt: SyntaxContext) -> Option { . match self.eval_with_source(e, ctxt) { . Some((x, ConstantSource::Local)) => x.int_value(self.tcx, self.typeck.expr_ty(e)), . _ => None, . } . } . 4,760 ( 0.00%) pub fn eval_pat_expr(&self, pat_expr: &PatExpr<'_>) -> Option { 1,190 ( 0.00%) match &pat_expr.kind { . PatExprKind::Lit { lit, negated } => { 4,165 ( 0.00%) let ty = self.typeck.node_type_opt(pat_expr.hir_id); 22,015 ( 0.00%) => ???:::node_type_opt (595x) 2,380 ( 0.00%) let val = lit_to_mir_constant(&lit.node, ty); 14,875 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::lit_to_mir_constant (595x) 1,190 ( 0.00%) if *negated { . self.constant_negate(&val, ty?) . } else { 2,380 ( 0.00%) Some(val) . } 595 ( 0.00%) }, . PatExprKind::Path(qpath) => self.qpath(qpath, pat_expr.hir_id), . } 5,355 ( 0.00%) } . . fn check_ctxt(&self, ctxt: SyntaxContext) { 56,649 ( 0.00%) if self.ctxt.get() != ctxt { . self.source.set(ConstantSource::NonLocal); . } . } . 4,350 ( 0.00%) fn qpath(&self, qpath: &QPath<'_>, hir_id: HirId) -> Option { . self.fetch_path(qpath, hir_id) . .and_then(|c| mir_to_const(self.tcx, c, self.typeck.node_type(hir_id))) 3,480 ( 0.00%) } . . /// Simple constant folding: Insert an expression, get a constant or none. 463,904 ( 0.01%) fn expr(&self, e: &Expr<'_>) -> Option { 33,136 ( 0.00%) self.check_ctxt(e.span.ctxt()); 198,816 ( 0.00%) match e.kind { . ExprKind::ConstBlock(ConstBlock { body, .. }) => self.expr(self.tcx.hir_body(body).value), . ExprKind::DropTemps(e) => self.expr(e), 3,045 ( 0.00%) ExprKind::Path(ref qpath) => self.qpath(qpath, e.hir_id), 77,384 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::qpath (219x) 143 ( 0.00%) ExprKind::Block(block, _) => { 143 ( 0.00%) self.check_ctxt(block.span.ctxt()); . self.block(block) . }, 55,892 ( 0.00%) ExprKind::Lit(lit) => { 13,973 ( 0.00%) self.check_ctxt(lit.span.ctxt()); 97,811 ( 0.00%) Some(lit_to_mir_constant(&lit.node, self.typeck.expr_ty_opt(e))) 542,217 ( 0.01%) => ???:::expr_ty_opt (13,903x) 347,576 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::lit_to_mir_constant (13,903x) . }, . ExprKind::Array(vec) => self.multi(vec).map(Constant::Vec), . 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)) . }, 180 ( 0.00%) ExprKind::Unary(op, operand) => self.expr(operand).and_then(|o| match op { 74,496 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (45x) . UnOp::Not => self.constant_not(&o, self.typeck.expr_ty(e)), . UnOp::Neg => self.constant_negate(&o, self.typeck.expr_ty(e)), . UnOp::Deref => Some(if let Constant::Ref(r) = o { *r } else { o }), . }), . ExprKind::If(cond, then, ref otherwise) => self.ifthenelse(cond, then, *otherwise), 28,191 ( 0.00%) ExprKind::Binary(op, left, right) => { . self.check_ctxt(e.span.ctxt()); . self.binop(op.node, left, right) . }, 248 ( 0.00%) ExprKind::Call(callee, []) => { . // We only handle a few const functions for now. 8 ( 0.00%) if let ExprKind::Path(qpath) = &callee.kind 12 ( 0.00%) && let Some(did) = self.typeck.qpath_res(qpath, callee.hir_id).opt_def_id() 67 ( 0.00%) => ???:::qpath_res (1x) . { 10 ( 0.00%) match self.tcx.get_diagnostic_name(did) { 53 ( 0.00%) => ???:::get_diagnostic_name (1x) . 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 . } . }, . ExprKind::Index(arr, index, _) => self.index(arr, index), . ExprKind::AddrOf(_, _, inner) => self.expr(inner).map(|r| Constant::Ref(Box::new(r))), . ExprKind::Field(base, ref field) 48,504 ( 0.00%) if let base_ty = self.typeck.expr_ty(base) 42,000 ( 0.00%) => ???:::expr_ty (1,050x) 40,366 ( 0.00%) && match self.typeck.expr_adjustments(base) { 44,772 ( 0.00%) => ???:::expr_adjustments (1,050x) 16,168 ( 0.00%) [] => true, . [.., a] => a.target == base_ty, . } 270 ( 0.00%) && let Some(Constant::Adt(constant)) = self.expr(base) 7,452 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (54x) . && 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, . } 294,264 ( 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. . pub fn eval_is_empty(&self, e: &Expr<'_>) -> Option { . 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), -- line 699 ---------------------------------------- -- line 769 ---------------------------------------- . . /// 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. 1,602 ( 0.00%) let did = match *qpath { . QPath::Resolved(None, path) 1,098 ( 0.00%) if path.span.ctxt() == self.ctxt.get() 366 ( 0.00%) && path.segments.iter().all(|s| self.ctxt.get() == s.ident.span.ctxt()) 1,168 ( 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) 483 ( 0.00%) if let TyKind::Path(QPath::Resolved(None, ty_path)) = ty.kind 276 ( 0.00%) && let [.., ty_name] = ty_path.segments . && (matches!( 207 ( 0.00%) ty_name.ident.name, 507 ( 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)) 84 ( 0.00%) && const_name.ident.span.ctxt() == self.ctxt.get() 56 ( 0.00%) && ty.span.ctxt() == self.ctxt.get() . && ty_name.ident.span.ctxt() == self.ctxt.get() . && matches!(ty_path.res, Res::PrimTy(_)) . && let Some((DefKind::AssocConst { .. }, did)) = self.typeck.type_dependent_def(id) . && 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. 2,385 ( 0.00%) _ if let Res::Def( . DefKind::Const { is_type_const: false } | DefKind::AssocConst { is_type_const: false }, 80 ( 0.00%) did, 4,045 ( 0.00%) ) = self.typeck.qpath_res(qpath, id) => 10,113 ( 0.00%) => ???:::qpath_res (435x) . { . self.source.set(ConstantSource::NonLocal); . did . }, . _ => return None, . }; . 240 ( 0.00%) let args = self.typeck.node_args(id); 1,560 ( 0.00%) => ???:::node_args (40x) . 80 ( 0.00%) if !args.is_empty() { 80 ( 0.00%) let owner_def_id = self.typeck.hir_owner.def_id.to_def_id(); 120 ( 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. 80 ( 0.00%) if self . .tcx 120 ( 0.00%) .instantiate_and_check_impossible_clauses((owner_def_id, identity_args)) . { . return None; . } . } . 40 ( 0.00%) self.tcx 320 ( 0.00%) .const_eval_resolve(self.typing_env, mir::UnevaluatedConst::new(did, args), qpath.span()) 50,841 ( 0.00%) => ???:::const_eval_resolve (40x) 12,360 ( 0.00%) => ???:::span (40x) . .ok() . } . . fn index(&self, lhs: &'_ Expr<'_>, index: &'_ Expr<'_>) -> Option { . let lhs = self.expr(lhs); . let index = self.expr(index); . . match (lhs, index) { -- line 911 ---------------------------------------- -- line 930 ---------------------------------------- . } . }, . _ => None, . } . } . . /// A block can only yield a constant if it has exactly one constant expression. . fn block(&self, block: &Block<'_>) -> Option { 143 ( 0.00%) if block.stmts.is_empty() 429 ( 0.00%) && let Some(expr) = block.expr . { . // Try to detect any `cfg`ed statements or empty macro expansions. 429 ( 0.00%) let span = block.span.data(); 7,462 ( 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 (73x) 143 ( 0.00%) if span.ctxt == SyntaxContext::root() { 7 ( 0.00%) if let Some(expr_span) = walk_span_to_context(expr.span, span.ctxt) 86 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (1x) . && let expr_lo = expr_span.lo() 1 ( 0.00%) && expr_lo >= span.lo 8 ( 0.00%) && let Some(src) = (span.lo..expr_lo).get_source_range(self.tcx) 3 ( 0.00%) && let Some(src) = src.as_str() 28 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::as_str (1x) . { . use rustc_lexer::TokenKind::{BlockComment, LineComment, OpenBrace, Semi, Whitespace}; 3 ( 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); . } . } . 572 ( 0.00%) self.expr(expr) 10,986 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (73x) . } else { . None . } . } . . fn ifthenelse(&self, cond: &Expr<'_>, then: &Expr<'_>, otherwise: Option<&Expr<'_>>) -> Option { . if let Some(Constant::Bool(b)) = self.expr(cond) { . if b { -- line 972 ---------------------------------------- -- line 976 ---------------------------------------- . } . } else { . None . } . } . . #[expect(clippy::too_many_lines)] . fn binop(&self, op: BinOpKind, left: &Expr<'_>, right: &Expr<'_>) -> Option { 46,985 ( 0.00%) let l = self.expr(left)?; 1,175,587 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (7,187x) 210 ( 0.00%) let r = self.expr(right); 11,305 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:::expr'2 (35x) 1,470 ( 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, . }, 910 ( 0.00%) (l, r) => match (op, l, r) { . (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)), 70 ( 0.00%) _ => None, 210 ( 0.00%) }, 875 ( 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:: (35x) . } . } . } . 13,266 ( 0.00%) pub fn mir_to_const<'tcx>(tcx: TyCtxt<'tcx>, val: ConstValue, ty: Ty<'tcx>) -> Option { 11,792 ( 0.00%) match (val, ty.kind()) { . (_, &ty::Adt(adt_def, _)) if adt_def.is_struct() => Some(Constant::Adt(val)), 7,370 ( 0.00%) (ConstValue::Scalar(Scalar::Int(int)), _) => match ty.kind() { . ty::Bool => Some(Constant::Bool(int == ScalarInt::TRUE)), 5,896 ( 0.00%) 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, . }, . (_, ty::Ref(_, inner_ty, _)) if matches!(inner_ty.kind(), ty::Str) => { -- line 1116 ---------------------------------------- -- 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, . } 13,266 ( 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 ---------------------------------------- -- line 1160 ---------------------------------------- . } . . /// If `expr` evaluates to an integer constant, return its value. . /// . /// 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. 11,150 ( 0.00%) pub fn integer_const(cx: &LateContext<'_>, expr: &Expr<'_>, ctxt: SyntaxContext) -> Option { 7,805 ( 0.00%) if let Some(Constant::Int(value)) = ConstEvalCtxt::new(cx).eval_local(expr, ctxt) { 3,345 ( 0.00%) Some(value) . } else { . None . } 8,920 ( 0.00%) } . . /// Check if `expr` evaluates to an integer constant of 0. . /// . /// 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. . #[inline] . pub fn is_zero_integer_const(cx: &LateContext<'_>, expr: &Expr<'_>, ctxt: SyntaxContext) -> bool { 3,345 ( 0.00%) integer_const(cx, expr, ctxt) == Some(0) 288,785 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::integer_const (1,115x) . } . . pub fn const_item_rhs_to_expr<'tcx>(tcx: TyCtxt<'tcx>, ct_rhs: ConstItemRhs<'tcx>) -> Option<&'tcx Expr<'tcx>> { . match ct_rhs { . ConstItemRhs::Body(body_id) => Some(tcx.hir_body(body_id).value), . ConstItemRhs::TypeConst(const_arg) => match const_arg.kind { . ConstArgKind::Anon(anon) => Some(tcx.hir_body(anon.body).value), . ConstArgKind::Struct(..) -- line 1192 ---------------------------------------- 326,906 ( 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/slice.rs -------------------------------------------------------------------------------- Ir -- line 424 ---------------------------------------- . } . let mut vec = Vec::with_capacity_in(s.len(), alloc); . let mut guard = DropGuard { vec: &mut vec, num_init: 0 }; . let slots = guard.vec.spare_capacity_mut(); . // .take(slots.len()) is necessary for LLVM to remove bounds checks . // and has better codegen than zip. . for (i, b) in s.iter().enumerate().take(slots.len()) { . guard.num_init = i; 106 ( 0.00%) slots[i].write(b.clone()); 3,899 ( 0.00%) => ???:::clone (53x) . } . core::mem::forget(guard); . // SAFETY: . // the vec was allocated and initialized above to at least this length. . unsafe { . vec.set_len(s.len()); . } 93,330 ( 0.00%) vec . } . } . . impl ConvertVec for T { . #[inline] . fn to_vec(s: &[Self], alloc: A) -> Vec { . let len = s.len(); . let mut v = Vec::with_capacity_in(len, alloc); . // SAFETY: . // allocated above with the capacity of `s`, and initialize to `s.len()` in . // ptr::copy_to_non_overlapping below. 50,946 ( 0.00%) if len > 0 { . unsafe { . s.as_ptr().copy_to_nonoverlapping(v.as_mut_ptr(), len); . v.set_len(len); . } . } . v . } . } -- line 460 ---------------------------------------- 10,098 ( 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 { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 35,926 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 12,562 ( 0.00%) items, . .. 15,680 ( 0.00%) }) = item.kind . { 12,562 ( 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`", . ); . } . } . } 112,344 ( 0.00%) } . } 6,281 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . diag.span_suggestion(e.span, "try", suggestion, applicability); . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessParensOnRangeLiterals { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 327,150 ( 0.00%) if let Some(higher::Range { start, end, .. }) = higher::Range::hir(cx, expr) { 2,981,965 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . if let Some(start) = start { . check_for_parens(cx, start, true); . } . if let Some(end) = end { . check_for_parens(cx, end, false); . } . } . } -- line 87 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /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,482 ( 0.00%) #[derive(Clone, Copy, Eq, PartialEq, Hash)] . #[rustc_pass_by_value] . pub struct Span { . lo_or_index: u32, . len_with_tag_or_marker: u16, . ctxt_or_parent_or_marker: u16, . } . . // Convenience structures for all span formats. -- line 88 ---------------------------------------- -- line 109 ---------------------------------------- . #[derive(Clone, Copy)] . struct Interned { . index: u32, . } . . impl InlineCtxt { . #[inline] . fn data(self) -> SpanData { 48,746 ( 0.00%) let len = self.len as u32; . debug_assert!(len <= MAX_LEN); 48,802 ( 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 { 80,008 ( 0.00%) let len = (self.len_with_tag & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 241,599 ( 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) = 8,947 ( 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 { 14,844 ( 0.00%) SpanData { . ctxt: SyntaxContext::from_u16(self.ctxt), 7,896 ( 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, . ) => { 8,942,614 ( 0.11%) if $span.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { 13,837,359 ( 0.17%) 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,841,040 ( 0.02%) } 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] 18 ( 0.00%) pub fn new( . mut lo: BytePos, . mut hi: BytePos, . ctxt: SyntaxContext, . parent: Option, . ) -> Self { 26,555 ( 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). 3 ( 0.00%) let (len, ctxt32) = (hi.0 - lo.0, ctxt.as_u32()); 100,167 ( 0.00%) if len <= MAX_LEN && ctxt32 <= MAX_CTXT { 63,731 ( 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(); 116,973 ( 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| { 19,360 ( 0.00%) with_span_interner(|interner| interner.intern(&SpanData { lo, hi, ctxt, parent })) 180,660 ( 0.00%) => ???:::intern (1,936x) . }; . if ctxt32 <= MAX_CTXT { . // Interned ctxt should never be read, so it can use any value. 3,872 ( 0.00%) PartiallyInterned::span(index(SyntaxContext::from_u32(u32::MAX)), ctxt32 as u16) . } else { . Interned::span(index(ctxt)) . } 162,875 ( 0.00%) } . . #[inline] 1,141 ( 0.00%) pub fn data(self) -> SpanData { . let data = self.data_untracked(); 85,701 ( 0.00%) if let Some(parent) = data.parent { 95,475 ( 0.00%) (*SPAN_TRACK)(parent); 3,402 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (162x) . } . data 4 ( 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] . pub fn data_untracked(self) -> SpanData { . match_span_kind! { . self, . InlineCtxt(span) => span.data(), . InlineParent(span) => span.data(), 7,896 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . } . } . . /// Returns `true` if this span comes from any kind of macro, desugaring or inlining. . #[inline] . pub fn from_expansion(self) -> bool { . let ctxt = match_span_kind! { -- line 309 ---------------------------------------- -- 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(); 31,000 ( 0.00%) return if new_ctxt32 <= MAX_CTXT { . // Any small new context including zero will preserve the format. 15,500 ( 0.00%) InlineCtxt::span(span.lo, span.len, new_ctxt32 as u16) . } else { . span.data().with_ctxt(new_ctxt) . }; . }, . InlineParent(span) => span.data(), . PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . }; . . data.with_ctxt(map(data.ctxt)) 46,500 ( 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 377 ---------------------------------------- . } . } . . /// This function is used as a fast path when decoding the full `SpanData` is not necessary. . /// It's a cut-down version of `data_untracked`. . #[cfg_attr(not(test), rustc_diagnostic_item = "SpanCtxt")] . #[inline] . pub fn ctxt(self) -> SyntaxContext { 2,760 ( 0.00%) self.inline_ctxt() . .unwrap_or_else(|index| with_span_interner(|interner| interner.spans[index].ctxt)) . } . . #[inline] . pub fn eq_ctxt(self, other: Span) -> bool { 37,996 ( 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 . }), -- line 399 ---------------------------------------- -- 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 { 15,488 ( 0.00%) crate::with_session_globals(|session_globals| f(&mut session_globals.span_interner.lock())) . } 5,448,737 ( 0.07%) -------------------------------------------------------------------------------- -- 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. 118,458 ( 0.00%) match self.mode { . Mode::NoSync => { . let cell = unsafe { &self.lock.mode_union.no_sync }; . debug_assert!(cell.get()); . cell.set(false); . } . // SAFETY (unlock): We know that the lock is locked as this type is a proof of that. . Mode::Sync => unsafe { self.lock.mode_union.sync.unlock() }, . } -- line 64 ---------------------------------------- -- line 143 ---------------------------------------- . #[cold] . fn lock_held() -> ! { . panic!("lock was already held") . } . . // SAFETY: This is safe since the union fields are used in accordance with `mode` . // which also must match `self.mode` due to the safety precondition. . unsafe { 212,064 ( 0.00%) match mode { . Mode::NoSync => { 221,920 ( 0.00%) if self.mode_union.no_sync.replace(LOCKED) == LOCKED { . hint::cold_path(); . lock_held() . } . } . Mode::Sync => self.mode_union.sync.lock(), . } . } . LockGuard { lock: self, marker: PhantomData, mode } . } . . #[inline(always)] . #[track_caller] . pub fn lock(&self) -> LockGuard<'_, T> { 106,032 ( 0.00%) unsafe { self.lock_assume(self.mode) } . } . } . . unsafe impl DynSend for Lock {} . unsafe impl DynSync for Lock {} . . impl Lock { . #[inline(always)] -- line 175 ---------------------------------------- 110,578 ( 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let Some(higher::If { cond, then, .. }) = higher::If::hir(expr) 2 ( 0.00%) && let ExprKind::MethodCall(_, target_arg, [pattern], _) = cond.kind . && let ExprKind::Path(target_path) = &target_arg.kind . && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(cond.hir_id) . { . let strip_kind = match cx.tcx.get_diagnostic_name(method_def_id) { . Some(sym::str_starts_with) => StripKind::Prefix, . Some(sym::str_ends_with) => StripKind::Suffix, . _ => return, . }; -- line 81 ---------------------------------------- -- line 144 ---------------------------------------- . ) . .collect(), . app, . ); . }, . ); . } . } 523,440 ( 0.01%) } . } . . // Returns `Some(arg)` if `expr` matches `arg.len()` and `None` otherwise. . fn len_arg<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::MethodCall(_, arg, [], _) = expr.kind . && let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::str_len, method_def_id) . { -- line 160 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: 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 { 85,000 ( 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() 31,872 ( 0.00%) && !header.asyncness.is_async() . // Check that this function returns `impl Future` 10,619 ( 0.00%) && let FnRetTy::Return(ret_ty) = decl.output 21,238 ( 0.00%) && let TyKind::OpaqueDef(opaque) = ret_ty.kind . && 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) { -- line 63 ---------------------------------------- -- line 96 ---------------------------------------- . (block.span, body_snip), . ], . Applicability::MachineApplicable, . ); . } . }, . ); . } 85,000 ( 0.00%) } . } . . fn future_trait_ref<'tcx>(cx: &LateContext<'tcx>, opaque: &'tcx OpaqueTy<'tcx>) -> Option<&'tcx TraitRef<'tcx>> { . if let Some(trait_ref) = opaque.bounds.iter().find_map(|bound| { . if let GenericBound::Trait(poly) = bound { . Some(&poly.trait_ref) . } else { . None -- line 112 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 399 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, e) 456 ( 0.00%) && let is_debug = match cx.tcx.get_diagnostic_name(macro_call.def_id) { 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . Some(sym::debug_assert_macro) => true, . Some(sym::assert_macro) => false, . _ => return, . } . && let Some((condition, _)) = find_assert_args(cx, e, macro_call.expn) . // Check if the whole expression can be moved into a const context. . // Note that const eval can evaluate things which cannot be moved (e.g. `false && x`). . && is_const_evaluatable(cx.tcx, cx.typeck_results(), condition) -- line 57 ---------------------------------------- -- 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); . } 523,440 ( 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 ---------------------------------------- 114 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/include_in_doc_without_cfg.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use rustc_ast::{AttrArgs, AttrKind, AttrStyle, Attribute}; . use rustc_errors::Applicability; . use rustc_lint::EarlyContext; . . use super::DOC_INCLUDE_WITHOUT_CFG; . . pub fn check(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . for attr in attrs { 60,590 ( 0.00%) if !attr.span.from_expansion() 49,352 ( 0.00%) && let AttrKind::Normal(ref normal) = attr.kind 73,659 ( 0.00%) && attr.doc_str().is_some() 7,967,761 ( 0.10%) => ???:::doc_str (24,553x) 46,500 ( 0.00%) && let AttrArgs::Eq { expr: meta, .. } = &normal.item.args 108,500 ( 0.00%) && !attr.span.contains(meta.span) 682,000 ( 0.01%) => ???:::contains (15,500x) . // 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('[') . && let Some(end) = snippet.rfind(']') . && let snippet = &snippet[start + 1..end] -- line 23 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 14,076 ( 0.00%) ty.boxed_ty().is_some_and(|boxed| { 46,149 ( 0.00%) => ???:::boxed_ty (7,038x) . !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 { 106,250 ( 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 53,125 ( 0.00%) if matches!(fn_kind, intravisit::FnKind::Closure) { . return; . } . . if let Some(header) = fn_kind.header() 31,872 ( 0.00%) && header.abi != ExternAbi::Rust . { . return; . } . 10,624 ( 0.00%) let parent_id = cx . .tcx 10,624 ( 0.00%) .hir_get_parent_item(cx.tcx.local_def_id_to_hir_id(fn_def_id)) 1,543,794 ( 0.02%) => ???:::hir_get_parent_item (10,624x) . .def_id; . 10,624 ( 0.00%) let mut trait_self_ty = None; 120,675 ( 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 => { . trait_self_ty = Some(TraitRef::identity(cx.tcx, parent_id.to_def_id()).self_ty()); . }, . . _ => {}, . } . 13,626 ( 0.00%) let typeck_results = cx.tcx.typeck_body(body.id()); 1,573,139 ( 0.02%) => ???:::typeck_body (6,813x) . . // 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. 13,626 ( 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. 14,076 ( 0.00%) if !matches!(param.pat.kind, PatKind::Binding(..)) { . return None; . } . 21,114 ( 0.00%) let ty = typeck_results.pat_ty(param.pat); 281,520 ( 0.00%) => ???:::pat_ty (7,038x) 7,038 ( 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. 6,813 ( 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", . ); . } 85,000 ( 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 ---------------------------------------- 45,723 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zero_div_zero.rs -------------------------------------------------------------------------------- Ir -- line 24 ---------------------------------------- . pub ZERO_DIVIDED_BY_ZERO, . complexity, . "usage of `0.0 / 0.0` to obtain NaN instead of `f32::NAN` or `f64::NAN`" . } . . declare_lint_pass!(ZeroDiv => [ZERO_DIVIDED_BY_ZERO]); . . impl<'tcx> LateLintPass<'tcx> for ZeroDiv { 392,580 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // check for instances of 0.0/0.0 130,860 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind 6,523 ( 0.00%) && op.node == BinOpKind::Div . // TODO - constant_simple does not fold many operations involving floats. . // That's probably fine for this lint - it's pretty unlikely that someone would . // do something like 0.0/(2.0 - 2.0), but it would be nice to warn on that case too. . && let ecx = ConstEvalCtxt::new(cx) . && let ctxt = expr.span.ctxt() . && let Some(lhs_value) = ecx.eval_local(left, ctxt) . && let Some(rhs_value) = ecx.eval_local(right, ctxt) . // FIXME(f16_f128): add these types when eq is available on all platforms -- line 43 ---------------------------------------- -- line 54 ---------------------------------------- . cx, . ZERO_DIVIDED_BY_ZERO, . expr.span, . "constant division of `0.0` with `0.0` will always result in NaN", . None, . format!("consider using `{float_type}::NAN` if you would like a constant representing NaN"), . ); . } 458,010 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/too_many_arguments.rs -------------------------------------------------------------------------------- Ir -- line 14 ---------------------------------------- . cx: &LateContext<'_>, . kind: FnKind<'_>, . decl: &hir::FnDecl<'_>, . hir_id: hir::HirId, . def_id: LocalDefId, . too_many_arguments_threshold: u64, . ) { . // don't warn for implementations, it's not their fault 31,875 ( 0.00%) if !is_trait_impl_item(cx, hir_id) 1,599,609 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (10,625x) . // don't lint extern functions decls, it's not their fault either 34,065 ( 0.00%) && kind.header().is_some_and(|header| header.abi == ExternAbi::Rust) 320,211 ( 0.00%) => ???:::eq (6,813x) . { . check_arg_number(cx, decl, cx.tcx.def_span(def_id), too_many_arguments_threshold); . } . } . . pub(super) fn check_trait_item(cx: &LateContext<'_>, item: &hir::TraitItem<'_>, too_many_arguments_threshold: u64) { 20 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, _) = item.kind . // don't lint extern functions decls, it's not their fault 5 ( 0.00%) && sig.header.abi == ExternAbi::Rust 47 ( 0.00%) => ???:::eq (1x) . { 1 ( 0.00%) check_arg_number( . cx, 1 ( 0.00%) sig.decl, 1 ( 0.00%) item.span.with_hi(sig.decl.output.span().hi()), . too_many_arguments_threshold, . ); . } . } . . fn check_arg_number(cx: &LateContext<'_>, decl: &hir::FnDecl<'_>, fn_span: Span, too_many_arguments_threshold: u64) { 6,814 ( 0.00%) let args = decl.inputs.len() as u64; 13,628 ( 0.00%) if args > too_many_arguments_threshold { . span_lint( . cx, . TOO_MANY_ARGUMENTS, . fn_span, . format!("this function has too many arguments ({args}/{too_many_arguments_threshold})"), . ); . } . } -- line 54 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/format_impl.rs -------------------------------------------------------------------------------- Ir -- line 103 ---------------------------------------- . pub struct FormatImpl { . format_args: FormatArgsStorage, . // Whether we are inside Display or Debug trait impl - None for neither . format_trait_impl: Option, . } . . impl FormatImpl { . pub fn new(format_args: FormatArgsStorage) -> Self { 2 ( 0.00%) Self { . format_args, . format_trait_impl: None, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FormatImpl { . fn check_impl_item(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { 59,965 ( 0.00%) self.format_trait_impl = is_format_trait_impl(cx, impl_item); 276,905 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (11,993x) . } . . fn check_impl_item_post(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { . // Assume no nested Impl of Debug and Display within each other 47,972 ( 0.00%) if is_format_trait_impl(cx, impl_item).is_some() { 276,905 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (11,993x) 594 ( 0.00%) self.format_trait_impl = None; . } . } . 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 201,111 ( 0.00%) if let Some(format_trait_impl) = self.format_trait_impl { 28,926 ( 0.00%) let linter = FormatImplExpr { . cx, 4,821 ( 0.00%) format_args: &self.format_args, . expr, . format_trait_impl, . }; . linter.check_to_string_in_display(); . linter.check_self_in_format_args(); . linter.check_print_in_format_impl(); . } 523,440 ( 0.01%) } . } . . struct FormatImplExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . format_args: &'a FormatArgsStorage, . expr: &'tcx Expr<'tcx>, . format_trait_impl: FormatTraitNames, . } . . impl FormatImplExpr<'_, '_> { . fn check_to_string_in_display(&self) { 4,821 ( 0.00%) if self.format_trait_impl.name == sym::Display . && let ExprKind::MethodCall(path, self_arg, [], _) = self.expr.kind . // Get the hir_id of the object we are calling the method on . // Is the method to_string() ? . && path.ident.name == sym::to_string . // Is the method a part of the ToString trait? (i.e. not to_string() implemented . // separately) . && self . .cx -- line 162 ---------------------------------------- -- line 250 ---------------------------------------- . format!("{replacement}!(..)") . }, . Applicability::HasPlaceholders, . ); . } . } . } . 23,986 ( 0.00%) fn is_format_trait_impl(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) -> Option { 23,986 ( 0.00%) if impl_item.ident.name == sym::fmt 4,768 ( 0.00%) && let ImplItemKind::Fn(_, body_id) = impl_item.kind 2,384 ( 0.00%) && let Some(Impl { . of_trait: Some(of_trait), . .. 5,960 ( 0.00%) }) = get_parent_as_impl(cx.tcx, impl_item.hir_id()) 195,320 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_as_impl (1,192x) 3,564 ( 0.00%) && let Some(did) = of_trait.trait_ref.trait_def_id() 15,444 ( 0.00%) => ???:::trait_def_id (1,188x) 5,940 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(did) 103,356 ( 0.00%) => ???:::get_diagnostic_name (1,188x) . && matches!(name, sym::Debug | sym::Display) . { 4,752 ( 0.00%) let body = cx.tcx.hir_body(body_id); 81,874 ( 0.00%) => ???:::hir_body (1,188x) 1,188 ( 0.00%) let formatter_name = body . .params . .get(1) 1,188 ( 0.00%) .and_then(|param| param.pat.simple_ident()) . .map(|ident| ident.name); . . Some(FormatTraitNames { name, formatter_name }) . } else { . None . } 23,986 ( 0.00%) } 26,318 ( 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(); . 523,048 ( 0.01%) if start > end || end > slice.len() { . return false; . } . 251,336 ( 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 { 318,917 ( 0.00%) (start == 0 || bytes.as_ptr().add(start).read().is_utf8_char_boundary()) 226,694 ( 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 { 226,433 ( 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> { 120,279 ( 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 { 8,964 ( 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> { 7,657 ( 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 ---------------------------------------- 410,121 ( 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> { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if matches!(expr.kind, ExprKind::AddrOf(..)) 1,654 ( 0.00%) && !expr.span.from_expansion() 9,097 ( 0.00%) && let use_site = get_expr_use_site(cx.tcx, cx.typeck_results(), SyntaxContext::root(), expr) 540,650 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (827x) 3,308 ( 0.00%) && use_site.same_ctxt . && !use_site.is_ty_unified 6,616 ( 0.00%) && let use_node = use_site.use_node(cx) 21,629 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (827x) 5,789 ( 0.00%) && let Some(DefinedTy::Mir { def_site_def_id: _, ty }) = use_node.defined_ty(cx) 197,941 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (827x) 1,654 ( 0.00%) && let ty::Param(param_ty) = *ty.skip_binder().kind() . && let Some((hir_id, fn_id, i)) = match use_node { . ExprUseNode::MethodArg(_, _, 0) => None, . ExprUseNode::MethodArg(hir_id, None, i) => cx . .typeck_results() . .type_dependent_def_id(hir_id) . .map(|id| (hir_id, id, i)), . ExprUseNode::FnArg( . &Expr { -- line 99 ---------------------------------------- -- line 128 ---------------------------------------- . |diag| { . let mut app = Applicability::MachineApplicable; . let snip_span = peel_n_hir_expr_refs(expr, count).0.span; . let snip = snippet_with_context(cx, snip_span, expr.span.ctxt(), "..", &mut app).0; . diag.span_suggestion(expr.span, "change this to", snip.into_owned(), app); . }, . ); . } 523,440 ( 0.01%) } . 99,197 ( 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(); . } 113,368 ( 0.00%) } . } . . fn path_has_args(p: &QPath<'_>) -> bool { . match *p { . QPath::Resolved(_, Path { segments: [.., s], .. }) | QPath::TypeRelative(_, s) => s.args.is_some(), . QPath::Resolved(..) => false, . } . } -- line 154 ---------------------------------------- 2,481 ( 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. 48,140 ( 0.00%) if old_size > MAX_REFCOUNT { . abort(); . } . 96,258 ( 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 { 755,860 ( 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. 187,140 ( 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(); 1,001 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>>>::drop_slow (1x) 75 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>>>::drop_slow (1x) . } . } . } . . impl Arc { . /// Attempts to downcast the `Arc` to a concrete type. . /// . /// # Examples -- line 2909 ---------------------------------------- -- line 3372 ---------------------------------------- . } . } . . /// Returns `None` when the pointer is dangling and there is no allocated `ArcInner`, . /// (i.e., when this `Weak` was created by `Weak::new`). . #[inline] . fn inner(&self) -> Option> { . let ptr = self.ptr.as_ptr(); 2 ( 0.00%) if is_dangling(ptr) { . None . } else { . // We are careful to *not* create a reference covering the "data" field, as . // the field may be mutated concurrently (for example, if the last `Arc` . // is dropped, the data field will be dropped in-place). . Some(unsafe { WeakInner { strong: &(*ptr).strong, weak: &(*ptr).weak } }) . } . } -- line 3388 ---------------------------------------- -- line 3524 ---------------------------------------- . // the memory orderings . // . // It's not necessary to check for the locked state here, because the . // weak count can only be locked if there was precisely one weak ref, . // meaning that drop could only subsequently run ON that remaining weak . // ref, which can only happen after the lock is released. . let inner = if let Some(inner) = self.inner() { inner } else { return }; . 2 ( 0.00%) if inner.weak.fetch_sub(1, Release) == 1 { . acquire!(inner.weak); . . // Make sure we aren't trying to "deallocate" the shared static for empty slices . // used by Default::default. . debug_assert!( . !ptr::addr_eq(self.ptr.as_ptr(), &STATIC_INNER_SLICE.inner), . "Arc/Weaks backed by a static should never be deallocated. \ . Likely decrement_strong_count or from_raw were called too many times.", -- line 3540 ---------------------------------------- 2,134,347 ( 0.03%) -------------------------------------------------------------------------------- -- 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, . { 228,280 ( 0.00%) 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, . { 420,257 ( 0.01%) let thread_local = unsafe { (self.inner)(None).as_ref().ok_or(AccessError)? }; 13,638 ( 0.00%) => ???:>>,)>>::call_once (4,546x) 502,734 ( 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 ---------------------------------------- 62,332 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 0.00%) if expr.span.from_expansion() { . return; . } . 327,092 ( 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, . appl, . ); . }; . . if !is_bit_op(op) { . return; . } 3,083 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 6,166 ( 0.00%) match (op, get_bin_opt(left), get_bin_opt(right)) { . ( . BitAnd | BitOr | BitXor, . Some(left_op @ (Shl | Shr | Add | Div | Mul | Rem | Sub)), . Some(right_op @ (Shl | Shr | Add | Div | Mul | Rem | Sub)), . ) . | ( . Shl | Shr, . Some(left_op @ (Add | Div | Mul | Rem | Sub)), -- line 80 ---------------------------------------- -- 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 6,544 ( 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, . ); . }); . } 598,616 ( 0.01%) } . } . . fn get_bin_opt(expr: &Expr) -> Option { 12,332 ( 0.00%) match expr.kind { . ExprKind::Binary(Spanned { node: op, .. }, _, _) => Some(op), . _ => None, . } . } . . #[must_use] . fn is_bit_op(op: BinOpKind) -> bool { 18,027 ( 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 ---------------------------------------- 3,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/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 . } . }}; 653,544 ( 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 . 17,944 ( 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 548 ( 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. 548 ( 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. . 15,316 ( 0.00%) let ptr = self.ptr; 15,868 ( 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.) 11,598,293 ( 0.15%) 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. 83,547 ( 0.00%) self.ptr = ptr.add(1); . } . // SAFETY: Now that we know it wasn't empty and we've moved past . // the first one (to avoid giving a duplicate `&mut` next time), . // we can give out a reference to it. . Some({ptr}.$into_ref()) . } . } . -- line 193 ---------------------------------------- -- line 217 ---------------------------------------- . . #[inline] . fn count(self) -> usize { . len!(self) . } . . #[inline] . fn nth(&mut self, n: usize) -> Option<$elem> { 1,660 ( 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 36,724 ( 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) }; 450,589 ( 0.01%) if i == len { . break; . } . } . acc . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 287 ---------------------------------------- -- line 302 ---------------------------------------- . // faster to compile. . #[inline] . fn all(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 11,501 ( 0.00%) if !f(x) { . return false; . } . } . true . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 318 ---------------------------------------- -- line 319 ---------------------------------------- . // faster to compile. . #[inline] . fn any(&mut self, mut f: F) -> bool . where . Self: Sized, . F: FnMut(Self::Item) -> bool, . { . while let Some(x) = self.next() { 684,323 ( 0.01%) if f(x) { . return true; . } . } . false . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is -- line 335 ---------------------------------------- -- line 336 ---------------------------------------- . // faster to compile. . #[inline] . fn find

(&mut self, mut predicate: P) -> Option . where . Self: Sized, . P: FnMut(&Self::Item) -> bool, . { . while let Some(x) = self.next() { 985,721 ( 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() { 227,296 ( 0.00%) if let Some(y) = f(x) { 448,963 ( 0.01%) => /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 (30,295x) . 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() { 3,528 ( 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); . } 1,656 ( 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; 635 ( 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 ---------------------------------------- 11,036,647 ( 0.14%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::def_id::DefId; . use rustc_hir::{BinOpKind, Expr, ExprKind, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::SyntaxContext; . . use super::{FLOAT_CMP, FLOAT_CMP_CONST}; . 588,870 ( 0.01%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . if let Some(macro_call) = . first_node_macro_backtrace(cx, e).find(|macro_call| is_assert_eq_diag(cx, macro_call.def_id)) . && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) . && is_float(cx, lhs) . { . let ecx = ConstEvalCtxt::new(cx); . let ctxt = macro_call.span.ctxt(); . -- line 23 ---------------------------------------- -- line 30 ---------------------------------------- . let msg = if is_comparing_arrays { . "strict comparison of `f32` or `f64` constant arrays" . } else { . "strict comparison of `f32` or `f64` constant" . }; . . clippy_utils::diagnostics::span_lint(cx, FLOAT_CMP_CONST, macro_call.span, msg); . } 523,440 ( 0.01%) } . . fn is_float_const(ecx: &ConstEvalCtxt<'_>, expr: &Expr<'_>, ctxt: SyntaxContext) -> bool { . match ecx.eval_with_source(expr, ctxt) { . Some((c, s)) if !is_allowed(&c) => !s.is_local(), . _ => false, . } . } . . fn is_assert_eq_diag(cx: &LateContext<'_>, def_id: DefId) -> bool { 684 ( 0.00%) matches!( 456 ( 0.00%) cx.tcx.get_diagnostic_name(def_id), 9,918 ( 0.00%) => ???:::get_diagnostic_name (114x) . Some(sym::assert_eq_macro | sym::assert_ne_macro | sym::debug_assert_eq_macro | sym::debug_assert_ne_macro) . ) . } . . fn is_inside_assert_eq(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . macro_backtrace(expr.span).any(|mc| is_assert_eq_diag(cx, mc.def_id)) . } . 78,276 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 34,699 ( 0.00%) if (op == BinOpKind::Eq || op == BinOpKind::Ne) && is_float(cx, left) { . // Skip if inside assert_eq!/assert_ne! macro to avoid double-linting . // (handled by check_assert) . if is_inside_assert_eq(cx, expr) { . return; . } . . let ecx = ConstEvalCtxt::new(cx); . let ctxt = expr.span.ctxt(); -- line 73 ---------------------------------------- -- line 108 ---------------------------------------- . lhs - rhs, . if op == BinOpKind::Eq { '<' } else { '>' } . ), . Applicability::HasPlaceholders, // snippet . ); . } . }); . } 52,184 ( 0.00%) } . . fn get_lint_and_message(is_local: bool, is_comparing_arrays: bool) -> (&'static rustc_lint::Lint, &'static str) { . if is_local { . ( . FLOAT_CMP, . if is_comparing_arrays { . "strict comparison of `f32` or `f64` arrays" . } else { -- line 124 ---------------------------------------- -- line 164 ---------------------------------------- . // the method call) . { . return is_float(cx, self_arg); . } . false . } . . fn is_float(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 10,173 ( 0.00%) let value = &cx.typeck_results().expr_ty(expr).peel_refs().kind(); 135,640 ( 0.00%) => ???:::expr_ty (3,391x) . . if let ty::Array(arr_ty, _) = value { . return matches!(arr_ty.kind(), ty::Float(_)); . } . . matches!(value, ty::Float(_)) . } . -- line 180 ---------------------------------------- 3,448 ( 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]>`. 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 35,926 ( 0.00%) if let ItemKind::Impl(imp) = item.kind 15,680 ( 0.00%) && let Some(of_trait) = imp.of_trait 18,843 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 31,405 ( 0.00%) && let Some(hash_id) = cx.tcx.get_diagnostic_item(sym::Hash) 665,786 ( 0.01%) => ???:::get_diagnostic_item (6,281x) 56,529 ( 0.00%) && Res::Def(DefKind::Trait, hash_id) == of_trait.trait_ref.path.res 207,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/def.rs:::eq (6,281x) . && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) . // since we are in the `Hash` impl, we don't need to check for that. . // we need only to check for `Borrow` and `Borrow<[u8]>` . && implements_trait(cx, ty, borrow_id, &[cx.tcx.types.str_.into()]) . && implements_trait(cx, ty, borrow_id, &[Ty::new_slice(cx.tcx, cx.tcx.types.u8).into()]) . { . span_lint_and_then( . cx, -- line 92 ---------------------------------------- -- 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"); . }, . ); . } 112,344 ( 0.00%) } . } 6,281 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/int_plus_one.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . enum LeOrGe { . Le, . Ge, . } . . impl TryFrom for LeOrGe { . type Error = (); . fn try_from(value: BinOpKind) -> Result { 19,569 ( 0.00%) match value { . BinOpKind::Le => Ok(Self::Le), . BinOpKind::Ge => Ok(Self::Ge), . _ => Err(()), . } . } . } . . impl IntPlusOne { -- line 64 ---------------------------------------- -- line 151 ---------------------------------------- . let rec = sugg::make_binop(new_binop, &new_lhs, &new_rhs); . diag.span_suggestion(expr.span, "change it to", rec, app); . }, . ); . } . } . . impl EarlyLintPass for IntPlusOne { 448,962 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 0.00%) if let ExprKind::Binary(binop, lhs, rhs) = &expr.kind 13,046 ( 0.00%) && let Ok(le_or_ge) = LeOrGe::try_from(binop.node) . && let Some((new_lhs, new_rhs)) = Self::check_binop(le_or_ge, lhs, rhs) . { . Self::emit_warning(cx, expr, new_lhs, le_or_ge, new_rhs); . } 523,789 ( 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 { 58,645 ( 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 30,240 ( 0.00%) if !p.is_self() || p.span.from_expansion() { . return; . } . 45,420 ( 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) 18,864 ( 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); . }, . ); . } 58,645 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_wildcard_pattern.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use rustc_ast::ast::{Pat, PatFieldsRest, PatKind}; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, LintContext as _}; . use rustc_span::Span; . . use super::UNNEEDED_WILDCARD_PATTERN; . . pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 139,797 ( 0.00%) if let PatKind::TupleStruct(_, _, ref patterns) | PatKind::Tuple(ref patterns) = pat.kind . && let Some(rest_index) = patterns.iter().position(Pat::is_rest) . { . if let Some((left_index, left_pat)) = patterns[..rest_index] . .iter() . .rev() . .take_while(|pat| matches!(pat.kind, PatKind::Wild)) . .enumerate() . .last() -- line 18 ---------------------------------------- -- line 29 ---------------------------------------- . && !pat.span.in_external_macro(cx.sess().source_map()) . { . span_lint( . cx, . patterns[rest_index].span.shrink_to_hi().to(right_pat.span), . right_index == 0, . ); . } 15,533 ( 0.00%) } else if let PatKind::Struct(_, _, patfields, rest) = &pat.kind . && let PatFieldsRest::Rest(rspan) = rest . && let Some((right_index, _right_pat)) = patfields . .iter() . .rev() . .take_while(|patfield| matches!(patfield.pat.kind, PatKind::Wild)) . .enumerate() . .last() . // Only run if `rest_pattern_accessible_field` is Allow, as they otherwise will contradict each other. -- line 45 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 196,290 ( 0.00%) eq_op::check_assert(cx, e); 6,376,885 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check_assert (65,430x) 196,290 ( 0.00%) float_cmp::check_assert(cx, e); 4,153,633 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert (65,430x) 356,433 ( 0.00%) match e.kind { 19,569 ( 0.00%) ExprKind::Binary(op, lhs, rhs) => { 13,046 ( 0.00%) if !e.span.from_expansion() { 36,054 ( 0.00%) absurd_extreme_comparisons::check(cx, e, op.node, lhs, rhs); 1,833,446 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::check (6,009x) . if !(macro_with_not_op(lhs) || macro_with_not_op(rhs)) { 36,054 ( 0.00%) eq_op::check(cx, e, op.node, lhs, rhs); 3,084,200 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs:clippy_lints::operators::eq_op::check (6,009x) 36,054 ( 0.00%) op_ref::check(cx, e, op.node, lhs, rhs); 503,323 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/op_ref.rs:clippy_lints::operators::op_ref::check (6,009x) . } . erasing_op::check(cx, e, op.node, lhs, rhs); 36,054 ( 0.00%) identity_op::check(cx, e, op.node, lhs, rhs); 3,379,463 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::check (6,009x) . invalid_upcast_comparisons::check(cx, op.node, lhs, rhs, e.span); 42,063 ( 0.00%) needless_bitwise_bool::check(cx, e, op.node, lhs, rhs); 131,154 ( 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 (6,009x) 48,072 ( 0.00%) manual_midpoint::check(cx, e, op.node, lhs, rhs, self.msrv); 170,787 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/manual_midpoint.rs:clippy_lints::operators::manual_midpoint::check (6,009x) 42,063 ( 0.00%) manual_is_multiple_of::check(cx, e, op.node, lhs, rhs, self.msrv); 697,532 ( 0.01%) => /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 (6,009x) 42,063 ( 0.00%) manual_isolate_lowest_one::check(cx, e, op.node, lhs, rhs, self.msrv); 262,688 ( 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 (6,009x) 30,045 ( 0.00%) decimal_bitwise_operands::check(cx, op.node, lhs, rhs); 188,985 ( 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 (6,009x) . } 45,661 ( 0.00%) self.arithmetic_context.check_binary(cx, e, op.node, lhs, rhs); 345,699 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_binary (6,523x) 39,138 ( 0.00%) bit_mask::check(cx, e, op.node, lhs, rhs); 1,577,476 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check (6,523x) . verbose_bit_mask::check(cx, e, op.node, lhs, rhs, self.verbose_bit_mask_threshold); 45,661 ( 0.00%) double_comparison::check(cx, op.node, lhs, rhs, e.span); 121,958 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/double_comparison.rs:clippy_lints::operators::double_comparison::check (6,523x) 39,138 ( 0.00%) const_comparisons::check(cx, op, lhs, rhs, e.span); 110,891 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs:clippy_lints::operators::const_comparisons::check (6,523x) 39,138 ( 0.00%) duration_subsec::check(cx, e, op.node, lhs, rhs); 110,891 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/duration_subsec.rs:clippy_lints::operators::duration_subsec::check (6,523x) 39,138 ( 0.00%) float_equality_without_abs::check(cx, e, op.node, lhs, rhs); 143,506 ( 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 (6,523x) 39,138 ( 0.00%) integer_division::check(cx, e, op.node, lhs, rhs); 110,891 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/integer_division.rs:clippy_lints::operators::integer_division::check (6,523x) 39,138 ( 0.00%) integer_division_remainder_used::check(cx, op.node, lhs, rhs, e.span); 123,937 ( 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 (6,523x) . cmp_owned::check(cx, e, op.node, lhs, rhs); 36,006 ( 0.00%) float_cmp::check(cx, e, op.node, lhs, rhs); 338,100 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check (6,523x) . modulo_one::check(cx, e, op.node, rhs); 39,138 ( 0.00%) modulo_arithmetic::check( 110,891 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/modulo_arithmetic.rs:clippy_lints::operators::modulo_arithmetic::check (6,523x) . cx, . e, . op.node, . lhs, . rhs, 6,523 ( 0.00%) self.modulo_arithmetic_allow_comparison_to_zero, . ); 91,322 ( 0.00%) manual_div_ceil::check(cx, e, op.node, lhs, rhs, self.msrv); 123,937 ( 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 (6,523x) . }, . ExprKind::AssignOp(op, lhs, rhs) => { . let bin_op = op.node.into(); . if !e.span.from_expansion() { . decimal_bitwise_operands::check(cx, bin_op, lhs, rhs); . } . self.arithmetic_context.check_binary(cx, e, bin_op, lhs, rhs); . misrefactored_assign_op::check(cx, e, bin_op, lhs, rhs); . modulo_arithmetic::check(cx, e, bin_op, lhs, rhs, false); . }, 22 ( 0.00%) ExprKind::Assign(lhs, rhs, _) => { 66 ( 0.00%) assign_op_pattern::check(cx, e, lhs, rhs, self.msrv); 178,873 ( 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 (11x) 132 ( 0.00%) self_assignment::check(cx, e, lhs, rhs); 8,840 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/operators/self_assignment.rs:clippy_lints::operators::self_assignment::check (11x) . }, . ExprKind::Unary(op, arg) => . { . #[expect(clippy::collapsible_match)] 1,981 ( 0.00%) if op == UnOp::Neg { . self.arithmetic_context.check_negate(cx, e, arg); . } . }, . _ => (), . } 471,168 ( 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 { 25,396 ( 0.00%) if let ExprKind::Unary(_, e) = e.kind { 2,720 ( 0.00%) e.span.from_expansion() . } else { . false . } . } 57,664 ( 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; . 88,582 ( 0.00%) pub fn check( . cx: &LateContext<'_>, . owner_id: OwnerId, . sig: FnSig<'_>, . headers: DocHeaders, . body_id: Option, . check_private_items: bool, . ) { 47,698 ( 0.00%) if !check_private_items && !cx.effective_visibilities.is_exported(owner_id.def_id) { 388,398 ( 0.00%) => ???:::is_exported (6,814x) . return; // Private functions do not require doc comments . } . . // do not lint if any parent has `#[doc(hidden)]` attribute (#7347) . if !check_private_items 6,810 ( 0.00%) && cx . .tcx . .hir_parent_iter(owner_id.into()) 136,092 ( 0.00%) .any(|(id, _node)| is_doc_hidden(cx.tcx.hir_attrs(id))) 2,163,152 ( 0.03%) => ???:::hir_attrs (34,023x) . { . return; . } . . let span = cx.tcx.def_span(owner_id); 34,050 ( 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", . ), . _ => (), . } 20,428 ( 0.00%) if !headers.panics . && let Some(body_id) = body_id 13,618 ( 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", . ); . } 13,620 ( 0.00%) if !headers.errors { 28,046 ( 0.00%) if return_ty(cx, owner_id).is_diag_item(cx, sym::Result) { 3,488,677 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (6,810x) . span_lint( . cx, . MISSING_ERRORS_DOC, . span, . "docs for function returning `Result` missing `# Errors` section", . ); 6,810 ( 0.00%) } else if let Some(body_id) = body_id 27,236 ( 0.00%) && let Some(future) = cx.tcx.lang_items().future_trait() 272,360 ( 0.00%) => ???:::lang_items (6,809x) 47,663 ( 0.00%) && let typeck = cx.tcx.typeck_body(body_id) 1,572,311 ( 0.02%) => ???:::typeck_body (6,809x) 27,236 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 485,970 ( 0.01%) => ???:::hir_body (6,809x) 27,236 ( 0.00%) && let ret_ty = typeck.expr_ty(body.value) 272,360 ( 0.00%) => ???:::expr_ty (6,809x) 102,135 ( 0.00%) && implements_trait_with_env( 36,715,470 ( 0.46%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait_with_env (6,809x) . cx.tcx, 27,236 ( 0.00%) ty::TypingEnv::non_body_analysis(cx.tcx, owner_id.def_id), 27,421,243 ( 0.34%) => /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:: (6,809x) . 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", . ); . } . } 54,512 ( 0.00%) } . . fn find_panic(cx: &LateContext<'_>, body_id: BodyId) -> Option { 6,809 ( 0.00%) let mut panic_span = None; 47,663 ( 0.00%) let typeck = cx.tcx.typeck_body(body_id); 1,572,311 ( 0.02%) => ???:::typeck_body (6,809x) 34,045 ( 0.00%) for_each_expr(cx.tcx, cx.tcx.hir_body(body_id), |expr| { 485,970 ( 0.01%) => ???:::hir_body (6,809x) 420,100 ( 0.01%) if is_inside_always_const_context(cx.tcx, expr.hir_id) { 2,616,338 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (6,809x) . return ControlFlow::::Continue(()); . } . 285 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 342 ( 0.00%) && (is_panic(cx, macro_call.def_id) 5,757 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_panic (57x) 171 ( 0.00%) || matches!( 228 ( 0.00%) cx.tcx.get_diagnostic_name(macro_call.def_id), 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . Some(sym::assert_macro | sym::assert_eq_macro | sym::assert_ne_macro) . )) . && !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` 42,010 ( 0.00%) if let Some(arglists) = 504,120 ( 0.01%) method_chain_args(expr, &[sym::unwrap]).or_else(|| method_chain_args(expr, &[sym::expect])) 1,882,263 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (13,618x) . && let receiver_ty = typeck.expr_ty(arglists[0].0).peel_refs() . && matches!(receiver_ty.opt_diag_name(cx), Some(sym::Option | sym::Result)) . && !fulfill_or_allowed(cx, MISSING_PANICS_DOC, [expr.hir_id]) . && panic_span.is_none() . { . panic_span = Some(expr.span); . } . -- line 129 ---------------------------------------- 54,531 ( 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. 31,330 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item: &Item<'_>, . trait_ref: &hir::TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . ) { 12,050 ( 0.00%) let clone_id = match cx.tcx.lang_items().clone_trait() { 96,400 ( 0.00%) => ???:::lang_items (2,410x) 4,820 ( 0.00%) Some(id) if trait_ref.trait_def_id() == Some(id) => id, 31,330 ( 0.00%) => ???:::trait_def_id (2,410x) . _ => return, . }; . let Some(copy_id) = cx.tcx.lang_items().copy_trait() else { . return; . }; . let (ty_adt, ty_subs) = match *ty.kind() { . // Unions can't derive clone. . ty::Adt(adt, subs) if !adt.is_union() => (adt, subs), -- line 27 ---------------------------------------- -- line 68 ---------------------------------------- . 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`", . ); 19,280 ( 0.00%) } 2,410 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/blocks_in_conditions.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . "useless or complex blocks that can be eliminated in conditions" . } . . declare_lint_pass!(BlocksInConditions => [BLOCKS_IN_CONDITIONS]); . . const BRACED_EXPR_MESSAGE: &str = "omit braces around single expression condition"; . . impl<'tcx> LateLintPass<'tcx> for BlocksInConditions { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . 1,988 ( 0.00%) let Some((cond, keyword, desc)) = higher::If::hir(expr) . .map(|hif| (hif.cond, "if", "an `if` condition")) 1,488 ( 0.00%) .or(if let ExprKind::Match(match_ex, _, MatchSource::Normal) = expr.kind { . Some((match_ex, "match", "a `match` scrutinee")) . } else { . None . }) . else { . return; . }; 1,491 ( 0.00%) let complex_block_message = format!( . "in {desc}, avoid complex blocks or closures with blocks; \ . instead, move the block or closure higher and bind it with a `let`", . ); . 994 ( 0.00%) if let ExprKind::Block(block, _) = &cond.kind { 3 ( 0.00%) if !block.span.eq_ctxt(expr.span) { . // If the block comes from a macro, or as an argument to a macro, . // do not lint. . return; . } . if block.rules == BlockCheckMode::DefaultBlock { . if block.stmts.is_empty() { . if let Some(ex) = &block.expr { . // don't dig into the expression here, just suggest that they remove -- line 84 ---------------------------------------- -- line 129 ---------------------------------------- . "let res = {}; {keyword} res", . snippet_block_with_applicability(cx, block.span, "..", Some(expr.span), &mut applicability), . ), . applicability, . ); . } . } . } 523,440 ( 0.01%) } . } 3,479 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/format_args_collector.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . pub struct FormatArgsCollector { . format_args: FxHashMap, . parent_spans: Vec, . storage: FormatArgsStorage, . } . . impl FormatArgsCollector { . pub fn new(storage: FormatArgsStorage) -> Self { 8 ( 0.00%) Self { . format_args: FxHashMap::default(), . parent_spans: Vec::new(), . storage, . } . } . } . . impl_lint_pass!(FormatArgsCollector => []); . . impl EarlyLintPass for FormatArgsCollector { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 0.00%) if let ExprKind::FormatArgs(args) = &expr.kind { . if self.has_span_from_external_macro(cx.sess().source_map(), expr.span, args) { . return; . } . . self.format_args.insert(expr.span.with_parent(None), (**args).clone()); . } 598,616 ( 0.01%) } . . fn check_crate_post(&mut self, _: &EarlyContext<'_>, _: &Crate) { 2 ( 0.00%) self.storage.set(mem::take(&mut self.format_args)); 110 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::set (1x) . } . } . . impl FormatArgsCollector { . /// Detects if the format string or an argument has its span set by a proc macro to something . /// inside a macro callsite, e.g. . /// . /// ```ignore -- line 51 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /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 { 86,216 ( 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 { 31,767 ( 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 ---------------------------------------- 127,087 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/borrowed_box.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::{ . self as hir, GenericArg, GenericBounds, GenericParamKind, HirId, Lifetime, MutTy, Mutability, Node, QPath, TyKind, . }; . use rustc_lint::LateContext; . . use super::BORROWED_BOX; . 56,208 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, mut_ty: &MutTy<'_>) -> bool { . // Ignore `&mut Box` types; see issue #2907 for details. 14,052 ( 0.00%) if mut_ty.mutbl == Mutability::Not 10,794 ( 0.00%) && let TyKind::Path(ref qpath) = mut_ty.ty.kind 17,990 ( 0.00%) && let QPath::Resolved(None, path) = *qpath . && let Some(def_id) = path.res.opt_def_id() 105 ( 0.00%) && Some(def_id) == cx.tcx.lang_items().owned_box() 1,400 ( 0.00%) => ???:::lang_items (35x) . && let [bx] = path.segments . && let Some(params) = bx.args . && params.parenthesized == hir::GenericArgsParentheses::No . && let Some(inner) = params.args.iter().find_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), . _ => None, . }) . // Ignore `Box` types; see issue #1884 for details. -- line 26 ---------------------------------------- -- line 64 ---------------------------------------- . Applicability::Unspecified, . ); . }, . ); . true . } else { . false . } 56,208 ( 0.00%) } . . // Returns true if given type is `Any` trait. . fn is_any_trait(cx: &LateContext<'_>, t: &hir::Ty<'_>) -> bool { . if let TyKind::TraitObject(traits, ..) = t.kind . && let Some(any_did) = cx.tcx.get_diagnostic_item(sym::Any) . { . return traits . .iter() -- line 80 ---------------------------------------- 7,061 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/neg_cmp_op_on_partial_ord.rs -------------------------------------------------------------------------------- Ir -- line 38 ---------------------------------------- . pub NEG_CMP_OP_ON_PARTIAL_ORD, . complexity, . "The use of negated comparison operators on partially ordered types may produce confusing code." . } . . declare_lint_pass!(NoNegCompOpForPartialOrd => [NEG_CMP_OP_ON_PARTIAL_ORD]); . . impl<'tcx> LateLintPass<'tcx> for NoNegCompOpForPartialOrd { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 134,833 ( 0.00%) if let ExprKind::Unary(UnOp::Not, inner) = expr.kind 22 ( 0.00%) && let ExprKind::Binary(ref op, left, _) = inner.kind 27 ( 0.00%) && let BinOpKind::Le | BinOpKind::Ge | BinOpKind::Lt | BinOpKind::Gt = op.node . && !expr.span.in_external_macro(cx.sess().source_map()) . { . let ty = cx.typeck_results().expr_ty(left); . . let implements_ord = { . if let Some(id) = cx.tcx.get_diagnostic_item(sym::Ord) { . implements_trait(cx, ty, id, &[]) . } else { -- line 57 ---------------------------------------- -- line 74 ---------------------------------------- . expr.span, . "the use of negated comparison operators on partially ordered \ . types produces code that is hard to read and refactor, please \ . consider using the `partial_cmp` method instead, to make it \ . clear that the two values could be incomparable", . ); . } . } 523,440 ( 0.01%) } . } 36 ( 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 { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 28,086 ( 0.00%) if let ItemKind::Trait { 16 ( 0.00%) ident, 8 ( 0.00%) items: trait_items, . .. . } = item.kind 8 ( 0.00%) && !item.span.from_expansion() . { 12 ( 0.00%) check_trait_items(cx, item, ident, trait_items); . } 112,344 ( 0.00%) } . 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 11,993 ( 0.00%) if item.ident.name == sym::len . && let ImplItemKind::Fn(sig, _) = &item.kind . && sig.decl.implicit_self().has_implicit_self() . && sig.decl.inputs.len() == 1 . && cx.effective_visibilities.is_exported(item.owner_id.def_id) . && matches!(sig.decl.output, FnRetTy::Return(_)) . && let Some(imp) = get_parent_as_impl(cx.tcx, item.hir_id()) . && imp.of_trait.is_none() . && let TyKind::Path(ty_path) = &imp.self_ty.kind -- line 68 ---------------------------------------- -- line 95 ---------------------------------------- . output, . ty_id, . name, . kind, . item.hir_id(), . ty_hir_id, . ); . } 95,944 ( 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); . } . } . } . 20 ( 0.00%) if cx.effective_visibilities.is_exported(visited_trait.owner_id.def_id) 228 ( 0.00%) => ???:::is_exported (4x) . && 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 ---------------------------------------- 8 ( 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 { 108,731 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, ref_pat: &'tcx Pat<'_>) { 31,066 ( 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), . ); . }, . _ => {}, . } . } 124,264 ( 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/single_range_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } else { . write!(f, "an array") . } . } . } . . impl LateLintPass<'_> for SingleRangeInVecInit { . #[expect(clippy::too_many_lines)] 588,870 ( 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`" 130,862 ( 0.00%) let (inner_expr, span, suggested_type) = if let ExprKind::Array([inner_expr]) = expr.kind . && !expr.span.from_expansion() . { . (inner_expr, expr.span, SuggestedType::Array) 171 ( 0.00%) } else if let Some(macro_call) = root_macro_call_first_node(cx, expr) 285 ( 0.00%) && let Some(VecArgs::Vec([expr])) = VecArgs::hir(cx, expr) 17,328 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (57x) . { . (expr, macro_call.span, SuggestedType::Vec) . } else { . return; . }; . . let Some(range) = Range::hir(cx, inner_expr) else { . return; -- line 92 ---------------------------------------- -- line 188 ---------------------------------------- . format!("if you wanted {suggested_type} of len {end_snippet}, try"), . format!("{start_snippet}; {end_snippet}"), . applicability, . ); . } . } . }, . ); 523,440 ( 0.01%) } . } 57 ( 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 { 1,028,176 ( 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 { 759,374 ( 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 1021 ---------------------------------------- . /// capacity after the push, *O*(*capacity*) time is taken to copy the . /// vector's elements to a larger allocation. This expensive operation is . /// offset by the *capacity* *O*(1) insertions it allows. . #[inline] . #[stable(feature = "push_mut", since = "1.95.0")] . #[must_use = "if you don't need a reference to the value, use `Vec::push` instead"] . pub fn push_mut(&mut self, value: T) -> &mut T { . // Inform codegen that the length does not change across grow_one(). 197,989 ( 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. 459,346 ( 0.01%) if len == self.buf.capacity() { 101,996 ( 0.00%) self.buf.grow_one(); 40,499 ( 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 (307x) 16,885 ( 0.00%) => ???:>::grow_one (307x) . } . unsafe { . let end = self.as_mut_ptr().add(len); . ptr::write(end, value); 423,845 ( 0.01%) self.len = len + 1; . // SAFETY: We just wrote a value to the pointer that will live the lifetime of the reference. . &mut *end . } . } . } . . impl Vec { . /// Constructs a new, empty `Vec`. -- line 1046 ---------------------------------------- -- line 1188 ---------------------------------------- . capacity: usize, . alloc: A, . ) -> Self { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::from_raw_parts_in requires that length <= capacity", . (length: usize = length, capacity: usize = capacity) => length <= capacity . ); 1,715 ( 0.00%) unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } . } . . #[doc(alias = "from_non_null_parts_in")] . /// Creates a `Vec` directly from a `NonNull` pointer, a length, a capacity, . /// and an allocator. . /// . /// # Safety . /// -- line 1204 ---------------------------------------- -- line 1453 ---------------------------------------- . /// let mut vec = vec![1]; . /// vec.reserve(10); . /// assert!(vec.capacity() >= 11); . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_reserve"] . pub fn reserve(&mut self, additional: usize) { 22,671 ( 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. 57,739 ( 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. 18,260 ( 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,601 ( 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 1,472,073 ( 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 187,541 ( 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 . ); . 50,611 ( 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(); 500 ( 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(); 250 ( 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 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(); . 8 ( 0.00%) if original_len == 0 { . // Empty case: explicit return allows better optimization, vs letting compiler infer it . return; . } . . // Vec: [Kept, Kept, Hole, Hole, Hole, Hole, Unchecked, Unchecked] . // | ^- write ^- read | . // |<- original_len ->| . // Kept: Elements which predicate returns true on. -- line 2521 ---------------------------------------- -- line 2865 ---------------------------------------- . /// . /// # Time complexity . /// . /// Takes *O*(1) time. . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_pop"] . pub fn pop(&mut self) -> Option { 299,372 ( 0.00%) if self.len == 0 { . None . } else { . unsafe { 171,238 ( 0.00%) self.len -= 1; . core::hint::assert_unchecked(self.len < self.capacity()); 307 ( 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 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(); 22,514 ( 0.00%) if count > 0 { . unsafe { . ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) . }; . } 43,897 ( 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 { 35,003 ( 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 { 115,892 ( 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 { 101,092 ( 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. 130,662 ( 0.00%) fn clone(&self) -> Self { . let alloc = self.allocator().clone(); 2 ( 0.00%) <[T]>::to_vec_in(&**self, alloc) 167,992 ( 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) { 7,063 ( 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 { 30,691 ( 0.00%) >::from_iter(iter.into_iter()) 373,574 ( 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 (1,554x) . } . } . . #[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); . // } 124,152 ( 0.00%) while let Some(element) = iterator.next() { 3,538,726 ( 0.04%) => /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 (22,879x) . let len = self.len(); 16,435 ( 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 7,970 ( 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); 1,860 ( 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 . { 54,691 ( 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 168,453 ( 0.00%) self.as_mut_ptr().cast_slice(self.len).drop_in_place() . } . // RawVec handles deallocation 68,362 ( 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 ---------------------------------------- 783,111 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/write/mod.rs -------------------------------------------------------------------------------- Ir -- line 251 ---------------------------------------- . format_args: FormatArgsStorage, . // The outermost `impl Debug` we're currently in. While we're in one, `USE_DEBUG` is deactivated . outermost_debug_impl: Option, . allow_print_in_tests: bool, . } . . impl Write { . pub fn new(conf: &'static Conf, format_args: FormatArgsStorage) -> Self { 3 ( 0.00%) Self { . format_args, . outermost_debug_impl: None, . allow_print_in_tests: conf.allow_print_in_tests, . } . } . . fn in_debug_impl(&self) -> bool { . self.outermost_debug_impl.is_some() . } . } . . impl<'tcx> LateLintPass<'tcx> for Write { . fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { . // Only check for `impl Debug`s if we're not already in one 46,929 ( 0.00%) if self.outermost_debug_impl.is_none() && is_debug_impl(cx, item) { 1,188 ( 0.00%) self.outermost_debug_impl = Some(item.owner_id); . } . } . . fn check_item_post(&mut self, _cx: &LateContext<'_>, item: &Item<'_>) { . // Only clear `self.outermost_debug_impl` if we're escaping the _outermost_ debug impl . if self.outermost_debug_impl == Some(item.owner_id) { 594 ( 0.00%) self.outermost_debug_impl = None; . } . } . 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 342 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 399 ( 0.00%) let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) else { 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . return; . }; 114 ( 0.00%) let Some(name) = diag_name.as_str().strip_suffix("_macro") else { . return; . }; . . let is_build_script = cx . .sess() . .opts . .crate_name . .as_ref() . .is_some_and(|crate_name| crate_name == "build_script_build"); . 114 ( 0.00%) let allowed_in_tests = self.allow_print_in_tests && is_in_test(cx.tcx, expr.hir_id); . match diag_name { 570 ( 0.00%) sym::print_macro | sym::println_macro if !allowed_in_tests => { . if !is_build_script { . span_lint(cx, PRINT_STDOUT, macro_call.span, format!("use of `{name}!`")); . } . }, . sym::eprint_macro | sym::eprintln_macro if !allowed_in_tests => { . span_lint(cx, PRINT_STDERR, macro_call.span, format!("use of `{name}!`")); . }, . sym::write_macro | sym::writeln_macro => {}, -- line 314 ---------------------------------------- -- line 332 ---------------------------------------- . } . . literal::check(cx, format_args, name); . . if !self.in_debug_impl() { . use_debug::check(cx, format_args); . } . } 523,440 ( 0.01%) } . } . . fn is_debug_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 84,258 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. . }) = &item.kind 18,843 ( 0.00%) && let Some(trait_id) = of_trait.trait_ref.trait_def_id() 81,653 ( 0.00%) => ???:::trait_def_id (6,281x) . { 25,124 ( 0.00%) cx.tcx.is_diagnostic_item(sym::Debug, trait_id) 581,996 ( 0.01%) => ???:::is_diagnostic_item (6,281x) . } else { . false . } . } 6,338 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 8 ( 0.00%) (cx.effective_visibilities.is_exported(def_id) || find_attr!(cx.tcx, def_id, MacroExport { .. })) 92 ( 0.00%) => ???:>::get_attrs (1x) 42 ( 0.00%) => ???:::is_exported (1x) . && !cx.tcx.is_doc_hidden(def_id) . } . . impl<'tcx> Visitor<'tcx> for BodyVisitor<'_, 'tcx> { . fn visit_stmt(&mut self, s: &'tcx Stmt<'tcx>) { 2,382 ( 0.00%) let from_expn = s.span.from_expansion(); . if from_expn { 939 ( 0.00%) self.expn_depth += 1; . } . walk_stmt(self, s); . if from_expn { 939 ( 0.00%) self.expn_depth -= 1; . } . } . 523,440 ( 0.01%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) { 65,430 ( 0.00%) let ctxt = e.span.ctxt(); . 130,860 ( 0.00%) if let ExprKind::Block(block, _) = e.kind 14,121 ( 0.00%) && let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules . && !ctxt.is_root() 7 ( 0.00%) && let Some(macro_def_id) = ctxt.outer_expn_data().macro_def_id . && let Some(macro_def_id) = macro_def_id.as_local() 4 ( 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(); 238,512 ( 0.00%) } else if ctxt.is_root() && self.expn_depth > 0 { . let unsafe_block = self.macro_unsafe_blocks.last().copied(); . . match (self.lint.metavar_expns.entry(e.span), unsafe_block) { . (Entry::Vacant(e), None) => { . e.insert(MetavarState::ReferencedInSafe); . }, . (Entry::Vacant(e), Some(unsafe_block)) => { . e.insert(MetavarState::ReferencedInUnsafe { -- line 188 ---------------------------------------- -- line 201 ---------------------------------------- . unsafe_blocks.push(unsafe_block); . } . }, . } . . // NB: No need to visit descendant nodes. They're guaranteed to represent the same . // metavariable . } else { 196,290 ( 0.00%) walk_expr(self, e); 5,262,459 ( 0.07%) => /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:: (14,171x) . } 523,440 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe { 127,539 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 113,368 ( 0.00%) if is_lint_allowed(cx, MACRO_METAVARS_IN_UNSAFE, body.value.hir_id) { 19,848,108 ( 0.25%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (14,171x) . 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 . 85,026 ( 0.00%) let mut vis = BodyVisitor { . macro_unsafe_blocks: Vec::new(), . #[expect(clippy::bool_to_int_with_if)] // obfuscates the meaning 28,342 ( 0.00%) expn_depth: if body.value.span.from_expansion() { 1 } else { 0 }, . cx, . lint: self . }; . vis.visit_body(body); 99,197 ( 0.00%) } . . fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { . // Aggregate all unsafe blocks from all spans: . // ``` . // macro_rules! x { . // ($w:expr, $x:expr, $y:expr) => { $w; unsafe { $w; $x; }; unsafe { $x; $y; }; } . // } . // $w: [] (unsafe#0 is never added because it was referenced in a safe context) -- line 239 ---------------------------------------- -- line 266 ---------------------------------------- . // The invocation doesn't matter. Also we want to dedupe by the unsafe block and not by anything . // related to the callsite. . let span = cx.tcx.hir_span(id); . . (id, Span::new(span.lo(), span.hi(), SyntaxContext::root(), None)) . }) . .dedup_by(|&(_, a), &(_, b)| a == b); . 20 ( 0.00%) for (id, span) in bad_unsafe_blocks { 49 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/adaptors/coalesce.rs:, ::check_crate_post::{closure#0}>>>, ::check_crate_post::{closure#1}>, ::check_crate_post::{closure#2}>, itertools::adaptors::coalesce::DedupPred2CoalescePred<::check_crate_post::{closure#3}>, itertools::adaptors::coalesce::NoCount> as core::iter::traits::iterator::Iterator>::next (1x) . span_lint_hir_and_then( . cx, . MACRO_METAVARS_IN_UNSAFE, . id, . span, . "this macro expands metavariables in an unsafe block", . |diag| { . diag.note("this allows the user of the macro to write unsafe code outside of an unsafe block"); -- line 282 ---------------------------------------- -- line 284 ---------------------------------------- . "consider expanding any metavariables outside of this block, e.g. by storing them in a variable", . ); . diag.help( . "... or also expand referenced metavariables in a safe context to require an unsafe block at callsite", . ); . }, . ); . } 8 ( 0.00%) } . } 276,483 ( 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; . 48,072 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 18,027 ( 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); . } 48,072 ( 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 { 13,335 ( 0.00%) if let ExprKind::Cast(cast_exp, _) = expr.kind { 1,353 ( 0.00%) let precast_ty = cx.typeck_results().expr_ty(cast_exp); 18,040 ( 0.00%) => ???:::expr_ty (451x) 1,353 ( 0.00%) let cast_ty = cx.typeck_results().expr_ty(expr); 18,040 ( 0.00%) => ???:::expr_ty (451x) . . return is_isize_or_usize(precast_ty) != is_isize_or_usize(cast_ty); . } . . false . } . . fn detect_absurd_comparison<'tcx>( -- line 76 ---------------------------------------- -- line 78 ---------------------------------------- . 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 66,099 ( 0.00%) if cx.typeck_results().expr_ty(lhs) != cx.typeck_results().expr_ty(rhs) { 480,720 ( 0.01%) => ???:::expr_ty (12,018x) . return None; . } . . // comparisons between fix sized types and target sized types are considered unanalyzable 451 ( 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)?; . 4,698 ( 0.00%) let lx = detect_extreme_expr(cx, normalized_lhs); 499,554 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (1,566x) 6,264 ( 0.00%) let rx = detect_extreme_expr(cx, normalized_rhs); 520,216 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (1,566x) . . Some(match rel { . Rel::Lt => { . match (lx, rx) { . (Some(l @ ExtremeExpr { which: Maximum, .. }), _) => (l, AlwaysFalse), // max < x . (_, Some(r @ ExtremeExpr { which: Minimum, .. })) => (r, AlwaysFalse), // x < min . _ => return None, . } -- line 106 ---------------------------------------- -- line 113 ---------------------------------------- . (_, Some(r @ ExtremeExpr { which: Maximum, .. })) => (r, AlwaysTrue), // x <= max . _ => return None, . } . }, . Rel::Ne | Rel::Eq => return None, . }) . } . 25,056 ( 0.00%) fn detect_extreme_expr<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { 6,264 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 125,280 ( 0.00%) => ???:::expr_ty (3,132x) . 21,924 ( 0.00%) let cv = ConstEvalCtxt::new(cx).eval(expr)?; 532,744 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (3,132x) 175,392 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (3,132x) . 28,188 ( 0.00%) let which = match (ty.kind(), cv) { . (&ty::Bool, Constant::Bool(false)) | (&ty::Uint(_), Constant::Int(0)) => ExtremeType::Minimum, . (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MIN >> (128 - int_bits(cx.tcx, ity)), ity) => { . ExtremeType::Minimum . }, . . (&ty::Bool, Constant::Bool(true)) => ExtremeType::Maximum, . (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MAX >> (128 - int_bits(cx.tcx, ity)), ity) => { . ExtremeType::Maximum . }, . (&ty::Uint(uty), Constant::Int(i)) if clip(cx.tcx, u128::MAX, uty) == i => ExtremeType::Maximum, . . _ => return None, . }; . Some(ExtremeExpr { which, expr }) 28,188 ( 0.00%) } 15,405 ( 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 { 654,300 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 196,290 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 120,430 ( 0.00%) match expr.kind { . // `T::BITS - n.leading_zeros()` . ExprKind::Binary(op, left, right) . if op.node == BinOpKind::Sub 6 ( 0.00%) && let ExprKind::MethodCall(leading_zeros, recv, [], _) = right.kind . && leading_zeros.ident.name == sym::leading_zeros . && let ExprKind::Path(QPath::TypeRelative(hir_ty, segment)) = left.kind . && segment.ident.name == sym::BITS . && let right_ty = cx.typeck_results().expr_ty(recv) . && 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) -- line 118 ---------------------------------------- -- 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); . } . }, . _ => {}, . } 523,440 ( 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/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; . 66,099 ( 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) = 39,207 ( 0.00%) if op == BinOpKind::Div && (is_integer_literal(right, 2) || is_float_literal(right, 2.0)) { . (left, false) . } else if op == BinOpKind::Mul && is_float_literal(left, 0.5) { . (right, false) . } else if op == BinOpKind::Mul && is_float_literal(right, 0.5) { . (left, false) . } else if op == BinOpKind::Shr && is_integer_literal(right, 1) { . (left, true) . } else { . return; . }; . 162 ( 0.00%) if !left.span.from_expansion() 162 ( 0.00%) && !right.span.from_expansion() . && let Some((add_l_expr, add_r_expr)) = add_operands(maybe_add_expr) . && add_operands(add_l_expr).is_none() && add_operands(add_r_expr).is_none() . && let left_ty = cx.typeck_results().expr_ty_adjusted(add_l_expr) . && let right_ty = cx.typeck_results().expr_ty_adjusted(add_r_expr) . && left_ty == right_ty . && (!require_uint || matches!(left_ty.kind(), ty::Uint(_))) . // Do not lint on `(_+1)/2` and `(1+_)/2`, it is likely a `div_ceil()` operation . && !is_integer_literal(add_l_expr, 1) && !is_integer_literal(add_r_expr, 1) -- line 43 ---------------------------------------- -- line 52 ---------------------------------------- . MANUAL_MIDPOINT, . expr.span, . "manual implementation of `midpoint` which can overflow", . format!("use `{left_ty}::midpoint` instead"), . sugg, . app, . ); . } 48,072 ( 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>)> { 162 ( 0.00%) match expr.kind { . ExprKind::Binary(op, left, right) if op.node == BinOpKind::Add => Some((left, right)), . _ => None, . } . } . . fn is_midpoint_implemented(cx: &LateContext<'_>, ty: Ty<'_>, msrv: Msrv) -> bool { . match ty.kind() { . ty::Uint(_) | ty::Float(_) => msrv.meets(cx, msrvs::UINT_FLOAT_MIDPOINT), -- line 72 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl ExplicitWrite { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for ExplicitWrite { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // match call to unwrap 134,254 ( 0.00%) if let ExprKind::MethodCall(unwrap_fun, write_call, [], _) = expr.kind 62 ( 0.00%) && unwrap_fun.ident.name == sym::unwrap . // match call to write_fmt . && let ExprKind::MethodCall(write_fun, write_recv, [write_arg], _) = *look_in_block(cx, &write_call.kind) . && let ExprKind::Call(write_recv_path, []) = write_recv.kind . && write_fun.ident.name == sym::write_fmt . && let Some(def_id) = write_recv_path.basic_res().opt_def_id() . { . // match calls to std::io::stdout() / std::io::stderr () . let (dest_name, prefix) = match cx.tcx.get_diagnostic_name(def_id) { -- line 66 ---------------------------------------- -- line 105 ---------------------------------------- . EXPLICIT_WRITE, . expr.span, . format!("use of `{used}.unwrap()`"), . "try", . format!("{prefix}{sugg_mac}!({inputs_snippet})"), . applicability, . ); . } 523,440 ( 0.01%) } . } . . /// If `kind` is a block that looks like `{ let result = $expr; result }` then . /// returns $expr. Otherwise returns `kind`. . fn look_in_block<'tcx, 'hir>(cx: &LateContext<'tcx>, kind: &'tcx ExprKind<'hir>) -> &'tcx ExprKind<'hir> { . if let ExprKind::Block(block, _label @ None) = kind . && let Block { . stmts: [Stmt { kind: StmtKind::Let(local), .. }], -- line 121 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/derive_ord_xor_partial_ord.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use rustc_hir::{self as hir, HirId}; . use rustc_lint::LateContext; . use rustc_middle::ty::Ty; . use rustc_span::sym; . . use super::DERIVE_ORD_XOR_PARTIAL_ORD; . . /// Implementation of the `DERIVE_ORD_XOR_PARTIAL_ORD` lint. 85,935 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item: &hir::Item<'_>, . trait_ref: &hir::TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . ord_is_automatically_derived: bool, . ) { 34,374 ( 0.00%) if let Some(ord_trait_def_id) = cx.tcx.get_diagnostic_item(sym::Ord) 607,274 ( 0.01%) => ???:::get_diagnostic_item (5,729x) 22,916 ( 0.00%) && let Some(partial_ord_trait_def_id) = cx.tcx.lang_items().partial_ord_trait() 229,160 ( 0.00%) => ???:::lang_items (5,729x) 22,916 ( 0.00%) && let Some(def_id) = &trait_ref.trait_def_id() 74,477 ( 0.00%) => ???:::trait_def_id (5,729x) . && *def_id == ord_trait_def_id . && let item_hir_id = cx.tcx.local_def_id_to_hir_id(item.owner_id) . && !fulfill_or_allowed(cx, DERIVE_ORD_XOR_PARTIAL_ORD, [adt_hir_id]) . { . // Look for the PartialOrd implementations for `ty` . cx.tcx.for_each_relevant_impl(partial_ord_trait_def_id, ty, |impl_id| { . let partial_ord_is_automatically_derived = cx.tcx.is_automatically_derived(impl_id); . -- line 29 ---------------------------------------- -- line 46 ---------------------------------------- . 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), "`PartialOrd` implemented here"); . } . }); . } . }); . } 45,832 ( 0.00%) } 22,916 ( 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<'_, '_> { 21,064 ( 0.00%) fn check_single_char_names(&self) { 10,532 ( 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(); 92 ( 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"), . ); . } 31,596 ( 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 { 502 ( 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, '_> { 94,050 ( 0.00%) fn visit_pat(&mut self, pat: &'tcx Pat) { 76,124 ( 0.00%) match pat.kind { 35,852 ( 0.00%) PatKind::Ident(_, ident, _) => { 17,926 ( 0.00%) if !pat.span.from_expansion() { 8,919 ( 0.00%) self.check_ident(ident); . } . }, . PatKind::Struct(_, _, ref fields, _) => { . for field in fields { . if !field.is_shorthand { . self.visit_pat(&field.pat); . } . } . }, . // just go through the first pattern, as either all patterns . // bind the same bindings or rustc would have errored much earlier . PatKind::Or(ref pats) => self.visit_pat(&pats[0]), . _ => walk_pat(self, pat), . } 71,704 ( 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() 102,610 ( 0.00%) .any(|&name| interned_name.starts_with(name) || interned_name.ends_with(name)) . } . . impl SimilarNamesNameVisitor<'_, '_, '_> { 138 ( 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); . } 184 ( 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; . } 8,919 ( 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(); 17,838 ( 0.00%) if count < 3 { 92 ( 0.00%) if count == 1 { 184 ( 0.00%) self.check_short_ident(ident); 4,186 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_short_ident (46x) . } . return; . } . for existing_name in &self.0.names { 251 ( 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( -- line 258 ---------------------------------------- -- line 285 ---------------------------------------- . |diag| { . diag.span_note(existing_name.span, "existing binding defined here"); . }, . ); . return; . } . self.0.names.push(ExistingName { . interned: ident.name, 8,873 ( 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(); -- line 301 ---------------------------------------- -- 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> { 9 ( 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 4 ( 0.00%) SimilarNamesNameVisitor(self).visit_pat(&local.pat); 468 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (1x) 8 ( 0.00%) } 729 ( 0.00%) fn visit_block(&mut self, blk: &'tcx Block) { 68 ( 0.00%) self.single_char_names.push(vec![]); . . self.apply(|this| walk_block(this, blk)); . 162 ( 0.00%) self.check_single_char_names(); 924 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (77x) . self.single_char_names.pop(); 648 ( 0.00%) } 13,383 ( 0.00%) fn visit_arm(&mut self, arm: &'tcx Arm) { 496 ( 0.00%) self.single_char_names.push(vec![]); . . self.apply(|this| { 5,948 ( 0.00%) SimilarNamesNameVisitor(this).visit_pat(&arm.pat); 126,538 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (1,487x) 4,461 ( 0.00%) if let Some(body) = &arm.body { . this.apply(|this| walk_expr(this, body)); . } . }); . 2,974 ( 0.00%) self.check_single_char_names(); 17,844 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (1,487x) . self.single_char_names.pop(); 11,896 ( 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) { 14,032 ( 0.00%) if item.span.in_external_macro(cx.sess().source_map()) { . return; . } . . if let ItemKind::Fn(ast::Fn { . ref sig, . body: Some(ref blk), . .. . }) = item.kind . { . do_check(self, cx, &item.attrs, &sig.decl, blk); . } . } . . fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &AssocItem) { 56,645 ( 0.00%) if item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 8,964 ( 0.00%) if let AssocItemKind::Fn(ast::Fn { . ref sig, . body: Some(ref blk), . .. 26,892 ( 0.00%) }) = item.kind . { 35,856 ( 0.00%) do_check(self, cx, &item.attrs, &sig.decl, blk); 8,849,566 ( 0.11%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:clippy_lints::non_expressive_names::do_check (8,964x) . } . } . } . 98,604 ( 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)) { 71,712 ( 0.00%) let mut visitor = SimilarNamesLocalVisitor { . names: Vec::new(), . cx, . threshold: lint.single_char_binding_names_threshold, 26,892 ( 0.00%) single_char_names: vec![vec![]], . }; . . // initialize with function arguments . for arg in &decl.inputs { 35,848 ( 0.00%) SimilarNamesNameVisitor(&mut visitor).visit_pat(&arg.pat); 4,316,246 ( 0.05%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat (8,962x) . } . // walk all other bindings . walk_block(&mut visitor, blk); . 8,964 ( 0.00%) visitor.check_single_char_names(); 108,534 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_single_char_names (8,964x) . } 71,712 ( 0.00%) } . . /// Precondition: `a_name.chars().count() < b_name.chars().count()`. . #[must_use] . 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(); . while let (Some(a), Some(b)) = (a_chars.next(), b_chars.next()) { -- line 459 ---------------------------------------- 76,320 ( 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 { 28,393 ( 0.00%) if let ItemKind::Mod(_, test_mod) = item.kind 3,377 ( 0.00%) && item.span.hi() == test_mod.spans.inner_span.hi() . && is_cfg_test(cx.tcx, item.hir_id()) . && !item.span.from_expansion() . && !is_from_proc_macro(cx, item) . { . true . } else { . false . } . } . . impl LateLintPass<'_> for ItemsAfterTestModule { 2,772 ( 0.00%) fn check_mod(&mut self, cx: &LateContext<'_>, module: &Mod<'_>, _: HirId) { 28,394 ( 0.00%) let mut items = module.item_ids.iter().map(|&id| cx.tcx.hir_item(id)); 972,055 ( 0.01%) => ???:::hir_item (14,043x) . . 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, . ); . } . }, . ); . } 2,464 ( 0.00%) } . } 308 ( 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 { 159 ( 0.00%) Self { . cx, 4,811 ( 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 { 23,895 ( 0.00%) Self { . allow_side_effects: false, . ..self . } . } . . /// Check paths by their resolution instead of exact equality. See [`PathCheck`] for more . /// details. . #[must_use] -- line 90 ---------------------------------------- -- 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`. 1 ( 0.00%) pub fn inter_expr(&mut self, ctxt: SyntaxContext) -> HirEqInterExpr<'_, 'a, 'tcx> { 81,769 ( 0.00%) HirEqInterExpr { . inner: self, . eval_ctxt: ctxt, . prev_left_ctxt: ctxt, . prev_right_ctxt: ctxt, . locals: HirIdMap::default(), . local_items: FxIndexMap::default(), . } 1 ( 0.00%) } . 2 ( 0.00%) pub fn eq_block(&mut self, ctxt: SyntaxContext, left: &Block<'_>, right: &Block<'_>) -> bool { 6 ( 0.00%) self.inter_expr(ctxt).eq_block(left, right) 699 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (1x) 16 ( 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) 4 ( 0.00%) } . 58 ( 0.00%) pub fn eq_expr(&mut self, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 28,848 ( 0.00%) self.inter_expr(ctxt).eq_expr(left, right) 496,788 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (29x) 464 ( 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:: (29x) 116 ( 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 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. 259 ( 0.00%) fn eq_block(&mut self, left: &Block<'_>, right: &Block<'_>) -> bool { . use TokenKind::{Semi, Whitespace}; 111 ( 0.00%) if left.stmts.len() != right.stmts.len() { . return false; . } 185 ( 0.00%) let lspan = left.span.data(); 185 ( 0.00%) let rspan = right.span.data(); 407 ( 0.00%) match self.check_ctxt(lspan.ctxt, rspan.ctxt) { 1,073 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (37x) . Some(false) => return false, 74 ( 0.00%) None if self.eval_ctxt.is_root() => {}, . _ => { . // Don't try to check in between statements inside macros. . return over(left.stmts, right.stmts, |left, right| self.eq_stmt(left, right)) . && both(left.expr.as_ref(), right.expr.as_ref(), |left, right| { 72 ( 0.00%) self.eq_expr(left, right) 43,616 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (36x) . }); . }, . } . 2 ( 0.00%) let mut lstart = lspan.lo; 1 ( 0.00%) let mut rstart = rspan.lo; . . for (left, right) in left.stmts.iter().zip(right.stmts) { . if !self.eq_stmt(left, right) { . 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 { -- line 415 ---------------------------------------- -- line 435 ---------------------------------------- . }) { . return false; . } . . lstart = lstmt_span.hi; . rstart = rstmt_span.hi; . } . 6 ( 0.00%) let (lend, rend) = match (left.expr, right.expr) { . (Some(left), Some(right)) => { 6 ( 0.00%) if !self.eq_expr(left, right) { 533 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1x) . return false; . } . let Some(lexpr_span) = walk_span_to_context(left.span, lspan.ctxt) else { . return false; . }; . let Some(rexpr_span) = walk_span_to_context(right.span, rspan.ctxt) else { . return false; . }; -- line 453 ---------------------------------------- -- line 463 ---------------------------------------- . return true; . } else if lend < lstart || rend < rstart { . // Only one of the blocks had a weird macro . return false; . } . eq_span_tokens(self.inner.cx, lstart..lend, rstart..rend, |t| { . !matches!(t, Whitespace | Semi) . }) 296 ( 0.00%) } . 3,520 ( 0.00%) fn should_ignore(&self, expr: &Expr<'_>) -> bool { 319 ( 0.00%) macro_backtrace(expr.span).last().is_some_and(|macro_call| { 319 ( 0.00%) matches!( 1,595 ( 0.00%) self.inner.cx.tcx.get_diagnostic_name(macro_call.def_id), 16,907 ( 0.00%) => ???:::get_diagnostic_name (319x) . Some(sym::todo_macro | sym::unimplemented_macro) . ) . }) 2,560 ( 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)] 51,290 ( 0.00%) pub fn eq_expr(&mut self, left: &Expr<'_>, right: &Expr<'_>) -> bool { 46,161 ( 0.00%) match self.check_ctxt(left.span.ctxt(), right.span.ctxt()) { 139,461 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (4,809x) . None => { 25,645 ( 0.00%) if let Some((typeck_lhs, typeck_rhs)) = self.inner.maybe_typeck_results 46,161 ( 0.00%) && typeck_lhs.expr_ty(left) == typeck_rhs.expr_ty(right) 384,720 ( 0.00%) => ???:::expr_ty (9,618x) 58,566 ( 0.00%) && let (Some(l), Some(r)) = ( 14,796 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_lhs) 101,370 ( 0.00%) => ???:::typing_env (3,379x) 3,699 ( 0.00%) .eval_local(left, self.eval_ctxt), 14,796 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_rhs) 101,370 ( 0.00%) => ???:::typing_env (3,379x) 3,699 ( 0.00%) .eval_local(right, self.eval_ctxt), . ) 112 ( 0.00%) && l == r 1,092 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (28x) . { . return true; 17,190 ( 0.00%) } 80,900 ( 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:: (3,236x) . }, . Some(false) => return false, . Some(true) => {}, . } . 35,707 ( 0.00%) let is_eq = match ( 30,606 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &left.kind), 19,236 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (4,809x) 25,505 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &right.kind), 19,686 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (4,809x) . ) { . (ExprKind::AddrOf(lb, l_mut, le), ExprKind::AddrOf(rb, r_mut, re)) => { . 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, _)) => { . 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)) => { . self.inner.allow_side_effects && lo.node == ro.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }, 144 ( 0.00%) (ExprKind::Block(l, _), ExprKind::Block(r, _)) => self.eq_block(l, r), 53,120 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (36x) . (ExprKind::Binary(l_op, ll, lr), ExprKind::Binary(r_op, rl, rr)) => { 1,620 ( 0.00%) l_op.node == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) 465,418 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (36x) . || self.swap_binop(l_op.node, ll, lr).is_some_and(|(l_op, ll, lr)| { . l_op == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }) . }, . (ExprKind::Break(li, le), ExprKind::Break(ri, re)) => { . 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)) => { 196 ( 0.00%) self.inner.allow_side_effects && self.eq_expr(l_fun, r_fun) && self.eq_exprs(l_args, r_args) 20,146 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (14x) . }, . (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)) => { 63 ( 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)) => { . self.eq_expr(lc, rc) && self.eq_expr(lt, rt) . && both(le.as_ref(), re.as_ref(), |l, r| self.eq_expr(l, r)) . }, . (ExprKind::Let(l), ExprKind::Let(r)) => { . self.eq_pat(l.pat, r.pat) -- line 563 ---------------------------------------- -- line 582 ---------------------------------------- . && both(l.guard.as_ref(), r.guard.as_ref(), |l, r| self.eq_expr(l, r)) . && self.eq_expr(l.body, r.body) . }) . }, . ( . ExprKind::MethodCall(l_path, l_receiver, l_args, _), . ExprKind::MethodCall(r_path, r_receiver, r_args, _), . ) => { 12 ( 0.00%) self.inner.allow_side_effects 28 ( 0.00%) && self.eq_path_segment(l_path, r_path) 192 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (4x) 24 ( 0.00%) && self.eq_expr(l_receiver, r_receiver) 3,776 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (4x) 16 ( 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) . }, 624 ( 0.00%) (ExprKind::Path(l), ExprKind::Path(r)) => self.eq_qpath(l, r), 53 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (1x) . (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)) => { . self.eq_qpath(l_path, r_path) . && match (lo, ro) { . (StructTailExpr::Base(l),StructTailExpr::Base(r)) => self.eq_expr(l, r), -- line 610 ---------------------------------------- -- line 612 ---------------------------------------- . (StructTailExpr::DefaultFields(_), StructTailExpr::DefaultFields(_)) => true, . _ => false, . } . && over(lf, rf, |l, r| self.eq_expr_field(l, r)) . }, . (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), 18 ( 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, . }; 2,700 ( 0.00%) (is_eq && (!self.should_ignore(left) || !self.should_ignore(right))) 11,683 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::should_ignore (28x) 9,562 ( 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)) . }) 41,032 ( 0.00%) } . . fn eq_exprs(&mut self, left: &[Expr<'_>], right: &[Expr<'_>]) -> bool { 124 ( 0.00%) over(left, right, |l, r| self.eq_expr(l, r)) 16,448 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_exprs::{closure#0}> (18x) . } . . fn eq_expr_field(&mut self, left: &ExprField<'_>, right: &ExprField<'_>) -> bool { . left.ident.name == right.ident.name && self.eq_expr(left.expr, right.expr) . } . . fn eq_generic_arg(&mut self, left: &GenericArg<'_>, right: &GenericArg<'_>) -> bool { . match (left, right) { -- line 693 ---------------------------------------- -- line 815 ---------------------------------------- . && 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, . } . } . 312 ( 0.00%) fn eq_qpath(&mut self, left: &QPath<'_>, right: &QPath<'_>) -> bool { 630 ( 0.00%) match (left, right) { . (QPath::Resolved(lty, lpath), QPath::Resolved(rty, rpath)) => { 816 ( 0.00%) both(lty.as_ref(), rty.as_ref(), |l, r| self.eq_ty(l, r)) && self.eq_path(lpath, rpath) 2,288 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path (22x) . }, . (QPath::TypeRelative(lty, lseg), QPath::TypeRelative(rty, rseg)) => { 374 ( 0.00%) self.eq_ty(lty, rty) && self.eq_path_segment(lseg, rseg) 3,124 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_ty (22x) 1,056 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (22x) . }, . _ => false, . } . } . 832 ( 0.00%) pub fn eq_path(&mut self, left: &Path<'_>, right: &Path<'_>) -> bool { 1,178 ( 0.00%) match (left.res, right.res) { 138 ( 0.00%) (Res::Local(l), Res::Local(r)) => l == r || self.locals.get(&l) == Some(&r), . (Res::Local(_), _) | (_, Res::Local(_)) => false, . (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 => . { . (l == r || self.local_items.get(&l) == Some(&r)) && self.eq_path_segments(left.segments, right.segments) . }, 232 ( 0.00%) _ => self.eq_path_segments(left.segments, right.segments), . } 832 ( 0.00%) } . . fn eq_path_parameters(&mut self, left: &GenericArgs<'_>, right: &GenericArgs<'_>) -> bool { 84 ( 0.00%) if left.parenthesized == right.parenthesized { 84 ( 0.00%) over(left.args, right.args, |l, r| self.eq_generic_arg(l, r)) // FIXME(flip1995): may not work 84 ( 0.00%) && over(left.constraints, right.constraints, |l, r| self.eq_assoc_eq_constraint(l, r)) . } else { . false . } . } . . pub fn eq_path_segments<'tcx>( . &mut self, . mut left: &'tcx [PathSegment<'tcx>], . mut right: &'tcx [PathSegment<'tcx>], . ) -> bool { 174 ( 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; . } . 290 ( 0.00%) over(left, right, |l, r| self.eq_path_segment(l, r)) 2,784 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (58x) . } . 588 ( 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; . } . 420 ( 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 . } 672 ( 0.00%) } . 176 ( 0.00%) pub fn eq_ty(&mut self, left: &Ty<'_>, right: &Ty<'_>) -> bool { 220 ( 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. 41,328 ( 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); . 10,332 ( 0.00%) if left == self.eval_ctxt && right == self.eval_ctxt { . None . } 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 . || right == prev_right . || left == self.eval_ctxt . || right == self.eval_ctxt -- line 936 ---------------------------------------- -- line 980 ---------------------------------------- . // Either there's a different number of expansions, or at least one context is . // a parent of the evaluation context. . return Some(false); . } . left_data = left.outer_expn_data(); . right_data = right.outer_expn_data(); . } . } 46,494 ( 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>)> { . match binop { -- line 996 ---------------------------------------- -- line 1018 ---------------------------------------- . .is_primitive() . .then_some((binop, rhs, lhs)) . }), . } . } . } . . /// Some simple reductions like `{ return }` => `return` 10,202 ( 0.00%) fn reduce_exprkind<'hir>( . cx: &LateContext<'_>, . eval_ctxt: SyntaxContext, . kind: &'hir ExprKind<'hir>, . ) -> &'hir ExprKind<'hir> { 20,404 ( 0.00%) if let ExprKind::Block(block, _) = kind { 450 ( 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. 360 ( 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 1065 ---------------------------------------- . }, . _ => kind, . }, . _ => kind, . } . } else { . kind . } 10,202 ( 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() . .map_or_else(|| r.is_none(), |x| r.as_ref().is_some_and(|y| eq_fn(x, y))) . } . . /// 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 { 488 ( 0.00%) left.len() == right.len() && left.iter().zip(right).all(|(x, y)| eq_fn(x, y)) 18 ( 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. 19,116 ( 0.00%) pub fn eq_expr_value(cx: &LateContext<'_>, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 4,779 ( 0.00%) SpanlessEq::new(cx).deny_side_effects().eq_expr(ctxt, left, right) 28,674 ( 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 { 10 ( 0.00%) Self { . cx, 2 ( 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() . } . 10 ( 0.00%) pub fn hash_block(&mut self, b: &Block<'_>) { 1 ( 0.00%) for s in b.stmts { . self.hash_stmt(s); . } . 3 ( 0.00%) if let Some(e) = b.expr { 2 ( 0.00%) self.hash_expr(e); 585 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (1x) . } . . mem::discriminant(&b.rules).hash(&mut self.s); 8 ( 0.00%) } . . #[expect(clippy::too_many_lines)] 54 ( 0.00%) pub fn hash_expr(&mut self, e: &Expr<'_>) { 12 ( 0.00%) let simple_const = self.maybe_typeck_results.and_then(|typeck_results| { 18 ( 0.00%) ConstEvalCtxt::with_env(self.cx.tcx, self.cx.typing_env(), typeck_results).eval_local(e, e.span.ctxt()) 60 ( 0.00%) => ???:::typing_env (2x) . }); . . // 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 6 ( 0.00%) simple_const.hash(&mut self.s); . if simple_const.is_some() { . return; . } . . mem::discriminant(&e.kind).hash(&mut self.s); . 18 ( 0.00%) match &e.kind { . ExprKind::AddrOf(kind, m, e) => { . mem::discriminant(kind).hash(&mut self.s); . m.hash(&mut self.s); . self.hash_expr(e); . }, . ExprKind::Continue(i) => { 1 ( 0.00%) if let Some(i) = i.label { . self.hash_name(i.ident.name); . } . }, . ExprKind::Array(v) => { . self.hash_exprs(v); . }, . ExprKind::Assign(l, r, _) => { . self.hash_expr(l); -- line 1205 ---------------------------------------- -- line 1209 ---------------------------------------- . 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, _) => { 4 ( 0.00%) self.hash_block(b); 618 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block (1x) . }, . ExprKind::Binary(op, l, r) => { . mem::discriminant(&op.node).hash(&mut self.s); . self.hash_expr(l); . self.hash_expr(r); . }, . ExprKind::Break(i, j) => { . if let Some(i) = i.label { . self.hash_name(i.ident.name); . } . if let Some(j) = j { . self.hash_expr(j); . } . }, . ExprKind::Call(fun, args) => { 6 ( 0.00%) self.hash_expr(fun); 311 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (1x) 2 ( 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 { . capture_clause, body, .. . }) => { -- line 1242 ---------------------------------------- -- line 1398 ---------------------------------------- . mem::discriminant(kind).hash(&mut self.s); . self.hash_expr(expr); . if let Some(ty) = ty { . self.hash_ty(ty); . } . }, . ExprKind::Err(_) => {}, . } 48 ( 0.00%) } . . pub fn hash_exprs(&mut self, e: &[Expr<'_>]) { . for e in e { 3 ( 0.00%) self.hash_expr(e); 1,918 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (1x) . } . } . . pub fn hash_name(&mut self, n: Symbol) { . n.hash(&mut self.s); . } . . pub fn hash_qpath(&mut self, p: &QPath<'_>) { 6 ( 0.00%) match p { . QPath::Resolved(_, path) => { 6 ( 0.00%) self.hash_path(path); 48 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_path (1x) . }, . QPath::TypeRelative(_, path) => { 1 ( 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); . match &lit.kind { -- line 1432 ---------------------------------------- -- line 1525 ---------------------------------------- . self.hash_pat(pat); . } . e.hash(&mut self.s); . }, . PatKind::Never | PatKind::Wild | PatKind::Err(_) => {}, . } . } . 16 ( 0.00%) pub fn hash_path(&mut self, path: &Path<'_>) { 4 ( 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), . _ => { 4 ( 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 { 2 ( 0.00%) for seg in path.segments { 2 ( 0.00%) self.hash_name(seg.ident.name); 8 ( 0.00%) self.hash_generic_args(seg.args().args); 6 ( 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 (2x) . } . } . }, . } 16 ( 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<'_>) { -- line 1564 ---------------------------------------- -- 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()), . } . } 2 ( 0.00%) } . } . . pub fn hash_stmt(cx: &LateContext<'_>, s: &Stmt<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); . h.hash_stmt(s); . h.finish() . } . -- line 1724 ---------------------------------------- -- line 1725 ---------------------------------------- . 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 . } . } . 2 ( 0.00%) pub fn hash_expr(cx: &LateContext<'_>, e: &Expr<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); 2 ( 0.00%) h.hash_expr(e); 2,704 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr (2x) 2 ( 0.00%) h.finish() 4 ( 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 { -- line 1745 ---------------------------------------- 68,290 ( 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>)> { 54 ( 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 { 458,010 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 150,438 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 19,551 ( 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, . ); . }, . ); . } 523,440 ( 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_error_messages/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . DiagMessage::Str(s) => Some(s), . DiagMessage::Inline(_) => None, . } . } . } . . impl From for DiagMessage { . fn from(s: String) -> Self { 12 ( 0.00%) DiagMessage::Str(Cow::Owned(s)) . } . } . impl From<&'static str> for DiagMessage { . fn from(s: &'static str) -> Self { 12 ( 0.00%) DiagMessage::Str(Cow::Borrowed(s)) . } . } . impl From> for DiagMessage { . fn from(s: Cow<'static, str>) -> Self { . DiagMessage::Str(s) . } . } . -- line 69 ---------------------------------------- -- line 84 ---------------------------------------- . /// A collection of `Span`s. . /// . /// Spans have two orthogonal attributes: . /// . /// - They can be *primary spans*. In this case they are the locus of . /// the error, and would be rendered with `^^^`. . /// - They can have a *label*. In this case, the label is written next . /// to the mark in the snippet when we render. 130,645 ( 0.00%) #[derive(Clone, Debug, Hash, PartialEq, Eq, Encodable, Decodable, StableHash)] . pub struct MultiSpan { . primary_spans: Vec, 55,989 ( 0.00%) span_labels: Vec<(Span, DiagMessage)>, 3,904 ( 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 (122x) . } . . impl MultiSpan { . #[inline] . pub fn new() -> MultiSpan { 2,000 ( 0.00%) MultiSpan { primary_spans: vec![], span_labels: vec![] } . } . . pub fn from_span(primary_span: Span) -> MultiSpan { . MultiSpan { primary_spans: vec![primary_span], span_labels: vec![] } . } . . pub fn from_spans(mut vec: Vec) -> MultiSpan { . vec.sort(); -- line 109 ---------------------------------------- 10,690 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/set.rs -------------------------------------------------------------------------------- Ir -- line 239 ---------------------------------------- . /// let mut set = HashSet::with_hasher(s); . /// set.insert(2); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "hashmap_build_hasher", since = "1.7.0")] . #[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")] . pub const fn with_hasher(hasher: S) -> HashSet { 60 ( 0.00%) HashSet { base: base::HashSet::with_hasher(hasher) } . } . . /// Creates an empty `HashSet` with at least the specified capacity, using . /// `hasher` to hash the keys. . /// . /// The hash set will be able to hold at least `capacity` elements without . /// reallocating. This method is allowed to allocate for more elements than . /// `capacity`. If `capacity` is zero, the hash set will not allocate. -- line 255 ---------------------------------------- -- line 1182 ---------------------------------------- . impl FromIterator for HashSet . where . T: Eq + Hash, . S: BuildHasher + Default, . { . #[inline] . fn from_iter>(iter: I) -> HashSet { . let mut set = HashSet::with_hasher(Default::default()); 29 ( 0.00%) set.extend(iter); 62 ( 0.00%) set . } . } . . #[stable(feature = "std_collections_from_array", since = "1.56.0")] . // Note: as what is currently the most convenient built-in way to construct . // a HashSet, a simple usage of this function must not *require* the user . // to provide a type annotation in order to infer the third type parameter . // (the hasher parameter, conventionally "S"). -- line 1199 ---------------------------------------- -- line 1278 ---------------------------------------- . #[rustc_const_unstable(feature = "const_default", issue = "143894")] . const impl Default for HashSet . where . S: [const] Default, . { . /// Creates an empty `HashSet` with the `Default` value for the hasher. . #[inline] . fn default() -> HashSet { 84,200 ( 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/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}; . 58,707 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . cmp_op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 6,782 ( 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(); 10,173 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 189,896 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (3,391x) 3,391 ( 0.00%) let ctxt = e.span.ctxt(); 12,265 ( 0.00%) let Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) = try_maybe_swap( . lhs, . rhs, 60,015 ( 0.00%) |lhs, rhs| { 12,449 ( 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) 4,460 ( 0.00%) && matches!(typeck.expr_ty(rhs).peel_refs().kind(), ty::Uint(_) | ty::Int(_)) 44,600 ( 0.00%) => ???:::expr_ty (1,115x) 2,230 ( 0.00%) && bit_sp.ctxt() == ctxt 12,265 ( 0.00%) && let Some(Constant::Int(cmp_val)) = ecx.eval(rhs) 153,870 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (1,115x) 5,575 ( 0.00%) && walk_span_to_context(rhs.span, ctxt).is_some() 95,890 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (1,115x) . { 10,035 ( 0.00%) Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) . } else { 4,552 ( 0.00%) None . } 45,336 ( 0.00%) }, . |r| (r.0.swap_operands(), r.1, r.2, r.3, r.4), . ) else { . return; . }; . 7,805 ( 0.00%) if !ctxt.in_external_macro(cx.tcx.sess.source_map()) 112,615 ( 0.00%) => ???:::in_external_macro (1,115x) 4,460 ( 0.00%) && let ty = typeck.expr_ty(bit_lhs).peel_refs() 44,600 ( 0.00%) => ???:::expr_ty (1,115x) . && matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) 3,345 ( 0.00%) && matches!(typeck.expr_ty(bit_rhs).peel_refs().kind(), ty::Uint(_) | ty::Int(_)) 44,600 ( 0.00%) => ???:::expr_ty (1,115x) 8,920 ( 0.00%) && let Some(Constant::Int(op_val)) = try_maybe_swap( . bit_lhs, . bit_rhs, 5,575 ( 0.00%) |_, e| ecx.eval(e).filter(|_| walk_span_to_context(e.span, ctxt).is_some()), 153,870 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (1,115x) 95,890 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (1,115x) . identity, . ) . { 11,150 ( 0.00%) let (lint, msg, note) = if matches!(bit_op, BitOp::And) && op_val == 0 { . let is_eq = cmp_op.matches_ordering(0.cmp(&cmp_val)); . (BAD_BIT_MASK, LintMsg::from_cmp_result(is_eq), NoteMsg::AndZero) . } else { 2,230 ( 0.00%) match cmp_op.kind { . CmpOpKind::Eq => { 5,575 ( 0.00%) let help_msg = match bit_op { 6,690 ( 0.00%) BitOp::And if op_val & cmp_val != cmp_val => NoteMsg::OpMissingBits, . BitOp::Or if op_val | cmp_val != cmp_val => NoteMsg::OpExtraBits, . _ => return, . }; . (BAD_BIT_MASK, LintMsg::from_cmp_result(cmp_op.negate), help_msg) . }, . CmpOpKind::Lt if matches!(ty.kind(), ty::Uint(_)) => match bit_op { . BitOp::And if op_val < cmp_val => { . (BAD_BIT_MASK, LintMsg::from_cmp_result(!cmp_op.negate), NoteMsg::OpLt) -- line 76 ---------------------------------------- -- 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)); . }); . } . } 52,184 ( 0.00%) } . . fn try_maybe_swap( . lhs: &T, . rhs: &T, . mut f: impl FnMut(&T, &T) -> Option, . inv: impl FnOnce(R) -> R, . ) -> Option { 23,691 ( 0.00%) if let Some(x) = f(lhs, rhs) { 455,748 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (3,391x) . Some(x) . } else { 6,828 ( 0.00%) f(rhs, lhs).map(inv) 40,968 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (2,276x) . } . } . . #[derive(Clone, Copy)] . struct CmpOp { . pub kind: CmpOpKind, . pub negate: bool, . } . impl CmpOp { . fn from_bin_op(op: BinOpKind) -> Option { 36,524 ( 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 { 3,345 ( 0.00%) match op { . BinOpKind::BitXor => Some(Self::Xor), . BinOpKind::BitAnd => Some(Self::And), . BinOpKind::BitOr => Some(Self::Or), . _ => None, . } . } . } . -- line 217 ---------------------------------------- 45,014 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_range_patterns.rs -------------------------------------------------------------------------------- Ir -- line 69 ---------------------------------------- . } . . fn min(self, other: Self) -> Self { . if self.val < other.val { self } else { other } . } . } . . impl LateLintPass<'_> for ManualRangePatterns { 124,264 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'_>, pat: &'_ rustc_hir::Pat<'_>) { . // a pattern like 1 | 2 seems fine, lint if there are at least 3 alternatives . // or more then one range (exclude triggering on stylistic using OR with one element . // like described https://github.com/rust-lang/rust-clippy/issues/11825) 31,066 ( 0.00%) if let PatKind::Or(pats) = pat.kind . && (pats.len() >= 3 || (pats.len() > 1 && pats.iter().any(|p| matches!(p.kind, PatKind::Range(..))))) . && !pat.span.in_external_macro(cx.sess().source_map()) . { . let mut min = Num::dummy(i128::MAX); . let mut max = Num::dummy(i128::MIN); . let mut range_kind = RangeEnd::Included; . let mut numbers_found = FxHashSet::default(); . let mut ranges_found = Vec::new(); -- line 89 ---------------------------------------- -- line 151 ---------------------------------------- . "try", . format!("{min}{range_kind}{max}"), . Applicability::MachineApplicable, . ); . } . }, . ); . } 124,264 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partialeq_ne_impl.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . pub PARTIALEQ_NE_IMPL, . complexity, . "re-implementing `PartialEq::ne`" . } . . declare_lint_pass!(PartialEqNeImpl => [PARTIALEQ_NE_IMPL]); . . impl<'tcx> LateLintPass<'tcx> for PartialEqNeImpl { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 35,926 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 12,562 ( 0.00%) items: impl_items, . .. 15,680 ( 0.00%) }) = item.kind 43,967 ( 0.00%) && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) 839,255 ( 0.01%) => ???:::is_automatically_derived (6,281x) 11,848 ( 0.00%) && let Some(eq_trait) = cx.tcx.lang_items().eq_trait() 118,480 ( 0.00%) => ???:::lang_items (2,962x) 5,927 ( 0.00%) && of_trait.trait_ref.path.res.def_id() == eq_trait . { . for impl_item in impl_items { 3 ( 0.00%) if cx.tcx.item_name(impl_item.owner_id) == sym::ne { . span_lint_hir( . cx, . PARTIALEQ_NE_IMPL, . impl_item.hir_id(), . cx.tcx.def_span(impl_item.owner_id), . "re-implementing `PartialEq::ne` is unnecessary", . ); . } . } . } 112,344 ( 0.00%) } . } 5,924 ( 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 { 261,720 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 135,796 ( 0.00%) if let ExprKind::MethodCall(name, recv, [_], _) = expr.kind 1,604 ( 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, . ); . } . } 261,720 ( 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 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 156,952 ( 0.00%) if let ExprKind::Binary(op, lhs, rhs) = expr.kind 19,569 ( 0.00%) && let (lt, gt) = match op.node { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . } . && let ctxt = expr.span.ctxt() . && let (op_lhs, op_rhs, other, commutative) = match (<.kind, >.kind) { . (&ExprKind::Binary(op, lhs, rhs), _) if op.node == BinOpKind::Add && ctxt == lt.span.ctxt() => { . (lhs, rhs, gt, true) -- line 62 ---------------------------------------- -- line 76 ---------------------------------------- . { . span_lint( . cx, . PANICKING_OVERFLOW_CHECKS, . expr.span, . "you are trying to use classic C overflow conditions that will fail in Rust", . ); . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { . // Cheap kind check before the costlier const context query. 65,430 ( 0.00%) if matches!( 130,860 ( 0.00%) expr.kind, . ExprKind::If(..) | ExprKind::Match(..) | ExprKind::MethodCall(..) | ExprKind::Call(..) 16,342 ( 0.00%) ) && !expr.span.from_expansion() 24,516 ( 0.00%) && !is_in_const_context(cx) 2,216,568 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (6,129x) . { . let suggestion = is_if_elseif_else_pattern(cx, expr) 12,258 ( 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); . } . } 523,440 ( 0.01%) } . 74,949 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { . // Cheap `if`-statement check before the costlier const context query. 10,707 ( 0.00%) if !block . .stmts . .iter() 2,382 ( 0.00%) .any(|stmt| matches!(stmt.kind, StmtKind::Expr(e) if matches!(e.kind, ExprKind::If(..)))) . { . return; . } . . if is_in_const_context(cx) || !self.msrv.meets(cx, msrvs::CLAMP) { . return; . } . for suggestion in is_two_if_pattern(cx, block) { . maybe_emit_suggestion(cx, &suggestion); . } 85,656 ( 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 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> { 17,117 ( 0.00%) if let ExprKind::MethodCall(seg_second, receiver, [arg_second], _) = expr.kind 3,174 ( 0.00%) && let ExprKind::MethodCall(seg_first, input, [arg_first], _) = &receiver.kind . // Match method names before the costlier type queries. . && let Some((min, max)) = match (seg_first.ident.name, seg_second.ident.name) { . (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)) -- line 319 ---------------------------------------- -- line 367 ---------------------------------------- . } . . enum FunctionType<'tcx> { . CmpMin, . CmpMax, . OrdOrFloat(&'tcx PathSegment<'tcx>), . } . 18 ( 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> { 4 ( 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 { 2 ( 0.00%) None . } 16 ( 0.00%) } . 36,338 ( 0.00%) if let ExprKind::Call(outer_fn, [first, second]) = &expr.kind { 19 ( 0.00%) check(cx, outer_fn, first, second, expr.span).or_else(|| check(cx, outer_fn, second, first, expr.span)) 40 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:clippy_lints::manual_clamp::is_call_max_min_pattern::check (2x) . } 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> { 10,074 ( 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>| { . 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 -- line 452 ---------------------------------------- 106,660 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_self_imports.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . pub UNNECESSARY_SELF_IMPORTS, . restriction, . "imports ending in `::{self}`, which can be omitted" . } . . declare_lint_pass!(UnnecessarySelfImports => [UNNECESSARY_SELF_IMPORTS]); . . impl EarlyLintPass for UnnecessarySelfImports { 98,224 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 32,624 ( 0.00%) if let ItemKind::Use(use_tree) = &item.kind . && let UseTreeKind::Nested { items, .. } = &use_tree.kind 2 ( 0.00%) && let [(self_tree, _)] = &**items . && let [self_seg] = &*self_tree.prefix.segments . && self_seg.ident.name == kw::SelfLower . && let Some(last_segment) = use_tree.prefix.segments.last() . { . span_lint_and_then( . cx, . UNNECESSARY_SELF_IMPORTS, . item.span, -- line 48 ---------------------------------------- -- line 61 ---------------------------------------- . }, . ), . Applicability::MaybeIncorrect, . ); . diag.note("this will slightly change semantics; any non-module items at the same path will also be imported"); . }, . ); . } 112,256 ( 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/mod.rs -------------------------------------------------------------------------------- Ir -- line 151 ---------------------------------------- . R: [const] Try, Output: [const] Destruct>, . F: [const] FnMut(usize) -> R + [const] Destruct, . { . let mut array = [const { MaybeUninit::uninit() }; N]; . match try_from_fn_erased(&mut array, cb) { . ControlFlow::Break(r) => FromResidual::from_residual(r), . ControlFlow::Continue(()) => { . // SAFETY: All elements of the array were populated. 1,236 ( 0.00%) try { unsafe { MaybeUninit::array_assume_init(array) } } 23,793 ( 0.00%) => ???:0x0000000000173dc0 (309x) . } . } . } . . /// Converts a reference to `T` into a reference to an array of length 1 (without copying). . #[stable(feature = "array_from_ref", since = "1.53.0")] . #[rustc_const_stable(feature = "const_array_from_ref_shared", since = "1.63.0")] . pub const fn from_ref(s: &T) -> &[T; 1] { -- line 167 ---------------------------------------- -- line 497 ---------------------------------------- . // - https://github.com/rust-lang/rust/issues/61415 . // - https://github.com/rust-lang/rust/pull/145457 . . macro_rules! array_impl_default { . {$n:expr, $t:ident $($ts:ident)*} => { . #[stable(since = "1.4.0", feature = "array_default")] . impl Default for [T; $n] where T: Default { . fn default() -> [T; $n] { 109,081 ( 0.00%) [$t::default(), $($ts::default()),*] . } . } . array_impl_default!{($n - 1), $($ts)*} . }; . {$n:expr,} => { . #[stable(since = "1.4.0", feature = "array_default")] . impl Default for [T; $n] { . fn default() -> [T; $n] { [] } -- line 513 ---------------------------------------- -- line 590 ---------------------------------------- . #[stable(feature = "array_map", since = "1.55.0")] . #[rustc_const_unstable(feature = "const_array", issue = "147606")] . pub const fn map(self, f: F) -> [U; N] . where . F: [const] FnMut(T) -> U + [const] Destruct, . U: [const] Destruct, . T: [const] Destruct, . { 927 ( 0.00%) self.try_map(NeverShortCircuit::wrap_mut_1(f)).0 379,426 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/array/mod.rs:<[(&str, (char, char)); 13]>::try_map::, >::wrap_mut_1<(&str, (char, char)), clippy_lints::nonstandard_macro_braces::macro_braces::{closure#0}>::{closure#0}> (309x) . } . . /// A fallible function `f` applied to each element on array `self` in order to . /// return an array the same size as `self` or the first error encountered. . /// . /// The return type of this function depends on the return type of the closure. . /// If you return `Result` from the closure, you'll get a `Result<[T; N], E>`. . /// If you return `Option` from the closure, you'll get an `Option<[T; N]>`. -- line 606 ---------------------------------------- -- line 625 ---------------------------------------- . /// . /// let a = [1, 2, 3]; . /// let b = a.try_map(NonZero::new); . /// let c = b.map(|x| x.map(NonZero::get)); . /// assert_eq!(c, Some(a)); . /// ``` . #[unstable(feature = "array_try_map", issue = "79711")] . #[rustc_const_unstable(feature = "array_try_map", issue = "79711")] 2,163 ( 0.00%) pub const fn try_map( . self, . mut f: impl [const] FnMut(T) -> R + [const] Destruct, . ) -> ChangeOutputType . where . R: [const] Try, Output: [const] Destruct>, . T: [const] Destruct, . { . let mut me = ManuallyDrop::new(self); . // SAFETY: try_from_fn calls `f` N times. . let mut f = unsafe { drain::Drain::new(&mut me, &mut f) }; . try_from_fn(&mut f) 2,781 ( 0.00%) } . . /// Returns a slice containing the entire array. Equivalent to `&s[..]`. . #[stable(feature = "array_as_slice", since = "1.57.0")] . #[rustc_const_stable(feature = "array_as_slice", since = "1.57.0")] . pub const fn as_slice(&self) -> &[T] { . self . } . -- line 653 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if !expr.span.from_expansion() . // Avoid cases already linted by `field_reassign_with_default` 61,818 ( 0.00%) && !self.reassigned_linted.contains(&expr.span) 4 ( 0.00%) && let ExprKind::Call(path, []) = expr.kind 44 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 2,944 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (4x) 12 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 20 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 312 ( 0.00%) => ???:::qpath_res (4x) 20 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 265 ( 0.00%) => ???:::is_diagnostic_item (4x) 5 ( 0.00%) && !is_update_syntax_base(cx, expr) 127 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/default.rs:clippy_lints::default::is_update_syntax_base (1x) . // Detect and ignore ::default() because these calls do explicitly name the type. 2 ( 0.00%) && let QPath::Resolved(None, _path) = qpath . && let expr_ty = cx.typeck_results().expr_ty(expr) . && let ty::Adt(def, ..) = expr_ty.kind() . && !is_from_proc_macro(cx, expr) . { . let replacement = with_forced_trimmed_paths!(format!("{}::default()", cx.tcx.def_path_str(def.did()))); . span_lint_and_sugg( . cx, . DEFAULT_TRAIT_ACCESS, . expr.span, . format!("calling `{replacement}` is more clear than this expression"), . "try", . replacement, . Applicability::Unspecified, // First resolve the TODO above . ); . } 523,440 ( 0.01%) } . . #[expect(clippy::too_many_lines)] 96,363 ( 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 { 42,828 ( 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 1,398 ( 0.00%) let (local, variant, binding_name, binding_type, span) = if let StmtKind::Let(local) = stmt.kind . // only take `let ...` statements 1,398 ( 0.00%) && let Some(expr) = local.init 3,262 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 203,932 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (466x) 2 ( 0.00%) && !expr.span.from_expansion() . // only take bindings to identifiers 6 ( 0.00%) && let PatKind::Binding(_, binding_id, ident, _) = local.pat.kind . // only when assigning `... = Default::default()` 5 ( 0.00%) && is_expr_default(cx, expr) 4 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_default (1x) . && 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); . } . } 85,656 ( 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 }` 2 ( 0.00%) fn is_update_syntax_base<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> bool { 3 ( 0.00%) if let Some(parent) = get_parent_expr(cx, expr) 119 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (1x) . && let ExprKind::Struct(_, _, StructTailExpr::Base(base)) = parent.kind . { . base.hir_id == expr.hir_id . } else { . false . } 2 ( 0.00%) } 4,667 ( 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/control_flow.rs -------------------------------------------------------------------------------- Ir -- line 103 ---------------------------------------- . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl ops::Try for ControlFlow { . type Output = C; . type Residual = ControlFlow; . . #[inline] . fn from_output(output: Self::Output) -> Self { 228 ( 0.00%) ControlFlow::Continue(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 197,392 ( 0.00%) match self { . ControlFlow::Continue(c) => ControlFlow::Continue(c), . ControlFlow::Break(b) => ControlFlow::Break(ControlFlow::Break(b)), . } . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . // 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 ControlFlow { . #[inline] . fn from_residual(residual: ControlFlow) -> Self { . match residual { 216,342 ( 0.00%) ControlFlow::Break(b) => ControlFlow::Break(b), . } . } . } . . #[unstable(feature = "try_trait_v2_residual", issue = "91285")] . #[rustc_const_unstable(feature = "const_try_residual", issue = "91285")] . const impl ops::Residual for ControlFlow { . type TryType = ControlFlow; -- line 139 ---------------------------------------- -- line 149 ---------------------------------------- . /// . /// assert!(ControlFlow::<&str, i32>::Break("Stop right there!").is_break()); . /// assert!(!ControlFlow::<&str, i32>::Continue(3).is_break()); . /// ``` . #[inline] . #[stable(feature = "control_flow_enum_is", since = "1.59.0")] . #[rustc_const_stable(feature = "min_const_control_flow", since = "1.95.0")] . pub const fn is_break(&self) -> bool { 6,286 ( 0.00%) matches!(*self, ControlFlow::Break(_)) . } . . /// Returns `true` if this is a `Continue` variant. . /// . /// # Examples . /// . /// ``` . /// use std::ops::ControlFlow; -- line 165 ---------------------------------------- -- line 187 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "control_flow_enum", since = "1.83.0")] . #[rustc_const_unstable(feature = "const_control_flow", issue = "148739")] . pub const fn break_value(self) -> Option . where . Self: [const] Destruct, . { 53,414 ( 0.00%) match self { 26,029 ( 0.00%) ControlFlow::Continue(..) => None, 197,426 ( 0.00%) ControlFlow::Break(x) => Some(x), . } . } . . /// Converts the `ControlFlow` into a `Result` which is `Ok` if the . /// `ControlFlow` was `Break` and `Err` if otherwise. . /// . /// # Examples . /// -- line 205 ---------------------------------------- -- line 300 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "control_flow_enum", since = "1.83.0")] . #[rustc_const_unstable(feature = "const_control_flow", issue = "148739")] . pub const fn continue_value(self) -> Option . where . Self: [const] Destruct, . { 2 ( 0.00%) match self { . ControlFlow::Continue(x) => Some(x), . ControlFlow::Break(..) => None, . } . } . . /// Converts the `ControlFlow` into a `Result` which is `Ok` if the . /// `ControlFlow` was `Continue` and `Err` if otherwise. . /// -- line 316 ---------------------------------------- 86,048 ( 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); 1,470 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod (1x) . } . 126,288 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 56,128 ( 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", . ); . } . } 112,256 ( 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 { 16 ( 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 { 82 ( 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); . } . } 16 ( 0.00%) } . . fn track_uses( . &mut self, . item: &Item, . imports_reused_with_self: &mut Vec, . single_use_usages: &mut Vec, . macros: &mut Vec, . ) { 332 ( 0.00%) if item.span.from_expansion() || item.vis.kind.is_pub() { . return; . } . 162 ( 0.00%) match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, ..)) => { 2 ( 0.00%) self.check_mod(items); 1,344 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod'2 (1x) . }, . ItemKind::MacroDef(ident, MacroDef { macro_rules: true, .. }) => { 3 ( 0.00%) macros.push(ident.name); . }, . ItemKind::Use(use_tree) => { . let segments = &use_tree.prefix.segments; . . // keep track of `use some_module;` usages 4 ( 0.00%) if segments.len() == 1 { . 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 202 ---------------------------------------- -- line 223 ---------------------------------------- . can_suggest: false, . }); . } . } . } . } . } . // keep track of `use self::some_module` usages 1 ( 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/operators/double_comparison.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use rustc_errors::Applicability; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::DOUBLE_COMPARISONS; . 45,661 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>, span: Span) { 13,046 ( 0.00%) if let ExprKind::Binary(lop, llhs, lrhs) = lhs.kind 5,149 ( 0.00%) && let ExprKind::Binary(rop, rlhs, rrhs) = rhs.kind . && let ctxt = span.ctxt() 63 ( 0.00%) && eq_expr_value(cx, ctxt, llhs, rlhs) 5,693 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (9x) . && eq_expr_value(cx, ctxt, lrhs, rrhs) . { . let op = match (op, lop.node, rop.node) { . // x == y || x < y => x <= y . (BinOpKind::Or, BinOpKind::Eq, BinOpKind::Lt) . // x < y || x == y => x <= y . | (BinOpKind::Or, BinOpKind::Lt, BinOpKind::Eq) => { . "<=" -- line 23 ---------------------------------------- -- line 64 ---------------------------------------- . DOUBLE_COMPARISONS, . span, . "this binary expression can be simplified", . "try", . sugg, . applicability, . ); . } 52,184 ( 0.00%) } 108 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_hir::{self as hir, HirId}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, ClauseKind, GenericParamDefKind, ParamEnv, TraitPredicate, Ty, TyCtxt, Upcast as _}; . use rustc_span::{Span, sym}; . . use super::DERIVE_PARTIAL_EQ_WITHOUT_EQ; . . /// Implementation of the `DERIVE_PARTIAL_EQ_WITHOUT_EQ` lint. 33,190 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . span: Span, . trait_ref: &hir::TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . ) { 6,638 ( 0.00%) if let ty::Adt(adt, args) = ty.kind() 13,276 ( 0.00%) && cx.tcx.visibility(adt.did()).is_public() 33,190 ( 0.00%) && let Some(eq_trait_def_id) = cx.tcx.get_diagnostic_item(sym::Eq) 351,814 ( 0.00%) => ???:::get_diagnostic_item (3,319x) 9,957 ( 0.00%) && let Some(def_id) = trait_ref.trait_def_id() 43,147 ( 0.00%) => ???:::trait_def_id (3,319x) 19,914 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::PartialEq, def_id) 333,559 ( 0.00%) => ???:::is_diagnostic_item (3,319x) 2,765 ( 0.00%) && !has_non_exhaustive_attr(cx.tcx, *adt) 387,514 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::has_non_exhaustive_attr (553x) 553 ( 0.00%) && !ty_implements_eq_trait(cx.tcx, ty, eq_trait_def_id) 2,208 ( 0.00%) && let typing_env = typing_env_for_derived_eq(cx.tcx, adt.did(), eq_trait_def_id) 136,344 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs:clippy_lints::derive::derive_partial_eq_without_eq::typing_env_for_derived_eq (552x) . // If all of our fields implement `Eq`, we can implement `Eq` too 1,104 ( 0.00%) && adt . .all_fields() 552 ( 0.00%) .map(|f| f.ty(cx.tcx, args)) . .all(|ty| implements_trait_with_env(cx.tcx, typing_env, ty.skip_norm_wip(), eq_trait_def_id, None, &[])) . { . span_lint_hir_and_then( . cx, 1,104 ( 0.00%) DERIVE_PARTIAL_EQ_WITHOUT_EQ, . adt_hir_id, 552 ( 0.00%) span.ctxt().outer_expn_data().call_site, . "you are deriving `PartialEq` and can implement `Eq`", . |diag| { . diag.span_suggestion( . span.ctxt().outer_expn_data().call_site, . "consider deriving `Eq` as well", . "PartialEq, Eq", . Applicability::MachineApplicable, . ); . }, . ); . } 26,552 ( 0.00%) } . . fn ty_implements_eq_trait<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, eq_trait_id: DefId) -> bool { 2,765 ( 0.00%) tcx.non_blanket_impls_for_ty(eq_trait_id, ty).next().is_some() 273,331 ( 0.00%) => ???:::non_blanket_impls_for_ty (553x) . } . . /// Creates the `ParamEnv` used for the given type's derived `Eq` impl. 8,280 ( 0.00%) fn typing_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) -> ty::TypingEnv<'_> { . // Initial map from generic index to param def. . // Vec<(param_def, needs_eq)> . let mut params = tcx . .generics_of(did) . .own_params . .iter() . .map(|p| (p, matches!(p.kind, GenericParamDefKind::Type { .. }))) . .collect::>(); -- line 66 ---------------------------------------- -- line 71 ---------------------------------------- . && p.trait_ref.def_id == eq_trait_id . && let ty::Param(self_ty) = p.trait_ref.self_ty().kind() . { . // Flag types which already have an `Eq` bound. . params[self_ty.index as usize].1 = false; . } . } . 1,104 ( 0.00%) let param_env = ParamEnv::new(tcx.mk_clauses_from_iter(ty_clauses.iter().map(|&(c, _)| c).chain( . params.iter().filter(|&&(_, needs_eq)| needs_eq).map(|&(param, _)| { . ClauseKind::Trait(TraitPredicate { . trait_ref: ty::TraitRef::new(tcx, eq_trait_id, [tcx.mk_param_from_def(param)]), . polarity: ty::PredicatePolarity::Positive, . }) . .upcast(tcx) . }), . ))); . ty::TypingEnv::new(param_env, ty::TypingMode::non_body_analysis()) 4,416 ( 0.00%) } 8,294 ( 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 130,862 ( 0.00%) if let hir::ExprKind::Closure(hir::Closure { . kind: hir::ClosureKind::Coroutine(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Async, _)), . def_id, . .. 1 ( 0.00%) }) = expr.kind . && let Some(coroutine_layout) = cx.tcx.mir_coroutine_witnesses(*def_id) . { . self.check_interior_types(cx, coroutine_layout); . } 523,440 ( 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: /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. 499,478 ( 0.01%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable, StableHash)] . #[rustc_pass_by_value] . pub struct HirId { 62,720 ( 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 . ); . 10,124 ( 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 ---------------------------------------- 28,054 ( 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/lint.rs -------------------------------------------------------------------------------- Ir -- line 378 ---------------------------------------- . /// The innermost function for emitting lints implementing the [`trait@Diagnostic`] trait. . /// . /// If you are looking to implement a lint, look for higher level functions, . /// for example: . /// . /// - [`TyCtxt::emit_node_span_lint`] . /// - `LintContext::opt_span_lint` . #[track_caller] 181,653 ( 0.00%) pub fn emit_lint_base<'a, D: Diagnostic<'a, ()> + 'a>( . sess: &'a Session, . lint: &'static Lint, . level_spec: impl Into, . span: Option, . decorate: D, . ) { . // Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to . // the "real" work. -- line 394 ---------------------------------------- -- line 572 ---------------------------------------- . let citation = . format!("for more information, see {}", future_incompatible.reason.reference()); . err.note(citation); . } . . explain_lint_level_source(sess, lint, level, src, &mut err); . err.emit(); . } 153,728 ( 0.00%) emit_lint_base_impl( 2,300,572 ( 0.03%) => ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl (8,908x) . sess, . lint, . level_spec.into(), 115,296 ( 0.00%) span, 3,236 ( 0.00%) Box::new(move |dcx, level| decorate.into_diag(dcx, level)), 15,698 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:::{closure#0}>::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag (4x) 120 ( 0.00%) => ???:0x0000000000173dc0 (4x) . ); 105,998 ( 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<'_>) { 65,430 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = e.kind 6,523 ( 0.00%) && BinOpKind::Mul == op.node . { . 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 60 ---------------------------------------- -------------------------------------------------------------------------------- -- 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; . 588,870 ( 0.01%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 65,430 ( 0.00%) if let Some(macro_call) = first_node_macro_backtrace(cx, e).find(|macro_call| { 684 ( 0.00%) matches!( 456 ( 0.00%) cx.tcx.get_diagnostic_name(macro_call.def_id), 9,918 ( 0.00%) => ???:::get_diagnostic_name (114x) . Some(sym::assert_eq_macro | sym::assert_ne_macro | sym::debug_assert_eq_macro | sym::debug_assert_ne_macro) . ) . }) && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) . && eq_expr_value(cx, macro_call.span.ctxt(), lhs, rhs) . && macro_call.is_local() . && !is_in_test_function(cx.tcx, e.hir_id) . { . span_lint( -- line 21 ---------------------------------------- -- line 23 ---------------------------------------- . EQ_OP, . lhs.span.to(rhs.span), . format!( . "identical args used in this `{}!` macro call", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } 523,440 ( 0.01%) } . 54,081 ( 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) 32,067 ( 0.00%) && eq_expr_value(cx, e.span.ctxt(), left, right) 2,848,364 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (4,581x) . && !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"); . } . }, . ); . } 48,072 ( 0.00%) } 214,614 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::Span; . . use super::MANUAL_ISOLATE_LOWEST_ONE; . 42,063 ( 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, . ) { 15,939 ( 0.00%) if op != BinOpKind::BitAnd || expr.span.from_expansion() || lhs.span.from_expansion() || rhs.span.from_expansion() { . return; . } . . // x & x.wrapping_neg() 9,930 ( 0.00%) if let Some(base) = matching_wrapping_neg(lhs, rhs) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_wrapping_neg (1,655x) . // x.wrapping_neg() & x 1,655 ( 0.00%) .or_else(|| matching_wrapping_neg(rhs, lhs)) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_wrapping_neg (1,655x) . && is_primitive_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, false); . } else if let Some(base) = matching_neg(lhs, rhs) . // x & -x or -x & x . .or_else(|| matching_neg(rhs, lhs)) . && is_signed_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, false); 4,965 ( 0.00%) } else if let Some(base) = matching_nonzero_wrapping_neg(lhs, rhs) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_nonzero_wrapping_neg (1,655x) . // nz.get() & nz.get().wrapping_neg() or reversed 1,655 ( 0.00%) .or_else(|| matching_nonzero_wrapping_neg(rhs, lhs)) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_nonzero_wrapping_neg (1,655x) . && is_nonzero_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, true); 4,965 ( 0.00%) } else if let Some(base) = matching_nonzero_neg(lhs, rhs) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_nonzero_neg (1,655x) . // nz.get() & -nz.get() or reversed 1,655 ( 0.00%) .or_else(|| matching_nonzero_neg(rhs, lhs)) 6,620 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/manual_isolate_lowest_one.rs:clippy_lints::operators::manual_isolate_lowest_one::matching_nonzero_neg (1,655x) . && is_nonzero_signed_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, true); . } 48,072 ( 0.00%) } . . fn maybe_emit_lint(cx: &LateContext<'_>, span: Span, base: &Expr<'_>, msrv: Msrv, add_get: bool) { . if !msrv.meets(cx, msrvs::ISOLATE_LOWEST_ONE) { . return; . } . . let mut applicability = Applicability::MachineApplicable; . let snippet = Sugg::hir_with_applicability(cx, base, "_", &mut applicability); -- line 61 ---------------------------------------- -- line 67 ---------------------------------------- . span, . "manual implementation of `isolate_lowest_one`", . "consider using `.isolate_lowest_one()`", . format!("{}.isolate_lowest_one(){get}", snippet.maybe_paren()), . applicability, . ); . } . 3,310 ( 0.00%) fn matching_wrapping_neg<'tcx>(base: &'tcx Expr<'tcx>, negated: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . let receiver = wrapping_neg_receiver(negated)?; . is_same_local_path(base, receiver).then_some(base) 3,310 ( 0.00%) } . . fn matching_neg<'tcx>(base: &'tcx Expr<'tcx>, negated: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 11,585 ( 0.00%) if let ExprKind::Unary(UnOp::Neg, inner) = negated.kind . && is_same_local_path(base, inner) . { . Some(base) . } else { . None . } . } . 3,310 ( 0.00%) fn matching_nonzero_wrapping_neg<'tcx>(base_get: &'tcx Expr<'tcx>, negated: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . let base = get_receiver(base_get)?; . let receiver = wrapping_neg_receiver(negated)?; . let negated_base = get_receiver(receiver)?; . is_same_local_path(base, negated_base).then_some(base) 3,310 ( 0.00%) } . 3,310 ( 0.00%) fn matching_nonzero_neg<'tcx>(base_get: &'tcx Expr<'tcx>, negated: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . let base = get_receiver(base_get)?; . if let ExprKind::Unary(UnOp::Neg, inner) = negated.kind { . let negated_base = get_receiver(inner)?; . is_same_local_path(base, negated_base).then_some(base) . } else { . None . } 3,310 ( 0.00%) } . . fn wrapping_neg_receiver<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 6,620 ( 0.00%) if let ExprKind::MethodCall(method_name, receiver, [], _) = expr.kind . && method_name.ident.name == sym::wrapping_neg . { . Some(receiver) . } else { . None . } . } . . fn get_receiver<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 13,240 ( 0.00%) if let ExprKind::MethodCall(method_name, receiver, [], _) = expr.kind . && method_name.ident.name == sym::get . && is_local_path(receiver) . { . Some(receiver) . } else { . None . } . } -- line 126 ---------------------------------------- 4,965 ( 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 { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 133,204 ( 0.00%) if let ExprKind::Cast(cast_from_expr, cast_to_hir) = expr.kind { 3,516 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } 5,860 ( 0.00%) if is_hir_ty_cfg_dependant(cx, cast_to_hir) { 12,640 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_hir_ty_cfg_dependant (1,172x) . return; . } . let (cast_from, cast_to) = ( 5,860 ( 0.00%) cx.typeck_results().expr_ty(cast_from_expr), 46,880 ( 0.00%) => ???:::expr_ty (1,172x) 4,688 ( 0.00%) cx.typeck_results().expr_ty(expr), 46,880 ( 0.00%) => ???:::expr_ty (1,172x) . ); . 9,360 ( 0.00%) if !expr.span.from_expansion() && unnecessary_cast::check(cx, expr, cast_from_expr, cast_from, cast_to) { 2,137,412 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::check (1,170x) . return; . } 7,008 ( 0.00%) char_lit_as_u8::check(cx, expr, cast_from_expr, cast_to); 15,266 ( 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 (1,168x) 8,176 ( 0.00%) cast_slice_from_raw_parts::check(cx, expr, cast_from_expr, cast_to, self.msrv); 21,255 ( 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 (1,168x) . cast_ptr_alignment::check(cx, expr, cast_from, cast_to); 8,176 ( 0.00%) ptr_cast_constness::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 19,976 ( 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 (1,168x) 14,016 ( 0.00%) ptr_as_ptr::check(cx, expr, cast_from_expr, cast_from, cast_to_hir, cast_to, self.msrv); 193,647 ( 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 (1,168x) . as_ptr_cast_mut::check(cx, expr, cast_from_expr, cast_to); 9,344 ( 0.00%) confusing_method_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 30,368 ( 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 (1,168x) . zero_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); . 7,008 ( 0.00%) if self.msrv.meets(cx, msrvs::MANUAL_DANGLING_PTR) { 17,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,168x) 5,840 ( 0.00%) manual_dangling_ptr::check(cx, expr, cast_from_expr, cast_to_hir); 11,324,014 ( 0.14%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/manual_dangling_ptr.rs:clippy_lints::casts::manual_dangling_ptr::check (1,168x) . } . . if cast_to.is_numeric() { 7,637 ( 0.00%) cast_possible_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir.span); 1,430,347 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_possible_truncation.rs:clippy_lints::casts::cast_possible_truncation::check (1,091x) . if cast_from.is_numeric() { 4,304 ( 0.00%) cast_possible_wrap::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 22,596 ( 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 (538x) 4,842 ( 0.00%) cast_precision_loss::check(cx, expr, cast_from, cast_to); 13,450 ( 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 (538x) . cast_sign_loss::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 3,766 ( 0.00%) cast_abs_to_unsigned::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 10,222 ( 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 (538x) 3,228 ( 0.00%) cast_nan_to_int::check(cx, expr, cast_from_expr, cast_from, cast_to); 10,760 ( 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 (538x) . } 10,910 ( 0.00%) cast_lossless::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir, self.msrv); 462,263 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_lossless.rs:clippy_lints::casts::cast_lossless::check (1,091x) . cast_enum_constructor::check(cx, expr, cast_from_expr, cast_from); 6,546 ( 0.00%) fn_to_numeric_cast_any::check(cx, expr, cast_from_expr, cast_from, cast_to); 21,820 ( 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 (1,091x) 6,546 ( 0.00%) fn_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 28,500 ( 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 (1,091x) 6,546 ( 0.00%) fn_to_numeric_cast_with_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to); 29,591 ( 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 (1,091x) . } . . as_underscore::check(cx, expr, cast_to_hir); 4,672 ( 0.00%) as_pointer_underscore::check(cx, cast_to, cast_to_hir); 165,504 ( 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 (1,168x) . 8,176 ( 0.00%) let was_borrow_as_ptr_emitted = self.msrv.meets(cx, msrvs::BORROW_AS_PTR) 17,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,168x) 8,176 ( 0.00%) && borrow_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); 21,409 ( 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 (1,168x) 10,512 ( 0.00%) if !was_borrow_as_ptr_emitted && self.msrv.meets(cx, msrvs::PTR_FROM_REF) { 17,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1,168x) 3,504 ( 0.00%) ref_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . } . 457,982 ( 0.01%) if self.msrv.meets(cx, msrvs::RAW_REF_OP) { 981,390 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (65,426x) 196,278 ( 0.00%) borrow_as_ptr::check_implicit_cast(cx, expr); 1,328,774 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs:clippy_lints::casts::borrow_as_ptr::check_implicit_cast (65,426x) . } 392,556 ( 0.00%) if self.msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) { 981,390 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (65,426x) 196,278 ( 0.00%) cast_slice_from_raw_parts::check_implicit_cast(cx, expr); 1,742,465 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast (65,426x) . } 196,278 ( 0.00%) cast_ptr_alignment::check_cast_method(cx, expr); 854,056 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method (65,426x) 261,704 ( 0.00%) cast_slice_different_sizes::check(cx, expr, self.msrv); 12,142,886 ( 0.15%) => /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 (65,426x) 196,278 ( 0.00%) ptr_cast_constness::check_null_ptr_cast_method(cx, expr); 984,908 ( 0.01%) => /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 (65,426x) 523,440 ( 0.01%) } . . fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 42,513 ( 0.00%) needless_type_cast::check(cx, body); 4,138,059 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check (14,171x) . } . } 13,406 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs -------------------------------------------------------------------------------- Ir -- line 128 ---------------------------------------- . | DefKind::Ctor(..) . | DefKind::AssocConst { .. } => false, . . DefKind::Fn | DefKind::AssocFn | DefKind::Closure => tcx.constness(def_id) == Constness::NotConst, . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 139,944 ( 0.00%) if let ExprKind::Binary(kind, lhs, rhs) = expr.kind 13,055 ( 0.00%) && let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind 5,140 ( 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`. 27 ( 0.00%) && let mut exprs = [lhs_lhs, lhs_rhs, rhs_lhs, rhs_rhs] 18 ( 0.00%) && exprs.iter_mut().partition_in_place(|i| i.res_local_id().is_some()) == 2 . && !expr.span.in_external_macro(cx.sess().source_map()) . && ( . is_not_const(cx.tcx, cx.tcx.hir_enclosing_body_owner(expr.hir_id).into()) . || self.msrv.meets(cx, msrvs::CONST_FLOAT_CLASSIFY) . ) . && let [first, second, const_1, const_2] = exprs . && let ecx = ConstEvalCtxt::new(cx) . && let ctxt = expr.span.ctxt() -- line 151 ---------------------------------------- -- line 197 ---------------------------------------- . "or, for conciseness", . format!("!{local_snippet}.is_infinite()"), . Applicability::MaybeIncorrect, . ); . }, . } . }); . } 523,440 ( 0.01%) } . } 36 ( 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 = { 29,426 ( 0.00%) let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 }; . visitor.visit_ty_unambig(ty); 14,712 ( 0.00%) visitor.score . }; . 29,426 ( 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); . } . 91,320 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx hir::Ty<'_, AmbigArg>) { 205,470 ( 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 47,037 ( 0.00%) TyKind::Path(..) | TyKind::Slice(..) | TyKind::Tup(..) | TyKind::Array(..) => (10 * self.nest, 1), . . // function types bring a lot of overhead 7 ( 0.00%) TyKind::FnPtr(fn_ptr) if fn_ptr.abi == ExternAbi::Rust => (50 * self.nest, 1), 38 ( 0.00%) => ???:::eq (1x) . . 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 { .. })) . }); -- line 61 ---------------------------------------- -- line 65 ---------------------------------------- . } else { . // simple trait bounds like A + B . (20 * self.nest, 0) . } . }, . . _ => (0, 0), . }; 22,830 ( 0.00%) self.score += add_score; 22,830 ( 0.00%) self.nest += sub_nest; 45,660 ( 0.00%) walk_ty(self, ty); 1,523,449 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (14,712x) 22,830 ( 0.00%) self.nest -= sub_nest; 91,320 ( 0.00%) } . } 68,492 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/decimal_bitwise_operands.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_ast::LitKind; . use rustc_data_structures::packed::Pu128; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::DECIMAL_BITWISE_OPERANDS; . 42,063 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, op: BinOpKind, left: &'tcx Expr<'_>, right: &'tcx Expr<'_>) { 18,027 ( 0.00%) if !matches!(op, BinOpKind::BitAnd | BinOpKind::BitOr | BinOpKind::BitXor) { . return; . } . 6,620 ( 0.00%) for expr in [left, right] { . check_expr(cx, expr); . } 48,072 ( 0.00%) } . . fn check_expr(cx: &LateContext<'_>, expr: &Expr<'_>) { 18,886 ( 0.00%) match &expr.kind { . ExprKind::Block(block, _) => { . if let Some(block_expr) = block.expr { . check_expr(cx, block_expr); . } . }, . ExprKind::Cast(cast_expr, _) => { . check_expr(cx, cast_expr); . }, . ExprKind::Unary(_, unary_expr) => { . check_expr(cx, unary_expr); . }, . ExprKind::AddrOf(_, _, addr_of_expr) => { . check_expr(cx, addr_of_expr); . }, . ExprKind::Lit(lit) => { 6,620 ( 0.00%) if let LitKind::Int(Pu128(val), _) = lit.node 2,363 ( 0.00%) && !is_single_digit(val) 236 ( 0.00%) && !is_power_of_twoish(val) . && let Some(src) = lit.span.get_text(cx) . && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit.node) . && num_lit.is_decimal() . { . emit_lint(cx, lit.span, num_lit.suffix, val); . } . }, . _ => (), -- line 50 ---------------------------------------- -- line 51 ---------------------------------------- . } . } . . fn is_power_of_twoish(val: u128) -> bool { . val.is_power_of_two() || val.wrapping_add(1).is_power_of_two() . } . . fn is_single_digit(val: u128) -> bool { 4,965 ( 0.00%) val <= 9 . } . . fn emit_lint(cx: &LateContext<'_>, span: Span, suffix: Option<&str>, val: u128) { . span_lint_and_help( . cx, . DECIMAL_BITWISE_OPERANDS, . span, . "using decimal literal for bitwise operation", -- line 67 ---------------------------------------- 19,149 ( 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. 307,588 ( 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); 615,170 ( 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, 291,480 ( 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. 258,309 ( 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) } { 100,454 ( 0.00%) Some((value, idx)) => Some((value, I::new(idx as usize))), . None => None, . } 10,291 ( 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`. 565,285 ( 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 = 524,234 ( 0.01%) 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. 794,028 ( 0.01%) 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 ---------------------------------------- 397,207 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs -------------------------------------------------------------------------------- Ir -- line 59 ---------------------------------------- . . impl NeedlessNonzeroGet { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessNonzeroGet { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 438,300 ( 0.01%) match expr.kind { . // `.get().()` 3,332 ( 0.00%) ExprKind::MethodCall(method, get_call, [], _) 744 ( 0.00%) if let Some((recv, nz_ty, nonzero_did, get_span)) = nonzero_get(cx, get_call) 1,012 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:clippy_lints::needless_nonzero_get::nonzero_get (62x) . // The outer call must resolve to an inherent method. A trait method of the same . // name could resolve differently once the receiver becomes a `NonZero`. . && let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) . && cx.tcx.trait_of_assoc(method_did).is_none() . // Dropping `get` must leave the expression's type unchanged. Methods whose . // `NonZero` version returns a `NonZero` deliberately do not match. . && let ret_ty = cx.typeck_results().expr_ty(expr) . && has_matching_method(cx, nonzero_did, nz_ty, method.ident.name, ret_ty, self.msrv) => . { . emit_unnecessary_get(cx, expr, get_call, recv, get_span, method.ident.name.as_str()); . }, . . // ` / .get()` and ` % .get()` . ExprKind::Binary(op, lhs, get_call) 26,092 ( 0.00%) if matches!(op.node, BinOpKind::Div | BinOpKind::Rem) . && let Some((recv, nz_ty, _, get_span)) = nonzero_get(cx, get_call) . && let Some((trait_lang_item, _)) = binop_traits(op.node) . && let Some(trait_id) = cx.tcx.lang_items().get(trait_lang_item) . && has_nonzero_operator(cx, lhs, recv, nz_ty, trait_id, self.msrv) => . { . emit_unnecessary_get(cx, expr, get_call, recv, get_span, op.node.as_str()); . }, . -- line 94 ---------------------------------------- -- line 100 ---------------------------------------- . && let Some(trait_id) = cx.tcx.lang_items().get(trait_lang_item) . && has_nonzero_operator(cx, lhs, recv, nz_ty, trait_id, self.msrv) => . { . emit_unnecessary_get(cx, expr, get_call, recv, get_span, op.node.as_str()); . }, . . _ => {}, . } 523,440 ( 0.01%) } . } . . /// Returns the receiver, its `NonZero` type and definition, and the `get` identifier span when . /// `expr` is an inherent `NonZero::get()` call. 310 ( 0.00%) fn nonzero_get<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, Ty<'tcx>, DefId, Span)> { 206 ( 0.00%) let ExprKind::MethodCall(get, recv, [], get_span) = expr.kind else { . return None; . }; . if get.ident.name != sym::get { . return None; . } . let get_did = cx.typeck_results().type_dependent_def_id(expr.hir_id)?; . if cx.tcx.trait_of_assoc(get_did).is_some() { . return None; -- line 125 ---------------------------------------- -- line 128 ---------------------------------------- . let ty::Adt(adt, _) = nz_ty.kind() else { . return None; . }; . if !cx.tcx.is_diagnostic_item(sym::NonZero, adt.did()) { . return None; . } . . Some((recv, nz_ty, adt.did(), get_span)) 372 ( 0.00%) } . . fn emit_unnecessary_get<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'tcx>, . get_call: &Expr<'tcx>, . recv: &Expr<'tcx>, . get_span: Span, . operation: &str, -- line 144 ---------------------------------------- 186 ( 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/mod.rs -------------------------------------------------------------------------------- Ir -- line 66 ---------------------------------------- . }) . } . . /// Access dependencies from current implicit context. . fn read_deps(op: OP) . where . OP: for<'a> FnOnce(TaskDepsRef<'a>), . { 2,102,779 ( 0.03%) ty::tls::with_context_opt(|icx| { 176,612 ( 0.00%) let Some(icx) = icx else { return }; 88,306 ( 0.00%) op(icx.task_deps) 2,403,176 ( 0.03%) }) . } . . impl<'tcx> TyCtxt<'tcx> { . #[inline] . pub fn dep_kind_vtable(self, dk: DepKind) -> &'tcx DepKindVTable<'tcx> { . &self.dep_kind_vtables[dk.as_usize()] . } . -- line 85 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs -------------------------------------------------------------------------------- Ir -- line 565 ---------------------------------------- . ub_checks::maybe_is_aligned_and_not_null(src, align, zero_size) . && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size) . && ub_checks::maybe_is_nonoverlapping(src, dst, size, count) . } . ); . . // SAFETY: the safety contract for `copy_nonoverlapping` must be . // upheld by the caller. 504,149 ( 0.01%) unsafe { crate::intrinsics::copy_nonoverlapping(src, dst, count) } 3,823 ( 0.00%) => ???:0x0000000000173dc0 (85x) . } . . /// Copies `count * size_of::()` bytes from `src` to `dst`. The source . /// and destination may overlap. . /// . /// If the source and destination will *never* overlap, . /// [`copy_nonoverlapping`] can be used instead. . /// -- line 581 ---------------------------------------- -- line 656 ---------------------------------------- . src: *const () = src as *const (), . dst: *mut () = dst as *mut (), . align: usize = align_of::(), . zero_size: bool = T::IS_ZST || count == 0, . ) => . ub_checks::maybe_is_aligned_and_not_null(src, align, zero_size) . && ub_checks::maybe_is_aligned_and_not_null(dst, align, zero_size) . ); 24,521 ( 0.00%) crate::intrinsics::copy(src, dst, count) 17,455 ( 0.00%) => ???:0x0000000000173dc0 (599x) . } . } . . /// Sets `count * size_of::()` bytes of memory starting at `dst` to . /// `val`. . /// . /// `write_bytes` is similar to C's [`memset`], but sets `count * . /// size_of::()` bytes to `val`. -- line 672 ---------------------------------------- -- line 727 ---------------------------------------- . check_language_ub, . "ptr::write_bytes requires that the destination pointer is aligned and non-null", . ( . addr: *const () = dst as *const (), . align: usize = align_of::(), . zero_size: bool = T::IS_ZST || count == 0, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, zero_size) . ); 113,967 ( 0.00%) crate::intrinsics::write_bytes(dst, val, count) 65 ( 0.00%) => ???:0x00000000001747c0 (5x) . } . } . . /// Executes the destructor (if any) of the pointed-to value. . /// . /// This is almost the same as calling [`ptr::read`] and discarding . /// the result, but has the following advantages: . // FIXME: say something more useful than "almost the same"? -- line 743 ---------------------------------------- -- line 834 ---------------------------------------- . // Due to historic reasons, `drop_in_place` takes a pointer rather than a reference, . // which results in worse codegen since we don't apply noalias/dereferenceable llvm . // attributes to pointer arguments. To workaround this without breaking public . // interface, `drop_in_place` calls the lang item, rather than being one directly. . . // SAFETY: . // - compiler glue has the same safety requirements as this function . // - the pointer must be valid as per the safety requirement of this function 43 ( 0.00%) unsafe { drop_glue(&mut *to_drop) } 753 ( 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::<[serde_spanned::spanned::Spanned]> (18x) . } . . /// Helper function for `drop_in_place`. The compiler replaces this by the actual drop glue. . #[lang = "drop_glue"] 3,640,863 ( 0.05%) pub(crate) const unsafe fn drop_glue(_: &mut T) 5,179,428 ( 0.06%) => /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::> (15,583x) . where . T: [const] Destruct, . { . // Code here does not matter - this is replaced by the . // real drop glue by the compiler. . } . . /// Creates a null raw pointer. -- line 855 ---------------------------------------- -- line 1464 ---------------------------------------- . i += 1; . } . } . . // Don't let MIR inline this, because we really want it to keep its noalias metadata . #[rustc_no_mir_inline] . #[inline] . fn swap_chunk(x: &mut MaybeUninit<[u8; N]>, y: &mut MaybeUninit<[u8; N]>) { 47,255 ( 0.00%) let a = *x; . let b = *y; 128,100 ( 0.00%) *x = b; . *y = a; . } . . #[inline] . unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, bytes: NonZero) { . // Same as `swap_nonoverlapping::<[u8; N]>`. . unsafe fn swap_nonoverlapping_chunks( . x: *mut MaybeUninit<[u8; N]>, -- line 1482 ---------------------------------------- -- line 1747 ---------------------------------------- . check_language_ub, . "ptr::read requires that the pointer argument is aligned and non-null", . ( . addr: *const () = src as *const (), . align: usize = align_of::(), . is_zst: bool = T::IS_ZST, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, is_zst) . ); 160,609 ( 0.00%) crate::intrinsics::read_via_copy(src) . } . } . . /// Reads the value from `src` without moving it. This leaves the . /// memory in `src` unchanged. . /// . /// Unlike [`read`], `read_unaligned` works with unaligned pointers. . /// -- line 1763 ---------------------------------------- -- line 1955 ---------------------------------------- . check_language_ub, . "ptr::write requires that the pointer argument is aligned and non-null", . ( . addr: *mut () = dst as *mut (), . align: usize = align_of::(), . is_zst: bool = T::IS_ZST, . ) => ub_checks::maybe_is_aligned_and_not_null(addr, align, is_zst) . ); 1,508,068 ( 0.02%) intrinsics::write_via_move(dst, src) 1,260 ( 0.00%) => ???:0x0000000000173dc0 (42x) . } . } . . /// Overwrites a memory location with the given value without reading or . /// dropping the old value. . /// . /// Unlike [`write()`], the pointer may be unaligned. . /// -- line 1971 ---------------------------------------- -- line 2500 ---------------------------------------- . /// assert!(!std::ptr::eq(&a[0..2], &a[1..3])); . /// ``` . #[stable(feature = "ptr_eq", since = "1.17.0")] . #[inline(always)] . #[must_use = "pointer comparison produces a value"] . #[rustc_diagnostic_item = "ptr_eq"] . #[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here . pub fn eq(a: *const T, b: *const T) -> bool { 55,484 ( 0.00%) a == b . } . . /// Compares the *addresses* of the two pointers for equality, . /// ignoring any metadata in fat pointers. . /// . /// If the arguments are thin pointers of the same type, . /// then this is the same as [`eq`]. . /// -- line 2516 ---------------------------------------- -- line 2524 ---------------------------------------- . /// . /// assert!(ptr::addr_eq(whole, first)); . /// assert!(!ptr::eq::(whole, first)); . /// ``` . #[stable(feature = "ptr_addr_eq", since = "1.76.0")] . #[inline(always)] . #[must_use = "pointer comparison produces a value"] . pub fn addr_eq(p: *const T, q: *const U) -> bool { 110,654 ( 0.00%) (p as *const ()) == (q as *const ()) . } . . /// Compares the *addresses* of the two function pointers for equality. . /// . /// This is the same as `f == g`, but using this function makes clear that the potentially . /// surprising semantics of function pointer comparison are involved. . /// . /// There are **very few guarantees** about how functions are compiled and they have no intrinsic -- line 2540 ---------------------------------------- 228,837 ( 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 { 42,096 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 28,064 ( 0.00%) if let ItemKind::MacroDef(_, macro_def) = &item.kind . && item.attrs.iter().any(is_macro_export) . && let Some(span) = contains_unhygienic_crate_reference(¯o_def.body.tokens) . { . span_lint_and_sugg( . cx, . CRATE_IN_MACRO_DEF, . span, . "`crate` references the macro call's crate", . "to reference the macro definition's crate, use", . String::from("$crate"), . Applicability::MachineApplicable, . ); . } 56,128 ( 0.00%) } . } . . fn is_macro_export(attr: &Attribute) -> bool { . if let AttrKind::Normal(normal) = &attr.kind . && let [segment] = normal.item.path.segments.as_slice() . { . segment.ident.name == sym::macro_export . } else { -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 44 ( 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<'_>) { 130,860 ( 0.00%) if let ExprKind::Assign(target, ..) = &expr.kind { . let mut base = target; 180 ( 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 ---------------------------------------- 22 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/self_named_constructors.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub SELF_NAMED_CONSTRUCTORS, . style, . "method should not have the same name as the type it is implemented for" . } . . declare_lint_pass!(SelfNamedConstructors => [SELF_NAMED_CONSTRUCTORS]); . . impl<'tcx> LateLintPass<'tcx> for SelfNamedConstructors { 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { 23,986 ( 0.00%) match impl_item.kind { . ImplItemKind::Fn(ref sig, _) => { 31,872 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() { 84,992 ( 0.00%) => ???:::implicit_self (10,624x) . return; . } . }, . _ => return, . } . 8,208 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 198,604 ( 0.00%) => ???:::hir_get_parent_item (1,368x) 5,472 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 91,778 ( 0.00%) => ???:::hir_expect_item (1,368x) 2,736 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 2,736 ( 0.00%) let ret_ty = return_ty(cx, impl_item.owner_id); 153,516 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (1,368x) . . // Do not check trait impls 5,472 ( 0.00%) if matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) { . return; . } . . // Ensure method is constructor-like . if let Some(self_adt) = self_ty.ty_adt_def() { 94 ( 0.00%) if !contains_adt_constructor(ret_ty, self_adt) { 16,959 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::contains_adt_constructor (47x) . return; . } . } else if !ret_ty.contains(self_ty) { . return; . } . . if let Some(self_def) = self_ty.ty_adt_def() . && let Some(self_local_did) = self_def.did().as_local() 18 ( 0.00%) && let Node::Item(x) = cx.tcx.hir_node_by_def_id(self_local_did) 18 ( 0.00%) && let Some(type_ident) = x.kind.ident() 66 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::ident (6x) 12 ( 0.00%) && let type_name = type_ident.name.as_str().to_lowercase() 1,400 ( 0.00%) => ???:::to_lowercase (6x) 6 ( 0.00%) && (impl_item.ident.name.as_str() == type_name 12 ( 0.00%) || impl_item.ident.name.as_str().replace('_', "") == type_name) 1,287 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/str.rs:::replace:: (6x) . { . span_lint( . cx, . SELF_NAMED_CONSTRUCTORS, . impl_item.span, . format!("constructor `{}` has the same name as the type", impl_item.ident.name), . ); . } 95,944 ( 0.00%) } . } 22,757 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/manual_div_ceil.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::{Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . use rustc_span::Spanned; . . use super::MANUAL_DIV_CEIL; . 52,184 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>, msrv: Msrv) { 6,523 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 6,523 ( 0.00%) if op == BinOpKind::Div . && check_int_ty_and_feature(cx, cx.typeck_results().expr_ty(lhs)) . && check_int_ty_and_feature(cx, cx.typeck_results().expr_ty(rhs)) . && msrv.meets(cx, msrvs::DIV_CEIL) . { . let ctxt = expr.span.ctxt(); . match lhs.kind { . ExprKind::Binary(inner_op, inner_lhs, inner_rhs) => { . // (x + (y - 1)) / y -- line 27 ---------------------------------------- -- line 92 ---------------------------------------- . && eq_expr_value(cx, ctxt, next_multiple_of_arg, rhs) . { . build_suggestion(cx, expr, receiver, rhs, &mut applicability); . } . }, . _ => (), . } . } 52,184 ( 0.00%) } . . /// Checks if two expressions represent non-zero integer literals such that `small_expr + 1 == . /// large_expr`. . fn differ_by_one(small_expr: &Expr<'_>, large_expr: &Expr<'_>) -> bool { . if let ExprKind::Lit(small) = small_expr.kind . && let ExprKind::Lit(large) = large_expr.kind . && let LitKind::Int(s, _) = small.node . && let LitKind::Int(l, _) = large.node -- line 108 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 673,443 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 0.00%) if expr.span.from_expansion() { . return; . } . 194,613 ( 0.00%) if let Some(binops) = extract_related_binops(&expr.kind) { . check_binops(cx, &binops.iter().collect::>(), &mut self.linted_spans); . . let mut op_types = Vec::with_capacity(binops.len()); . // We could use a hashmap, etc. to avoid being O(n*m) here, but . // we want the lints to be emitted in a consistent order. Besides, . // m, (the number of distinct `BinOpKind`s in `binops`) . // will often be small, and does have an upper limit. . binops.iter().map(|b| b.op).for_each(|op| { -- line 88 ---------------------------------------- -- line 92 ---------------------------------------- . }); . . for op_type in op_types { . let ops: Vec<_> = binops.iter().filter(|b| b.op == op_type).collect(); . . check_binops(cx, &ops, &mut self.linted_spans); . } . } 598,616 ( 0.01%) } . } . . fn check_binops(cx: &EarlyContext<'_>, binops: &[&BinaryOp<'_>], linted_spans: &mut FxHashSet) { . let binop_count = binops.len(); . if binop_count < 2 { . // Single binary operation expressions would likely be false . // positives. . return; -- line 108 ---------------------------------------- -- line 356 ---------------------------------------- . _ => { . return output; . }, . }; . } . } . . fn extract_related_binops(kind: &ExprKind) -> Option>> { 194,613 ( 0.00%) append_opt_vecs(chained_binops(kind), if_statement_binops(kind)) 1,577,598 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops (64,871x) 1,427,162 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (64,871x) . } . 454,524 ( 0.01%) fn if_statement_binops(kind: &ExprKind) -> Option>> { 463,889 ( 0.01%) match kind { 4 ( 0.00%) ExprKind::If(condition, _, _) => chained_binops(&condition.kind), 3,123 ( 0.00%) ExprKind::Paren(e) => if_statement_binops(&e.kind), . ExprKind::Block(block, _) => { 61 ( 0.00%) let mut output = None; 61 ( 0.00%) for stmt in &block.stmts { 244 ( 0.00%) match &stmt.kind { . StmtKind::Expr(e) | StmtKind::Semi(e) => { 854 ( 0.00%) output = append_opt_vecs(output, if_statement_binops(&e.kind)); 1,472 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops'2 (61x) 1,342 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (61x) . }, . _ => {}, . } . } 427 ( 0.00%) output . }, . _ => None, . } 519,456 ( 0.01%) } . 454,524 ( 0.01%) fn append_opt_vecs(target_opt: Option>, source_opt: Option>) -> Option> { 324,660 ( 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) . }, . (Some(v), None) | (None, Some(v)) => Some(v), 129,864 ( 0.00%) (None, None) => None, . } 519,456 ( 0.01%) } . . fn chained_binops(kind: &ExprKind) -> Option>> { 474,055 ( 0.01%) match kind { 54,552 ( 0.00%) ExprKind::Binary(_, left_outer, right_outer) => chained_binops_helper(left_outer, right_outer), 343,104 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper (9,092x) 4,558 ( 0.00%) ExprKind::Paren(e) | ExprKind::Unary(_, e) => chained_binops(&e.kind), 55,779 ( 0.00%) _ => None, . } . } . 90,920 ( 0.00%) fn chained_binops_helper<'expr>(left_outer: &'expr Expr, right_outer: &'expr Expr) -> Option>> { 95,630 ( 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), . ) => chained_binops_helper(left_e, right_e), . (ExprKind::Paren(left_e) | ExprKind::Unary(_, left_e), _) => chained_binops_helper(left_e, right_outer), . (_, 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), -- line 418 ---------------------------------------- -- line 436 ---------------------------------------- . right_ops.insert(0, BinaryOp::new(*left_op, left_outer.span, (left_left, left_right))); . Some(right_ops) . }, . (None, None) => Some(vec![ . BinaryOp::new(*left_op, left_outer.span, (left_left, left_right)), . BinaryOp::new(*right_op, right_outer.span, (right_left, right_right)), . ]), . }, 9,092 ( 0.00%) _ => None, . } 72,736 ( 0.00%) } . . #[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] . struct IdentLocation { . index: usize, . } . . impl Add for IdentLocation { . type Output = IdentLocation; -- line 454 ---------------------------------------- 485,322 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs -------------------------------------------------------------------------------- Ir -- line 160 ---------------------------------------- . pub enum SchemeType { . File, . SpecialNotFile, . NotSpecial, . } . . impl SchemeType { . pub fn is_special(&self) -> bool { 279 ( 0.00%) !matches!(*self, Self::NotSpecial) . } . . pub fn is_file(&self) -> bool { . matches!(*self, Self::File) . } . } . . impl> From for SchemeType { . fn from(s: T) -> Self { . match s.as_ref() { 279 ( 0.00%) "http" | "https" | "ws" | "wss" | "ftp" => Self::SpecialNotFile, . "file" => Self::File, . _ => Self::NotSpecial, . } 279 ( 0.00%) } . } . . pub fn default_port(scheme: &str) -> Option { . match scheme { . "http" | "ws" => Some(80), . "https" | "wss" => Some(443), . "ftp" => Some(21), . _ => None, -- line 191 ---------------------------------------- -- line 221 ---------------------------------------- . chars: input.chars(), . } . } . . pub fn new_trim_c0_control_and_space( . original_input: &'i str, . vfn: Option<&dyn Fn(SyntaxViolation)>, . ) -> Self { 5,240 ( 0.00%) let input = original_input.trim_matches(c0_control_or_space); 34,844 ( 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_matches:: (1,048x) 2,096 ( 0.00%) if let Some(vfn) = vfn { . if input.len() < original_input.len() { . vfn(SyntaxViolation::C0SpaceIgnored) . } . if input.chars().any(ascii_tab_or_new_line) { . vfn(SyntaxViolation::TabOrNewlineIgnored) . } . } . Input { -- line 238 ---------------------------------------- -- line 269 ---------------------------------------- . #[inline] . fn count_matching bool>(&self, f: F) -> (u32, Self) { . let mut count = 0; . let mut remaining = self.clone(); . loop { . let mut input = remaining.clone(); . if matches!(input.next(), Some(c) if f(c)) { . remaining = input; 558 ( 0.00%) count += 1; . } else { . return (count, remaining); . } . } . } . . #[inline] . fn next_utf8(&mut self) -> Option<(char, &'i str)> { -- line 285 ---------------------------------------- -- line 338 ---------------------------------------- . pub struct Parser<'a> { . pub serialization: String, . pub base_url: Option<&'a Url>, . pub query_encoding_override: EncodingOverride<'a>, . pub violation_fn: Option<&'a dyn Fn(SyntaxViolation)>, . pub context: Context, . } . 1,906 ( 0.00%) #[derive(PartialEq, Eq, Copy, Clone)] . pub enum Context { . UrlParser, . Setter, . PathSegmentSetter, . } . . impl Parser<'_> { . fn log_violation(&self, v: SyntaxViolation) { . if let Some(f) = self.violation_fn { . f(v) . } . } . . fn log_violation_if(&self, v: SyntaxViolation, test: impl FnOnce() -> bool) { 558 ( 0.00%) if let Some(f) = self.violation_fn { . if test() { . f(v) . } . } . } . . pub fn for_setter(serialization: String) -> Self { . Parser { -- line 369 ---------------------------------------- -- line 371 ---------------------------------------- . base_url: None, . query_encoding_override: None, . violation_fn: None, . context: Context::Setter, . } . } . . /// https://url.spec.whatwg.org/#concept-basic-url-parser 10,480 ( 0.00%) pub fn parse_url(mut self, input: &str) -> ParseResult { 2,096 ( 0.00%) let input = Input::new_trim_c0_control_and_space(input, self.violation_fn); 7,336 ( 0.00%) if let Ok(remaining) = self.parse_scheme(input.clone()) { 161,828 ( 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:::parse_scheme (1,048x) 2,790 ( 0.00%) return self.parse_with_scheme(remaining); . } . . // No-scheme state 2,307 ( 0.00%) if let Some(base_url) = self.base_url { . if input.starts_with('#') { . self.fragment_only(base_url, input) . } else if base_url.cannot_be_a_base() { . Err(ParseError::RelativeUrlWithCannotBeABaseBase) . } else { . let scheme_type = SchemeType::from(base_url.scheme()); . if scheme_type.is_file() { . self.parse_file(input, scheme_type, Some(base_url)) . } else { . self.parse_relative(input, scheme_type, base_url) . } . } . } else { . Err(ParseError::RelativeUrlWithoutBase) . } 9,432 ( 0.00%) } . . pub fn parse_scheme<'i>(&mut self, mut input: Input<'i>) -> Result, ()> { . // starts_with will also fail for empty strings so we can skip that comparison for perf 1,048 ( 0.00%) if !input.starts_with(ascii_alpha) { . return Err(()); . } . debug_assert!(self.serialization.is_empty()); . while let Some(c) = input.next() { 6,252 ( 0.00%) match c { 39,056 ( 0.00%) 'a'..='z' | '0'..='9' | '+' | '-' | '.' => self.serialization.push(c), 1,494 ( 0.00%) 'A'..='Z' => self.serialization.push(c.to_ascii_lowercase()), . ':' => return Ok(input), . _ => { . self.serialization.clear(); . return Err(()); . } . } . } . // EOF before ':' 769 ( 0.00%) if self.context == Context::Setter { . Ok(input) . } else { . self.serialization.clear(); . Err(()) . } 1,048 ( 0.00%) } . . fn parse_with_scheme(mut self, input: Input<'_>) -> ParseResult { . use crate::SyntaxViolation::{ExpectedDoubleSlash, ExpectedFileDoubleSlash}; . let scheme_end = to_u32(self.serialization.len())?; 558 ( 0.00%) let scheme_type = SchemeType::from(&self.serialization); 5,022 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:>::from (279x) . self.serialization.push(':'); 1,395 ( 0.00%) match scheme_type { . SchemeType::File => { . self.log_violation_if(ExpectedFileDoubleSlash, || !input.starts_with("//")); . let base_file_url = self.base_url.and_then(|base| { . if base.scheme() == "file" { . Some(base) . } else { . None . } . }); . self.serialization.clear(); . self.parse_file(input, scheme_type, base_file_url) . } . SchemeType::SpecialNotFile => { . // special relative or authority state . let (slashes_count, remaining) = input.count_matching(|c| matches!(c, '/' | '\\')); 1,395 ( 0.00%) if let Some(base_url) = self.base_url { . if slashes_count < 2 . && base_url.scheme() == &self.serialization[..scheme_end as usize] . { . // "Cannot-be-a-base" URLs only happen with "not special" schemes. . debug_assert!(!base_url.cannot_be_a_base()); . self.serialization.clear(); . return self.parse_relative(input, scheme_type, base_url); . } . } . // special authority slashes state 279 ( 0.00%) self.log_violation_if(ExpectedDoubleSlash, || { . input . .clone() . .take_while(|&c| matches!(c, '/' | '\\')) . .collect::() . != "//" . }); 4,464 ( 0.00%) self.after_double_slash(remaining, scheme_type, scheme_end) . } . SchemeType::NotSpecial => self.parse_non_special(input, scheme_type, scheme_end), . } . } . . /// Scheme other than file, http, https, ws, ws, ftp. . fn parse_non_special( . mut self, -- line 477 ---------------------------------------- -- line 836 ---------------------------------------- . base_url.port, . base_url.path_start, . remaining, . ) . } . } . } . 3,627 ( 0.00%) fn after_double_slash( . mut self, . input: Input<'_>, . scheme_type: SchemeType, . scheme_end: u32, . ) -> ParseResult { . self.serialization.push('/'); . self.serialization.push('/'); . // authority state . let before_authority = self.serialization.len(); . let (username_end, remaining) = self.parse_userinfo(input, scheme_type)?; 279 ( 0.00%) let has_authority = before_authority != self.serialization.len(); . // host state . let host_start = to_u32(self.serialization.len())?; . let (host_end, host, port, remaining) = . self.parse_host_and_port(remaining, scheme_end, scheme_type)?; . if host == HostInternal::None && has_authority { . return Err(ParseError::EmptyHost); . } . // path state . let path_start = to_u32(self.serialization.len())?; 2,511 ( 0.00%) let remaining = self.parse_path_start(scheme_type, &mut true, remaining); 164,496 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_path_start (279x) 6,417 ( 0.00%) self.with_query_and_fragment( 249,181 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::with_query_and_fragment (279x) . scheme_type, . scheme_end, . username_end, . host_start, . host_end, . host, . port, . path_start, . remaining, . ) 2,232 ( 0.00%) } . . /// Return (username_end, remaining) . fn parse_userinfo<'i>( . &mut self, . mut input: Input<'i>, . scheme_type: SchemeType, . ) -> ParseResult<(u32, Input<'i>)> { . let mut last_at = None; -- line 885 ---------------------------------------- -- line 894 ---------------------------------------- . self.log_violation(SyntaxViolation::EmbeddedCredentials) . } . last_at = Some((char_count, remaining.clone())) . } . '/' | '?' | '#' => break, . '\\' if scheme_type.is_special() => break, . _ => (), . } 1,978 ( 0.00%) char_count += 1; . } 558 ( 0.00%) let (mut userinfo_char_count, remaining) = match last_at { . None => return Ok((to_u32(self.serialization.len())?, input)), . Some((0, remaining)) => { . // Otherwise, if one of the following is true . // c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) . // url is special and c is U+005C (\) . // If @ flag is set and buffer is the empty string, validation error, return failure. . if let (Some(c), _) = remaining.split_first() { . if c == '/' || c == '?' || c == '#' || (scheme_type.is_special() && c == '\\') { -- line 912 ---------------------------------------- -- line 952 ---------------------------------------- . } . . fn parse_host_and_port<'i>( . &mut self, . input: Input<'i>, . scheme_end: u32, . scheme_type: SchemeType, . ) -> ParseResult<(u32, HostInternal, Option, Input<'i>)> { 1,674 ( 0.00%) let (host, remaining) = Parser::parse_host(input, scheme_type)?; 212,719 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_host (279x) 837 ( 0.00%) write!(&mut self.serialization, "{host}").unwrap(); . let host_end = to_u32(self.serialization.len())?; 1,953 ( 0.00%) if let Host::Domain(h) = &host { . if h.is_empty() { . // Port with an empty host . if remaining.starts_with(":") { . return Err(ParseError::EmptyHost); . } . if scheme_type.is_special() { . return Err(ParseError::EmptyHost); . } -- line 971 ---------------------------------------- -- line 980 ---------------------------------------- . let mut buffer = [0u8; 5]; . let port_str = fast_u16_to_str(&mut buffer, port); . self.serialization.push_str(port_str); . } . (port, remaining) . } else { . (None, remaining) . }; 279 ( 0.00%) Ok((host_end, host.into(), port, remaining)) . } . 2,790 ( 0.00%) pub fn parse_host( . mut input: Input<'_>, . scheme_type: SchemeType, . ) -> ParseResult<(Host>, Input<'_>)> { 558 ( 0.00%) if scheme_type.is_file() { . return Parser::get_file_host(input); . } . // Undo the Input abstraction here to avoid allocating in the common case . // where the host part of the input does not contain any tab or newline . let input_str = input.chars.as_str(); . let mut inside_square_brackets = false; . let mut has_ignored_chars = false; . let mut non_ignored_chars = 0; . let mut bytes = 0; . for c in input_str.chars() { 10,152 ( 0.00%) match c { . ':' if !inside_square_brackets => break, . '\\' if scheme_type.is_special() => break, . '/' | '?' | '#' => break, . ascii_tab_or_new_line_pattern!() => { . has_ignored_chars = true; . } . '[' => { . inside_square_brackets = true; . non_ignored_chars += 1 . } . ']' => { . inside_square_brackets = false; . non_ignored_chars += 1 . } 1,978 ( 0.00%) _ => non_ignored_chars += 1, . } 1,978 ( 0.00%) bytes += c.len_utf8(); . } . let host_str; . { . let host_input = input.by_ref().take(non_ignored_chars); 558 ( 0.00%) if has_ignored_chars { . host_str = Cow::Owned(host_input.collect()); . } else { 1,978 ( 0.00%) for _ in host_input {} . host_str = Cow::Borrowed(&input_str[..bytes]); . } . } 837 ( 0.00%) if scheme_type == SchemeType::SpecialNotFile && host_str.is_empty() { . return Err(ParseError::EmptyHost); . } . if !scheme_type.is_special() { . let host = Host::parse_opaque_cow(host_str)?; . return Ok((host, input)); . } 1,674 ( 0.00%) let host = Host::parse_cow(host_str)?; 139,546 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/host.rs:>>::parse_cow (279x) . Ok((host, input)) 2,511 ( 0.00%) } . . fn get_file_host(input: Input<'_>) -> ParseResult<(Host>, Input<'_>)> { . let (_, host_str, remaining) = Parser::file_host(input)?; . let host = match Host::parse(&host_str)? { . Host::Domain(ref d) if d == "localhost" => Host::Domain(Cow::Borrowed("")), . Host::Domain(s) => Host::Domain(Cow::Owned(s)), . Host::Ipv4(ip) => Host::Ipv4(ip), . Host::Ipv6(ip) => Host::Ipv6(ip), -- line 1052 ---------------------------------------- -- line 1142 ---------------------------------------- . . let mut opt_port = Some(port as u16); . if !has_any_digit || opt_port == default_port() { . opt_port = None; . } . Ok((opt_port, input)) . } . 2,511 ( 0.00%) pub fn parse_path_start<'i>( . &mut self, . scheme_type: SchemeType, . has_host: &mut bool, . input: Input<'i>, . ) -> Input<'i> { . let path_start = self.serialization.len(); . let (maybe_c, remaining) = input.split_first(); . // If url is special, then: 279 ( 0.00%) if scheme_type.is_special() { . if maybe_c == Some('\\') { . // If c is U+005C (\), validation error. . self.log_violation(SyntaxViolation::Backslash); . } . // A special URL always has a non-empty path. 279 ( 0.00%) if !self.serialization.ends_with('/') { . self.serialization.push('/'); . // We have already made sure the forward slash is present. . if maybe_c == Some('/') || maybe_c == Some('\\') { 837 ( 0.00%) return self.parse_path(scheme_type, has_host, path_start, remaining); . } . } . return self.parse_path(scheme_type, has_host, path_start, input); . } else if maybe_c == Some('?') || maybe_c == Some('#') { . // Otherwise, if state override is not given and c is U+003F (?), . // set url’s query to the empty string and state to query state. . // Otherwise, if state override is not given and c is U+0023 (#), . // set url’s fragment to the empty string and state to fragment state. -- line 1177 ---------------------------------------- -- line 1181 ---------------------------------------- . . if maybe_c.is_some() && maybe_c != Some('/') { . self.serialization.push('/'); . } . // Otherwise, if c is not the EOF code point: . self.parse_path(scheme_type, has_host, path_start, input) . } . 5,859 ( 0.00%) pub fn parse_path<'i>( . &mut self, . scheme_type: SchemeType, . has_host: &mut bool, . path_start: usize, . mut input: Input<'i>, . ) -> Input<'i> { . // it's much faster to call utf8_percent_encode in bulk 4,520 ( 0.00%) fn push_pending( . serialization: &mut String, . start_str: &str, . remaining_len: usize, . context: Context, . scheme_type: SchemeType, . ) { . let text = &start_str[..start_str.len() - remaining_len]; . if text.is_empty() { . return; . } 291 ( 0.00%) if context == Context::PathSegmentSetter { . if scheme_type.is_special() { . serialization.extend(utf8_percent_encode(text, SPECIAL_PATH_SEGMENT)); . } else { . serialization.extend(utf8_percent_encode(text, PATH_SEGMENT)); . } . } else { . serialization.extend(utf8_percent_encode(text, PATH)); . } 4,520 ( 0.00%) } . . // Relative path state . loop { . let mut segment_start = self.serialization.len(); . let mut ends_with_slash = false; . let mut start_str = input.chars.as_str(); . loop { . let input_before_c = input.clone(); . // bypass input.next() and manually handle ascii_tab_or_new_line . // in order to encode string slices in bulk . let c = if let Some(c) = input.chars.next() { . c . } else { 40 ( 0.00%) push_pending( 722 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_path::push_pending (5x) . &mut self.serialization, . start_str, . 0, . self.context, . scheme_type, . ); . break; . }; 15,336 ( 0.00%) match c { . ascii_tab_or_new_line_pattern!() => { . push_pending( . &mut self.serialization, . start_str, . input_before_c.chars.as_str().len(), . self.context, . scheme_type, . ); . start_str = input.chars.as_str(); . } 286 ( 0.00%) '/' if self.context != Context::PathSegmentSetter => { 1,430 ( 0.00%) push_pending( 50,951 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_path::push_pending (286x) . &mut self.serialization, . start_str, . input_before_c.chars.as_str().len(), . self.context, . scheme_type, . ); . self.serialization.push(c); . ends_with_slash = true; 286 ( 0.00%) break; . } . '\\' if self.context != Context::PathSegmentSetter . && scheme_type.is_special() => . { . push_pending( . &mut self.serialization, . start_str, . input_before_c.chars.as_str().len(), -- line 1269 ---------------------------------------- -- line 1270 ---------------------------------------- . self.context, . scheme_type, . ); . self.log_violation(SyntaxViolation::Backslash); . self.serialization.push('/'); . ends_with_slash = true; . break; . } 548 ( 0.00%) '?' | '#' if self.context == Context::UrlParser => { 1,644 ( 0.00%) push_pending( 5,409 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_path::push_pending (274x) . &mut self.serialization, . start_str, . input_before_c.chars.as_str().len(), . self.context, . scheme_type, . ); . input = input_before_c; . break; . } . _ => { . self.check_url_code_point(c, &input); 2,334 ( 0.00%) if scheme_type.is_file() . && self.serialization.len() > path_start . && is_normalized_windows_drive_letter( . &self.serialization[path_start + 1..], . ) . { . push_pending( . &mut self.serialization, . start_str, -- line 1299 ---------------------------------------- -- line 1311 ---------------------------------------- . . let segment_before_slash = if ends_with_slash { . &self.serialization[segment_start..self.serialization.len() - 1] . } else { . &self.serialization[segment_start..self.serialization.len()] . }; . match segment_before_slash { . // If buffer is a double-dot path segment, shorten url’s path, 19 ( 0.00%) ".." | "%2e%2e" | "%2e%2E" | "%2E%2e" | "%2E%2E" | "%2e." | "%2E." | ".%2e" 566 ( 0.00%) | ".%2E" => { . debug_assert!(self.serialization.as_bytes()[segment_start - 1] == b'/'); . self.serialization.truncate(segment_start); . if self.serialization.ends_with('/') . && Parser::last_slash_can_be_removed(&self.serialization, path_start) . { . self.serialization.pop(); . } . self.shorten_path(scheme_type, path_start); -- line 1328 ---------------------------------------- -- line 1359 ---------------------------------------- . // validation error, set url’s host to the empty string. . if *has_host { . self.log_violation(SyntaxViolation::FileWithHostAndWindowsDrive); . *has_host = false; // FIXME account for this in callers . } . } . } . } 1,130 ( 0.00%) if !ends_with_slash { . break; . } . } 279 ( 0.00%) if scheme_type.is_file() { . // while url’s path’s size is greater than 1 . // and url’s path[0] is the empty string, . // validation error, remove the first item from url’s path. . //FIXME: log violation . let path = self.serialization.split_off(path_start); . self.serialization.push('/'); . self.serialization.push_str(path.trim_start_matches('/')); . } . . input 2,790 ( 0.00%) } . . fn last_slash_can_be_removed(serialization: &str, path_start: usize) -> bool { . let url_before_segment = &serialization[..serialization.len() - 1]; . if let Some(segment_before_start) = url_before_segment.rfind('/') { . // Do not remove the root slash . segment_before_start >= path_start . // Or a windows drive letter slash . && !path_starts_with_windows_drive_letter(&serialization[segment_before_start..]) -- line 1390 ---------------------------------------- -- line 1437 ---------------------------------------- . .extend(utf8_percent_encode(utf8_c, CONTROLS)); . } . None => return input, . } . } . } . . #[allow(clippy::too_many_arguments)] 6,138 ( 0.00%) fn with_query_and_fragment( . mut self, . scheme_type: SchemeType, . scheme_end: u32, . username_end: u32, . host_start: u32, . host_end: u32, . host: HostInternal, . port: Option, -- line 1453 ---------------------------------------- -- line 1457 ---------------------------------------- . // Special case for anarchist URL's with a leading empty path segment . // This prevents web+demo:/.//not-a-host/ or web+demo:/path/..//not-a-host/, . // when parsed and then serialized, from ending up as web+demo://not-a-host/ . // (they end up as web+demo:/.//not-a-host/). . // . // If url’s host is null, url does not have an opaque path, . // url’s path’s size is greater than 1, and url’s path[0] is the empty string, . // then append U+002F (/) followed by U+002E (.) to output. 279 ( 0.00%) let scheme_end_as_usize = scheme_end as usize; . let path_start_as_usize = path_start as usize; 1,116 ( 0.00%) if path_start_as_usize == scheme_end_as_usize + 1 { . // Anarchist URL . if self.serialization[path_start_as_usize..].starts_with("//") { . // Case 1: The base URL did not have an empty path segment, but the resulting one does . // Insert the "/." prefix . self.serialization.insert_str(path_start_as_usize, "/."); . path_start += 2; . } . assert!(!self.serialization[scheme_end_as_usize..].starts_with("://")); 837 ( 0.00%) } else if path_start_as_usize == scheme_end_as_usize + 3 . && &self.serialization[scheme_end_as_usize..path_start_as_usize] == ":/." . { . // Anarchist URL with leading empty path segment . // The base URL has a "/." between the host and the path . assert_eq!(self.serialization.as_bytes()[path_start_as_usize], b'/'); . if self . .serialization . .as_bytes() -- line 1484 ---------------------------------------- -- line 1491 ---------------------------------------- . self.serialization . .replace_range(scheme_end_as_usize..path_start_as_usize, ":"); . path_start -= 2; . } . assert!(!self.serialization[scheme_end_as_usize..].starts_with("://")); . } . . let (query_start, fragment_start) = 1,116 ( 0.00%) self.parse_query_and_fragment(scheme_type, scheme_end, remaining)?; 229,093 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:::parse_query_and_fragment (279x) 5,301 ( 0.00%) Ok(Url { 1,395 ( 0.00%) serialization: self.serialization, . scheme_end, . username_end, . host_start, . host_end, . host, . port, . path_start, . query_start, . fragment_start, . }) 2,232 ( 0.00%) } . . /// Return (query_start, fragment_start) 1,953 ( 0.00%) fn parse_query_and_fragment( . &mut self, . scheme_type: SchemeType, . scheme_end: u32, . mut input: Input<'_>, . ) -> ParseResult<(Option, Option)> { . let mut query_start = None; . match input.next() { . Some('#') => {} -- line 1523 ---------------------------------------- -- line 1526 ---------------------------------------- . self.serialization.push('?'); . let remaining = self.parse_query(scheme_type, scheme_end, input); . if let Some(remaining) = remaining { . input = remaining . } else { . return Ok((query_start, None)); . } . } 10 ( 0.00%) None => return Ok((None, None)), . _ => panic!("Programming error. parse_query_and_fragment() called without ? or #"), . } . . let fragment_start = to_u32(self.serialization.len())?; . self.serialization.push('#'); . self.parse_fragment(input); 1,918 ( 0.00%) Ok((query_start, Some(fragment_start))) 2,232 ( 0.00%) } . . pub fn parse_query<'i>( . &mut self, . scheme_type: SchemeType, . scheme_end: u32, . input: Input<'i>, . ) -> Option> { . struct QueryPartIter<'i, 'p> { -- line 1550 ---------------------------------------- -- line 1646 ---------------------------------------- . struct FragmentPartIter<'i, 'p> { . input: Input<'i>, . violation_fn: Option<&'p dyn Fn(SyntaxViolation)>, . } . . impl<'i> Iterator for FragmentPartIter<'i, '_> { . type Item = &'i str; . 2,740 ( 0.00%) fn next(&mut self) -> Option { . let start = self.input.chars.as_str(); . // bypass self.input.next() in order to get string slices . // which are faster to operate on . while let Some(c) = self.input.chars.next() { 43,897 ( 0.00%) match c { . ascii_tab_or_new_line_pattern!() => { . return Some( . &start[..start.len() - self.input.chars.as_str().len() - 1], . ); . } . '\0' => { . if let Some(vfn) = &self.violation_fn { . vfn(SyntaxViolation::NullInFragment); . } . } . c => { 12,542 ( 0.00%) if let Some(vfn) = &self.violation_fn { . check_url_code_point(vfn, c, &self.input); . } . } . } . } 548 ( 0.00%) if start.is_empty() { . None . } else { . Some(start) . } 4,384 ( 0.00%) } . } . . let part_iter = FragmentPartIter { . input, 274 ( 0.00%) violation_fn: self.violation_fn, . }; . 2,740 ( 0.00%) for part in part_iter { 125,208 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.8/src/parser.rs:<::parse_fragment::FragmentPartIter as core::iter::traits::iterator::Iterator>::next (548x) . self.serialization . .extend(utf8_percent_encode(part, FRAGMENT)); . } . } . . #[inline] . fn check_url_code_point(&self, c: char, input: &Input<'_>) { 7,002 ( 0.00%) if let Some(vfn) = self.violation_fn { . check_url_code_point(vfn, c, input) . } . } . } . . fn check_url_code_point(vfn: &dyn Fn(SyntaxViolation), c: char, input: &Input<'_>) { . if c == '%' { . let mut input = input.clone(); -- line 1706 ---------------------------------------- -- line 1738 ---------------------------------------- . '\u{B0000}'..='\u{BFFFD}' | '\u{C0000}'..='\u{CFFFD}' | . '\u{D0000}'..='\u{DFFFD}' | '\u{E1000}'..='\u{EFFFD}' | . '\u{F0000}'..='\u{FFFFD}' | '\u{100000}'..='\u{10FFFD}') . } . . /// https://url.spec.whatwg.org/#c0-controls-and-space . #[inline] . fn c0_control_or_space(ch: char) -> bool { 1,598 ( 0.00%) ch <= ' ' // U+0000 to U+0020 . } . . /// https://infra.spec.whatwg.org/#ascii-tab-or-newline . #[inline] . fn ascii_tab_or_new_line(ch: char) -> bool { 45,572 ( 0.00%) matches!(ch, ascii_tab_or_new_line_pattern!()) . } . . /// https://url.spec.whatwg.org/#ascii-alpha . #[inline] . pub fn ascii_alpha(ch: char) -> bool { . ch.is_ascii_alphabetic() . } . . #[inline] . pub fn to_u32(i: usize) -> ParseResult { 5,286 ( 0.00%) if i <= u32::MAX as usize { . Ok(i as u32) . } else { . Err(ParseError::Overflow) . } . } . . fn is_normalized_windows_drive_letter(segment: &str) -> bool { . is_windows_drive_letter(segment) && segment.as_bytes()[1] == b':' -- line 1771 ---------------------------------------- 29,086 ( 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 { 112,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 24,312 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 112,344 ( 0.00%) } . 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 196,290 ( 0.00%) if has_attr(cx, expr.hir_id) { . println!("{expr:#?}"); . } 523,440 ( 0.01%) } . 10,719 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 5,955 ( 0.00%) match stmt.kind { 1,040 ( 0.00%) hir::StmtKind::Expr(e) | hir::StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 3,313 ( 0.00%) if has_attr(cx, stmt.hir_id) { . println!("{stmt:#?}"); . } 9,528 ( 0.00%) } . 32 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { 8 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 32 ( 0.00%) } . 95,944 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) { 22,635 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 95,944 ( 0.00%) } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool { 212,142 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 4,449,111 ( 0.06%) => ???:::hir_attrs (65,430x) 20,915 ( 0.00%) get_builtin_attr(attrs, sym::dump).count() > 0 . } 41,830 ( 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. 90,574 ( 0.00%) if text.len() < 2 * USIZE_BYTES { . return memchr_naive(x, text); . } . 82,109 ( 0.00%) memchr_aligned(x, text) 1,412,286 ( 0.02%) => ???:core::slice::memchr::memchr_aligned (15,465x) . } . . #[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)`. 255,080 ( 0.00%) while i < text.len() { 181,105 ( 0.00%) if text[i] == x { . return Some(i); . } . 90,336 ( 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 ---------------------------------------- 106,038 ( 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 { 61,659 ( 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 { 357,849 ( 0.00%) String { vec: Vec::with_capacity(capacity) } . } . . /// Creates a new empty `String` with at least the specified capacity. . /// . /// # Errors . /// . /// Returns [`Err`] if the capacity exceeds `isize::MAX` bytes, . /// or if the memory allocator reports failure. -- line 502 ---------------------------------------- -- line 1009 ---------------------------------------- . /// }; . /// . /// assert_eq!("💖", sparkle_heart); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . pub unsafe fn from_utf8_unchecked(bytes: Vec) -> String { 17,892 ( 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)); 8,418 ( 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()?; 15,583 ( 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 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); 822 ( 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] 9,093 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 18,186 ( 0.00%) fmt::Display::fmt(&**self, f) 1,465,978 ( 0.02%) => ???:::fmt (9,093x) . } . } . . #[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 2944 ---------------------------------------- . // See , the last attempt . // to try to remove it. . #[inline] . default fn spec_to_string(&self) -> String { . let mut buf = String::new(); . let mut formatter = . core::fmt::Formatter::new(&mut buf, core::fmt::FormattingOptions::new()); . // Bypass format_args!() to avoid write_str with zero-length strs 35,225 ( 0.00%) fmt::Display::fmt(self, &mut formatter) 102,914 ( 0.00%) => ???:::fmt (41x) . .expect("a Display implementation returned an error unexpectedly"); 35,348 ( 0.00%) buf . } . } . . #[cfg(not(no_global_oom_handling))] . impl SpecToString for core::ascii::Char { . #[inline] . fn spec_to_string(&self) -> String { . self.as_str().to_owned() -- line 2962 ---------------------------------------- -- line 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> { 171 ( 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] 147,609 ( 0.00%) fn write_str(&mut self, s: &str) -> fmt::Result { . self.push_str(s); . Ok(()) 147,609 ( 0.00%) } . . #[inline] . fn write_char(&mut self, c: char) -> fmt::Result { . self.push(c); . Ok(()) . } . } . -- line 3392 ---------------------------------------- 32,692 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/else_if_without_else.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . restriction, . "`if` expression with an `else if`, but without a final `else` branch" . } . . declare_lint_pass!(ElseIfWithoutElse => [ELSE_IF_WITHOUT_ELSE]); . . impl EarlyLintPass for ElseIfWithoutElse { . fn check_expr(&mut self, cx: &EarlyContext<'_>, item: &Expr) { 149,657 ( 0.00%) if let ExprKind::If(_, _, Some(ref els)) = item.kind 2 ( 0.00%) && let ExprKind::If(_, _, None) = els.kind . && !item.span.in_external_macro(cx.sess().source_map()) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . ELSE_IF_WITHOUT_ELSE, . els.span, . "`if` expression with an `else if`, but without a final `else`", -- line 59 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,860 ( 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); . }, . ); . } 523,440 ( 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)> { 165,364 ( 0.00%) let (has_ref, expr) = if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = expr.kind { . (true, inner) 266,240 ( 0.00%) } else if let Some(parent) = get_parent_expr(cx, expr) // Already checked by the parent expr. 6,971,692 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (53,248x) 65,089 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, _) = parent.kind . { . return None; . } else { . (false, expr) . }; . 108,480 ( 0.00%) if let ExprKind::Array(members) = expr.kind 2 ( 0.00%) && !members.is_empty() 1 ( 0.00%) && !span_contains_comment(cx, expr.span) 5 ( 0.00%) && !span_contains_cfg(cx, expr.span) 4,257 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (1x) . { . return members . .iter() . .try_fold(Vec::new(), |mut acc, member| { 2 ( 0.00%) if let ExprKind::Lit(lit) = member.kind . && let LitKind::Byte(_) = lit.node . && expr.span.eq_ctxt(member.span) . { . acc.push(lit.span); . return Some(acc); . } . None . }) -- line 103 ---------------------------------------- 211,012 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs -------------------------------------------------------------------------------- Ir -- line 78 ---------------------------------------- . /// . /// We then check the individual expressions via `check_expr`. We use the same logic for . /// semi expressions and the final expression as we need to check match and if expressions . /// for binding of the io amount to `Ok(_)`. . /// . /// We explicitly check for the match source to be Normal as it needs special logic . /// to consider the arms, and we want to avoid breaking the logic for situations where things . /// get desugared to match. 96,363 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx hir::Block<'tcx>) { 10,707 ( 0.00%) let fn_def_id = block.hir_id.owner.to_def_id(); 64,242 ( 0.00%) if let Some(impl_id) = cx.tcx.trait_impl_of_assoc(fn_def_id) { 1,630,804 ( 0.02%) => ???:::trait_impl_of_assoc (10,707x) . let trait_id = cx.tcx.impl_trait_id(impl_id); . // We don't want to lint inside io::Read or io::Write implementations, as the author has more . // information about their trait implementation than our lint, see https://github.com/rust-lang/rust-clippy/issues/4836 30,816 ( 0.00%) if let Some(trait_name) = cx.tcx.get_diagnostic_name(trait_id) 326,860 ( 0.00%) => ???:::get_diagnostic_name (3,852x) . && matches!(trait_name, sym::IoRead | sym::IoWrite) . { . return; . } . . let async_paths = [ . &paths::TOKIO_IO_ASYNCREADEXT, . &paths::TOKIO_IO_ASYNCWRITEEXT, -- line 100 ---------------------------------------- -- line 102 ---------------------------------------- . &paths::FUTURES_IO_ASYNCWRITEEXT, . ]; . . if async_paths.into_iter().any(|path| path.matches(cx, trait_id)) { . return; . } . } . 10,707 ( 0.00%) for stmt in block.stmts { 2,642 ( 0.00%) if let hir::StmtKind::Semi(exp) = stmt.kind { 520 ( 0.00%) check_expr(cx, exp); 27,823 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr (260x) . } . } . 32,121 ( 0.00%) if let Some(exp) = block.expr 33,099 ( 0.00%) && matches!( 21,406 ( 0.00%) exp.kind, . ExprKind::If(_, _, _) | ExprKind::Match(_, _, hir::MatchSource::Normal) . ) . { 4,473 ( 0.00%) check_expr(cx, exp); 29,208 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr (497x) . } 81,680 ( 0.00%) } . } . . fn non_consuming_err_arm<'a>(cx: &LateContext<'a>, arm: &hir::Arm<'a>) -> bool { . // if there is a guard, we consider the result to be consumed . if arm.guard.is_some() { . return false; . } . if is_unreachable_or_panic(cx, arm.body) { -- line 132 ---------------------------------------- -- line 154 ---------------------------------------- . // if the body is unreachable or there is a panic, . // we consider the result to be consumed . return false; . } . . is_ok_wild_or_dotdot_pattern(cx, arm.pat) . } . 6,813 ( 0.00%) fn check_expr<'a>(cx: &LateContext<'a>, expr: &'a hir::Expr<'a>) { 5,271 ( 0.00%) match expr.kind { . ExprKind::If(cond, _, _) 3 ( 0.00%) if let ExprKind::Let(hir::LetExpr { pat, init, .. }) = cond.kind . && is_ok_wild_or_dotdot_pattern(cx, pat) . && let Some(op) = should_lint(cx, init) => . { . emit_lint(cx, cond.span, cond.hir_id, op, &[pat.span]); . }, . // we will capture only the case where the match is Ok( ) or Err( ) . // prefer to match the minimum possible, and expand later if needed . // to avoid false positives on something as used as this 3,820 ( 0.00%) ExprKind::Match(expr, [arm1, arm2], hir::MatchSource::Normal) if let Some(op) = should_lint(cx, expr) => { 12,928 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint (404x) . if non_consuming_ok_arm(cx, arm1) && non_consuming_err_arm(cx, arm2) { . emit_lint(cx, expr.span, expr.hir_id, op, &[arm1.pat.span]); . } . if non_consuming_ok_arm(cx, arm2) && non_consuming_err_arm(cx, arm1) { . emit_lint(cx, expr.span, expr.hir_id, op, &[arm2.pat.span]); . } . }, . ExprKind::Match(_, _, hir::MatchSource::Normal) => {}, 1,305 ( 0.00%) _ if let Some(op) = should_lint(cx, expr) => { 20,835 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint (261x) . emit_lint(cx, expr.span, expr.hir_id, op, &[]); . }, . _ => {}, . } 6,056 ( 0.00%) } . 5,985 ( 0.00%) fn should_lint<'a>(cx: &LateContext<'a>, mut inner: &'a hir::Expr<'a>) -> Option { . inner = unpack_match(inner); 665 ( 0.00%) inner = unpack_try(cx, inner); . inner = unpack_call_chain(inner); . inner = unpack_await(cx, inner); . // we type-check it to get whether it's a read/write or their vectorized forms . // and keep only the ones that are produce io amount . check_io_mode(cx, inner) 5,985 ( 0.00%) } . . fn is_ok_wild_or_dotdot_pattern<'a>(cx: &LateContext<'a>, pat: &hir::Pat<'a>) -> bool { . // the if checks whether we are in a result Ok( ) pattern . // and the return checks whether it is unhandled . . if let PatKind::TupleStruct(ref path, inner_pat, _) = pat.kind . // we check against Result::Ok to avoid linting on Err(_) or something else. . && cx.qpath_res(path, pat.hir_id).ctor_parent(cx).is_lang_item(cx, hir::LangItem::ResultOk) -- line 206 ---------------------------------------- -- line 227 ---------------------------------------- . }; . if is_panic(cx, macro_call.def_id) { . return !cx.tcx.hir_is_inside_const_context(expr.hir_id); . } . cx.tcx.is_diagnostic_item(sym::unreachable_macro, macro_call.def_id) . } . . fn unpack_call_chain<'a>(mut expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> { 2,240 ( 0.00%) while let ExprKind::MethodCall(path, receiver, ..) = expr.kind { . if matches!( 245 ( 0.00%) path.ident.name, 2,211 ( 0.00%) sym::unwrap . | sym::expect . | sym::unwrap_or . | sym::unwrap_or_else . | sym::ok . | sym::is_ok . | sym::is_err . | sym::or_else . | sym::or -- line 246 ---------------------------------------- -- line 249 ---------------------------------------- . } else { . break; . } . } . expr . } . . fn unpack_try<'a>(cx: &LateContext<'_>, mut expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> { 1,330 ( 0.00%) while let ExprKind::Call(func, [arg_0]) = expr.kind . && let ExprKind::Path(qpath) = func.kind . && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::TryTraitBranch) . { . expr = arg_0; . } . expr . } . . fn unpack_match<'a>(mut expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> { 1,995 ( 0.00%) while let ExprKind::Match(res, _, _) = expr.kind { . expr = res; . } . expr . } . . /// If `expr` is an (e).await, return the inner expression "e" that's being . /// waited on. Otherwise return None. . fn unpack_await<'a>(cx: &LateContext<'_>, expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> { 840 ( 0.00%) if let ExprKind::Match(expr, _, hir::MatchSource::AwaitDesugar) = expr.kind . && let ExprKind::Call(func, [arg_0]) = expr.kind . && let ExprKind::Path(qpath) = func.kind . && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::IntoFutureIntoFuture) . { . return arg_0; . } . expr . } . . /// Check whether the current expr is a function call for an IO operation . fn check_io_mode(cx: &LateContext<'_>, call: &hir::Expr<'_>) -> Option { 840 ( 0.00%) let ExprKind::MethodCall(path, ..) = call.kind else { . return None; . }; . 735 ( 0.00%) let vectorized = match path.ident.as_str() { 7,840 ( 0.00%) => ???:::as_str (245x) . "write_vectored" | "read_vectored" => true, 242 ( 0.00%) "write" | "read" => false, . _ => { . return None; . }, . }; . . if let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(call.hir_id) . && let Some(trait_def_id) = cx.tcx.trait_of_assoc(method_def_id) . { -- line 302 ---------------------------------------- 8,629 ( 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 { 261,720 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 316,064 ( 0.00%) match &expr.kind { 3,332 ( 0.00%) ExprKind::MethodCall(path, func, [param], _) => { 3,208 ( 0.00%) if let Some(adt) = cx.typeck_results().expr_ty(func).peel_refs().ty_adt_def() 64,160 ( 0.00%) => ???:::expr_ty (1,604x) 1,589 ( 0.00%) && matches!( 4,849 ( 0.00%) (cx.tcx.get_diagnostic_name(adt.did()), path.ident.name), 85,611 ( 0.00%) => ???:::get_diagnostic_name (1,589x) 164 ( 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); . } . }, 11,086 ( 0.00%) ExprKind::Call(func, [param]) => { 19,940 ( 0.00%) if let ExprKind::Path(ref path) = func.kind 19,940 ( 0.00%) && let Some(def_id) = cx.qpath_res(path, func.hir_id).opt_def_id() 297,365 ( 0.00%) => ???:::qpath_res (4,985x) 24,915 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::permissions_from_mode, def_id) 301,954 ( 0.00%) => ???:::is_diagnostic_item (4,983x) . && 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); . } . }, . _ => {}, . } 327,150 ( 0.00%) } . } . . 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 ---------------------------------------- 14,955 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs -------------------------------------------------------------------------------- Ir -- line 222 ---------------------------------------- . ); . } . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for StringPatterns { 392,580 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 143,108 ( 0.00%) if !expr.span.from_expansion() 6,544 ( 0.00%) && let ExprKind::MethodCall(method, receiver, args, _) = expr.kind 1,636 ( 0.00%) && let method_name = method.ident.name . && let Some(&(_, pos)) = PATTERN_METHODS . .iter() . .find(|(array_method_name, _)| *array_method_name == method_name) . && let Some(arg) = args.get(pos) . && let ty::Ref(_, ty, _) = cx.typeck_results().expr_ty_adjusted(receiver).kind() . && ty.is_str() . { . check_single_char_pattern_lint(cx, arg); . . check_manual_pattern_char_comparison(cx, arg, self.msrv); . } 392,580 ( 0.00%) } . } 107,652 ( 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>) { 252,300 ( 0.00%) if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind { . for arg in args { 4,812 ( 0.00%) check_closure(cx, Some(receiver), arg); 28,872 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (1,604x) . } . } 16,629 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { 16,629 ( 0.00%) check_closure(cx, None, func); 99,774 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (5,543x) . for arg in args { 18,279 ( 0.00%) check_closure(cx, None, arg); 110,188 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (6,093x) . } . } . } . } . . #[expect(clippy::too_many_lines)] 105,920 ( 0.00%) fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) { 26,481 ( 0.00%) let body = if let ExprKind::Closure(c) = expr.kind 3 ( 0.00%) && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) 2 ( 0.00%) && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_)) 2 ( 0.00%) && !expr.span.from_expansion() . { 6 ( 0.00%) cx.tcx.hir_body(c.body) 83 ( 0.00%) => ???:::hir_body (1x) . } else { . return; . }; . 3 ( 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; . } . 5 ( 0.00%) if is_adjusted(cx, body.value) { 19 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_adjusted (1x) . return; . } . . let typeck = cx.typeck_results(); 3 ( 0.00%) let closure = if let ty::Closure(_, closure_subs) = typeck.expr_ty(expr).kind() { 40 ( 0.00%) => ???:::expr_ty (1x) 1 ( 0.00%) closure_subs.as_closure() . } else { . return; . }; 6 ( 0.00%) let closure_sig = cx.tcx.signature_unclosure(closure.sig(), Safety::Safe).skip_binder(); 243 ( 0.00%) => ???:::signature_unclosure (1x) 50 ( 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 (1x) 6 ( 0.00%) match body.value.kind { . ExprKind::Call(callee, args) . if matches!( . callee.kind, . ExprKind::Path(QPath::Resolved(..) | QPath::TypeRelative(..)) . ) => . { . let callee_ty_raw = typeck.expr_ty(callee); . let callee_ty = callee_ty_raw.peel_refs(); -- line 146 ---------------------------------------- -- line 289 ---------------------------------------- . app, . ); . }, . ); . } . }, . _ => (), . } 105,920 ( 0.00%) } . . fn check_inputs( . typeck: &TypeckResults<'_>, . params: &[Param<'_>], . self_arg: Option<&Expr<'_>>, . args: &[Expr<'_>], . ) -> bool { . params.len() == self_arg.map_or(0, |_| 1) + args.len() -- line 305 ---------------------------------------- 7,701 ( 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/sync/atomic.rs -------------------------------------------------------------------------------- Ir -- line 754 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const fn load(&self, order: Ordering) -> bool { . // SAFETY: any data races are prevented by atomic intrinsics and the raw . // pointer passed in is valid because we got it from a reference. 190,815 ( 0.00%) unsafe { atomic_load(self.v.get().cast::(), order) != 0 } . } . . /// Stores a value into the bool. . /// . /// `store` takes an [`Ordering`] argument which describes the memory ordering . /// of this operation. Possible values are [`SeqCst`], [`Release`] and [`Relaxed`]. . /// . /// # Panics -- line 770 ---------------------------------------- -- line 3970 ---------------------------------------- . . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_store(dst: *mut T, val: T, order: Ordering) { . // SAFETY: the caller must uphold the safety contract for `atomic_store`. . unsafe { . match order { 2 ( 0.00%) Relaxed => intrinsics::atomic_store::(dst, val), . Release => intrinsics::atomic_store::(dst, val), . SeqCst => intrinsics::atomic_store::(dst, val), . Acquire => panic!("there is no such thing as an acquire store"), . AcqRel => panic!("there is no such thing as an acquire-release store"), . } . } . } . . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_load(dst: *const T, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_load`. . unsafe { . match order { 205,166 ( 0.00%) Relaxed => intrinsics::atomic_load::(dst), 696,928 ( 0.01%) Acquire => intrinsics::atomic_load::(dst), 136,328 ( 0.00%) SeqCst => intrinsics::atomic_load::(dst), . Release => panic!("there is no such thing as a release load"), . AcqRel => panic!("there is no such thing as an acquire-release load"), . } . } . } . . #[inline] . #[cfg(target_has_atomic)] -- line 4004 ---------------------------------------- -- line 4005 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_swap(dst: *mut T, val: T, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_swap`. . unsafe { . match order { . Relaxed => intrinsics::atomic_xchg::(dst, val), . Acquire => intrinsics::atomic_xchg::(dst, val), 13,618 ( 0.00%) Release => intrinsics::atomic_xchg::(dst, val), . AcqRel => intrinsics::atomic_xchg::(dst, val), . SeqCst => intrinsics::atomic_xchg::(dst, val), . } . } . } . . /// Returns the previous value (like __sync_fetch_and_add). . #[inline] . #[cfg(target_has_atomic)] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_add(dst: *mut T, val: U, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_add`. . unsafe { . match order { 48,140 ( 0.00%) Relaxed => intrinsics::atomic_xadd::(dst, val), . Acquire => intrinsics::atomic_xadd::(dst, val), . Release => intrinsics::atomic_xadd::(dst, val), . AcqRel => intrinsics::atomic_xadd::(dst, val), . SeqCst => intrinsics::atomic_xadd::(dst, val), . } . } . } . -- line 4037 ---------------------------------------- -- line 4041 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . #[rustc_const_unstable(feature = "const_atomic", issue = "160078")] . const unsafe fn atomic_sub(dst: *mut T, val: U, order: Ordering) -> T { . // SAFETY: the caller must uphold the safety contract for `atomic_sub`. . unsafe { . match order { . Relaxed => intrinsics::atomic_xsub::(dst, val), . Acquire => intrinsics::atomic_xsub::(dst, val), 195,500 ( 0.00%) Release => intrinsics::atomic_xsub::(dst, val), . AcqRel => intrinsics::atomic_xsub::(dst, val), . SeqCst => intrinsics::atomic_xsub::(dst, val), . } . } . } . . /// Publicly exposed for stdarch; nobody else should use this. . #[inline] -- line 4057 ---------------------------------------- -- line 4075 ---------------------------------------- . } . (Relaxed, Acquire) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Relaxed, SeqCst) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, Relaxed) => { 20,427 ( 0.00%) intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, Acquire) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Acquire, SeqCst) => { . intrinsics::atomic_cxchg::(dst, old, new) . } . (Release, Relaxed) => { -- line 4091 ---------------------------------------- 10,624 ( 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, . { 13,626 ( 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 292 ---------------------------------------- . { . fn new(a: A, b: B) -> Self { . let len = cmp::min(a.size(), b.size()); . Zip { a, b, index: 0, len } . } . . #[inline] . fn next(&mut self) -> Option<(A::Item, B::Item)> { 172,605 ( 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 14,080 ( 0.00%) self.index += 1; . // SAFETY: `i` is smaller than `self.len`, thus smaller than `self.a.len()` and `self.b.len()` . unsafe { 6,770 ( 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 ---------------------------------------- 21,412 ( 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 { 12 ( 0.00%) if let hir::TyKind::Path(ref qpath) = ty.kind { 4 ( 0.00%) is_ty_alias(qpath) 78 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias (4x) . } else { . false . } . } . . impl LateLintPass<'_> for DefaultConstructedUnitStructs { 458,010 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 141,950 ( 0.00%) if let ExprKind::Call(fn_expr, &[]) = expr.kind . // make sure we have a call to `Default::default` 20 ( 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 32 ( 0.00%) && !is_alias(*base) 40 ( 0.00%) && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) 312 ( 0.00%) => ???:::qpath_res (4x) 20 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 265 ( 0.00%) => ???:::is_diagnostic_item (4x) . // make sure we have a struct with no fields (unit struct) 4 ( 0.00%) && let ty::Adt(def, ..) = cx.typeck_results().expr_ty(expr).kind() 40 ( 0.00%) => ???:::expr_ty (1x) . && def.is_struct() . && let var @ ty::VariantDef { ctor: Some((hir::def::CtorKind::Const, _)), .. } = def.non_enum_variant() . && !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())]; -- line 80 ---------------------------------------- -- line 91 ---------------------------------------- . diag.multipart_suggestion( . "remove this call to `default`", . removals, . Applicability::MachineApplicable, . ); . }, . ); . } 523,440 ( 0.01%) } . } 16 ( 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 { 126,387 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 28,086 ( 0.00%) if item.span.from_expansion() { . return; . } . let sm = cx.sess().source_map(); . let mut span = cx . .tcx 42,740 ( 0.00%) .hir_attrs(item.hir_id()) 714,544 ( 0.01%) => ???:::hir_attrs (10,685x) . .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| { 28,068 ( 0.00%) matches!( . i, . Attribute::Parsed(AttributeKind::DocComment { . style: AttrStyle::Outer, . .. . }) . ) . }) 31,502 ( 0.00%) .fold(item.span.shrink_to_lo(), |span, attr| span.to(attr.span())); 1,006,138 ( 0.01%) => ???:::to (6,939x) 85,480 ( 0.00%) let (Some(file), _, _, end_line, _) = sm.span_to_location_info(span) else { 11,468,027 ( 0.14%) => ???:::span_to_location_info (10,685x) . return; . }; . let mut bad_comments = vec![]; . for line in (0..end_line.saturating_sub(1)).rev() { 54,195 ( 0.00%) let Some(contents) = file.get_line(line).map(|c| c.trim().to_owned()) else { 2,937,073 ( 0.04%) => ???:::get_line (18,065x) . return; . }; . // Keep searching until we find the next item 44,434 ( 0.00%) if !contents.is_empty() && !contents.starts_with("//") && !contents.starts_with("#[") { . break; . } . 7,639 ( 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)); . } . } . 10,684 ( 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, . ); . }, . ); . } 112,344 ( 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') . } 60,364 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . impl LargeConstArrays { . pub fn new(conf: &'static Conf) -> Self { . Self { . maximum_allowed_size: conf.array_size_threshold, . } . } . . /// Checks recursively checks whether `ty` has an array exceeding allowed size 10 ( 0.00%) fn check_impl<'a>(&self, cx: &LateContext<'a>, ty: Ty<'a>) -> bool { 7 ( 0.00%) match ty.kind() { . ty::Adt(adt_def, args) => adt_def . .all_fields() . .any(|f| self.check_impl(cx, f.ty(cx.tcx, args).skip_norm_wip())), . ty::Array(element_type, cst) => { . let normalized = cx . .tcx . .try_normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(*cst)) . .unwrap_or(*cst); -- line 58 ---------------------------------------- -- line 63 ---------------------------------------- . true . } else { . false . } . }, . ty::Tuple(fields) => fields.iter().any(|f| self.check_impl(cx, f)), . _ => false, . } 8 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for LargeConstArrays { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 28,086 ( 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. 4 ( 0.00%) && generics.params.is_empty() && !generics.has_where_clause_predicates 2 ( 0.00%) && !item.span.from_expansion() 3 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 4 ( 0.00%) && self.check_impl(cx, ty) 26 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs:::check_impl (1x) . { . let hi_pos = ident.span.lo() - BytePos::from_usize(1); . let sugg_span = Span::new( . hi_pos - BytePos::from_usize("const".len()), . hi_pos, . item.span.ctxt(), . item.span.parent(), . ); -- line 91 ---------------------------------------- -- line 99 ---------------------------------------- . sugg_span, . "make this a static item", . "static", . Applicability::MachineApplicable, . ); . }, . ); . } 112,344 ( 0.00%) } . } -------------------------------------------------------------------------------- -- 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,862 ( 0.00%) if let StmtKind::Let(LetStmt { . pat, . init: Some(init_expr), . els: Some(els), . .. 3,724 ( 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 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) 6 ( 0.00%) && !is_else_clause(cx.tcx, expr) 176 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (1x) 2 ( 0.00%) && let ExprKind::MethodCall(segment, caller, [], _) = &cond.kind . && let caller_ty = cx.typeck_results().expr_ty(caller) . && let if_block = IfBlockType::IfIs(caller, caller_ty, segment.ident.name, then) . && (is_early_return(sym::Option, cx, &if_block) || is_early_return(sym::Result, cx, &if_block)) . { . 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(..)); -- line 302 ---------------------------------------- -- line 324 ---------------------------------------- . . #[derive(Clone, Copy, Debug)] . enum TryMode { . Result, . Option, . } . . fn find_try_mode<'tcx>(cx: &LateContext<'tcx>, scrutinee: &Expr<'tcx>) -> Option { 1,212 ( 0.00%) let scrutinee_ty = cx.typeck_results().expr_ty_adjusted(scrutinee).peel_refs(); 27,876 ( 0.00%) => ???:::expr_ty_adjusted (404x) . let ty::Adt(scrutinee_adt_def, _) = scrutinee_ty.kind() else { . return None; . }; . . match cx.tcx.get_diagnostic_name(scrutinee_adt_def.did())? { . sym::Result => Some(TryMode::Result), . sym::Option => Some(TryMode::Option), . _ => None, -- line 340 ---------------------------------------- -- line 461 ---------------------------------------- . #[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>), . } . 7,688 ( 0.00%) fn check_if_try_match<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 8,494 ( 0.00%) if let ExprKind::Match(scrutinee, [arm1, arm2], MatchSource::Normal | MatchSource::Postfix) = expr.kind 1,550 ( 0.00%) && !expr.span.from_expansion() 808 ( 0.00%) && let Some(mode) = find_try_mode(cx, scrutinee) . && !span_contains_cfg(cx, expr.span) . && let Some(if_let_or_match_then) = check_arms_are_try(cx, mode, arm1, arm2) . { . span_lint_and_then( . cx, . QUESTION_MARK, . expr.span, . "this `match` expression can be replaced with `?`", -- line 480 ---------------------------------------- -- line 509 ---------------------------------------- . ); . } . diag.span_suggestion(expr.span, "try instead", sugg, applicability); . }, . } . }, . ); . } 7,688 ( 0.00%) } . . fn check_if_let_some_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 962 ( 0.00%) if let Some(higher::IfLet { . let_pat, . let_expr, . if_then, . if_else, . .. 4,810 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 4,813 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (962x) . && let PatKind::TupleStruct(ref path1, [field], ddpos) = let_pat.kind . && ddpos.as_opt_usize().is_none() . && let PatKind::Binding(BindingMode(by_ref, _), bind_id, ident, None) = field.kind . && let caller_ty = cx.typeck_results().expr_ty(let_expr) . && let if_block = IfBlockType::IfLet( . cx.qpath_res(path1, let_pat.hir_id), . caller_ty, . ident.name, -- line 534 ---------------------------------------- -- 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 { 42,828 ( 0.00%) if let Some(expr) = bl.expr 67,894 ( 0.00%) && let ExprKind::Call(callee, [_]) = expr.kind 53,354 ( 0.00%) && let ExprKind::Path(qpath) = callee.kind 15,244 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromOutput) 94,085 ( 0.00%) => ???:::qpath_is_lang_item (3,811x) . { . true . } else { . false . } . } . . fn is_inferred_ret_closure(expr: &Expr<'_>) -> bool { 456,084 ( 0.01%) let ExprKind::Closure(closure) = expr.kind else { . return false; . }; . 6 ( 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 { 8,337 ( 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. 2,382 ( 0.00%) if !matches!(stmt.kind, StmtKind::Let(..)) { . return; . } . 13,965 ( 0.00%) if !is_lint_allowed(cx, QUESTION_MARK_USED, stmt.hir_id) || !self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 780,868 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (931x) 13,965 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (931x) . { . return; . } . 6,517 ( 0.00%) if !self.inside_try_block() && !is_in_const_context(cx) { 342,566 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (931x) . check_let_some_else_return_none(cx, stmt); . } . self.check_manual_let_else(cx, stmt); 9,528 ( 0.00%) } . 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if is_inferred_ret_closure(expr) { 1 ( 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(..)) 2,886 ( 0.00%) && !self.inside_try_block() 3,848 ( 0.00%) && !is_in_const_context(cx) 351,450 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (962x) 6,734 ( 0.00%) && is_lint_allowed(cx, QUESTION_MARK_USED, expr.hir_id) 809,834 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (962x) 5,772 ( 0.00%) && self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 14,430 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (962x) . { . check_is_none_or_err_and_early_return(cx, expr); . check_if_let_some_or_err_and_early_return(cx, expr); . 1,924 ( 0.00%) if self.inferred_ret_closure_stack == 0 { 2,883 ( 0.00%) check_if_try_match(cx, expr); 64,476 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_try_match (961x) . } . } 523,441 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 1 ( 0.00%) if is_inferred_ret_closure(expr) { 1 ( 0.00%) self.inferred_ret_closure_stack -= 1; . } . } . . fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 22,140 ( 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>) { 22,140 ( 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; . } . } . } 5,648 ( 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 { 24,622 ( 0.00%) let macro_def_id = span.source_callee()?.macro_def_id?; 607,520 ( 0.01%) => ???:::source_callee (10,625x) . Some( 5,058 ( 0.00%) cx.tcx.is_diagnostic_item(sym::thread_local_macro, macro_def_id) 137,524 ( 0.00%) => ???:::is_diagnostic_item (1,686x) . && 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 { 106,250 ( 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(); 21,250 ( 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, . ); . } 85,000 ( 0.00%) } . } 10,625 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derive/unsafe_derive_deserialize.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . use rustc_lint::LateContext; . use rustc_middle::hir::nested_filter; . use rustc_middle::ty::{self, Ty}; . use rustc_span::Span; . . use super::UNSAFE_DERIVE_DESERIALIZE; . . /// Implementation of the `UNSAFE_DERIVE_DESERIALIZE` lint. 39,828 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item: &Item<'_>, . trait_ref: &hir::TraitRef<'_>, . ty: Ty<'tcx>, . adt_hir_id: HirId, . ) { . fn has_unsafe<'tcx>(cx: &LateContext<'tcx>, item: &'tcx Item<'_>) -> bool { . let mut visitor = UnsafeVisitor { cx }; . walk_item(&mut visitor, item).is_break() . } . 13,276 ( 0.00%) if let Some(trait_def_id) = trait_ref.trait_def_id() 43,147 ( 0.00%) => ???:::trait_def_id (3,319x) . && paths::SERDE_DESERIALIZE.matches(cx, trait_def_id) . && let ty::Adt(def, _) = ty.kind() . && !is_lint_allowed(cx, UNSAFE_DERIVE_DESERIALIZE, adt_hir_id) . && cx . .tcx . .inherent_impls(def.did()) . .iter() . .map(|imp_did| cx.tcx.hir_expect_item(imp_did.expect_local())) -- line 36 ---------------------------------------- -- line 44 ---------------------------------------- . "you are deriving `serde::Deserialize` on a type that has methods using `unsafe`", . |diag| { . diag.help( . "consider implementing `serde::Deserialize` manually. See https://serde.rs/impl-deserialize.html", . ); . }, . ); . } 26,552 ( 0.00%) } . . struct UnsafeVisitor<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . } . . impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> { . type Result = ControlFlow<()>; . type NestedFilter = nested_filter::All; -- line 60 ---------------------------------------- 6,638 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/higher.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . /// entire `for` loop span . pub span: Span, . /// label . pub label: Option, . } . . impl<'tcx> ForLoop<'tcx> { . /// Parses a desugared `for` loop 392,580 ( 0.00%) pub fn hir(expr: &Expr<'tcx>) -> Option { 130,860 ( 0.00%) if let ExprKind::DropTemps(e) = expr.kind . && let ExprKind::Match(iterexpr, [arm], MatchSource::ForLoopDesugar) = e.kind . && let ExprKind::Call(_, [arg]) = iterexpr.kind . && let ExprKind::Loop(block, label, ..) = arm.body.kind . && let [stmt] = block.stmts . && let hir::StmtKind::Expr(e) = stmt.kind . && let ExprKind::Match(_, [_, some_arm], _) = e.kind . && let hir::PatKind::Struct(_, [field], _) = some_arm.pat.kind . { -- line 46 ---------------------------------------- -- line 48 ---------------------------------------- . pat: field.pat, . arg, . body: some_arm.body, . loop_id: arm.body.hir_id, . span: expr.span.ctxt().outer_expn_data().call_site, . label, . }); . } 65,430 ( 0.00%) None 392,580 ( 0.00%) } . } . . /// An `if` expression without `let` . pub struct If<'hir> { . /// `if` condition . pub cond: &'hir Expr<'hir>, . /// `if` then expression . pub then: &'hir Expr<'hir>, -- line 65 ---------------------------------------- -- line 66 ---------------------------------------- . /// `else` expression . pub r#else: Option<&'hir Expr<'hir>>, . } . . impl<'hir> If<'hir> { . #[inline] . /// Parses an `if` expression without `let` . pub const fn hir(expr: &Expr<'hir>) -> Option { 857,071 ( 0.01%) if let ExprKind::If(cond, then, r#else) = expr.kind 52 ( 0.00%) && !has_let_expr(cond) 17 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr (1x) . { . Some(Self { cond, then, r#else }) . } else { . None . } . } . } . -- line 83 ---------------------------------------- -- line 93 ---------------------------------------- . pub if_else: Option<&'hir Expr<'hir>>, . /// `if let PAT = EXPR` . /// ^^^^^^^^^^^^^^ . pub let_span: Span, . } . . impl<'hir> IfLet<'hir> { . /// Parses an `if let` expression 197,971 ( 0.00%) pub fn hir(cx: &LateContext<'_>, expr: &Expr<'hir>) -> Option { 395,950 ( 0.00%) if let ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { . pat: let_pat, . init: let_expr, . span: let_span, . .. . }), . .. . }, . if_then, . if_else, 4 ( 0.00%) ) = expr.kind . { . let mut iter = cx.tcx.hir_parent_iter(expr.hir_id); . if let Some((_, Node::Block(Block { stmts: [], .. }))) = iter.next() . && let Some(( . _, . Node::Expr(Expr { . kind: ExprKind::Loop(_, _, LoopSource::While, _), . .. -- line 123 ---------------------------------------- -- line 130 ---------------------------------------- . return Some(Self { . let_pat, . let_expr, . if_then, . if_else, . let_span, . }); . } 197,971 ( 0.00%) None 197,971 ( 0.00%) } . } . . /// An `if let` or `match` expression. Useful for lints that trigger on one or the other. . #[derive(Debug)] . pub enum IfLetOrMatch<'hir> { . /// Any `match` expression . Match(&'hir Expr<'hir>, &'hir [Arm<'hir>], MatchSource), . /// scrutinee, pattern, then block, else block -- line 147 ---------------------------------------- -- line 153 ---------------------------------------- . /// `if let PAT = EXPR` . /// ^^^^^^^^^^^^^^ . Span, . ), . } . . impl<'hir> IfLetOrMatch<'hir> { . /// Parses an `if let` or `match` expression 5,040 ( 0.00%) pub fn parse(cx: &LateContext<'_>, expr: &Expr<'hir>) -> Option { 3,360 ( 0.00%) match expr.kind { . ExprKind::Match(expr, arms, source) => Some(Self::Match(expr, arms, source)), 1,680 ( 0.00%) _ => IfLet::hir(cx, expr).map( 8,400 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (1,680x) . |IfLet { . let_expr, . let_pat, . if_then, . if_else, . let_span, . }| { Self::IfLet(let_expr, let_pat, if_then, if_else, let_span) }, . ), . } 6,720 ( 0.00%) } . . pub fn scrutinee(&self) -> &'hir Expr<'hir> { . match self { . Self::Match(scrutinee, _, _) | Self::IfLet(scrutinee, _, _, _, _) => scrutinee, . } . } . } . -- line 182 ---------------------------------------- -- line 189 ---------------------------------------- . /// `else` expression . pub r#else: Option<&'hir Expr<'hir>>, . } . . impl<'hir> IfOrIfLet<'hir> { . #[inline] . /// Parses an `if` or `if let` expression . pub const fn hir(expr: &Expr<'hir>) -> Option { 8 ( 0.00%) if let ExprKind::If(cond, then, r#else) = expr.kind { . Some(Self { cond, then, r#else }) . } else { . None . } . } . } . . /// Represent a range akin to `ast::ExprKind::Range`. -- line 205 ---------------------------------------- -- line 211 ---------------------------------------- . pub start: Option<&'a Expr<'a>>, . /// The upper bound of the range, or `None` for ranges such as `X..`. . pub end: Option<&'a Expr<'a>>, . pub span: Span, . } . . impl<'a> Range<'a> { . /// Higher a `hir` range to something similar to `ast::ExprKind::Range`. 1,309,190 ( 0.02%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 261,838 ( 0.00%) let span = expr.range_span()?; 2,955,448 ( 0.04%) => ???:::range_span (130,919x) . let (ty, start, end) = match expr.kind { . ExprKind::Call(path, [arg1, arg2]) . if let ExprKind::Path(qpath) = path.kind . && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::RangeInclusiveNew) => . { . (RangeTy::OpsInclusive, Some(arg1), Some(arg2)) . }, . ExprKind::Struct(&qpath, fields, StructTailExpr::None) => match (cx.tcx.qpath_lang_item(qpath)?, fields) { -- line 228 ---------------------------------------- -- line 256 ---------------------------------------- . }, . (hir::LangItem::RangeTo, [end]) if end.ident.name == sym::end => (RangeTy::OpsTo, None, Some(end.expr)), . _ => return None, . }, . _ => return None, . }; . . Some(Range { ty, start, end, span }) 1,047,352 ( 0.01%) } . } . . /// A type that can appear as the type of a range expression. . /// . /// This is a component of [`Range`]. . #[derive(Debug, Copy, Clone, Eq, PartialEq)] . pub enum RangeTy { . /// [`core::ops::RangeFrom`] -- line 272 ---------------------------------------- -- line 361 ---------------------------------------- . Repeat(&'a Expr<'a>, &'a Expr<'a>), . /// `vec![a, b, c]` . Vec(&'a [Expr<'a>]), . } . . impl<'a> VecArgs<'a> { . /// Returns the arguments of the `vec!` macro if this expression was expanded . /// from `vec!`. 1,374,828 ( 0.02%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 409,555 ( 0.01%) if let ExprKind::Call(fun, args) = expr.kind 33,494 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 100,482 ( 0.00%) && is_expn_of(fun.span, sym::vec).is_some() 1,171,405 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of (16,747x) . && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() . && let Some(name) = cx.tcx.get_diagnostic_name(fun_def_id) . { . return match (name, args) { . (sym::vec_from_elem, [elem, size]) => { . // `vec![elem; size]` case . Some(VecArgs::Repeat(elem, size)) . }, -- line 380 ---------------------------------------- -- line 381 ---------------------------------------- . (sym::box_assume_init_into_vec_unsafe, [write_box_via_move]) . if let ExprKind::Call(_, [_box, elems]) = write_box_via_move.kind . && let ExprKind::Array(elems) = elems.kind => . { . // `vec![a, b, c]` case . Some(VecArgs::Vec(elems)) . }, . (sym::vec_new, []) => Some(VecArgs::Vec(&[])), 16,747 ( 0.00%) _ => None, . }; . } . 16,747 ( 0.00%) None 1,374,828 ( 0.02%) } . } . . /// A desugared `while` loop . pub struct While<'hir> { . /// `while` loop condition . pub condition: &'hir Expr<'hir>, . /// `while` loop body . pub body: &'hir Expr<'hir>, -- line 402 ---------------------------------------- -- line 448 ---------------------------------------- . /// ^^^^^^^^^^^^^^ . pub let_span: Span, . } . . impl<'hir> WhileLet<'hir> { . #[inline] . /// Parses a desugared `while let` loop . pub const fn hir(expr: &Expr<'hir>) -> Option { 345,834 ( 0.00%) if let ExprKind::Loop( . &Block { . expr: . Some(&Expr { . kind: . ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { -- line 464 ---------------------------------------- -- line 575 ---------------------------------------- . Default, . /// `Vec::with_capacity(123)` . WithConstCapacity(u128), . /// `Vec::with_capacity(slice.len())` . WithExprCapacity(HirId), . } . . /// Checks if the given expression is an initialization of `Vec` and returns its kind. 84 ( 0.00%) pub fn get_vec_init_kind<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option { 24 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { . match func.kind { . ExprKind::Path(QPath::TypeRelative(ty, name)) . if cx.typeck_results().node_type(ty.hir_id).is_diag_item(cx, sym::Vec) => . { . if name.ident.name == sym::new { . return Some(VecInitKind::New); . } else if name.ident.name == symbol::kw::Default { . return Some(VecInitKind::Default); -- line 592 ---------------------------------------- -- line 603 ---------------------------------------- . && cx.typeck_results().expr_ty(expr).is_diag_item(cx, sym::Vec) => . { . return Some(VecInitKind::Default); . }, . _ => (), . } . } . None 108 ( 0.00%) } . . /// Checks that a condition doesn't have a `let` expression, to keep `If` and `While` from accepting . /// `if let` and `while let`. 55 ( 0.00%) pub const fn has_let_expr<'tcx>(cond: &'tcx Expr<'tcx>) -> bool { 66 ( 0.00%) match &cond.kind { . ExprKind::Let(_) => true, . ExprKind::Binary(_, lhs, rhs) => has_let_expr(lhs) || has_let_expr(rhs), . _ => false, . } 55 ( 0.00%) } 433,109 ( 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 143,108 ( 0.00%) if !expr.span.from_expansion() 11,983 ( 0.00%) && let ExprKind::Call(func, [recv]) = expr.kind 11,973 ( 0.00%) && let ExprKind::Path(path) = &func.kind 19,955 ( 0.00%) && let Some(did) = cx.qpath_res(path, func.hir_id).opt_def_id() 274,118 ( 0.00%) => ???:::qpath_res (3,991x) 19,945 ( 0.00%) && match_libc_symbol(cx, did, sym::strlen) 299,175 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol (3,989x) . && 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); . }, . ); . } 523,440 ( 0.01%) } . } 119,625 ( 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/mod.rs -------------------------------------------------------------------------------- Ir -- line 469 ---------------------------------------- . pub before_feature_tys: Ty<'tcx>, . /// Tuple containing the types of closure captures after the feature `capture_disjoint_fields` . pub after_feature_tys: Ty<'tcx>, . } . . impl TyCtxt<'_> { . #[inline] . pub fn opt_parent(self, id: DefId) -> Option { 42,650 ( 0.00%) self.def_key(id).parent.map(|index| DefId { index, ..id }) 59,365 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: (1,636x) . } . . #[inline] . #[track_caller] . pub fn parent(self, id: DefId) -> DefId { . match self.opt_parent(id) { . Some(id) => id, . // not `unwrap_or_else` to avoid breaking caller tracking -- line 485 ---------------------------------------- -- line 490 ---------------------------------------- . #[inline] . #[track_caller] . pub fn opt_local_parent(self, id: LocalDefId) -> Option { . self.opt_parent(id.to_def_id()).map(DefId::expect_local) . } . . #[inline] . #[track_caller] 32,008 ( 0.00%) pub fn local_parent(self, id: impl Into) -> LocalDefId { . self.parent(id.into().to_def_id()).expect_local() 12,003 ( 0.00%) } . . /// Compare def-ids based on their position in def-id tree, ancestor def-ids are considered . /// larger than descendant def-ids, and two different def-ids are considered unordered if . /// neither of them is an ancestor of the other. . fn def_id_partial_cmp(self, lhs: DefId, rhs: DefId) -> Option { . // Def-ids from different crates are always unordered. . if lhs.krate != rhs.krate { . return None; -- line 508 ---------------------------------------- -- line 536 ---------------------------------------- . self.def_id_partial_cmp(descendant.into(), ancestor.into()), . Some(Ordering::Less | Ordering::Equal) . ) . } . } . . impl Visibility { . pub fn is_public(self) -> bool { 23,545 ( 0.00%) matches!(self, Visibility::Public) . } . . pub fn map_id(self, f: impl FnOnce(Id) -> OutId) -> Visibility { . match self { . Visibility::Public => Visibility::Public, . Visibility::Restricted(id) => Visibility::Restricted(f(id)), . } . } -- line 552 ---------------------------------------- -- line 644 ---------------------------------------- . #[rustc_diagnostic_item = "Ty"] . #[rustc_pass_by_value] . pub struct Ty<'tcx>(Interned<'tcx, WithCachedTypeInfo>>); . . impl<'tcx> rustc_type_ir::inherent::IntoKind for Ty<'tcx> { . type Kind = TyKind<'tcx>; . . fn kind(self) -> TyKind<'tcx> { 364 ( 0.00%) *self.kind() . } . } . . impl<'tcx> rustc_type_ir::Flags for Ty<'tcx> { . fn flags(&self) -> TypeFlags { 11,897 ( 0.00%) self.0.flags . } . . fn outer_exclusive_binder(&self) -> DebruijnIndex { . self.0.outer_exclusive_binder . } . } . . /// The crate outlives map is computed during typeck and contains the -- line 666 ---------------------------------------- -- line 1211 ---------------------------------------- . /// Most of the time you only need to care about the `ParamEnv` . /// as the `TypingMode` is simply stored in the `InferCtxt`. . /// . /// However, there are some places which rely on trait solving . /// without using an `InferCtxt` themselves. For these to be . /// able to use the trait system they have to be able to initialize . /// such an `InferCtxt` with the right `typing_mode`, so they need . /// to track both. 1,552 ( 0.00%) #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, StableHash)] . #[derive(TypeVisitable, TypeFoldable)] . pub struct TypingEnv<'tcx> { . #[type_foldable(identity)] . #[type_visitable(ignore)] . typing_mode: TypingModeEqWrapper<'tcx>, . pub param_env: ParamEnv<'tcx>, . } . . impl<'tcx> TypingEnv<'tcx> { . pub fn new(param_env: ParamEnv<'tcx>, typing_mode: TypingMode<'tcx>) -> Self { 32,736 ( 0.00%) Self { typing_mode: TypingModeEqWrapper(typing_mode), param_env } . } . . pub fn typing_mode(&self) -> TypingMode<'tcx> { . self.typing_mode.0 . } . . /// Create a typing environment with no where-clauses in scope . /// where all opaque types and default associated items are revealed. -- line 1238 ---------------------------------------- -- line 1245 ---------------------------------------- . Self::new(ParamEnv::empty(), TypingMode::Codegen) . } . . /// Create a typing environment for use during analysis outside of a body. . /// . /// Using a typing environment inside of bodies is not supported as the body . /// may define opaque types. In this case the used functions have to be . /// converted to use proper canonical inputs instead. 58,362 ( 0.00%) pub fn non_body_analysis( . tcx: TyCtxt<'tcx>, . def_id: impl IntoQueryKey, . ) -> TypingEnv<'tcx> { . let def_id = def_id.into_query_key(); . Self::new(tcx.param_env(def_id), TypingMode::non_body_analysis()) 55,070 ( 0.00%) } . . /// Ideally we just use `TypingMode::PostTypeckUntilBorrowck`. . /// But that's not compatible with the old solver yet. . /// . /// FIXME: this should not be needed in the long term. . pub fn post_typeck_until_borrowck_for_mir_build( . tcx: TyCtxt<'tcx>, . def_id: LocalDefId, -- line 1267 ---------------------------------------- -- line 1333 ---------------------------------------- . // canonical queries in the trait solver, at which point we can readd this assert. . // . // As of writing this comment, this is only used when normalizing consts that mention . // params. . /* debug_assert!( . !value.has_placeholders(), . "{value:?} which has placeholder shouldn't be pseudo-canonicalized" . ); */ 1,003 ( 0.00%) PseudoCanonicalInput { typing_env: self, value } . } . } . . /// Similar to `CanonicalInput`, this carries the `typing_mode` and the environment . /// necessary to do any kind of trait solving inside of nested queries. . /// . /// Unlike proper canonicalization, this requires the `param_env` and the `value` to not . /// contain anything local to the `infcx` of the caller, so we don't actually canonicalize . /// anything. . /// . /// This should be created by using `infcx.pseudo_canonicalize_query(param_env, value)` . /// or by using `typing_env.as_query_input(value)`. . #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] . #[derive(StableHash, TypeVisitable, TypeFoldable)] . pub struct PseudoCanonicalInput<'tcx, T> { 511 ( 0.00%) pub typing_env: TypingEnv<'tcx>, 991 ( 0.00%) pub value: T, . } . . #[derive(Copy, Clone, Debug, StableHash, Encodable, Decodable)] . pub struct Destructor { . /// The `DefId` of the destructor method . pub did: DefId, . } . -- line 1366 ---------------------------------------- -- line 1790 ---------------------------------------- . pack: min_pack, . flags, . field_shuffle_seed, . scalable: elt, . } . } . . /// Look up the name of a definition across crates. This does not look at HIR. 61,467 ( 0.00%) pub fn opt_item_name(self, def_id: impl IntoQueryKey) -> Option { . let def_id = def_id.into_query_key(); . if let Some(cnum) = def_id.as_crate_root() { . Some(self.crate_name(cnum)) . } else { 26,343 ( 0.00%) let def_key = self.def_key(def_id); 263,780 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: (8,781x) 52,686 ( 0.00%) match def_key.disambiguated_data.data { . // The name of a constructor is that of its parent. . rustc_hir::definitions::DefPathData::Ctor => self . .opt_item_name(DefId { krate: def_id.krate, index: def_key.parent.unwrap() }), . _ => def_key.get_opt_name(), . } . } 52,686 ( 0.00%) } . . /// Look up the name of a definition across crates. This does not look at HIR. . /// . /// This method will ICE if the corresponding item does not have a name. In these cases, use . /// [`opt_item_name`] instead. . /// . /// [`opt_item_name`]: Self::opt_item_name . pub fn item_name(self, id: impl IntoQueryKey) -> Symbol { . let id = id.into_query_key(); 18,747 ( 0.00%) self.opt_item_name(id).unwrap_or_else(|| { 174 ( 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:: (3x) . bug!("item_name: no name for {:?}", self.def_path(id)); . }) . } . . /// Look up the name and span of a definition. . /// . /// See [`item_name`][Self::item_name] for more information. . pub fn opt_item_ident(self, def_id: impl IntoQueryKey) -> Option { -- line 1829 ---------------------------------------- -- line 1987 ---------------------------------------- . /// Gets all attributes with the given name. . #[deprecated = "Though there are valid usecases for this method, especially when your attribute is not a parsed attribute, usually you want to call rustc_hir::find_attr! instead."] . pub fn get_attrs( . self, . did: impl Into, . attr: Symbol, . ) -> impl Iterator { . #[expect(deprecated)] 21,250 ( 0.00%) self.get_all_attrs(did).iter().filter(move |a: &&hir::Attribute| a.has_name(attr)) 1,619,186 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::get_all_attrs:: (10,625x) . } . . /// Gets all attributes. . /// . /// To see if an item has a specific attribute, you should use . /// [`rustc_hir::find_attr!`] so you can use matching. . #[deprecated = "Though there are valid usecases for this method, especially when your attribute is not a parsed attribute, usually you want to call rustc_hir::find_attr! instead."] 95,625 ( 0.00%) pub fn get_all_attrs(self, did: impl Into) -> &'tcx [hir::Attribute] { . let did: DefId = did.into(); . if let Some(did) = did.as_local() { 31,875 ( 0.00%) self.hir_attrs(self.local_def_id_to_hir_id(did)) 723,747 ( 0.01%) => ???:::hir_attrs (10,625x) . } else { . self.attrs_for_def(did) . } 85,000 ( 0.00%) } . . pub fn get_attrs_by_path( . self, . did: DefId, . attr: &[Symbol], . ) -> impl Iterator { . let filter_fn = move |a: &&hir::Attribute| a.path_matches(attr); . if let Some(did) = did.as_local() { -- line 2018 ---------------------------------------- -- line 2148 ---------------------------------------- . let parent = self.parent(def_id); . let def_kind = self.def_kind(parent); . Some((parent, def_kind)) . } . . /// Returns the trait item that is implemented by the given item `DefId`. . pub fn trait_item_of(self, def_id: impl IntoQueryKey) -> Option { . let def_id = def_id.into_query_key(); 8,604 ( 0.00%) self.opt_associated_item(def_id)?.trait_item_def_id() 277,805 ( 0.00%) => ???:::opt_associated_item (2,151x) . } . . /// If the given `DefId` is an associated item of a trait, . /// returns the `DefId` of the trait; otherwise, returns `None`. . pub fn trait_of_assoc(self, def_id: DefId) -> Option { . match self.assoc_parent(def_id) { . Some((id, DefKind::Trait)) => Some(id), . _ => None, -- line 2164 ---------------------------------------- -- line 2201 ---------------------------------------- . } . . pub fn impl_polarity(self, def_id: impl IntoQueryKey) -> ty::ImplPolarity { . let def_id = def_id.into_query_key(); . self.impl_trait_header(def_id).polarity . } . . /// Given an `impl_id`, return the trait it implements. 65,448 ( 0.00%) pub fn impl_trait_ref( . self, . def_id: impl IntoQueryKey, . ) -> ty::EarlyBinder<'tcx, ty::TraitRef<'tcx>> { . let def_id = def_id.into_query_key(); 14,112 ( 0.00%) self.impl_trait_header(def_id).trait_ref 50,040 ( 0.00%) } . . /// Given an `impl_id`, return the trait it implements. . /// Returns `None` if it is an inherent impl. . pub fn impl_opt_trait_ref( . self, . def_id: impl IntoQueryKey, . ) -> Option>> { . let def_id = def_id.into_query_key(); . self.impl_is_of_trait(def_id).then(|| self.impl_trait_ref(def_id)) . } . . /// Given the `DefId` of an impl, returns the `DefId` of the trait it implements. . pub fn impl_trait_id(self, def_id: impl IntoQueryKey) -> DefId { . let def_id = def_id.into_query_key(); 11,556 ( 0.00%) self.impl_trait_ref(def_id).skip_binder().def_id 348,786 ( 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:: (3,852x) . } . . /// Given the `DefId` of an impl, returns the `DefId` of the trait it implements. . /// Returns `None` if it is an inherent impl. . pub fn impl_opt_trait_id(self, def_id: impl IntoQueryKey) -> Option { . let def_id = def_id.into_query_key(); . self.impl_is_of_trait(def_id).then(|| self.impl_trait_id(def_id)) . } -- line 2238 ---------------------------------------- 16,139 ( 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)] 72,108 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 30,045 ( 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), 2,926 ( 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) . }, . }; 12,018 ( 0.00%) if let Some(trait_id) = trait_id { 45,574 ( 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, . ); . }); . } . }, . _ => {}, . } . } 48,072 ( 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 ---------------------------------------- 52,220 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_slicing.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . } . . declare_lint_pass!(RedundantSlicing => [DEREF_BY_SLICING, REDUNDANT_SLICING]); . . static REDUNDANT_SLICING_LINT: (&Lint, &str) = (REDUNDANT_SLICING, "redundant slicing of the whole range"); . static DEREF_BY_SLICING_LINT: (&Lint, &str) = (DEREF_BY_SLICING, "slicing when dereferencing would work"); . . impl<'tcx> LateLintPass<'tcx> for RedundantSlicing { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . 53,826 ( 0.00%) let ctxt = expr.span.ctxt(); 111,787 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, mutability, addressee) = expr.kind 1,654 ( 0.00%) && addressee.span.ctxt() == ctxt 1,700 ( 0.00%) && let ExprKind::Index(indexed, range, _) = addressee.kind . && cx . .typeck_results() 46 ( 0.00%) .expr_ty_adjusted(range) 1,587 ( 0.00%) => ???:::expr_ty_adjusted (23x) . .is_lang_item(cx, LangItem::RangeFull) . { . let (expr_ty, expr_ref_count, _) = peel_and_count_ty_refs(cx.typeck_results().expr_ty(expr)); . let (indexed_ty, indexed_ref_count, _) = peel_and_count_ty_refs(cx.typeck_results().expr_ty(indexed)); . let parent_expr = get_parent_expr(cx, expr); . let needs_parens_for_prefix = . parent_expr.is_some_and(|parent| cx.precedence(parent) > ExprPrecedence::Prefix); . -- line 94 ---------------------------------------- -- line 159 ---------------------------------------- . format!("(&{}{}*{snip})", mutability.prefix_str(), "*".repeat(indexed_ref_count)) . } else { . format!("&{}{}*{snip}", mutability.prefix_str(), "*".repeat(indexed_ref_count)) . }; . diag.span_suggestion(expr.span, "dereference the original value instead", sugg, app); . }); . } . } 523,440 ( 0.01%) } . } 218,658 ( 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/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 { 149,051 ( 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)] 96,044 ( 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) } 96,044 ( 0.00%) } . } . . impl RawVec { . #[cfg(not(no_global_oom_handling))] . pub(crate) const MIN_NON_ZERO_CAP: usize = min_non_zero_cap(size_of::()); . . /// Like `new`, but parameterized over the choice of allocator for . /// the returned `RawVec`. -- line 197 ---------------------------------------- -- line 417 ---------------------------------------- . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe impl<#[may_dangle] T, A: [const] Allocator + [const] Destruct> Drop for RawVec { . /// Frees the memory owned by the `RawVec` *without* trying to drop its contents. . fn drop(&mut self) { . // SAFETY: We are in a Drop impl, self.inner will not be used again. 1,445,027 ( 0.02%) unsafe { self.inner.deallocate(T::LAYOUT) } . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . #[rustfmt::skip] // FIXME(fee1-dead): temporary measure before rustfmt is bumped . const impl RawVecInner { . #[cfg(not(no_global_oom_handling))] . #[inline] -- line 433 ---------------------------------------- -- line 453 ---------------------------------------- . // We avoid `unwrap_or_else` here because it bloats the amount of . // LLVM IR generated. . let layout = match layout_array(capacity, elem_layout) { . Ok(layout) => layout, . Err(_) => return Err(CapacityOverflow.into()), . }; . . // Don't allocate here because `Drop` will not deallocate when `capacity` is 0. 471,045 ( 0.01%) if layout.size() == 0 { . return Ok(Self::new_in(alloc, elem_layout.alignment())); . } . . let result = match init { . AllocInit::Uninitialized => alloc.allocate(layout), . #[cfg(not(no_global_oom_handling))] . AllocInit::Zeroed => alloc.allocate_zeroed(layout), . }; 478,654 ( 0.01%) let ptr = match result { . Ok(ptr) => ptr, . Err(_) => return Err(AllocError { layout, non_exhaustive: () }.into()), . }; . . // Allocators currently return a `NonNull<[u8]>` whose length . // matches the size requested. If that ever changes, the capacity . // here should change to `ptr.len() / size_of::()`. . Ok(Self { -- line 478 ---------------------------------------- -- line 485 ---------------------------------------- . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . #[cfg(not(no_global_oom_handling))] . #[inline] . unsafe fn grow_one(&mut self, elem_layout: Layout) { . // SAFETY: Precondition passed to caller 24,011 ( 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); . 42,586 ( 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`. 66,599 ( 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 207,949 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 1,767 ( 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 (7x) . . // 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] 533,756 ( 0.01%) unsafe fn finish_grow( . &self, . cap: usize, . elem_layout: Layout, . ) -> Result, TryReserveError> { . let new_layout = layout_array(cap, elem_layout)?; . . let memory = if let Some((ptr, old_layout)) = unsafe { self.current_memory(elem_layout) } { . // FIXME(const-hack): switch to `debug_assert_eq` -- line 552 ---------------------------------------- -- line 556 ---------------------------------------- . hint::assert_unchecked(old_layout.align() == new_layout.align()); . self.alloc.grow(ptr, old_layout, new_layout) . } . } else { . self.alloc.allocate(new_layout) . }; . . memory.map_err(const |_| AllocError { layout: new_layout, non_exhaustive: () }.into()) 400,318 ( 0.01%) } . } . . impl RawVecInner { . #[inline] . const fn new_in(alloc: A, align: Alignment) -> Self { . let ptr = Unique::from_non_null(NonNull::without_provenance(align.as_nonzero_usize())); . // `cap: 0` means "unallocated". zero-sized types are ignored. . Self { ptr, cap: ZERO_CAP, alloc } -- line 572 ---------------------------------------- -- line 603 ---------------------------------------- . . #[inline] . const fn ptr(&self) -> *mut T { . self.non_null::().as_ptr() . } . . #[inline] . const fn non_null(&self) -> NonNull { 1,179,176 ( 0.01%) self.ptr.cast().as_non_null_ptr() . } . . #[inline] . const fn capacity(&self, elem_size: usize) -> usize { 44,851 ( 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)> { 1,365,670 ( 0.02%) 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] 85,175 ( 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); . } 85,176 ( 0.00%) } . 31,752 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . unsafe { 169,052 ( 0.00%) do_reserve_and_handle(self, len, additional, elem_layout); 3,607 ( 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:: (9x) . } . } . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment -- line 680 ---------------------------------------- -- line 756 ---------------------------------------- . cap: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { . unsafe { self.shrink(cap, elem_layout) } . } . . #[inline] . const fn needs_to_grow(&self, len: usize, additional: usize, elem_layout: Layout) -> bool { 32,588 ( 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::()`. 45,307 ( 0.00%) self.ptr = Unique::from(ptr.cast()); 45,305 ( 0.00%) self.cap = unsafe { Cap::new_unchecked(cap) }; . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . /// - The sum of `len` and `additional` must be greater than the current capacity . unsafe fn grow_exact( -- line 782 ---------------------------------------- -- line 789 ---------------------------------------- . // Since we return a capacity of `usize::MAX` when the type size is . // 0, getting to here necessarily means the `RawVec` is overfull. . return Err(CapacityOverflow.into()); . } . . let cap = len.checked_add(additional).ok_or(CapacityOverflow)?; . . // SAFETY: preconditions passed to caller 130,440 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 1,134,184 ( 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 (14,623x) . . // 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 13,493 ( 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. 26,986 ( 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 ---------------------------------------- 3,896,934 ( 0.05%) -------------------------------------------------------------------------------- -- 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 { 31,166 ( 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 { 170,443 ( 0.00%) match self.peeked.take() { . Some(v) => v, 255,246 ( 0.00%) None => self.iter.next(), 15,381,019 ( 0.19%) => /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next (85,082x) . } . } . . #[inline] . #[rustc_inherit_overflow_checks] . fn count(mut self) -> usize { . match self.peeked.take() { . Some(None) => 0, -- line 49 ---------------------------------------- 451,907 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_eq.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::std_or_core; . use clippy_utils::sugg::Sugg; . use rustc_errors::Applicability; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . use rustc_span::Span; . 50,865 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . span: Span, . ) { . if span.from_expansion() { . return; . } . . // Remove one level of usize conversion if any 5,852 ( 0.00%) let (left, right, usize_peeled) = match (expr_as_cast_to_usize(cx, left), expr_as_cast_to_usize(cx, right)) { . (Some(lhs), Some(rhs)) => (lhs, rhs, true), . _ => (left, right, false), . }; . . // This lint concerns raw pointers 23,408 ( 0.00%) let (left_ty, right_ty) = (cx.typeck_results().expr_ty(left), cx.typeck_results().expr_ty(right)); 234,080 ( 0.00%) => ???:::expr_ty (5,852x) 2,926 ( 0.00%) if !left_ty.is_raw_ptr() || !right_ty.is_raw_ptr() { . return; . } . . let ((left_var, left_casts_peeled), (right_var, right_casts_peeled)) = . (peel_raw_casts(cx, left, left_ty), peel_raw_casts(cx, right, right_ty)); . . if !(usize_peeled || left_casts_peeled || right_casts_peeled) { . return; -- line 38 ---------------------------------------- -- line 50 ---------------------------------------- . PTR_EQ, . span, . format!("use `{top_crate}::ptr::eq` when comparing raw pointers"), . "try", . format!("{invert}{top_crate}::ptr::eq({left_snip}, {right_snip})"), . app, . ); . } 27,128 ( 0.00%) } . . // If the given expression is a cast to a usize, return the lhs of the cast . // E.g., `foo as *const _ as usize` returns `foo as *const _`. . fn expr_as_cast_to_usize<'tcx>(cx: &LateContext<'tcx>, cast_expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 11,704 ( 0.00%) if !cast_expr.span.from_expansion() 26,334 ( 0.00%) && cx.typeck_results().expr_ty(cast_expr) == cx.tcx.types.usize 234,080 ( 0.00%) => ???:::expr_ty (5,852x) . && let ExprKind::Cast(expr, _) = cast_expr.kind . { . Some(expr) . } else { . None . } . } . -- line 72 ---------------------------------------- 2,926 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub REDUNDANT_ASYNC_BLOCK, . complexity, . "`async { future.await }` can be replaced by `future`" . } . . declare_lint_pass!(RedundantAsyncBlock => [REDUNDANT_ASYNC_BLOCK]); . . impl<'tcx> LateLintPass<'tcx> for RedundantAsyncBlock { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 65,430 ( 0.00%) let span = expr.span; 261,720 ( 0.00%) if !span.in_external_macro(cx.tcx.sess.source_map()) && 433,256 ( 0.01%) let Some(body_expr) = desugar_async_block(cx, expr) && 541,660 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:clippy_lints::redundant_async_block::desugar_async_block (54,157x) . let Some(expr) = desugar_await(peel_blocks(body_expr)) && . // The await prefix must not come from a macro as its content could change in the future. . expr.span.eq_ctxt(body_expr.span) && . // The await prefix must implement Future, as implementing IntoFuture is not enough. . let Some(future_trait) = cx.tcx.lang_items().future_trait() && . implements_trait(cx, cx.typeck_results().expr_ty(expr), future_trait, &[]) && . // An async block does not have immediate side-effects from a `.await` point-of-view. . (!expr.can_have_side_effects() || desugar_async_block(cx, expr).is_some()) && -- line 54 ---------------------------------------- -- line 59 ---------------------------------------- . REDUNDANT_ASYNC_BLOCK, . span, . "this async expression only awaits a single future", . "you can reduce it to", . snippet(cx, shortened_span, "..").into_owned(), . Applicability::MachineApplicable, . ); . } 523,440 ( 0.01%) } . } . . /// If `expr` is a desugared `async` block, return the original expression if it does not capture . /// any variable by ref. 162,471 ( 0.00%) fn desugar_async_block<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 108,314 ( 0.00%) if let ExprKind::Closure(Closure { body, def_id, kind, .. }) = expr.kind 3 ( 0.00%) && let body = cx.tcx.hir_body(*body) 83 ( 0.00%) => ???:::hir_body (1x) 2 ( 0.00%) && matches!( . kind, . ClosureKind::Coroutine(CoroutineKind::Desugared( . CoroutineDesugaring::Async, . CoroutineSource::Block . )) . ) . { . cx.typeck_results() -- line 83 ---------------------------------------- -- line 89 ---------------------------------------- . .iter() . .all(|place| matches!(place.info.capture_kind, UpvarCapture::ByValue)) . }) . }) . .then_some(body.value) . } else { . None . } 216,628 ( 0.00%) } 54,159 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs -------------------------------------------------------------------------------- Ir -- line 1081 ---------------------------------------- . Some(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::AsyncGen, _)) . ) . } . . pub fn features(self) -> &'tcx rustc_feature::Features { . self.features_query(()) . } . 120,204 ( 0.00%) pub fn def_key(self, id: impl IntoQueryKey) -> rustc_hir::definitions::DefKey { . let id = id.into_query_key(); . // Accessing the DefKey is ok, since it is part of DefPathHash. . if let Some(id) = id.as_local() { . self.definitions_untracked().def_key(id) . } else { 525 ( 0.00%) self.cstore_untracked().def_key(id) 16,711 ( 0.00%) => ???:::def_key (175x) . } 140,238 ( 0.00%) } . . /// Converts a `DefId` into its fully expanded `DefPath` (every . /// `DefId` is really just an interned `DefPath`). . /// . /// Note that if `id` is not local to this crate, the result will . /// be a non-local `DefPath`. . pub fn def_path(self, id: DefId) -> rustc_hir::definitions::DefPath { . // Accessing the DefPath is ok, since it is part of DefPathHash. -- line 1105 ---------------------------------------- -- line 2224 ---------------------------------------- . pub fn mk_ct_from_kind(self, kind: ty::ConstKind<'tcx>) -> Const<'tcx> { . self.interners.intern_const(kind) . } . . // Avoid this in favour of more specific `Ty::new_*` methods, where possible. . #[allow(rustc::usage_of_ty_tykind)] . #[inline] . pub fn mk_ty_from_kind(self, st: TyKind<'tcx>) -> Ty<'tcx> { 69,696 ( 0.00%) self.interners.intern_ty(st) 1,790,873 ( 0.02%) => ???:::intern_ty (17,383x) . } . . pub fn mk_param_from_def(self, param: &ty::GenericParamDef) -> GenericArg<'tcx> { . match param.kind { . GenericParamDefKind::Lifetime => { . ty::Region::new_early_param(self, param.to_early_bound_region_data()).into() . } . GenericParamDefKind::Type { .. } => Ty::new_param(self, param.index, param.name).into(), -- line 2240 ---------------------------------------- -- line 2420 ---------------------------------------- . T::collect_and_apply(iter, |xs| self.mk_predefined_opaques_in_body(xs)) . } . . pub fn mk_clauses_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, Clauses<'tcx>>, . { 6,072 ( 0.00%) T::collect_and_apply(iter, |xs| self.mk_clauses(xs)) 13,248 ( 0.00%) => ???:::mk_clauses (552x) . } . . pub fn mk_type_list_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, &'tcx List>>, . { . T::collect_and_apply(iter, |xs| self.mk_type_list(xs)) . } . . pub fn mk_args_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, ty::GenericArgsRef<'tcx>>, . { 20,499 ( 0.00%) T::collect_and_apply(iter, |xs| self.mk_args(xs)) 695,649 ( 0.01%) => ???:::mk_args (6,833x) . } . . pub fn mk_canonical_var_infos_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, &'tcx List>>, . { . T::collect_and_apply(iter, |xs| self.mk_canonical_var_kinds(xs)) -- line 2452 ---------------------------------------- -- line 2493 ---------------------------------------- . >, . { . T::collect_and_apply(iter, |xs| self.mk_outlives(xs)) . } . . /// Emit a lint at `span` from a lint struct (some type that implements `Diagnostic`, . /// typically generated by `#[derive(Diagnostic)]`). . #[track_caller] 6,624 ( 0.00%) pub fn emit_node_span_lint( . self, . lint: &'static Lint, . hir_id: HirId, . span: impl Into, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { 46,498 ( 0.00%) let level_spec = self.lint_level_spec_at_node(lint, hir_id); 6,196 ( 0.00%) => ???:::lint_level_spec_at_node (4x) 77,314 ( 0.00%) emit_lint_base(self.sess, lint, level_spec, Some(span.into()), decorator) 432,966 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/lint.rs:rustc_middle::lint::emit_lint_base::::report::{closure#2}>::{closure#0}>, rustc_middle::lint::LevelSpec> (1x) 4,416 ( 0.00%) } . . /// Find the appropriate span where `use` and outer attributes can be inserted at. . pub fn crate_level_attribute_injection_span(self) -> Span { . let node = self.hir_node(hir::CRATE_HIR_ID); . let hir::Node::Crate(m) = node else { bug!() }; . m.spans.inject_use_span.shrink_to_lo() . } . -- line 2518 ---------------------------------------- -- line 2680 ---------------------------------------- . let def_id = def_id.into_query_key(); . match self.def_kind(def_id) { . DefKind::Fn | DefKind::AssocFn => self.intrinsic_raw(def_id), . _ => None, . } . } . . pub fn next_trait_solver_globally(self) -> bool { 13,666 ( 0.00%) self.sess.opts.unstable_opts.next_solver.globally . } . . pub fn next_trait_solver_in_coherence(self) -> bool { . self.sess.opts.unstable_opts.next_solver.coherence . } . . pub fn disable_trait_solver_fast_paths(self) -> bool { . self.sess.opts.unstable_opts.disable_fast_paths -- line 2696 ---------------------------------------- 64,877 ( 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 { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 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. 121,721 ( 0.00%) && let start_offset = BytePos::from_u32(match lit.kind { . LitKind::Str => 1, . LitKind::ByteStr | LitKind::CStr => 2, . _ => return, . }) 50,853 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . let s = lit.symbol.as_str(); . let mut iter = s.as_bytes().iter(); 1,431,528 ( 0.02%) while let Some(&c) = iter.next() { 2,867,608 ( 0.04%) if c == b'\\' . // Always move the iterator to read the escape char. 9,104 ( 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; . } . } . } . } 598,616 ( 0.01%) } . } 86,521 ( 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; . 376,782 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . if let Some(higher::WhileLet { if_then, let_pat, let_expr, label, .. }) = higher::WhileLet::hir(expr) . // check for `Some(..)` pattern . && let Some(some_pat) = as_some_pattern(cx, let_pat) . // check for call to `Iterator::next` . && let ExprKind::MethodCall(method_name, iter_expr, [], _) = let_expr.kind . && method_name.ident.name == sym::next . && cx.ty_based_def(let_expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) . && let Some(iter_expr_struct) = try_parse_iter_expr(cx, iter_expr) -- line 27 ---------------------------------------- -- line 61 ---------------------------------------- . WHILE_LET_ON_ITERATOR, . expr.span.with_hi(let_expr.span.hi()), . "this loop could be written as a `for` loop", . "try", . format!("{loop_label}for {loop_var} in {iterator_by_ref}"), . applicability, . ); . } 430,608 ( 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/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 { 154,473 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 182,487 ( 0.00%) if !cx.effective_visibilities.is_exported(item.owner_id.def_id) || !self.msrv.meets(cx, msrvs::NON_EXHAUSTIVE) { 800,286 ( 0.01%) => ???:::is_exported (14,043x) 210,465 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (14,031x) . return; . } . 69,049 ( 0.00%) match item.kind { 2,124 ( 0.00%) ItemKind::Enum(_, _, def) if def.variants.len() > 1 => { . let iter = def.variants.iter().filter_map(|v| { 8,316 ( 0.00%) (matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id))) 150,024 ( 0.00%) => ???:::hir_attrs (1,386x) . .then_some((v.def_id, v.span)) . }); 1,395 ( 0.00%) if let Ok((id, span)) = iter.exactly_one() 194,466 ( 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 (465x) . && !find_attr!(cx.tcx, item.hir_id(), NonExhaustive(..)) . { . self.potential_enums.push((item.owner_id.def_id, id, item.span, span)); . } . }, 581 ( 0.00%) ItemKind::Struct(_, _, variant_data) => { . let fields = variant_data.fields(); . let private_fields = fields . .iter() 852 ( 0.00%) .filter(|field| !cx.effective_visibilities.is_exported(field.def_id)); 15,843 ( 0.00%) => ???:::is_exported (284x) 1,162 ( 0.00%) if fields.len() > 1 . && let Ok(field) = private_fields.exactly_one() 3 ( 0.00%) && 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", . |diag| { . if let Some(non_exhaustive_span) = -- line 115 ---------------------------------------- -- line 142 ---------------------------------------- . // ``` . diag.span_help(field.span, "remove this field"); . }, . ); . } . }, . _ => {}, . } 112,344 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 212,594 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, p)) = &e.kind 89,172 ( 0.00%) && let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Const), ctor_id) = p.res . && let Some(local_ctor) = ctor_id.as_local() . { 12,003 ( 0.00%) let variant_id = cx.tcx.local_parent(local_ctor); 184,046 ( 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:: (4,001x) . 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%) } . } 117 ( 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)] 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Skip path expressions from deref calls. e.g. `Deref::deref(e)` 130,860 ( 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 130,860 ( 0.00%) if expr.span.from_expansion() { 23,208 ( 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 107,375 ( 0.00%) if let Some((state, data)) = self.state.take() { 821 ( 0.00%) self.report(cx, expr, state, data, typeck); . } . return; . }; 2,191 ( 0.00%) self.skip_expr = skip_expr; . 4,382 ( 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; . } . 4,382 ( 0.00%) match (self.state.take(), kind) { . (None, kind) => { 8,764 ( 0.00%) let expr_ty = typeck.expr_ty(expr); 87,640 ( 0.00%) => ???:::expr_ty (2,191x) 10,955 ( 0.00%) let use_site = get_expr_use_site(cx.tcx, typeck, SyntaxContext::root(), expr); 992,472 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (2,191x) 15,325 ( 0.00%) let adjusted_ty = use_site.adjustments.last().map_or(expr_ty, |a| a.target); . 24,101 ( 0.00%) match kind { 2,728 ( 0.00%) RefOp::Deref if use_site.same_ctxt => { 1,364 ( 0.00%) let use_node = use_site.use_node(cx); 30,042 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (1,364x) 4,092 ( 0.00%) let sub_ty = typeck.expr_ty(sub_expr); 54,560 ( 0.00%) => ???:::expr_ty (1,364x) 8,184 ( 0.00%) if let ExprUseNode::FieldAccess(name) = use_node 2 ( 0.00%) && !use_site.moved_before_use 7 ( 0.00%) && !ty_contains_field(sub_ty, name.name) 4 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:clippy_lints::dereference::ty_contains_field (1x) . { 3 ( 0.00%) self.state = Some(( . State::ExplicitDerefField { . name: name.name, . derefs_manually_drop: is_manually_drop(sub_ty), . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 1,363 ( 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() 4,080 ( 0.00%) && let Some(ty) = use_node.defined_ty(cx) 36,720 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (1,360x) . && TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()).is_deref_stable() . { . self.state = Some(( . State::ExplicitDeref { mutability: None }, . StateData { . first_expr: expr, . adjusted_ty, . }, -- line 314 ---------------------------------------- -- line 328 ---------------------------------------- . mutbl, . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); . }, 1,654 ( 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) => { 7,443 ( 0.00%) if !matches!(adjust.kind, Adjust::Deref(_)) { . break Some(adjust); 1,654 ( 0.00%) } else if !adjust.target.is_ref() { . deref_count += 1; . break iter.next(); . } . deref_count += 1; . }, . None => break None, . } . }; . 4,962 ( 0.00%) let use_node = use_site.use_node(cx); 21,629 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (827x) 3,308 ( 0.00%) let stability = use_node.defined_ty(cx).map_or(TyCoercionStability::None, |ty| { 203,440 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (827x) 1,654 ( 0.00%) TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()) 12,340,019 ( 0.15%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty (827x) . }); 10,757 ( 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 }) 4,962 ( 0.00%) } else if let Some(&Adjustment { . kind: Adjust::Borrow(AutoBorrow::Ref(mutability)), . .. 827 ( 0.00%) }) = next_adjust 6,616 ( 0.00%) && matches!(mutability, AutoBorrowMutability::Mut { .. }) . && !stability.is_reborrow_stable() . { . (3, deref_msg) . } else { . (2, deref_msg) . }; . 1,654 ( 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, . }, . )); 827 ( 0.00%) } else if stability.is_deref_stable() . // Auto-deref doesn't combine with other adjustments 6,560 ( 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(_))) . { 2,460 ( 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), . } 523,440 ( 0.01%) } . 108,731 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 69,043 ( 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, . }), . ); . } . } 124,264 ( 0.00%) } . 99,197 ( 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; . } 113,368 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { . // Only check for `impl Deref(Mut)`s if we're not already in one 40,601 ( 0.00%) if !self.in_deref_impl() && is_deref_or_derefmut_impl(cx, item) { 1,570 ( 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) { 785 ( 0.00%) self.outermost_deref_impl = None; . } . } . } . . fn is_deref_or_derefmut_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 56,172 ( 0.00%) if let hir::ItemKind::Impl(impl_) = item.kind . && let Some(of_trait) = impl_.of_trait 18,843 ( 0.00%) && let Some(trait_id) = of_trait.trait_ref.trait_def_id() 81,653 ( 0.00%) => ???:::trait_def_id (6,281x) . { 24,585 ( 0.00%) cx.tcx.lang_items().deref_trait() == Some(trait_id) || cx.tcx.lang_items().deref_mut_trait() == Some(trait_id) 480,920 ( 0.01%) => ???:::lang_items (12,023x) . } else { . false . } . } . . fn try_parse_ref_op<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'_>, . expr: &'tcx Expr<'_>, . ) -> Option<(RefOp, &'tcx Expr<'tcx>, Option)> { 344,324 ( 0.00%) let (call_path_id, def_id, arg) = match expr.kind { 3,762 ( 0.00%) ExprKind::MethodCall(_, arg, [], _) => (None, typeck.type_dependent_def_id(expr.hir_id)?, arg), 2,499 ( 0.00%) => ???:::type_dependent_def_id (49x) . ExprKind::Call( . &Expr { 676 ( 0.00%) kind: ExprKind::Path(QPath::Resolved(None, path)), 674 ( 0.00%) hir_id, . .. . }, 8,666 ( 0.00%) [arg], . ) => (Some(hir_id), path.res.opt_def_id()?, arg), 12,700 ( 0.00%) ExprKind::Unary(UnOp::Deref, sub_expr) if !typeck.expr_ty(sub_expr).is_raw_ptr() => { 56,680 ( 0.00%) => ???:::expr_ty (1,417x) . return Some((RefOp::Deref, sub_expr, None)); . }, . ExprKind::AddrOf(BorrowKind::Ref, mutability, sub_expr) => { 4,135 ( 0.00%) return Some((RefOp::AddrOf(mutability), sub_expr, None)); . }, . _ => return None, . }; 6,507 ( 0.00%) let mutbl = match tcx.get_diagnostic_name(def_id) { 44,265 ( 0.00%) => ???:::get_diagnostic_name (723x) . 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 { 1,654 ( 0.00%) matches!(self, Self::Deref) . } . . fn is_reborrow_stable(self) -> bool { . matches!(self, Self::Deref | Self::Reborrow) . } . 4,962 ( 0.00%) fn for_defined_ty<'tcx>(cx: &LateContext<'tcx>, ty: DefinedTy<'tcx>, for_return: bool) -> Self { 2,481 ( 0.00%) match ty { . DefinedTy::Hir(ty) => Self::for_hir_ty(ty), 2,481 ( 0.00%) DefinedTy::Mir { def_site_def_id, ty } => Self::for_mir_ty( . cx.tcx, . def_site_def_id, 2,481 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ty), 701,014 ( 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:: (827x) . for_return, . ), . } 5,789 ( 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 { 1,654 ( 0.00%) let ty::Ref(_, mut ty, _) = *ty.kind() else { . return Self::None; . }; . 1,654 ( 0.00%) if let Some(def_id) = def_site_def_id { 3,292 ( 0.00%) let typing_env = ty::TypingEnv::non_body_analysis(tcx, def_id); 142,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/mod.rs:::non_body_analysis:: (823x) . ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)) . .unwrap_or(ty); . } . loop { 4,155 ( 0.00%) break match *ty.kind() { . ty::Ref(_, ref_ty, _) => { . ty = ref_ty; . continue; . }, 9 ( 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( . _, . ty::AliasTy { . kind: ty::Projection { .. }, . .. . }, 12 ( 0.00%) ) if !for_return && ty.has_non_region_param() => Self::Reborrow, . ty::Infer(_) . | ty::Error(_) . | ty::Bound(..) . | ty::Alias( . _, . ty::AliasTy { . kind: ty::Opaque { .. }, . .. . }, . ) . | ty::Placeholder(_) . | ty::Dynamic(..) . | ty::Param(_) => Self::Reborrow, . ty::Adt(_, args) 2,460 ( 0.00%) if ty.has_placeholders() . || ty.has_opaque_types() 1,640 ( 0.00%) || (!for_return && args.has_non_region_param()) => . { . Self::Reborrow . }, . ty::Bool . | ty::Char . | ty::Int(_) . | ty::Uint(_) . | ty::Array(..) -- line 970 ---------------------------------------- -- line 1017 ---------------------------------------- . } . } . let mut v = V(false); . v.visit_ty_unambig(ty); . v.0 . } . . fn ty_contains_field(ty: Ty<'_>, name: Symbol) -> bool { 2 ( 0.00%) if let ty::Adt(adt, _) = *ty.kind() { . adt.is_struct() && adt.all_fields().any(|f| f.name == name) . } else { . false . } 1 ( 0.00%) } . . 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) { 50,316 ( 0.00%) if let Some(outer_pat) = self.ref_locals.get_mut(&local) 150,948 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (12,579x) . && 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)] 8,210 ( 0.00%) fn report( . &self, . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . state: State, . data: StateData<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . ) { 6,568 ( 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 1253 ---------------------------------------- . }; . diag.span_suggestion(data.first_expr.span, "try", sugg, app); . }, . ); . }, . State::ExplicitDerefField { . derefs_manually_drop, .. . } => { 4 ( 0.00%) let (snip_span, needs_parens) = if matches!(expr.kind, ExprKind::Field(..)) . && (derefs_manually_drop . || adjust_derefs_manually_drop( . typeck.expr_adjustments(data.first_expr), . typeck.expr_ty(data.first_expr), . )) { . // `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. -- line 1269 ---------------------------------------- -- line 1271 ---------------------------------------- . // e.g. `&mut x.y.z` where `x` is a union, and accessing `z` requires a . // deref through `ManuallyDrop<_>` will not compile. . let parent_id = cx.tcx.parent_hir_id(expr.hir_id); . if parent_id == data.first_expr.hir_id { . return; . } . (cx.tcx.hir_node(parent_id).expect_expr().span, true) . } else { 1 ( 0.00%) (expr.span, false) . }; . span_lint_hir_and_then( . cx, 2 ( 0.00%) EXPLICIT_AUTO_DEREF, 3 ( 0.00%) data.first_expr.hir_id, 1 ( 0.00%) data.first_expr.span, . "deref which would be done by auto-deref", . |diag| { 1 ( 0.00%) let mut app = Applicability::MachineApplicable; 9 ( 0.00%) let snip = snippet_with_context(cx, snip_span, data.first_expr.span.ctxt(), "..", &mut app).0; 3 ( 0.00%) let sugg = if needs_parens { . format!("({snip})") . } else { 3 ( 0.00%) snip.into_owned() . }; 1 ( 0.00%) diag.span_suggestion(data.first_expr.span, "try", sugg, app); 3 ( 0.00%) }, . ); 1 ( 0.00%) }, . State::Borrow { .. } | State::Reborrow { .. } => (), . } 6,568 ( 0.00%) } . } 213,081 ( 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) { 149,654 ( 0.00%) if let ExprKind::Struct(ref se) = expr.kind 596 ( 0.00%) && self.msrv.meets(msrvs::FIELD_INIT_SHORTHAND) 1,192 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (149x) . { 149 ( 0.00%) for field in &se.fields { 396 ( 0.00%) if !field.is_shorthand 784 ( 0.00%) && let ExprKind::Path(None, path) = &field.expr.kind 208 ( 0.00%) && let [segment] = path.segments.as_slice() 95 ( 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, . ); . } . } . } 74,827 ( 0.00%) } . . extract_msrv_attr!(); . } 2,384 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs -------------------------------------------------------------------------------- Ir -- line 361 ---------------------------------------- . /// let mut map = HashMap::with_hasher(s); . /// map.insert(1, 2); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "hashmap_build_hasher", since = "1.7.0")] . #[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")] . pub const fn with_hasher(hash_builder: S) -> HashMap { 730,292 ( 0.01%) HashMap { base: base::HashMap::with_hasher(hash_builder) } . } . . /// Creates an empty `HashMap` with at least the specified capacity, using . /// `hasher` to hash the keys. . /// . /// The hash map will be able to hold at least `capacity` elements without . /// reallocating. This method is allowed to allocate for more elements than . /// `capacity`. If `capacity` is zero, the hash map will not allocate. -- line 377 ---------------------------------------- -- line 1006 ---------------------------------------- . /// assert_eq!(letters[&'s'], 2); . /// assert_eq!(letters[&'t'], 3); . /// assert_eq!(letters[&'u'], 1); . /// assert_eq!(letters.get(&'y'), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A> { 18,197 ( 0.00%) map_entry(self.base.rustc_entry(key)) 1,063 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/rustc_entry.rs:>::rustc_entry (6x) . } . . /// Returns a reference to the value corresponding to the key. . /// . /// The key may be any borrowed form of the map's key type, but . /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for . /// the key type. . /// -- line 1022 ---------------------------------------- -- line 1032 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn get(&self, k: &Q) -> Option<&V> . where . K: Borrow, . Q: Hash + Eq, . { 94 ( 0.00%) self.base.get(k) 188 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/raw.rs:>::get:: (47x) . } . . /// Returns the key-value pair corresponding to the supplied key. This is . /// potentially useful: . /// - for key types where non-identical keys can be considered equal; . /// - for getting the `&K` stored key value from a borrowed `&Q` lookup key; or . /// - for getting a reference to a key with the same lifetime as the collection. . /// -- line 1048 ---------------------------------------- -- line 1326 ---------------------------------------- . /// assert_eq!(map.insert(37, "c"), Some("b")); . /// assert_eq!(map[&37], "c"); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("push", "append", "put")] . #[cfg_attr(not(test), rustc_diagnostic_item = "hashmap_insert")] . pub fn insert(&mut self, k: K, v: V) -> Option { 46,914 ( 0.00%) self.base.insert(k, v) 2,819,577 ( 0.04%) => /rust/deps/hashbrown-0.17.1/src/map.rs:>::insert (11,728x) . } . . /// Tries to insert a key-value pair into the map, and returns . /// a mutable reference to the value in the entry. . /// . /// If the map already had this key present, nothing is updated, and . /// an error containing the occupied entry, key, and the value is returned. . /// -- line 1342 ---------------------------------------- -- line 1388 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("delete", "take")] . pub fn remove(&mut self, k: &Q) -> Option . where . K: Borrow, . Q: Hash + Eq, . { 8,088 ( 0.00%) self.base.remove(k) . } . . /// Removes a key from the map, returning the stored key and value if the . /// key was previously in the map. . /// . /// The key may be any borrowed form of the map's key type, but . /// [`Hash`] and [`Eq`] on the borrowed form *must* match those for . /// the key type. -- line 1404 ---------------------------------------- -- line 1431 ---------------------------------------- . where . K: Clone, . V: Clone, . S: Clone, . A: Allocator + Clone, . { . #[inline] . fn clone(&self) -> Self { 14 ( 0.00%) Self { base: self.base.clone() } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . self.base.clone_from(&source.base); . } . } . -- line 1447 ---------------------------------------- -- line 3006 ---------------------------------------- . where . K: Eq + Hash, . S: BuildHasher + Default, . { . /// Constructs a `HashMap` from an iterator of key-value pairs. . /// . /// If the iterator produces any pairs with equal keys, . /// all but one of the corresponding values will be dropped. 2,489 ( 0.00%) fn from_iter>(iter: T) -> HashMap { . let mut map = HashMap::with_hasher(Default::default()); 71,129 ( 0.00%) map.extend(iter); 77 ( 0.00%) => ???:0x0000000000173dc0 (1x) 189,170 ( 0.00%) map 2,797 ( 0.00%) } . } . . /// Inserts all new key-values from the iterator and replaces values with existing . /// keys with new values returned from the iterator. . #[stable(feature = "rust1", since = "1.0.0")] . impl Extend<(K, V)> for HashMap . where . K: Eq + Hash, . S: BuildHasher, . A: Allocator, . { . #[inline] . fn extend>(&mut self, iter: T) { 4 ( 0.00%) self.base.extend(iter) 4,320 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/map.rs: as core::iter::traits::collect::Extend<(clippy_config::types::SourceItemOrderingModuleItemKind, alloc::string::String)>>::extend::<[(clippy_config::types::SourceItemOrderingModuleItemKind, alloc::string::String); 16]> (1x) 3,718 ( 0.00%) => /rust/deps/hashbrown-0.17.1/src/map.rs: as core::iter::traits::collect::Extend<(clippy_config::types::SourceItemOrderingModuleItemKind, usize)>>::extend::<[(clippy_config::types::SourceItemOrderingModuleItemKind, usize); 16]> (1x) . } . . #[inline] . fn extend_one(&mut self, (k, v): (K, V)) { . self.base.insert(k, v); . } . . #[inline] -- line 3040 ---------------------------------------- -- line 3066 ---------------------------------------- . Extend::<(K, V)>::extend_reserve(self, additional) . } . } . . #[inline] . fn map_entry<'a, K: 'a, V: 'a, A: Allocator>( . raw: base::RustcEntry<'a, K, V, A>, . ) -> Entry<'a, K, V, A> { 27,157 ( 0.00%) match raw { . base::RustcEntry::Occupied(base) => Entry::Occupied(OccupiedEntry { base }), 18,090 ( 0.00%) base::RustcEntry::Vacant(base) => Entry::Vacant(VacantEntry { base }), . } . } . . #[inline] . pub(super) fn map_try_reserve_error(err: hashbrown::TryReserveError) -> TryReserveError { . match err { . hashbrown::TryReserveError::CapacityOverflow => { . TryReserveErrorKind::CapacityOverflow.into() -- line 3084 ---------------------------------------- 426,571 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_noop_waker.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . . impl ManualNoopWaker { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualNoopWaker { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 35,926 ( 0.00%) if let ItemKind::Impl(imp) = item.kind 15,680 ( 0.00%) && let Some(trait_ref) = imp.of_trait 25,124 ( 0.00%) && let Some(trait_id) = trait_ref.trait_ref.trait_def_id() 81,653 ( 0.00%) => ???:::trait_def_id (6,281x) 43,967 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Wake, trait_id) 485,894 ( 0.01%) => ???:::is_diagnostic_item (6,281x) . && self.msrv.meets(cx, msrvs::WAKER_NOOP) . { . for impl_item_ref in imp.items { . let impl_item = cx . .tcx . .hir_node_by_def_id(impl_item_ref.owner_id.def_id) . .expect_impl_item(); . -- line 65 ---------------------------------------- -- line 75 ---------------------------------------- . cx, . MANUAL_NOOP_WAKER, . trait_ref.trait_ref.path.span, . "manual implementation of a no-op waker", . None, . "use `std::task::Waker::noop()` instead", . ); . } 112,344 ( 0.00%) } . } 37,686 ( 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")] 2 ( 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")] 21,910 ( 0.00%) extern "rust-call" fn call_once(self, args: Args) -> Self::Output; 2,828 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::new (101x) . } . . 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 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, . { 129,226 ( 0.00%) extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { 11,473 ( 0.00%) (*self).call_mut(args) 159,724 ( 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 { 3,177 ( 0.00%) (*self).call_mut(args) . } . } . } 1,059 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 2760 ---------------------------------------- . /// . /// ``` . /// use itertools::Itertools; . /// . /// assert_eq!(["a", "b", "c"].iter().join(", "), "a, b, c"); . /// assert_eq!([1, 2, 3].iter().join(", "), "1, 2, 3"); . /// ``` . #[cfg(feature = "use_alloc")] 63,315 ( 0.00%) fn join(&mut self, sep: &str) -> String . where . Self::Item: std::fmt::Display, . { . match self.next() { . None => String::new(), 9,039 ( 0.00%) Some(first_elt) => { . // estimate lower bound of capacity needed . let (lower, _) = self.size_hint(); 9,039 ( 0.00%) let mut result = String::with_capacity(sep.len() * lower); 27,117 ( 0.00%) write!(&mut result, "{first_elt}").unwrap(); . self.for_each(|elt| { . result.push_str(sep); . write!(&mut result, "{elt}").unwrap(); . }); 45,195 ( 0.00%) result . } . } 81,405 ( 0.00%) } . . /// Format all iterator elements, separated by `sep`. . /// . /// All elements are formatted (any formatting trait) . /// with `sep` inserted between each element. . /// . /// **Panics** if the formatter helper is formatted more than once. . /// -- line 2794 ---------------------------------------- -- line 4904 ---------------------------------------- . /// ``` . /// use itertools::Itertools; . /// . /// assert_eq!((0..10).filter(|&x| x == 2).exactly_one().unwrap(), 2); . /// assert!((0..10).filter(|&x| x > 1 && x < 4).exactly_one().unwrap_err().eq(2..4)); . /// assert!((0..10).filter(|&x| x > 1 && x < 5).exactly_one().unwrap_err().eq(2..5)); . /// assert!((0..10).filter(|&_| false).exactly_one().unwrap_err().eq(0..0)); . /// ``` 5,115 ( 0.00%) fn exactly_one(mut self) -> Result> . where . Self: Sized, . { . match self.next() { . Some(first) => match self.next() { . Some(second) => Err(ExactlyOneError::new( . Some(Either::Left([first, second])), . self, . )), . None => Ok(first), . }, 2,790 ( 0.00%) None => Err(ExactlyOneError::new(None, self)), . } 4,185 ( 0.00%) } . . /// If the iterator yields no elements, `Ok(None)` will be returned. If the iterator yields . /// exactly one element, that element will be returned, otherwise an error will be returned . /// containing an iterator that has the same output as the input iterator. . /// . /// This provides an additional layer of validation over just calling `Iterator::next()`. . /// If your assumption that there should be at most one element yielded is false this provides . /// the opportunity to detect and handle that, preventing errors at a distance. -- line 4934 ---------------------------------------- 9,039 ( 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/structural_impls.rs -------------------------------------------------------------------------------- Ir -- line 326 ---------------------------------------- . } . } . . impl<'tcx> TypeFoldable> for Ty<'tcx> { . fn try_fold_with>>( . self, . folder: &mut F, . ) -> Result { 1,570 ( 0.00%) folder.try_fold_ty(self) 11,444,545 ( 0.14%) => ???:>::try_fold_ty (785x) . } . . fn fold_with>>(self, folder: &mut F) -> Self { 182,340 ( 0.00%) folder.fold_ty(self) 172,707 ( 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 (10,787x) . } . } . . impl<'tcx> TypeVisitable> for Ty<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 12,298 ( 0.00%) visitor.visit_ty(*self) . } . } . . 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) }) . } . 156,816 ( 0.00%) fn super_fold_with>>(self, folder: &mut F) -> Self { 104,544 ( 0.00%) let kind = match *self.kind() { . ty::RawPtr(ty, mutbl) => ty::RawPtr(ty.fold_with(folder), mutbl), 6,637 ( 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)), 29,846 ( 0.00%) ty::Adt(tid, args) => ty::Adt(tid, args.fold_with(folder)), 7,392,247 ( 0.09%) => /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::> (6,596x) . ty::Dynamic(trait_ty, region) => { . ty::Dynamic(trait_ty.fold_with(folder), region.fold_with(folder)) . } . ty::Tuple(ts) => ty::Tuple(ts.fold_with(folder)), . ty::FnDef(def_id, args) => ty::FnDef(def_id, args.fold_with(folder)), . ty::FnPtr(sig_tys, hdr) => ty::FnPtr(sig_tys.fold_with(folder), hdr), . ty::UnsafeBinder(f) => ty::UnsafeBinder(f.fold_with(folder)), 75,509 ( 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, . }; . 156,816 ( 0.00%) if *self.kind() == kind { self } else { folder.cx().mk_ty_from_kind(kind) } 297,916 ( 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 (17,383x) 156,816 ( 0.00%) } . } . . impl<'tcx> TypeSuperVisitable> for Ty<'tcx> { . fn super_visit_with>>(&self, visitor: &mut V) -> V::Result { . match self.kind() { . ty::RawPtr(ty, _mutbl) => ty.visit_with(visitor), . ty::Array(typ, sz) => { . try_visit!(typ.visit_with(visitor)); -- line 442 ---------------------------------------- -- line 595 ---------------------------------------- . fn try_fold_with>>( . self, . folder: &mut F, . ) -> Result { . folder.try_fold_const(self) . } . . fn fold_with>>(self, folder: &mut F) -> Self { 19,548 ( 0.00%) folder.fold_const(self) 677,664 ( 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: as rustc_type_ir::fold::TypeFolder>::fold_const (6,516x) . } . } . . impl<'tcx> TypeVisitable> for ty::Const<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { . visitor.visit_const(*self) . } . } -- line 611 ---------------------------------------- -- line 626 ---------------------------------------- . | ConstKind::Infer(_) . | ConstKind::Bound(..) . | ConstKind::Placeholder(_) . | ConstKind::Error(_) => return Ok(self), . }; . if kind != self.kind() { Ok(folder.cx().mk_ct_from_kind(kind)) } else { Ok(self) } . } . 78,192 ( 0.00%) fn super_fold_with>>(self, folder: &mut F) -> Self { 60,816 ( 0.00%) let kind = match self.kind() { . ConstKind::Alias(is_rigid, alias_const) => { . ConstKind::Alias(is_rigid, alias_const.fold_with(folder)) . } . ConstKind::Value(v) => ConstKind::Value(v.fold_with(folder)), . ConstKind::Expr(e) => ConstKind::Expr(e.fold_with(folder)), . . ConstKind::Param(_) . | ConstKind::Infer(_) . | ConstKind::Bound(..) . | ConstKind::Placeholder(_) . | ConstKind::Error(_) => return self, . }; 26,064 ( 0.00%) if kind != self.kind() { folder.cx().mk_ct_from_kind(kind) } else { self } 69,504 ( 0.00%) } . } . . impl<'tcx> TypeSuperVisitable> for ty::Const<'tcx> { . fn super_visit_with>>(&self, visitor: &mut V) -> V::Result { . match self.kind() { . ConstKind::Alias(_, alias_const) => alias_const.visit_with(visitor), . ConstKind::Value(v) => v.visit_with(visitor), . ConstKind::Expr(e) => e.visit_with(visitor), -- line 657 ---------------------------------------- -- line 687 ---------------------------------------- . Ok(valtree) . } . } . . fn fold_with>>(self, folder: &mut F) -> Self { . let inner: &ty::ValTreeKind> = &*self; . let new_inner = inner.clone().fold_with(folder); . 34,752 ( 0.00%) if inner == &new_inner { self } else { folder.cx().intern_valtree(new_inner) } . } . } . . impl<'tcx> TypeVisitable> for rustc_span::ErrorGuaranteed { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { . visitor.visit_error(*self) . } . } -- line 703 ---------------------------------------- 148,032 ( 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. 15,329 ( 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`. 2,324,692 ( 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. 566,270 ( 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 ---------------------------------------- 941,976 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/impl_trait_in_params.rs -------------------------------------------------------------------------------- Ir -- line 33 ---------------------------------------- . Applicability::HasPlaceholders, . ); . } . }, . ); . } . . pub(super) fn check_fn<'tcx>(cx: &LateContext<'_>, kind: &'tcx FnKind<'_>, body: &'tcx Body<'_>, hir_id: HirId) { 21,250 ( 0.00%) if let FnKind::ItemFn(_, generics, _) = kind . && cx.tcx.visibility(cx.tcx.hir_body_owner_def_id(body.id())).is_public() . && !is_in_test(cx.tcx, hir_id) . { . for param in generics.params { . if param.is_impl_trait() { . report(cx, param, generics); . } . } . } . } . . pub(super) fn check_impl_item(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { 45,234 ( 0.00%) if let ImplItemKind::Fn(_, body_id) = impl_item.kind 84,992 ( 0.00%) && let hir::Node::Item(item) = cx.tcx.parent_hir_node(impl_item.hir_id()) 1,440,116 ( 0.02%) => ???:::parent_hir_node (10,624x) 21,248 ( 0.00%) && let hir::ItemKind::Impl(impl_) = item.kind 21,248 ( 0.00%) && let hir::Impl { of_trait: None, .. } = impl_ 27,252 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 486,218 ( 0.01%) => ???:::hir_body (6,813x) 20,439 ( 0.00%) && cx.tcx.visibility(cx.tcx.hir_body_owner_def_id(body.id())).is_public() 912,610 ( 0.01%) => ???:::hir_body_owner_def_id (6,813x) 40,854 ( 0.00%) && !is_in_test(cx.tcx, impl_item.hir_id()) 15,121,604 ( 0.19%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test (6,809x) . { 13,618 ( 0.00%) for param in impl_item.generics.params { 6 ( 0.00%) if param.is_impl_trait() { . report(cx, param, impl_item.generics); . } . } . } . } . . pub(super) fn check_trait_item(cx: &LateContext<'_>, trait_item: &TraitItem<'_>, avoid_breaking_exported_api: bool) { 8 ( 0.00%) if !avoid_breaking_exported_api . && let TraitItemKind::Fn(_, _) = trait_item.kind . && let hir::Node::Item(item) = cx.tcx.parent_hir_node(trait_item.hir_id()) . // ^^ (Will always be a trait) . && !item.vis_span.is_empty() // Is public . && !is_in_test(cx.tcx, trait_item.hir_id()) . { . for param in trait_item.generics.params { . if param.is_impl_trait() { -- line 79 ---------------------------------------- 10,625 ( 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/binder.rs -------------------------------------------------------------------------------- Ir -- 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 { 223 ( 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); . } 4 ( 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; . let value = f(value)?; -- line 155 ---------------------------------------- -- 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, . { 16 ( 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 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 { 7,704 ( 0.00%) self.value . } . } . . impl EarlyBinder> { . pub fn def_id(&self) -> I::TraitId { . self.value.def_id . } . } -- line 422 ---------------------------------------- -- 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. 5,310 ( 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 976 ---------------------------------------- . if self.universe == ty::UniverseIndex::ROOT { . write!(f, "!{:?}", self.bound) . } else { . write!(f, "!{}_{:?}", self.universe.index(), self.bound) . } . } . } . 182,388 ( 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"), . } . } . } . 8,148 ( 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 ---------------------------------------- 4,924 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . tcx: TyCtxt<'tcx>, . // Cache the current value of `hir_owner_nodes` to avoid repeatedly calling the same query for . // the same owner, which will uselessly record many times the same query dependency. . current_owner_nodes: Option<&'tcx OwnerNodes<'tcx>>, . } . . impl<'tcx> ParentHirIterator<'tcx> { . fn new(tcx: TyCtxt<'tcx>, current_id: HirId) -> ParentHirIterator<'tcx> { 27,236 ( 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(); 137,489 ( 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> { 55,381 ( 0.00%) self.hir_node(self.local_def_id_to_hir_id(id)) 111,564 ( 0.00%) => ???:::hir_node (1,640x) . } . . /// 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> { 5,244 ( 0.00%) self.hir_body(id).params.iter().map(|param| match param.pat.kind { 874 ( 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. 153,669 ( 0.00%) pub fn hir_body_owner_kind(self, def_id: impl Into) -> BodyOwnerKind { 41,960 ( 0.00%) let def_id = def_id.into(); 251,764 ( 0.00%) match self.def_kind(def_id) { . DefKind::Const { .. } | DefKind::AssocConst { .. } => { 62 ( 0.00%) BodyOwnerKind::Const { inline: false } . } . DefKind::AnonConst => BodyOwnerKind::Const { . inline: self.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline, 3,482 ( 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), . } 139,498 ( 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)> { 371,011 ( 0.00%) self.hir_parent_id_iter(current_id).map(move |id| (id, self.hir_node(id))) 2,231,632 ( 0.03%) => ???:::hir_node (34,023x) . } . . /// 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 ---------------------------------------- 211,608 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/borrow_as_ptr.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::{BorrowKind, Expr, ExprKind, Mutability, Ty, TyKind}; . use rustc_lint::LateContext; . use rustc_middle::ty::adjustment::{Adjust, AutoBorrow}; . use rustc_span::BytePos; . . use super::BORROW_AS_PTR; . 8,176 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . cast_expr: &'tcx Expr<'_>, . cast_to: &'tcx Ty<'_>, . msrv: Msrv, . ) -> bool { 2,413 ( 0.00%) if let TyKind::Ptr(target) = cast_to.kind 308 ( 0.00%) && !matches!(target.ty.kind, TyKind::TraitObject(..)) . && let ExprKind::AddrOf(BorrowKind::Ref, mutability, e) = cast_expr.kind . && !is_lint_allowed(cx, BORROW_AS_PTR, expr.hir_id) . // Fix #9884 . && !is_expr_temporary_value(cx, e) . && !expr.span.in_external_macro(cx.tcx.sess.source_map()) . && !is_from_proc_macro(cx, expr) . { . let mut app = Applicability::MachineApplicable; -- line 30 ---------------------------------------- -- line 51 ---------------------------------------- . }; . (format!("{std_or_core}::ptr::{macro_name}!({snip})"), expr.span) . }; . . span_lint_and_sugg(cx, BORROW_AS_PTR, span, "borrow as raw pointer", "try", suggestion, app); . return true; . } . false 9,344 ( 0.00%) } . . /// Check for an implicit cast from reference to raw pointer outside an explicit `as`. 261,704 ( 0.00%) pub(super) fn check_implicit_cast<'cx>(cx: &LateContext<'cx>, expr: &Expr<'cx>) { 143,100 ( 0.00%) if !expr.span.from_expansion() 2,481 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, _, pointee) = expr.kind 841 ( 0.00%) && !matches!(get_parent_expr(cx, expr).map(|e| e.kind), Some(ExprKind::Cast(..))) 108,297 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (827x) 3,308 ( 0.00%) && let [deref, borrow] = cx.typeck_results().expr_adjustments(expr) 35,561 ( 0.00%) => ???:::expr_adjustments (827x) 1,654 ( 0.00%) && matches!(deref.kind, Adjust::Deref(..)) 3,308 ( 0.00%) && let Adjust::Borrow(AutoBorrow::RawPtr(mutability)) = borrow.kind . // Do not suggest taking a raw pointer to a temporary value . && !is_expr_temporary_value(cx, pointee) . && !is_from_proc_macro(cx, expr) . { . span_lint_and_then(cx, BORROW_AS_PTR, expr.span, "implicit borrow as raw pointer", |diag| { . diag.span_suggestion_verbose( . expr.span.until(pointee.span), . "use a raw pointer instead", . format!("&raw {} ", mutability.ptr_str()), . Applicability::MachineApplicable, . ); . }); . } 327,130 ( 0.00%) } 110,202 ( 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, . { 548,778 ( 0.01%) SESSION_GLOBALS.with(f) 6,532 ( 0.00%) => /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> (142x) . } . . /// 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)) . } . 615 ( 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> { 308 ( 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 { 307 ( 0.00%) if self.was_not_remapped() { 614 ( 0.00%) Some(self.maybe_remapped.name) . } else if let Some(local) = self.local { . Some(local.name) . } else { . None . } 1,228 ( 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 702 ---------------------------------------- . Span::new(self.lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_lo(&self, lo: BytePos) -> Span { . Span::new(lo, self.hi, self.ctxt, self.parent) . } . #[inline] . pub fn with_hi(&self, hi: BytePos) -> Span { 42,541 ( 0.00%) Span::new(self.lo, hi, self.ctxt, self.parent) 108 ( 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 (3x) . } . /// Avoid if possible, `Span::map_ctxt` should be preferred. . #[inline] . fn with_ctxt(&self, ctxt: SyntaxContext) -> Span { . Span::new(self.lo, self.hi, ctxt, self.parent) . } . /// Avoid if possible, `Span::with_parent` should be preferred. . #[inline] -- line 718 ---------------------------------------- -- line 745 ---------------------------------------- . fn cmp(&self, rhs: &Self) -> Ordering { . Ord::cmp(&self.data(), &rhs.data()) . } . } . . impl Span { . #[inline] . pub fn lo(self) -> BytePos { 35,500 ( 0.00%) self.data().lo 46 ( 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 (1x) . } . #[inline] . pub fn with_lo(self, lo: BytePos) -> Span { . self.data().with_lo(lo) . } . #[inline] . pub fn hi(self) -> BytePos { 40,953 ( 0.00%) self.data().hi 138 ( 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 (3x) . } . #[inline] . pub fn with_hi(self, hi: BytePos) -> Span { 6 ( 0.00%) self.data().with_hi(hi) 138 ( 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 (3x) . } . #[inline] . pub fn with_ctxt(self, ctxt: SyntaxContext) -> Span { 15,500 ( 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] 96 ( 0.00%) pub fn in_external_macro(self, sm: &SourceMap) -> bool { 678,699 ( 0.01%) self.ctxt().in_external_macro(sm) 2,676,824 ( 0.03%) => ???:::in_external_macro (26,293x) . } . . /// 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 2369 ---------------------------------------- . . #[inline] . pub fn absolute_position(&self, pos: RelativeBytePos) -> BytePos { . BytePos::from_u32(pos.to_u32() + self.start_pos.to_u32()) . } . . #[inline] . pub fn relative_position(&self, pos: BytePos) -> RelativeBytePos { 45,758 ( 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 { 51,780 ( 0.00%) self.0 as usize . } . . #[inline(always)] . fn from_u32(n: u32) -> $ident { . $ident(n as $inner_ty) . } . . #[inline(always)] -- line 2665 ---------------------------------------- -- line 2677 ---------------------------------------- . } . } . . impl Sub for $ident { . type Output = $ident; . . #[inline(always)] . fn sub(self, rhs: $ident) -> $ident { 29,482 ( 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. 11,935 ( 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 ---------------------------------------- 1,325,953 ( 0.02%) -------------------------------------------------------------------------------- -- 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,860 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind 6,523 ( 0.00%) && BinOpKind::Mul == op.node . && !expr.span.from_expansion() . && let Some((receiver, refs_count)) = simplify(cx, left, right) . && (!is_in_const_context(cx) || self.msrv.meets(cx, msrvs::CONST_SIZE_OF_VAL)) . { . let ctxt = expr.span.ctxt(); . let mut app = Applicability::MachineApplicable; . let deref = if refs_count > 0 { . "*".repeat(refs_count - 1) -- line 65 ---------------------------------------- -- line 74 ---------------------------------------- . MANUAL_SLICE_SIZE_CALCULATION, . expr.span, . "manual slice size calculation", . "try", . format!("{sugg}::mem::size_of_val({deref}{val_name})"), . app, . ); . } 523,440 ( 0.01%) } . } . . fn simplify<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { . let expr1 = expr_or_init(cx, expr1); -- line 90 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs -------------------------------------------------------------------------------- Ir -- line 81 ---------------------------------------- . Method(Ident, &'a FnSig<'a>), . . /// `|x, y| {}` . Closure, . } . . impl<'a> FnKind<'a> { . pub fn header(&self) -> Option<&FnHeader> { 87,195 ( 0.00%) match *self { . FnKind::ItemFn(_, _, ref header) => Some(header), 34,874 ( 0.00%) FnKind::Method(_, ref sig) => Some(&sig.header), . FnKind::Closure => None, . } . } . . pub fn constness(self) -> Constness { . self.header().map_or(Constness::NotConst, |header| header.constness) . } . -- line 99 ---------------------------------------- -- line 252 ---------------------------------------- . Self::Result::output() . } . . /// Like `visit_nested_item()`, but for impl items. See . /// `visit_nested_item()` for advice on when to override this . /// method. . fn visit_nested_impl_item(&mut self, id: ImplItemId) -> Self::Result { . if Self::NestedFilter::INTER { 41,164 ( 0.00%) let item = self.maybe_tcx().hir_impl_item(id); 710,115 ( 0.01%) => ???:::hir_impl_item (10,291x) . try_visit!(self.visit_impl_item(item)); . } . Self::Result::output() . } . . /// Like `visit_nested_item()`, but for foreign items. See . /// `visit_nested_item()` for advice on when to override this . /// method. -- line 268 ---------------------------------------- -- line 274 ---------------------------------------- . Self::Result::output() . } . . /// Invoked to visit the body of a function, method or closure. Like . /// `visit_nested_item`, does nothing by default unless you override . /// `Self::NestedFilter`. . fn visit_nested_body(&mut self, id: BodyId) -> Self::Result { . if Self::NestedFilter::INTRA { 141,964 ( 0.00%) let body = self.maybe_tcx().hir_body(id); 630,855 ( 0.01%) => ???:::hir_body (8,938x) . try_visit!(self.visit_body(body)); . } . Self::Result::output() . } . . fn visit_param(&mut self, param: &'v Param<'v>) -> Self::Result { . walk_param(self, param) . } -- line 290 ---------------------------------------- -- line 312 ---------------------------------------- . } . fn visit_mod(&mut self, m: &'v Mod<'v>, _s: Span, _n: HirId) -> Self::Result { . walk_mod(self, m) . } . fn visit_foreign_item(&mut self, i: &'v ForeignItem<'v>) -> Self::Result { . walk_foreign_item(self, i) . } . fn visit_local(&mut self, l: &'v LetStmt<'v>) -> Self::Result { 8,386 ( 0.00%) walk_local(self, l) 148,015 ( 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::> (931x) . } 43,857 ( 0.00%) fn visit_block(&mut self, b: &'v Block<'v>) -> Self::Result { 385,329 ( 0.00%) walk_block(self, b) 1,629,102 ( 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_block::::check::{closure#0}>> (8,939x) 8 ( 0.00%) } . fn visit_stmt(&mut self, s: &'v Stmt<'v>) -> Self::Result { 4,077 ( 0.00%) walk_stmt(self, s) 225,321 ( 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::> (1,191x) . } . fn visit_arm(&mut self, a: &'v Arm<'v>) -> Self::Result { 11,593 ( 0.00%) walk_arm(self, a) 93,321 ( 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}>> (1,487x) . } . fn visit_pat(&mut self, p: &'v Pat<'v>) -> Self::Result { 75,672 ( 0.00%) walk_pat(self, p) 375,324 ( 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:: (11,729x) . } . fn visit_pat_field(&mut self, f: &'v PatField<'v>) -> Self::Result { . walk_pat_field(self, f) . } . fn visit_pat_expr(&mut self, expr: &'v PatExpr<'v>) -> Self::Result { . walk_pat_expr(self, expr) . } . fn visit_lit(&mut self, _hir_id: HirId, _lit: Lit, _is_negated_pat: bool) -> Self::Result { -- line 340 ---------------------------------------- -- line 343 ---------------------------------------- . fn visit_anon_const(&mut self, c: &'v AnonConst) -> Self::Result { . walk_anon_const(self, c) . } . fn visit_inline_const(&mut self, c: &'v ConstBlock) -> Self::Result { . walk_inline_const(self, c) . } . . fn visit_generic_arg(&mut self, generic_arg: &'v GenericArg<'v>) -> Self::Result { 9,741 ( 0.00%) walk_generic_arg(self, generic_arg) 123,624 ( 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::> (1,053x) . } . . /// All types are treated as ambiguous types for the purposes of hir visiting in . /// order to ensure that visitors can handle infer vars without it being too error-prone. . /// . /// The [`Visitor::visit_infer`] method should be overridden in order to handle infer vars. . fn visit_ty(&mut self, t: &'v Ty<'v, AmbigArg>) -> Self::Result { 273,638 ( 0.00%) walk_ty(self, t) 1,509 ( 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::> (29x) . } . . fn visit_const_item_rhs(&mut self, c: ConstItemRhs<'v>) -> Self::Result { . walk_const_item_rhs(self, c) . } . . /// All consts are treated as ambiguous consts for the purposes of hir visiting in . /// order to ensure that visitors can handle infer vars without it being too error-prone. . /// . /// The [`Visitor::visit_infer`] method should be overridden in order to handle infer vars. . fn visit_const_arg(&mut self, c: &'v ConstArg<'v, AmbigArg>) -> Self::Result { 31,960 ( 0.00%) walk_const_arg(self, c) 28,033 ( 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_const_arg:: (1,649x) . } . . #[allow(unused_variables)] . fn visit_infer(&mut self, inf_id: HirId, inf_span: Span, kind: InferKind<'v>) -> Self::Result { . self.visit_id(inf_id) . } . . fn visit_lifetime(&mut self, lifetime: &'v Lifetime) -> Self::Result { . walk_lifetime(self, lifetime) . } . . fn visit_expr(&mut self, ex: &'v Expr<'v>) -> Self::Result { 222,689 ( 0.00%) walk_expr(self, ex) 2,354,679 ( 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:: (8,964x) . } . fn visit_expr_field(&mut self, field: &'v ExprField<'v>) -> Self::Result { . walk_expr_field(self, field) . } . fn visit_const_arg_expr_field(&mut self, field: &'v ConstArgExprField<'v>) -> Self::Result { . walk_const_arg_expr_field(self, field) . } . fn visit_pattern_type_pattern(&mut self, p: &'v TyPat<'v>) -> Self::Result { -- line 392 ---------------------------------------- -- line 413 ---------------------------------------- . fn visit_fn( . &mut self, . fk: FnKind<'v>, . fd: &'v FnDecl<'v>, . b: BodyId, . _: Span, . id: LocalDefId, . ) -> Self::Result { 17,891 ( 0.00%) walk_fn(self, fk, fd, b, id) 680 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_fn:: (1x) 1 ( 0.00%) } . fn visit_use(&mut self, path: &'v UsePath<'v>, hir_id: HirId) -> Self::Result { . walk_use(self, path, hir_id) . } . fn visit_trait_item(&mut self, ti: &'v TraitItem<'v>) -> Self::Result { . walk_trait_item(self, ti) . } . fn visit_trait_item_ref(&mut self, ii: &'v TraitItemId) -> Self::Result { . walk_trait_item_ref(self, *ii) . } . fn visit_impl_item(&mut self, ii: &'v ImplItem<'v>) -> Self::Result { 30,873 ( 0.00%) walk_impl_item(self, ii) 6,960,771 ( 0.09%) => /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::> (10,291x) . } . fn visit_foreign_item_ref(&mut self, ii: &'v ForeignItemId) -> Self::Result { . walk_foreign_item_ref(self, *ii) . } . fn visit_impl_item_ref(&mut self, ii: &'v ImplItemId) -> Self::Result { . walk_impl_item_ref(self, *ii) . } . fn visit_trait_ref(&mut self, t: &'v TraitRef<'v>) -> Self::Result { . walk_trait_ref(self, t) . } . fn visit_param_bound(&mut self, bounds: &'v GenericBound<'v>) -> Self::Result { 82 ( 0.00%) walk_param_bound(self, bounds) 4,140 ( 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_param_bound::> (38x) . } . fn visit_precise_capturing_arg(&mut self, arg: &'v PreciseCapturingArg<'v>) -> Self::Result { . walk_precise_capturing_arg(self, arg) . } . fn visit_poly_trait_ref(&mut self, t: &'v PolyTraitRef<'v>) -> Self::Result { . walk_poly_trait_ref(self, t) . } . fn visit_opaque_ty(&mut self, opaque: &'v OpaqueTy<'v>) -> Self::Result { -- line 453 ---------------------------------------- -- line 464 ---------------------------------------- . } . fn visit_variant(&mut self, v: &'v Variant<'v>) -> Self::Result { . walk_variant(self, v) . } . fn visit_label(&mut self, label: &'v Label) -> Self::Result { . walk_label(self, label) . } . // The span is that of the surrounding type/pattern/expr/whatever. 167,671 ( 0.00%) fn visit_qpath(&mut self, qpath: &'v QPath<'v>, id: HirId, _span: Span) -> Self::Result { 610,095 ( 0.01%) walk_qpath(self, qpath, id) 115,107 ( 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,426x) 143,718 ( 0.00%) } . fn visit_path(&mut self, path: &Path<'v>, _id: HirId) -> Self::Result { 173,208 ( 0.00%) walk_path(self, path) 228,095 ( 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:: (5,216x) . } . fn visit_path_segment(&mut self, path_segment: &'v PathSegment<'v>) -> Self::Result { 38,653 ( 0.00%) walk_path_segment(self, path_segment) 420,834 ( 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_path_segment:: (9,481x) 2,582 ( 0.00%) } 24 ( 0.00%) fn visit_generic_args(&mut self, generic_args: &'v GenericArgs<'v>) -> Self::Result { 3,438 ( 0.00%) walk_generic_args(self, generic_args) 77,977 ( 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_args:: (1,719x) 24 ( 0.00%) } 27 ( 0.00%) fn visit_assoc_item_constraint( . &mut self, . constraint: &'v AssocItemConstraint<'v>, . ) -> Self::Result { 20 ( 0.00%) walk_assoc_item_constraint(self, constraint) 684 ( 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_assoc_item_constraint::> (3x) . } . fn visit_attribute(&mut self, _attr: &'v Attribute) -> Self::Result { . Self::Result::output() . } . fn visit_defaultness(&mut self, defaultness: &'v Defaultness) -> Self::Result { . walk_defaultness(self, defaultness) . } . fn visit_inline_asm(&mut self, asm: &'v InlineAsm<'v>, id: HirId) -> Self::Result { -- line 496 ---------------------------------------- -- line 516 ---------------------------------------- . walk_unambig_const_arg(self, c) . } . } . impl<'v, V: Visitor<'v>> VisitorExt<'v> for V {} . . pub fn walk_param<'v, V: Visitor<'v>>(visitor: &mut V, param: &'v Param<'v>) -> V::Result { . let Param { hir_id, pat, ty_span: _, span: _ } = param; . try_visit!(visitor.visit_id(*hir_id)); 29,568 ( 0.00%) visitor.visit_pat(pat) . } . . pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) -> V::Result { . let Item { owner_id: _, kind, span: _, vis_span: _, eii: _ } = item; . try_visit!(visitor.visit_id(item.hir_id())); . match *kind { . ItemKind::ExternCrate(orig_name, ident) => { . visit_opt!(visitor, visit_name, orig_name); -- line 532 ---------------------------------------- -- line 632 ---------------------------------------- . walk_list!(visitor, visit_param_bound, bounds); . } . } . V::Result::output() . } . . pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &Body<'v>) -> V::Result { . let Body { params, value } = body; 35,395 ( 0.00%) walk_list!(visitor, visit_param, *params); 91,170 ( 0.00%) visitor.visit_expr(*value) 43,721,247 ( 0.55%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr (6,809x) . } . . pub fn walk_ident<'v, V: Visitor<'v>>(visitor: &mut V, ident: Ident) -> V::Result { . visitor.visit_name(ident.name) . } . . pub fn walk_mod<'v, V: Visitor<'v>>(visitor: &mut V, module: &'v Mod<'v>) -> V::Result { . let Mod { spans: _, item_ids } = module; -- line 649 ---------------------------------------- -- line 670 ---------------------------------------- . ForeignItemKind::Static(ref typ, _, _) => { . try_visit!(visitor.visit_ty_unambig(typ)); . } . ForeignItemKind::Type => (), . } . V::Result::output() . } . 7,478 ( 0.00%) pub fn walk_local<'v, V: Visitor<'v>>(visitor: &mut V, local: &'v LetStmt<'v>) -> V::Result { . // Intentionally visiting the expr first - the initialization expr . // dominates the local's definition. . let LetStmt { super_: _, pat, ty, init, els, hir_id, span: _, source: _ } = local; 10,262 ( 0.00%) visit_opt!(visitor, visit_expr, *init); 249,473 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (931x) . try_visit!(visitor.visit_id(*hir_id)); 936 ( 0.00%) try_visit!(visitor.visit_pat(*pat)); 5,601 ( 0.00%) visit_opt!(visitor, visit_block, *els); 2,802 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, *ty); . V::Result::output() 7,475 ( 0.00%) } . 336,897 ( 0.00%) pub fn walk_block<'v, V: Visitor<'v>>(visitor: &mut V, block: &'v Block<'v>) -> V::Result { . let Block { stmts, expr, hir_id, rules: _, span: _, targeted_by_break: _ } = block; . try_visit!(visitor.visit_id(*hir_id)); 73,570 ( 0.00%) walk_list!(visitor, visit_stmt, *stmts); 316,077 ( 0.00%) visit_opt!(visitor, visit_expr, *expr); 10,724,115 ( 0.13%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (4,858x) . V::Result::output() 106 ( 0.00%) } . 9,528 ( 0.00%) pub fn walk_stmt<'v, V: Visitor<'v>>(visitor: &mut V, statement: &'v Stmt<'v>) -> V::Result { . let Stmt { kind, hir_id, span: _ } = statement; . try_visit!(visitor.visit_id(*hir_id)); 18,674 ( 0.00%) match *kind { 1,868 ( 0.00%) StmtKind::Let(ref local) => visitor.visit_local(local), . StmtKind::Item(item) => visitor.visit_nested_item(item), . StmtKind::Expr(ref expression) | StmtKind::Semi(ref expression) => { 3,610 ( 0.00%) visitor.visit_expr(expression) 141,002 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_expr'2 (251x) . } . } . } . 28,932 ( 0.00%) pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm<'v>) -> V::Result { . let Arm { hir_id, span: _, pat, guard, body } = arm; . try_visit!(visitor.visit_id(*hir_id)); 10,308 ( 0.00%) try_visit!(visitor.visit_pat(*pat)); 44,004 ( 0.00%) visit_opt!(visitor, visit_expr, *guard); 29,336 ( 0.00%) visitor.visit_expr(*body) 265,344 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (2,873x) . } . . pub fn walk_ty_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v TyPat<'v>) -> V::Result { . let TyPat { kind, hir_id, span: _ } = pattern; . try_visit!(visitor.visit_id(*hir_id)); . match *kind { . TyPatKind::Range(lower_bound, upper_bound) => { . try_visit!(visitor.visit_const_arg_unambig(lower_bound)); -- line 723 ---------------------------------------- -- line 724 ---------------------------------------- . try_visit!(visitor.visit_const_arg_unambig(upper_bound)); . } . TyPatKind::Or(patterns) => walk_list!(visitor, visit_pattern_type_pattern, patterns), . TyPatKind::NotNull | TyPatKind::Err(_) => (), . } . V::Result::output() . } . 416,196 ( 0.01%) pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat<'v>) -> V::Result { . let Pat { hir_id, kind, span, default_binding_modes: _ } = pattern; . try_visit!(visitor.visit_id(*hir_id)); 362,827 ( 0.00%) match *kind { . PatKind::TupleStruct(ref qpath, children, _) => { . try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); . walk_list!(visitor, visit_pat, children); . } . PatKind::Struct(ref qpath, fields, _) => { . try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); . walk_list!(visitor, visit_pat_field, fields); . } -- line 743 ---------------------------------------- -- line 747 ---------------------------------------- . } . PatKind::Box(ref subpattern) . | PatKind::Deref(ref subpattern) . | PatKind::Ref(ref subpattern, _, _) => { . try_visit!(visitor.visit_pat(subpattern)); . } . PatKind::Binding(_, _hir_id, ident, ref optional_subpattern) => { . try_visit!(visitor.visit_ident(ident)); 121,992 ( 0.00%) visit_opt!(visitor, visit_pat, optional_subpattern); . } 6,826 ( 0.00%) PatKind::Expr(ref expression) => try_visit!(visitor.visit_pat_expr(expression)), . PatKind::Range(ref lower_bound, ref upper_bound, _) => { . visit_opt!(visitor, visit_pat_expr, lower_bound); . visit_opt!(visitor, visit_pat_expr, upper_bound); . } . PatKind::Missing | PatKind::Never | PatKind::Wild | PatKind::Err(_) => (), . PatKind::Slice(prepatterns, ref slice_pattern, postpatterns) => { . walk_list!(visitor, visit_pat, prepatterns); . visit_opt!(visitor, visit_pat, slice_pattern); -- line 765 ---------------------------------------- -- line 766 ---------------------------------------- . walk_list!(visitor, visit_pat, postpatterns); . } . PatKind::Guard(subpat, condition) => { . try_visit!(visitor.visit_pat(subpat)); . try_visit!(visitor.visit_expr(condition)); . } . } . V::Result::output() 291,600 ( 0.00%) } . . pub fn walk_pat_field<'v, V: Visitor<'v>>(visitor: &mut V, field: &'v PatField<'v>) -> V::Result { . let PatField { hir_id, ident, pat, is_shorthand: _, span: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); . visitor.visit_pat(*pat) . } . . pub fn walk_pat_expr<'v, V: Visitor<'v>>(visitor: &mut V, expr: &'v PatExpr<'v>) -> V::Result { . let PatExpr { hir_id, span, kind } = expr; 2,772 ( 0.00%) try_visit!(visitor.visit_id(*hir_id)); 13,652 ( 0.00%) match kind { . PatExprKind::Lit { lit, negated } => visitor.visit_lit(*hir_id, *lit, *negated), 15,246 ( 0.00%) PatExprKind::Path(qpath) => visitor.visit_qpath(qpath, *hir_id, *span), 54,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:::visit_qpath (1,386x) . } . } . . pub fn walk_anon_const<'v, V: Visitor<'v>>(visitor: &mut V, constant: &'v AnonConst) -> V::Result { . let AnonConst { hir_id, def_id: _, body, span: _ } = constant; . try_visit!(visitor.visit_id(*hir_id)); 6,596 ( 0.00%) visitor.visit_nested_body(*body) . } . . pub fn walk_inline_const<'v, V: Visitor<'v>>( . visitor: &mut V, . constant: &'v ConstBlock, . ) -> V::Result { . let ConstBlock { hir_id, def_id: _, body } = constant; . try_visit!(visitor.visit_id(*hir_id)); . visitor.visit_nested_body(*body) . } . 3,381,620 ( 0.04%) pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>) -> V::Result { . let Expr { hir_id, kind, span } = expression; 234,614 ( 0.00%) try_visit!(visitor.visit_id(*hir_id)); 2,064,857 ( 0.03%) match *kind { 2 ( 0.00%) ExprKind::Array(subexpressions) => { 589 ( 0.00%) walk_list!(visitor, visit_expr, subexpressions); 19,192 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (98x) . } . ExprKind::ConstBlock(ref const_block) => { . try_visit!(visitor.visit_inline_const(const_block)) . } . ExprKind::Repeat(ref element, ref count) => { . try_visit!(visitor.visit_expr(element)); . try_visit!(visitor.visit_const_arg_unambig(count)); . } 859 ( 0.00%) ExprKind::Struct(ref qpath, fields, ref optional_base) => { 1,208 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 4,917 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath (149x) 696 ( 0.00%) walk_list!(visitor, visit_expr_field, fields); 1,310 ( 0.00%) match optional_base { . StructTailExpr::Base(base) => try_visit!(visitor.visit_expr(base)), . StructTailExpr::None . | StructTailExpr::NoneWithError(_) . | StructTailExpr::DefaultFields(_) => {} . } . } . ExprKind::Tup(subexpressions) => { . walk_list!(visitor, visit_expr, subexpressions); . } 67,440 ( 0.00%) ExprKind::Call(ref callee_expression, arguments) => { 108,552 ( 0.00%) try_visit!(visitor.visit_expr(callee_expression)); 735,599 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (5,543x) 124,229 ( 0.00%) walk_list!(visitor, visit_expr, arguments); 1,515,231 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (6,093x) . } 39,063 ( 0.00%) ExprKind::MethodCall(ref segment, receiver, arguments, _) => { 22,058 ( 0.00%) try_visit!(visitor.visit_path_segment(segment)); 6,455 ( 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: as rustc_hir::intravisit::Visitor>::visit_path_segment (1,291x) 39,415 ( 0.00%) try_visit!(visitor.visit_expr(receiver)); 184,990 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (1,666x) 49,757 ( 0.00%) walk_list!(visitor, visit_expr, arguments); 163,978 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (1,604x) . } . ExprKind::Use(expr, _) => { . try_visit!(visitor.visit_expr(expr)); . } . ExprKind::Binary(_, ref left_expression, ref right_expression) => { 30,694 ( 0.00%) try_visit!(visitor.visit_expr(left_expression)); 6,009 ( 0.00%) try_visit!(visitor.visit_expr(right_expression)); . } . ExprKind::AddrOf(_, _, ref subexpression) | ExprKind::Unary(_, ref subexpression) => { 5,054 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); . } . ExprKind::Cast(ref subexpression, ref typ) | ExprKind::Type(ref subexpression, ref typ) => { 18,363 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); 2,460 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (41x) 4,600 ( 0.00%) try_visit!(visitor.visit_ty_unambig(typ)); . } . ExprKind::DropTemps(ref subexpression) => { . try_visit!(visitor.visit_expr(subexpression)); . } . ExprKind::Let(LetExpr { span: _, pat, ty, init, recovered: _ }) => { . // match the visit order in walk_local . try_visit!(visitor.visit_expr(init)); . try_visit!(visitor.visit_pat(pat)); . visit_opt!(visitor, visit_ty_unambig, ty); . } . ExprKind::If(ref cond, ref then, ref else_opt) => { 19 ( 0.00%) try_visit!(visitor.visit_expr(cond)); 186 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (1x) 18 ( 0.00%) try_visit!(visitor.visit_expr(then)); 186 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (1x) 11 ( 0.00%) visit_opt!(visitor, visit_expr, else_opt); . } . ExprKind::Loop(ref block, ref opt_label, _, _) => { . visit_opt!(visitor, visit_label, opt_label); . try_visit!(visitor.visit_block(block)); . } 9,796 ( 0.00%) ExprKind::Match(ref subexpression, arms, _) => { 16,151 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); 121,179 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (961x) 25,149 ( 0.00%) walk_list!(visitor, visit_arm, arms); . } . ExprKind::Closure(&Closure { 8 ( 0.00%) def_id, . binder: _, 7 ( 0.00%) bound_generic_params, 7 ( 0.00%) fn_decl, 9 ( 0.00%) body, . capture_clause: _, . fn_decl_span: _, . fn_arg_span: _, . kind: _, . constness: _, . explicit_captures: _, . }) => { . walk_list!(visitor, visit_generic_param, bound_generic_params); 14 ( 0.00%) try_visit!(visitor.visit_fn(FnKind::Closure, fn_decl, body, *span, def_id)); 4 ( 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: as rustc_hir::intravisit::Visitor>::visit_fn (1x) 2 ( 0.00%) } . ExprKind::Block(ref block, ref opt_label) => { . visit_opt!(visitor, visit_label, opt_label); 74,073 ( 0.00%) try_visit!(visitor.visit_block(block)); . } . ExprKind::Assign(ref lhs, ref rhs, _) => { 46 ( 0.00%) try_visit!(visitor.visit_expr(rhs)); 2 ( 0.00%) try_visit!(visitor.visit_expr(lhs)); . } . ExprKind::AssignOp(_, ref left_expression, ref right_expression) => { . try_visit!(visitor.visit_expr(right_expression)); . try_visit!(visitor.visit_expr(left_expression)); . } . ExprKind::Field(ref subexpression, ident) => { 6,419 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); . try_visit!(visitor.visit_ident(ident)); . } . ExprKind::Index(ref main_expression, ref index_expression, _) => { 115 ( 0.00%) try_visit!(visitor.visit_expr(main_expression)); 23 ( 0.00%) try_visit!(visitor.visit_expr(index_expression)); . } 59,615 ( 0.00%) ExprKind::Path(ref qpath) => { 397,600 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 363 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath (11x) . } . ExprKind::Break(ref destination, ref opt_expr) => { . visit_opt!(visitor, visit_label, &destination.label); . visit_opt!(visitor, visit_expr, opt_expr); . } . ExprKind::Continue(ref destination) => { . visit_opt!(visitor, visit_label, &destination.label); . } -- line 924 ---------------------------------------- -- line 939 ---------------------------------------- . ExprKind::UnsafeBinderCast(_kind, expr, ty) => { . try_visit!(visitor.visit_expr(expr)); . visit_opt!(visitor, visit_ty_unambig, ty); . } . ExprKind::Lit(lit) => try_visit!(visitor.visit_lit(*hir_id, lit, false)), . ExprKind::Err(_) => {} . } . V::Result::output() 1,421,948 ( 0.02%) } . . pub fn walk_expr_field<'v, V: Visitor<'v>>(visitor: &mut V, field: &'v ExprField<'v>) -> V::Result { . let ExprField { hir_id, ident, expr, span: _, is_shorthand: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); 1,692 ( 0.00%) visitor.visit_expr(*expr) 22,616 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (198x) . } . . pub fn walk_const_arg_expr_field<'v, V: Visitor<'v>>( . visitor: &mut V, . field: &'v ConstArgExprField<'v>, . ) -> V::Result { . let ConstArgExprField { hir_id, field, expr, span: _ } = field; . try_visit!(visitor.visit_id(*hir_id)); -- line 961 ---------------------------------------- -- line 966 ---------------------------------------- . /// We track whether an infer var is from a [`Ty`], [`ConstArg`], or [`GenericArg`] so that . /// HIR visitors overriding [`Visitor::visit_infer`] can determine what kind of infer is being visited . pub enum InferKind<'hir> { . Ty(&'hir Ty<'hir>), . Const(&'hir ConstArg<'hir>), . Ambig(&'hir InferArg), . } . 60,718 ( 0.00%) pub fn walk_generic_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . generic_arg: &'v GenericArg<'v>, . ) -> V::Result { 247,682 ( 0.00%) match generic_arg { 15,447 ( 0.00%) GenericArg::Lifetime(lt) => visitor.visit_lifetime(lt), 9,143 ( 0.00%) GenericArg::Type(ty) => visitor.visit_ty(ty), 1,241 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty (3x) 10,380 ( 0.00%) GenericArg::Const(ct) => visitor.visit_const_arg(ct), . GenericArg::Infer(inf) => { . let InferArg { hir_id, span } = inf; . visitor.visit_infer(*hir_id, *span, InferKind::Ambig(inf)) . } . } 30,576 ( 0.00%) } . . pub fn walk_unambig_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) -> V::Result { . match typ.try_as_ambig_ty() { 78,849 ( 0.00%) Some(ambig_ty) => visitor.visit_ty(ambig_ty), 1,914,102 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::visit_ty (14,712x) . None => { . let Ty { hir_id, span, kind: _ } = typ; . visitor.visit_infer(*hir_id, *span, InferKind::Ty(typ)) . } . } . } . 1,508,581 ( 0.02%) pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v, AmbigArg>) -> V::Result { . let Ty { hir_id, span: _, kind } = typ; . try_visit!(visitor.visit_id(*hir_id)); . 824,581 ( 0.01%) match *kind { . TyKind::Slice(ref ty) => try_visit!(visitor.visit_ty_unambig(ty)), . TyKind::Ptr(ref mutable_type) => try_visit!(visitor.visit_ty_unambig(mutable_type.ty)), . TyKind::Ref(ref lifetime, ref mutable_type) => { 28,251 ( 0.00%) try_visit!(visitor.visit_lifetime(lifetime)); 42,012 ( 0.00%) try_visit!(visitor.visit_ty_unambig(mutable_type.ty)); . } . TyKind::Never => {} 55 ( 0.00%) TyKind::Tup(tuple_element_types) => { 27 ( 0.00%) walk_list!(visitor, visit_ty_unambig, tuple_element_types); . } . TyKind::FnPtr(ref function_declaration) => { 2 ( 0.00%) walk_list!(visitor, visit_generic_param, function_declaration.generic_params); 1 ( 0.00%) try_visit!(visitor.visit_fn_decl(function_declaration.decl)); . } . TyKind::UnsafeBinder(ref unsafe_binder) => { . walk_list!(visitor, visit_generic_param, unsafe_binder.generic_params); . try_visit!(visitor.visit_ty_unambig(unsafe_binder.inner_ty)); . } 42,615 ( 0.00%) TyKind::Path(ref qpath) => { . try_visit!(visitor.visit_qpath(qpath, typ.hir_id, typ.span)); . } . TyKind::OpaqueDef(opaque) => { . try_visit!(visitor.visit_opaque_ty(opaque)); . } . TyKind::TraitAscription(bounds) => { . walk_list!(visitor, visit_param_bound, bounds); . } . TyKind::Array(ref ty, ref length) => { 39 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); 39 ( 0.00%) try_visit!(visitor.visit_const_arg_unambig(length)); . } . TyKind::TraitObject(bounds, ref lifetime) => { . for bound in bounds { . try_visit!(visitor.visit_poly_trait_ref(bound)); . } . try_visit!(visitor.visit_lifetime(lifetime)); . } . TyKind::InferDelegation(..) | TyKind::Err(_) => {} -- line 1041 ---------------------------------------- -- line 1051 ---------------------------------------- . TyKind::View(ty, fields) => { . try_visit!(visitor.visit_ty_unambig(ty)); . for field in fields { . try_visit!(visitor.visit_ident(*field)); . } . } . } . V::Result::output() 680,304 ( 0.01%) } . . pub fn walk_const_item_rhs<'v, V: Visitor<'v>>( . visitor: &mut V, . ct_rhs: ConstItemRhs<'v>, . ) -> V::Result { 90 ( 0.00%) match ct_rhs { . ConstItemRhs::Body(body_id) => visitor.visit_nested_body(body_id), . ConstItemRhs::TypeConst(const_arg) => visitor.visit_const_arg_unambig(const_arg), . } . } . . pub fn walk_unambig_const_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . const_arg: &'v ConstArg<'v>, -- line 1073 ---------------------------------------- -- line 1076 ---------------------------------------- . Some(ambig_ct) => visitor.visit_const_arg(ambig_ct), . None => { . let ConstArg { hir_id, kind: _, span } = const_arg; . visitor.visit_infer(*hir_id, *span, InferKind::Const(const_arg)) . } . } . } . 75,515 ( 0.00%) pub fn walk_const_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . const_arg: &'v ConstArg<'v, AmbigArg>, . ) -> V::Result { . let ConstArg { hir_id, kind, span: _ } = const_arg; . try_visit!(visitor.visit_id(*hir_id)); 52,095 ( 0.00%) match kind { . ConstArgKind::Tup(exprs) => { . walk_list!(visitor, visit_const_arg_unambig, *exprs); . V::Result::output() . } . ConstArgKind::Struct(qpath, field_exprs) => { . try_visit!(visitor.visit_qpath(qpath, *hir_id, qpath.span())); . . for field_expr in *field_exprs { -- line 1098 ---------------------------------------- -- line 1109 ---------------------------------------- . V::Result::output() . } . ConstArgKind::Array(array_expr) => { . for arg in array_expr.elems { . try_visit!(visitor.visit_const_arg_unambig(*arg)); . } . V::Result::output() . } 972 ( 0.00%) ConstArgKind::Path(qpath) => visitor.visit_qpath(qpath, *hir_id, qpath.span()), 2,430 ( 0.00%) => ???:::span (486x) 6,596 ( 0.00%) ConstArgKind::Anon(anon) => visitor.visit_anon_const(*anon), . ConstArgKind::Error(_) => V::Result::output(), // errors and spans are not important . ConstArgKind::Literal { .. } => V::Result::output(), // FIXME(mcga) . } 70,082 ( 0.00%) } . . pub fn walk_generic_param<'v, V: Visitor<'v>>( . visitor: &mut V, . param: &'v GenericParam<'v>, . ) -> V::Result { . let GenericParam { . hir_id, . def_id: _, -- line 1130 ---------------------------------------- -- line 1135 ---------------------------------------- . colon_span: _, . source: _, . } = param; . try_visit!(visitor.visit_id(*hir_id)); . match *name { . ParamName::Plain(ident) | ParamName::Error(ident) => try_visit!(visitor.visit_ident(ident)), . ParamName::Fresh => {} . } 58,752 ( 0.00%) match *kind { . GenericParamKind::Lifetime { .. } => {} . GenericParamKind::Type { ref default, .. } => { 135 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, default) . } . GenericParamKind::Const { ref ty, ref default } => { 486 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); 1,458 ( 0.00%) if let Some(default) = default { . try_visit!(visitor.visit_const_param_default(*hir_id, default)); . } . } . } . V::Result::output() . } . . pub fn walk_const_param_default<'v, V: Visitor<'v>>( . visitor: &mut V, . ct: &'v ConstArg<'v>, . ) -> V::Result { . visitor.visit_const_arg_unambig(ct) . } . 101,808 ( 0.00%) pub fn walk_generics<'v, V: Visitor<'v>>(visitor: &mut V, generics: &'v Generics<'v>) -> V::Result { . let &Generics { 21,603 ( 0.00%) params, 43,206 ( 0.00%) predicates, . has_where_clause_predicates: _, . where_clause_span: _, . span: _, . } = generics; . walk_list!(visitor, visit_generic_param, params); 64 ( 0.00%) walk_list!(visitor, visit_where_predicate, predicates); 5,271 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs: as rustc_hir::intravisit::Visitor>::visit_where_predicate (26x) . V::Result::output() 90,496 ( 0.00%) } . . pub fn walk_where_predicate<'v, V: Visitor<'v>>( . visitor: &mut V, . predicate: &'v WherePredicate<'v>, . ) -> V::Result { . let &WherePredicate { hir_id, kind, span: _ } = predicate; . try_visit!(visitor.visit_id(hir_id)); . match *kind { -- line 1184 ---------------------------------------- -- line 1204 ---------------------------------------- . V::Result::output() . } . . pub fn walk_fn_decl<'v, V: Visitor<'v>>( . visitor: &mut V, . function_declaration: &'v FnDecl<'v>, . ) -> V::Result { . let FnDecl { inputs, output, fn_decl_kind: _ } = function_declaration; 24,695 ( 0.00%) walk_list!(visitor, visit_ty_unambig, *inputs); . visitor.visit_fn_ret_ty(output) . } . . pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FnRetTy<'v>) -> V::Result { 74,068 ( 0.00%) if let FnRetTy::Return(output_ty) = *ret_ty { . try_visit!(visitor.visit_ty_unambig(output_ty)); . } . V::Result::output() . } . 214,558 ( 0.00%) pub fn walk_fn<'v, V: Visitor<'v>>( . visitor: &mut V, . function_kind: FnKind<'v>, . function_declaration: &'v FnDecl<'v>, . body_id: BodyId, . _: LocalDefId, . ) -> V::Result { . try_visit!(visitor.visit_fn_decl(function_declaration)); . try_visit!(walk_fn_kind(visitor, function_kind)); . visitor.visit_nested_body(body_id) 143,040 ( 0.00%) } . . pub fn walk_fn_kind<'v, V: Visitor<'v>>(visitor: &mut V, function_kind: FnKind<'v>) -> V::Result { 35,762 ( 0.00%) match function_kind { . FnKind::ItemFn(_, generics, ..) => { . try_visit!(visitor.visit_generics(generics)); . } . FnKind::Closure | FnKind::Method(..) => {} . } . V::Result::output() . } . -- line 1244 ---------------------------------------- -- line 1291 ---------------------------------------- . } . V::Result::output() . } . . pub fn walk_trait_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: TraitItemId) -> V::Result { . visitor.visit_nested_trait_item(id) . } . 92,619 ( 0.00%) pub fn walk_impl_item<'v, V: Visitor<'v>>( . visitor: &mut V, . impl_item: &'v ImplItem<'v>, . ) -> V::Result { . let ImplItem { owner_id: _, ident, ref generics, ref impl_kind, ref kind, span: _ } = . *impl_item; . . try_visit!(visitor.visit_ident(ident)); 10,291 ( 0.00%) try_visit!(visitor.visit_generics(generics)); . try_visit!(visitor.visit_id(impl_item.hir_id())); . match impl_kind { . ImplItemImplKind::Inherent { vis_span: _ } => {} . ImplItemImplKind::Trait { defaultness, trait_item_def_id: _ } => { . try_visit!(visitor.visit_defaultness(defaultness)); . } . } 82,238 ( 0.00%) match *kind { 135 ( 0.00%) ImplItemKind::Const(ref ty, rhs) => { 45 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); . visitor.visit_const_item_rhs(rhs) . } 17,876 ( 0.00%) ImplItemKind::Fn(ref sig, body_id) => visitor.visit_fn( 53,628 ( 0.00%) FnKind::Method(impl_item.ident, sig), 8,938 ( 0.00%) sig.decl, . body_id, . impl_item.span, . impl_item.owner_id.def_id, 8,938 ( 0.00%) ), 1,308 ( 0.00%) ImplItemKind::Type(ref ty) => visitor.visit_ty_unambig(ty), . } 71,864 ( 0.00%) } . . pub fn walk_foreign_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: ForeignItemId) -> V::Result { . visitor.visit_nested_foreign_item(id) . } . . pub fn walk_impl_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, id: ImplItemId) -> V::Result { . visitor.visit_nested_impl_item(id) . } . . pub fn walk_trait_ref<'v, V: Visitor<'v>>( . visitor: &mut V, . trait_ref: &'v TraitRef<'v>, . ) -> V::Result { . let TraitRef { hir_ref_id, path } = trait_ref; . try_visit!(visitor.visit_id(*hir_ref_id)); 3,063 ( 0.00%) visitor.visit_path(*path, *hir_ref_id) . } . 369 ( 0.00%) pub fn walk_param_bound<'v, V: Visitor<'v>>( . visitor: &mut V, . bound: &'v GenericBound<'v>, . ) -> V::Result { 349 ( 0.00%) match *bound { 12 ( 0.00%) GenericBound::Trait(ref typ) => visitor.visit_poly_trait_ref(typ), 4,212 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_poly_trait_ref (3x) . GenericBound::Outlives(ref lifetime) => visitor.visit_lifetime(lifetime), . GenericBound::Use(args, _) => { . walk_list!(visitor, visit_precise_capturing_arg, args); . V::Result::output() . } . } 328 ( 0.00%) } . . pub fn walk_precise_capturing_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . arg: &'v PreciseCapturingArg<'v>, . ) -> V::Result { . match *arg { . PreciseCapturingArg::Lifetime(lt) => visitor.visit_lifetime(lt), . PreciseCapturingArg::Param(param) => { -- line 1368 ---------------------------------------- -- line 1373 ---------------------------------------- . } . } . . pub fn walk_poly_trait_ref<'v, V: Visitor<'v>>( . visitor: &mut V, . trait_ref: &'v PolyTraitRef<'v>, . ) -> V::Result { . let PolyTraitRef { bound_generic_params, modifiers: _, trait_ref, span: _ } = trait_ref; 41 ( 0.00%) walk_list!(visitor, visit_generic_param, *bound_generic_params); . visitor.visit_trait_ref(trait_ref) . } . . pub fn walk_opaque_ty<'v, V: Visitor<'v>>(visitor: &mut V, opaque: &'v OpaqueTy<'v>) -> V::Result { . let &OpaqueTy { hir_id, def_id: _, bounds, origin: _, span: _ } = opaque; . try_visit!(visitor.visit_id(hir_id)); . walk_list!(visitor, visit_param_bound, bounds); . V::Result::output() -- line 1389 ---------------------------------------- -- line 1450 ---------------------------------------- . } . . pub fn walk_lifetime<'v, V: Visitor<'v>>(visitor: &mut V, lifetime: &'v Lifetime) -> V::Result { . let Lifetime { hir_id, ident, kind: _, source: _, syntax: _ } = lifetime; . try_visit!(visitor.visit_id(*hir_id)); . visitor.visit_ident(*ident) . } . 719,262 ( 0.01%) pub fn walk_qpath<'v, V: Visitor<'v>>( . visitor: &mut V, . qpath: &'v QPath<'v>, . id: HirId, . ) -> V::Result { 416,305 ( 0.01%) match *qpath { . QPath::Resolved(ref maybe_qself, ref path) => { 381,172 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, maybe_qself); 190,586 ( 0.00%) visitor.visit_path(path, id) . } . QPath::TypeRelative(ref qself, ref segment) => { 6,842 ( 0.00%) try_visit!(visitor.visit_ty_unambig(qself)); 17,541 ( 0.00%) visitor.visit_path_segment(segment) . } . } 639,344 ( 0.01%) } . 26,445 ( 0.00%) pub fn walk_path<'v, V: Visitor<'v>>(visitor: &mut V, path: &Path<'v>) -> V::Result { . let Path { segments, span: _, res: _ } = path; 197,087 ( 0.00%) walk_list!(visitor, visit_path_segment, *segments); . V::Result::output() 51,019 ( 0.00%) } . 21 ( 0.00%) pub fn walk_path_segment<'v, V: Visitor<'v>>( . visitor: &mut V, . segment: &'v PathSegment<'v>, . ) -> V::Result { . let PathSegment { ident, hir_id, res: _, args, infer_args: _, delegation_child_segment: _ } = . segment; . try_visit!(visitor.visit_ident(*ident)); . try_visit!(visitor.visit_id(*hir_id)); 771,035 ( 0.01%) visit_opt!(visitor, visit_generic_args, *args); 155,214 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs: as rustc_hir::intravisit::Visitor>::visit_generic_args (1,053x) . V::Result::output() 19,337 ( 0.00%) } . 15,471 ( 0.00%) pub fn walk_generic_args<'v, V: Visitor<'v>>( . visitor: &mut V, . generic_args: &'v GenericArgs<'v>, . ) -> V::Result { . let GenericArgs { args, constraints, parenthesized: _, span_ext: _ } = generic_args; 43,174 ( 0.00%) walk_list!(visitor, visit_generic_arg, *args); 672,829 ( 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: as rustc_hir::intravisit::Visitor>::visit_generic_arg (7,607x) 22,858 ( 0.00%) walk_list!(visitor, visit_assoc_item_constraint, *constraints); 861 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_assoc_item_constraint (3x) . V::Result::output() 13,752 ( 0.00%) } . 80 ( 0.00%) pub fn walk_assoc_item_constraint<'v, V: Visitor<'v>>( . visitor: &mut V, . constraint: &'v AssocItemConstraint<'v>, . ) -> V::Result { . let AssocItemConstraint { hir_id, ident, gen_args, kind: _, span: _ } = constraint; . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); 49 ( 0.00%) try_visit!(visitor.visit_generic_args(*gen_args)); 231 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs: as rustc_hir::intravisit::Visitor>::visit_generic_args'2 (11x) 48 ( 0.00%) match constraint.kind { 48 ( 0.00%) AssocItemConstraintKind::Equality { ref term } => match term { . Term::Ty(ty) => try_visit!(visitor.visit_ty_unambig(ty)), . Term::Const(c) => try_visit!(visitor.visit_const_arg_unambig(c)), . }, . AssocItemConstraintKind::Bound { bounds } => { . walk_list!(visitor, visit_param_bound, bounds) . } . } . V::Result::output() -- line 1520 ---------------------------------------- 1,823,011 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; . use rustc_span::sym; . . use super::SWAP_WITH_TEMPORARY; . . const MSG_TEMPORARY: &str = "this expression returns a temporary value"; . const MSG_TEMPORARY_REFMUT: &str = "this is a mutable reference to a temporary value"; . 27,972 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'_>, args: &'tcx [Expr<'_>]) { 16,661 ( 0.00%) if let ExprKind::Path(QPath::Resolved(_, func_path)) = func.kind . && let Some(func_def_id) = func_path.res.opt_def_id() 7,414 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_swap, func_def_id) 44,446 ( 0.00%) => ???:::is_diagnostic_item (674x) . { . match (ArgKind::new(cx, &args[0]), ArgKind::new(cx, &args[1])) { . (ArgKind::RefMutToTemp(left_temp), ArgKind::RefMutToTemp(right_temp)) => { . emit_lint_useless(cx, expr, &args[0], &args[1], left_temp, right_temp); . }, . (ArgKind::RefMutToTemp(left_temp), right) => emit_lint_assign(cx, expr, &right, &args[0], left_temp), . (left, ArgKind::RefMutToTemp(right_temp)) => emit_lint_assign(cx, expr, &left, &args[1], right_temp), . _ => {}, . } . } 31,968 ( 0.00%) } . . enum ArgKind<'tcx> { . // Mutable reference to a place, coming from a macro, and number of dereferences to use . RefMutToPlaceAsMacro(&'tcx Expr<'tcx>, usize), . // Place behind a mutable reference, and number of dereferences to use . RefMutToPlace(&'tcx Expr<'tcx>, usize), . // Temporary value behind a mutable reference . RefMutToTemp(&'tcx Expr<'tcx>), -- line 37 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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; . 719,686 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>, msrv: Msrv) { . // if this cast is the child of another cast expression then don't emit something for it, the full . // chain will be analyzed 243,272 ( 0.00%) if is_child_of_cast(cx, expr) { . return; . } . 64,152 ( 0.00%) if let Some(CastChainInfo { . left_cast, . start_ty, . end_ty, 320,760 ( 0.00%) }) = expr_cast_chain_tys(cx, expr) 1,672,954 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys (64,152x) . && 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, . ); . }, . ); . } . } 523,408 ( 0.01%) } . . fn is_child_of_cast(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 130,852 ( 0.00%) let parent = cx.tcx.parent_hir_node(expr.hir_id); 7,870,112 ( 0.10%) => ???:::parent_hir_node (65,426x) 305,724 ( 0.00%) let expr = match parent { 10,703 ( 0.00%) Node::Block(block) => { 32,109 ( 0.00%) if let Some(parent_expr) = block.expr { . parent_expr . } else { . return false; . } . }, 72,582 ( 0.00%) Node::Expr(expr) => expr, . _ => return false, . }; . 46,994 ( 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> { 2,312 ( 0.00%) match ty.kind() { 195 ( 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 513,216 ( 0.01%) fn expr_cast_chain_tys<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option> { 62,996 ( 0.00%) if let ExprKind::Cast(cast_expr, _cast_to_hir_ty) = expr.peel_blocks().kind { 3,468 ( 0.00%) let cast_to = cx.typeck_results().expr_ty(expr); 46,240 ( 0.00%) => ???:::expr_ty (1,156x) . 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 { 62,996 ( 0.00%) None . } 513,216 ( 0.01%) } 193,730 ( 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 { 154 ( 0.00%) match &expr.kind { . ExprKind::Paren(e) => strip_paren_blocks(e), . ExprKind::Block(b, _) => { . if let [ . Stmt { . kind: StmtKind::Expr(e), . .. . }, . ] = &b.stmts[..] -- line 43 ---------------------------------------- -- line 47 ---------------------------------------- . expr . } . }, . _ => expr, . } . } . . impl EarlyLintPass for MultiAssignments { 224,481 ( 0.00%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 149,654 ( 0.00%) if let ExprKind::Assign(target, source, _) = &expr.kind { 33 ( 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"); . } 33 ( 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"); . } . } 299,308 ( 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>) { 196,290 ( 0.00%) if cx.tcx.sess.edition() >= Edition2024 { . return; . } . 65,430 ( 0.00%) if let Some(higher::IfLet { . let_expr, . if_then, . if_else: Some(if_else), . .. 130,860 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 327,153 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . && let ctxt = expr.span.ctxt() . && let Some(op_mutex) = for_each_expr_without_closures(let_expr, |e| mutex_lock_call(cx, ctxt, e, None)) . && let Some(arm_mutex) = . for_each_expr_without_closures((if_then, if_else), |e| mutex_lock_call(cx, ctxt, e, Some(op_mutex))) . { . let diag = |diag: &mut Diag<'_, ()>| { . diag.span_label( . op_mutex.span, -- line 72 ---------------------------------------- -- line 81 ---------------------------------------- . span_lint_and_then( . cx, . IF_LET_MUTEX, . expr.span, . "calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock", . diag, . ); . } 65,430 ( 0.00%) } . } . . fn mutex_lock_call<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . op_mutex: Option<&'tcx Expr<'_>>, . ) -> ControlFlow<&'tcx Expr<'tcx>> { -- line 97 ---------------------------------------- 1,112,310 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 10,719 ( 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); 9,528 ( 0.00%) } . . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx rustc_hir::Block<'tcx>) { 1 ( 0.00%) self.local_bindings.push(Vec::default()); . } . 74,949 ( 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", . ); . } . } 85,656 ( 0.00%) } . . fn check_expr(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 37,737 ( 0.00%) if let Some(def_id) = expr.res_local_id() { 12,579 ( 0.00%) self.underscore_bindings.swap_remove(&def_id); 264,159 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (12,579x) . } . } . } . . impl NoEffect { . fn check_no_effect<'tcx>(&mut self, cx: &LateContext<'tcx>, stmt: &Stmt<'tcx>) -> bool { 4,353 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind { . // Covered by rustc `path_statements` lint 520 ( 0.00%) if matches!(expr.kind, ExprKind::Path(_)) { . return true; . } . 1,040 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 5,720 ( 0.00%) => ???:::range_span (260x) . 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; . } 1,255 ( 0.00%) if has_no_effect(cx, expr) { 7,028 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::has_no_effect (251x) . 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; . } 931 ( 0.00%) } else if let StmtKind::Let(local) = stmt.kind 6,517 ( 0.00%) && !is_lint_allowed(cx, NO_EFFECT_UNDERSCORE_BINDING, local.hir_id) 805,074 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (931x) . && !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. 741 ( 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()) . } . 2,761 ( 0.00%) fn has_no_effect(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 2,008 ( 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 263 ---------------------------------------- . false . } . } else { . false . } . }, . _ => false, . } 2,008 ( 0.00%) } . . fn check_unnecessary_operation(cx: &LateContext<'_>, stmt: &Stmt<'_>) { 753 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 780 ( 0.00%) && !stmt.span.in_external_macro(cx.sess().source_map()) . && let ctxt = stmt.span.ctxt() 1,040 ( 0.00%) && expr.range_span().unwrap_or(expr.span).ctxt() == ctxt 5,720 ( 0.00%) => ???:::range_span (260x) 1,560 ( 0.00%) && let Some(reduced) = reduce_expression(cx, expr) 17,932 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression (260x) . && 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, . ); . }, . ); . } . } . } . 2,860 ( 0.00%) fn reduce_expression<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option>> { 1,040 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 5,720 ( 0.00%) => ???:::range_span (260x) . return None; . } 1,757 ( 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 378 ---------------------------------------- . Some(args.iter().collect()) . }, . _ => None, . } . } else { . None . } . }, 4 ( 0.00%) ExprKind::Block(block, _) => { 12 ( 0.00%) if block.stmts.is_empty() && !block.targeted_by_break { 16 ( 0.00%) block.expr.as_ref().and_then(|e| { 20 ( 0.00%) match block.rules { 4 ( 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), . } 16 ( 0.00%) }) . } else { . None . } . }, . _ => None, . } 2,080 ( 0.00%) } 1,538 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/len_zero.rs -------------------------------------------------------------------------------- Ir -- line 96 ---------------------------------------- . . impl LenZero { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for LenZero { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if let ExprKind::Let(lt) = expr.kind . && match lt.pat.kind { . PatKind::Slice([], None, []) => true, . PatKind::Expr(lit) . if let PatExprKind::Lit { lit, .. } = lit.kind . && let LitKind::Str(lit, _) = lit.node => . { . lit.as_str().is_empty() . }, -- line 113 ---------------------------------------- -- line 127 ---------------------------------------- . lt.span, . "comparison to empty slice using `if let`", . "using `is_empty` is clearer and more explicit", . format!("{lit_str}.is_empty()"), . applicability, . ); . } . 134,192 ( 0.00%) if let ExprKind::MethodCall(method, lhs_expr, [rhs_expr], _) = expr.kind 12,832 ( 0.00%) && cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::PartialEq) 6 ( 0.00%) && !expr.span.from_expansion() . { 30 ( 0.00%) self.check_empty_expr( 81 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_empty_expr (3x) . cx, 3 ( 0.00%) expr.span, . lhs_expr, 6 ( 0.00%) peel_ref_operators(cx, rhs_expr), 78 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_ref_operators (3x) 3 ( 0.00%) if method.ident.name == sym::ne { . "!" . } else { . Default::default() . }, . ); . } . 147,221 ( 0.00%) if let ExprKind::Binary(Spanned { node: cmp, .. }, left, right) = expr.kind 13,046 ( 0.00%) && !expr.span.from_expansion() . { . // expr.span might contains parenthesis, see issue #10529 6,009 ( 0.00%) let actual_span = span_without_enclosing_paren(cx, expr.span); 26,805 ( 0.00%) match cmp { . BinOpKind::Eq => { 14,960 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "", 0); // len == 0 76,160 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (1,360x) 10,880 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "", 0); // 0 == len . }, . BinOpKind::Ne => { 20,358 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "!", 0); // len != 0 90,828 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (1,566x) 10,962 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "!", 0); // 0 != len . }, . BinOpKind::Gt => { . self.check_cmp(cx, actual_span, left, right, "!", 0); // len > 0 . self.check_cmp(cx, actual_span, right, left, "", 1); // 1 > len . }, . BinOpKind::Lt => { . self.check_cmp(cx, actual_span, left, right, "", 1); // len < 1 . self.check_cmp(cx, actual_span, right, left, "!", 0); // 0 < len . }, . BinOpKind::Ge => self.check_cmp(cx, actual_span, left, right, "!", 1), // len >= 1 . BinOpKind::Le => self.check_cmp(cx, actual_span, right, left, "!", 1), // 1 <= len . _ => (), . } . } 523,440 ( 0.01%) } . } . . impl LenZero { 52,668 ( 0.00%) fn check_cmp( . &self, . cx: &LateContext<'_>, . span: Span, . method: &Expr<'_>, . lit: &Expr<'_>, . op: &str, . compare_to: u32, . ) { 11,704 ( 0.00%) if method.span.from_expansion() { . return; . } . 11,704 ( 0.00%) if let (&ExprKind::MethodCall(method_path, receiver, [], _), ExprKind::Lit(lit)) = (&method.kind, &lit.kind) { . // check if we are in an is_empty() method . if parent_item_name(cx, method) == Some(sym::is_empty) { . return; . } . . self.check_len(cx, span, method_path.ident.name, receiver, &lit.node, op, compare_to); . } else { 46,816 ( 0.00%) self.check_empty_expr(cx, span, method, lit, op); 161,136 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_empty_expr (5,852x) . } . } . . #[expect(clippy::too_many_arguments)] . fn check_len( . &self, . cx: &LateContext<'_>, . span: Span, -- line 212 ---------------------------------------- -- line 235 ---------------------------------------- . snippet_with_context(cx, receiver.span, span.ctxt(), "_", &mut applicability).0, . ), . applicability, . ); . } . } . } . 81,970 ( 0.00%) fn check_empty_expr(&self, cx: &LateContext<'_>, span: Span, lit1: &Expr<'_>, lit2: &Expr<'_>, op: &str) { . if (is_empty_array(lit2) || is_empty_string(lit2)) && has_is_empty(cx, lit1, self.msrv) { . let mut applicability = Applicability::MachineApplicable; . . let lit1 = peel_ref_operators(cx, lit1); . let lit_str = Sugg::hir_with_context(cx, lit1, span.ctxt(), "_", &mut applicability).maybe_paren(); . . span_lint_and_sugg( . cx, -- line 251 ---------------------------------------- -- line 252 ---------------------------------------- . COMPARISON_TO_EMPTY, . span, . "comparison to empty slice", . format!("using `{op}is_empty` is clearer and more explicit"), . format!("{op}{lit_str}.is_empty()"), . applicability, . ); . } 46,840 ( 0.00%) } . } . . fn span_without_enclosing_paren(cx: &LateContext<'_>, span: Span) -> Span { 42,063 ( 0.00%) let Some(snippet) = span.get_text(cx) else { . return span; . }; 18,027 ( 0.00%) if has_enclosing_paren(snippet) { 1,360,528 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::has_enclosing_paren:: (6,009x) 3,083 ( 0.00%) let source_map = cx.tcx.sess.source_map(); 12,332 ( 0.00%) let left_paren = source_map.start_point(span); 1,014,307 ( 0.01%) => ???:::start_point (3,083x) 9,249 ( 0.00%) let right_parent = source_map.end_point(span); 1,285,611 ( 0.02%) => ???:::end_point (3,083x) 6,166 ( 0.00%) left_paren.between(right_parent) 607,351 ( 0.01%) => ???:::between (3,083x) . } else { . span . } . } . . fn is_empty_string(expr: &Expr<'_>) -> bool { 14,842 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind . && let LitKind::Str(lit, _) = lit.node . { . let lit = lit.as_str(); . return lit.is_empty(); . } . false . } . . fn is_empty_array(expr: &Expr<'_>) -> bool { 17,565 ( 0.00%) if let ExprKind::Array(arr) = expr.kind { . return arr.is_empty(); . } . false . } . . /// Checks if this type has an `is_empty` method. . fn has_is_empty(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Msrv) -> bool { . /// Gets an `AssocItem` and return true if it matches `is_empty(self)`. -- line 296 ---------------------------------------- 65,123 ( 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) { 11,492 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 22,984 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (2,873x) 17,238 ( 0.00%) lint_unnested_or_patterns(cx, &a.pat); 60,333 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (2,873x) . } . } . . fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) { 374,135 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) 598,616 ( 0.01%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (74,827x) . && let ast::ExprKind::Let(pat, _, _, _) = &e.kind . { . lint_unnested_or_patterns(cx, pat); . } . } . . fn check_param(&mut self, cx: &EarlyContext<'_>, p: &ast::Param) { 46,916 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 93,832 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (11,729x) 35,187 ( 0.00%) lint_unnested_or_patterns(cx, &p.pat); 293,221 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (11,729x) . } . } . . fn check_local(&mut self, cx: &EarlyContext<'_>, l: &ast::Local) { 3,724 ( 0.00%) if self.msrv.meets(msrvs::OR_PATTERNS) { 7,448 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (931x) 2,793 ( 0.00%) lint_unnested_or_patterns(cx, &l.pat); 23,275 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns (931x) . } . } . . extract_msrv_attr!(); . } . 77,665 ( 0.00%) fn lint_unnested_or_patterns(cx: &EarlyContext<'_>, pat: &Pat) { 134,049 ( 0.00%) if let Ident(.., None) | Expr(_) | Wild | Path(..) | Range(..) | Rest | MacCall(_) = pat.kind { . // This is a leaf pattern, so cloning is unprofitable. . return; . } . . let mut pat = pat.clone(); . . // Nix all the paren patterns everywhere so that they aren't in our way. . remove_all_parens(&mut pat); -- line 102 ---------------------------------------- -- line 110 ---------------------------------------- . insert_necessary_parens(&mut pat); . db.span_suggestion_verbose( . pat.span, . "nest the patterns", . pprust::pat_to_string(&pat), . Applicability::MachineApplicable, . ); . }); 93,198 ( 0.00%) } . . /// Remove all `(p)` patterns in `pat`. . fn remove_all_parens(pat: &mut Pat) { . #[derive(Default)] . struct Visitor { . /// If is not in the outer most pattern. This is needed to avoid removing the outermost . /// parens because top-level or-patterns are not allowed in let statements. . is_inner: bool, -- line 126 ---------------------------------------- 296,398 ( 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/attr/mod.rs -------------------------------------------------------------------------------- Ir -- line 464 ---------------------------------------- . /// ``` . /// . /// It returns `None` in any other cases like: . /// . /// ```text . /// #[attr("value")] . /// ``` . pub fn value_str(&self) -> Option { 36,260 ( 0.00%) match &self.kind { . MetaItemKind::NameValue(v) => v.kind.str(), . _ => None, . } . } . . fn from_tokens(iter: &mut TokenStreamIter<'_>) -> Option { . // FIXME: Share code with `parse_path`. . let tt = iter.next().map(|tt| TokenTree::uninterpolate(tt)); -- line 480 ---------------------------------------- -- line 689 ---------------------------------------- . MetaItemInner::MetaItem(_item) => Some(self), . MetaItemInner::Lit(MetaItemLit { kind: LitKind::Bool(_), .. }) => Some(self), . _ => None, . } . } . . /// Returns the `MetaItem` if `self` is a `MetaItemInner::MetaItem`. . pub fn meta_item(&self) -> Option<&MetaItem> { 18,107 ( 0.00%) match self { . MetaItemInner::MetaItem(item) => Some(item), . _ => None, . } . } . . /// Returns `true` if the variant is `MetaItem`. . pub fn is_meta_item(&self) -> bool { . self.meta_item().is_some() -- line 705 ---------------------------------------- -- line 934 ---------------------------------------- . /// So `#[doc = "doc"]` (which is a doc comment) and `#[doc(...)]` (which is not . /// a doc comment) will return `false`. . fn is_doc_comment(&self) -> Option; . . /// Returns true if the attribute's first *and only* path segment is equal to the passed-in . /// symbol. . #[inline] . fn has_name(&self, name: Symbol) -> bool { 342,945 ( 0.00%) self.name().map(|x| x == name).unwrap_or(false) 229,319 ( 0.00%) => ???:::name (25,546x) . } . . /// Returns true if the attribute's first *and only* path segment is any of the passed-in . /// symbols. . #[inline] . fn has_any_name(&self, names: &[Symbol]) -> bool { . names.iter().any(|&name| self.has_name(name)) . } -- line 950 ---------------------------------------- -- line 951 ---------------------------------------- . . /// get the span of the entire attribute . fn span(&self) -> Span; . . /// Returns whether the attribute is a path, without any arguments. . fn is_word(&self) -> bool; . . fn path(&self) -> SmallVec<[Symbol; 1]> { 30,318 ( 0.00%) self.symbol_path().unwrap_or(smallvec![sym::doc]) 1,931,398 ( 0.02%) => ???:::symbol_path (30,295x) . } . . fn path_span(&self) -> Option; . . /// Returns None for doc comments . fn symbol_path(&self) -> Option>; . . /// Returns the documentation if this is a doc comment or a sugared doc comment. -- line 967 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 327,150 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 130,860 ( 0.00%) if let Assign(left_expr, collect_expr, _) = &expr.kind 33 ( 0.00%) && let hir::ExprKind::MethodCall(seg, target_expr, [], _) = &collect_expr.kind . && seg.args.is_none() . && let Some(collect_def_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id) . && cx.tcx.is_diagnostic_item(sym::iterator_collect_fn, collect_def_id) . { . check_into_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_iter(cx, left_expr, target_expr, expr.span, self.msrv); . check_to_owned(cx, left_expr, target_expr, expr.span, self.msrv); . } 392,580 ( 0.00%) } . } . . fn check_into_iter( . cx: &LateContext<'_>, . left_expr: &hir::Expr<'_>, . target_expr: &hir::Expr<'_>, . parent_expr_span: Span, . msrv: Msrv, -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_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. 140,620 ( 0.00%) fn span_matches_pat(sess: &Session, span: Span, start_pat: Pat, end_pat: Pat) -> bool { 70,310 ( 0.00%) let pos = sess.source_map().lookup_byte_offset(span.lo()); 2,165,548 ( 0.03%) => ???:::lookup_byte_offset (14,062x) 28,124 ( 0.00%) let Some(ref src) = pos.sf.src else { . return false; . }; . let end = span.hi() - pos.sf.start_pos; 112,496 ( 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. 14,126 ( 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 == ','); 182,806 ( 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()) . }, 112,496 ( 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)), 2,148 ( 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, . }) 42,186 ( 0.00%) }) 126,558 ( 0.00%) } . . /// Get the search patterns to use for the given literal . fn lit_search_pat(lit: &LitKind) -> (Pat, Pat) { 312 ( 0.00%) match lit { . 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("#")), . LitKind::Byte(_) => (Pat::Str("b'"), Pat::Str("'")), . LitKind::Char(_) => (Pat::Str("'"), Pat::Str("'")), . LitKind::Int(_, LitIntType::Signed(IntTy::Isize)) => (Pat::Num, Pat::Str("isize")), 120 ( 0.00%) LitKind::Int(_, LitIntType::Unsigned(UintTy::Usize)) => (Pat::Num, Pat::Str("usize")), . 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("")), . } 24 ( 0.00%) } . . /// Get the search patterns to use for the given path 2,244 ( 0.00%) fn qpath_search_pat(path: &QPath<'_>) -> (Pat, Pat) { 4,488 ( 0.00%) match path { . QPath::Resolved(ty, path) => { 2,198 ( 0.00%) let start = if ty.is_some() { . Pat::Str("<") . } else { 2,198 ( 0.00%) path.segments.first().map_or(Pat::Str(""), |seg| { 4,396 ( 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| { 2,198 ( 0.00%) if seg.args.is_some() { . Pat::Str(">") . } else { . Pat::Sym(seg.ident.name) . } . }); 13,188 ( 0.00%) (start, end) . }, 368 ( 0.00%) QPath::TypeRelative(_, name) => (Pat::Str(""), Pat::Sym(name.ident.name)), . } 2,244 ( 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) { 98,658 ( 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. 21,924 ( 0.00%) if !e.span.eq_ctxt(outer_span) { . return (Pat::Str(""), Pat::Str("")); . } . 37,146 ( 0.00%) match e.kind { . 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("(")), 13,032 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) => (Pat::Str("*"), expr_search_pat_inner(tcx, e, outer_span).1), 113,621 ( 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 (1,364x) . 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), 264 ( 0.00%) ExprKind::Lit(lit) => lit_search_pat(&lit.node), 528 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::lit_search_pat (24x) . ExprKind::Array(_) | ExprKind::Repeat(..) => (Pat::Str("["), Pat::Str("]")), 105 ( 0.00%) ExprKind::Call(e, []) | ExprKind::MethodCall(_, e, [], _) => { 24 ( 0.00%) (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("(")) 498 ( 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) . }, 12 ( 0.00%) ExprKind::Call(first, [.., last]) 72 ( 0.00%) | ExprKind::MethodCall(_, first, [.., last], _) . | ExprKind::Binary(_, first, last) . | ExprKind::Tup([first, .., last]) . | ExprKind::Assign(first, last, _) 120 ( 0.00%) | ExprKind::AssignOp(_, first, last) => ( 90 ( 0.00%) expr_search_pat_inner(tcx, first, outer_span).0, 5,260 ( 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 (30x) 240 ( 0.00%) expr_search_pat_inner(tcx, last, outer_span).1, 2,584 ( 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 (30x) . ), . ExprKind::Tup([e]) | ExprKind::DropTemps(e) => expr_search_pat_inner(tcx, e, outer_span), 960 ( 0.00%) ExprKind::Cast(e, _) | ExprKind::Type(e, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("")), 5,964 ( 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::Let(let_expr) => (Pat::Str("let"), expr_search_pat_inner(tcx, let_expr.init, outer_span).1), . 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("}")) . }, -- line 199 ---------------------------------------- -- line 211 ---------------------------------------- . ExprKind::Block( . Block { . rules: BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided), . .. . }, . None, . ) => (Pat::Str("unsafe"), Pat::Str("}")), . ExprKind::Block(_, None) => (Pat::Str("{"), Pat::Str("}")), 10,270 ( 0.00%) ExprKind::Field(e, name) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Sym(name.name)), 65,570 ( 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 (790x) 460 ( 0.00%) ExprKind::Index(e, _, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("]")), 3,680 ( 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) 24,629 ( 0.00%) ExprKind::Path(ref path) => qpath_search_pat(path), 75,114 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (2,239x) 6,624 ( 0.00%) ExprKind::AddrOf(_, _, e) => (Pat::Str("&"), expr_search_pat_inner(tcx, e, outer_span).1), 138,077 ( 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 (827x) . 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")), . ExprKind::Ret(Some(e)) => (Pat::Str("return"), expr_search_pat_inner(tcx, e, outer_span).1), 50 ( 0.00%) ExprKind::Struct(path, _, _) => (qpath_search_pat(path).0, Pat::Str("}")), 170 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (5x) . ExprKind::Yield(e, YieldSource::Yield) => (Pat::Str("yield"), expr_search_pat_inner(tcx, e, outer_span).1), . _ => (Pat::Str(""), Pat::Str("")), . } 25,744 ( 0.00%) } . 6,714 ( 0.00%) expr_search_pat_inner(tcx, e, e.span) 443,902 ( 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 (2,238x) . } . . fn fn_header_search_pat(header: FnHeader) -> Pat { 6,818 ( 0.00%) if header.is_async() { . Pat::Str("async") 13,636 ( 0.00%) } else if matches!(header.constness, rustc_hir::Constness::Const { always: false }) { . Pat::Str("const") . } else if header.is_unsafe() { . Pat::Str("unsafe") 19,593 ( 0.00%) } else if header.abi != ExternAbi::Rust { . Pat::Str("extern") . } else { . Pat::MultiStr(&["fn", "extern"]) . } . } . . fn item_search_pat(item: &Item<'_>) -> (Pat, Pat) { 68,896 ( 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(";")), . 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("}")), -- line 266 ---------------------------------------- -- 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("")), . }; 8,996 ( 0.00%) if item.vis_span.is_empty() { 40,482 ( 0.00%) (start_pat, end_pat) . } else { . (Pat::Str("pub"), end_pat) . } . } . . fn trait_item_search_pat(item: &TraitItem<'_>) -> (Pat, Pat) { 11 ( 0.00%) match &item.kind { . TraitItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")), . TraitItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")), 3 ( 0.00%) TraitItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . } . } . . fn impl_item_search_pat(item: &ImplItem<'_>) -> (Pat, Pat) { 115,821 ( 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(";")), 13,626 ( 0.00%) ImplItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . }; 20,439 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind 6,813 ( 0.00%) && !vis_span.is_empty() . { 27,252 ( 0.00%) start_pat = Pat::Str("pub"); . } 81,756 ( 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)), . } . } . 36 ( 0.00%) fn fn_kind_pat(tcx: TyCtxt<'_>, kind: &FnKind<'_>, body: &Body<'_>, hir_id: HirId) -> (Pat, Pat) { 48 ( 0.00%) let (mut start_pat, end_pat) = match kind { . FnKind::ItemFn(.., header) => (fn_header_search_pat(*header), Pat::Str("")), 8 ( 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), . }; 36 ( 0.00%) match tcx.hir_node(hir_id) { 248 ( 0.00%) => ???:::hir_node (4x) . Node::Item(Item { vis_span, .. }) . | Node::ImplItem(ImplItem { 4 ( 0.00%) impl_kind: ImplItemImplKind::Inherent { vis_span, .. }, . .. . }) => { 8 ( 0.00%) if !vis_span.is_empty() { . start_pat = Pat::Str("pub"); . } . }, . Node::ImplItem(_) | Node::TraitItem(_) => {}, . _ => start_pat = Pat::Str(""), . } 40 ( 0.00%) (start_pat, end_pat) 36 ( 0.00%) } . . fn attr_search_pat(attr: &Attribute) -> (Pat, Pat) { 36 ( 0.00%) match attr.kind { . AttrKind::Normal(..) => { 48 ( 0.00%) if let Some(name) = attr.name() { 108 ( 0.00%) => ???:::name (12x) . // NOTE: This will likely have false positives, like `allow = 1` 48 ( 0.00%) (Pat::Attr(name), Pat::Str("")) . } else { . (Pat::Str("#"), Pat::Str("]")) . } . }, . AttrKind::Synthetic(..) => unreachable!(), . AttrKind::DocComment(_kind @ CommentKind::Line, ..) => { . if attr.style == AttrStyle::Outer { . (Pat::Str("///"), Pat::Str("")) -- line 376 ---------------------------------------- -- 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>; 67,832 ( 0.00%) fn search_pat(&$self, $cx_ident: &Self::Context) -> (Pat, Pat) { . $fn($($args)*) 85,956 ( 0.00%) } . fn span(&self) -> Span { . self.span . } . } . }; . } 2,238 ( 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) { 28 ( 0.00%) fn_kind_pat(cx.tcx, self.0, self.1, self.2) 800 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::fn_kind_pat (4x) . } . . 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. . pub fn is_from_proc_macro<'cx, T: WithSearchPat<'cx>>(cx: &T::Context, item: &T) -> bool { 40,695 ( 0.00%) let (start_pat, end_pat) = item.search_pat(cx); 245 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::search_pat (7x) 167,373 ( 0.00%) !span_matches_pat(cx.sess(), item.span(), start_pat, end_pat) 3,190 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (7x) . } . . /// Checks if the span actually refers to a match expression . pub fn is_span_match(cx: &impl LintContext, span: Span) -> bool { 6,448 ( 0.00%) span_matches_pat(cx.sess(), span, Pat::Str("match"), Pat::Str("}")) 212,312 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (496x) . } . . /// Checks if the span actually refers to an if expression . pub fn is_span_if(cx: &impl LintContext, span: Span) -> bool { . span_matches_pat(cx.sess(), span, Pat::Str("if"), Pat::Str("}")) . } 234,204 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/attrs.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . use rustc_lexer::TokenKind; . use rustc_lint::LateContext; . use rustc_middle::ty::{AdtDef, TyCtxt}; . use rustc_session::Session; . use rustc_span::{Span, Symbol}; . use std::str::FromStr as _; . . /// Validates a single clippy attribute and emits errors for unknown or deprecated ones. 272,655 ( 0.00%) pub fn check_clippy_attr(sess: &Session, attr: &A) { 30,121 ( 0.00%) if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . let path_span = attr . .path_span() . .expect("Clippy attributes are unparsed and have a span"); . . match *segment2 { . sym::cyclomatic_complexity => { -- line 25 ---------------------------------------- -- line 40 ---------------------------------------- . | sym::msrv . | sym::has_significant_drop . | sym::format_args => {}, . _ => { . sess.dcx().span_err(path_span, "usage of unknown attribute"); . }, . } . } 212,065 ( 0.00%) } . . /// Given `attrs`, extract all the instances of a built-in Clippy attribute called `name` . pub fn get_builtin_attr<'a, A: AttributeExt + 'a>(attrs: &'a [A], name: Symbol) -> impl Iterator { . attrs.iter().filter(move |attr| { 23 ( 0.00%) if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . if *segment2 == sym::cyclomatic_complexity { . return false; . } . *segment2 == name . } else { . false -- line 61 ---------------------------------------- -- line 87 ---------------------------------------- . } . . /// Checks whether `attrs` contain `#[doc(hidden)]` . pub fn is_doc_hidden(attrs: &[impl AttributeExt]) -> bool { . attrs.iter().any(AttributeExt::is_doc_hidden) . } . . /// Checks whether the given ADT, or any of its fields/variants, are marked as `#[non_exhaustive]` 4,424 ( 0.00%) pub fn has_non_exhaustive_attr(tcx: TyCtxt<'_>, adt: AdtDef<'_>) -> bool { 1,106 ( 0.00%) adt.is_variant_list_non_exhaustive() 1,863 ( 0.00%) || find_attr!(tcx, adt.did(), NonExhaustive(..)) 84,316 ( 0.00%) => ???:>::get_attrs (553x) . || adt.variants().iter().any(|variant_def| { 11,792 ( 0.00%) variant_def.is_field_list_non_exhaustive() || find_attr!(tcx, variant_def.def_id, NonExhaustive(..)) 235,978 ( 0.00%) => ???:>::get_attrs (1,474x) . }) . || adt . .all_fields() . .any(|field_def| find_attr!(tcx, field_def.did, NonExhaustive(..))) 4,424 ( 0.00%) } . . /// Checks whether the given span contains a `#[cfg(..)]` attribute 4 ( 0.00%) pub fn span_contains_cfg(cx: &LateContext<'_>, s: Span) -> bool { . s.check_text(cx, |src| { . // PERF: A `#[cfg]` needs a literal `#`, so skip the lexer when the source has none. 1 ( 0.00%) if !src.contains('#') { . return false; . } . . let mut iter = tokenize_with_text(src); . . // Search for the token sequence [`#`, `[`, `cfg`] . while iter.any(|(t, ..)| matches!(t, TokenKind::Pound)) { . let mut iter = iter.by_ref().skip_while(|(t, ..)| { -- line 118 ---------------------------------------- -- line 124 ---------------------------------------- . if matches!(iter.next(), Some((TokenKind::OpenBracket, ..))) . && matches!(iter.next(), Some((TokenKind::Ident, "cfg", _))) . { . return true; . } . } . false . }) 12 ( 0.00%) } . . /// Currently used to keep track of the current value of `#[clippy::cognitive_complexity(N)]` . pub struct LimitStack { . default: u64, . stack: Vec, . } . . impl Drop for LimitStack { -- line 140 ---------------------------------------- -- line 149 ---------------------------------------- . /// Initialize the stack starting with a default value, which usually comes from configuration . pub fn new(limit: u64) -> Self { . Self { . default: limit, . stack: vec![], . } . } . pub fn limit(&self) -> u64 { 8,939 ( 0.00%) self.stack.last().copied().unwrap_or(self.default) . } . pub fn push_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 443,220 ( 0.01%) parse_attrs(sess, attrs, name, |val| stack.push(val)); 2,579,959 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> (110,805x) . } . pub fn pop_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 443,220 ( 0.01%) parse_attrs(sess, attrs, name, |val| { 2,617,726 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> (110,805x) . let popped = stack.pop(); . debug_assert_eq!(popped, Some(val)); . }); . } . } . 2,216,100 ( 0.03%) fn parse_attrs(sess: &Session, attrs: &[impl AttributeExt], name: Symbol, mut f: F) { . for attr in get_builtin_attr(attrs, name) { . let Some(value) = attr.value_str() else { . sess.dcx().span_err(attr.span(), "bad clippy attribute"); . continue; . }; . let Ok(value) = u64::from_str(value.as_str()) else { . sess.dcx().span_err(attr.span(), "not a number"); . continue; . }; . f(value); . } 1,772,880 ( 0.02%) } 111,362 ( 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/validations.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . /// . /// # Safety . /// . /// `bytes` must produce a valid UTF-8-like (UTF-8 or WTF-8) string . #[unstable(feature = "str_internals", issue = "none")] . #[inline] . pub unsafe fn next_code_point<'a, I: Iterator>(bytes: &mut I) -> Option { . // Decode UTF-8 413,529 ( 0.01%) let x = *bytes.next()?; 980,124 ( 0.01%) if x < 128 { . return Some(x as u32); . } . . // Multibyte case follows . // Decode from a byte combination out of: [[[x y] z] w] . // NOTE: Performance is sensitive to the exact formulation here . let init = utf8_first_byte(x, 2); . // SAFETY: `bytes` produces an UTF-8-like string, -- line 46 ---------------------------------------- -- line 76 ---------------------------------------- . /// `bytes` must produce a valid UTF-8-like (UTF-8 or WTF-8) string . #[inline] . pub(super) unsafe fn next_code_point_reverse<'a, I>(bytes: &mut I) -> Option . where . I: DoubleEndedIterator, . { . // Decode UTF-8 . let w = match *bytes.next_back()? { 415,808 ( 0.01%) next_byte if next_byte < 128 => return Some(next_byte as u32), . back_byte => back_byte, . }; . . // Multibyte case follows . // Decode from a byte combination out of: [x [y [z w]]] . let mut ch; . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. -- line 92 ---------------------------------------- 594,089 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs -------------------------------------------------------------------------------- Ir -- line 118 ---------------------------------------- . replacement, . Applicability::MaybeIncorrect, . ); . }, . ); . } . . impl LateLintPass<'_> for UpperCaseAcronyms { 140,430 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, it: &Item<'_>) { . // do not lint public items or in macros 42,129 ( 0.00%) if it.span.in_external_macro(cx.sess().source_map()) 75,054 ( 0.00%) || (self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(it.owner_id.def_id)) 611,019 ( 0.01%) => ???:::is_exported (10,722x) . { . return; . } 40 ( 0.00%) match it.kind { . ItemKind::TyAlias(ident, ..) | ItemKind::Struct(ident, ..) | ItemKind::Trait { ident, .. } => { . check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); . }, . ItemKind::Enum(ident, _, ref enumdef) => { . check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); . // check enum variants separately because again we only want to lint on private enums and . // the fn check_variant does not know about the vis of the enum of its variants . enumdef.variants.iter().for_each(|variant| { . check_ident(cx, &variant.ident, variant.hir_id, self.upper_case_acronyms_aggressive); . }); . }, . _ => {}, . } 112,344 ( 0.00%) } . } -------------------------------------------------------------------------------- -- 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, exp: &Expr<'tcx>) { 141,946 ( 0.00%) if let ExprKind::Call(maybe_path, [src, radix]) = &exp.kind 2,770 ( 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, . ); . } 523,440 ( 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() . } 553 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/permissions_set_readonly_false.rs -------------------------------------------------------------------------------- Ir -- line 27 ---------------------------------------- . "Checks for calls to `std::fs::Permissions.set_readonly` with argument `false`" . } . . declare_lint_pass!(PermissionsSetReadonlyFalse => [ . PERMISSIONS_SET_READONLY_FALSE, . ]); . . impl<'tcx> LateLintPass<'tcx> for PermissionsSetReadonlyFalse { 196,290 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 135,796 ( 0.00%) if let ExprKind::MethodCall(path, receiver, [arg], _) = &expr.kind 3,208 ( 0.00%) && let ExprKind::Lit(lit) = &arg.kind 427 ( 0.00%) && LitKind::Bool(false) == lit.node 369 ( 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 (61x) 8 ( 0.00%) && path.ident.name == sym::set_readonly . && cx . .typeck_results() . .expr_ty(receiver) . .is_diag_item(cx, sym::FsPermissions) . { . span_lint_and_then( . cx, . PERMISSIONS_SET_READONLY_FALSE, -- line 47 ---------------------------------------- -- line 51 ---------------------------------------- . diag.note("on Unix platforms this results in the file being world writable"); . diag.help( . "you can set the desired permissions using `PermissionsExt`. For more information, see\n\ . https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html", . ); . }, . ); . } 261,720 ( 0.00%) } . } 65 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,862 ( 0.00%) if let ExprKind::If(cond, then, None) = expr.kind . && let Some((c, op_node, l)) = get_const(cx, cond) . && let BinOpKind::Ne | BinOpKind::Lt = op_node . && let ExprKind::Block(block, None) = then.kind . && let Block { . stmts: . [ . Stmt { . kind: StmtKind::Expr(ex) | StmtKind::Semi(ex), -- line 52 ---------------------------------------- -- line 88 ---------------------------------------- . IMPLICIT_SATURATING_ADD, . expr.span, . "manual saturating add detected", . "use instead", . sugg, . app, . ); . } 523,440 ( 0.01%) } . } . . fn get_int_max(ty: Ty<'_>) -> Option { . use rustc_middle::ty::{Int, Uint}; . match ty.peel_refs().kind() { . Int(IntTy::I8) => i8::MAX.try_into().ok(), . Int(IntTy::I16) => i16::MAX.try_into().ok(), . Int(IntTy::I32) => i32::MAX.try_into().ok(), -- line 104 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/str_utils.rs -------------------------------------------------------------------------------- Ir -- line 239 ---------------------------------------- . /// 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"); . /// ``` 240 ( 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 118 ( 0.00%) if i != 0 { . s.push('_'); . } . s.extend(c.to_lowercase()); . } else { . s.push(c); . } . } 210 ( 0.00%) s 240 ( 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"); . /// ``` 55,845 ( 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(); . } 4,414 ( 0.00%) if c == '_' { . up = true; . continue; . } 2,908 ( 0.00%) if up { . up = false; . s.extend(c.to_uppercase()); . } else { . s.push(c); . } . } 1,968 ( 0.00%) s 55,845 ( 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 ---------------------------------------- 5,877 ( 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 { 261,720 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 132,432 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 30,642 ( 0.00%) && let LitKind::Str(_, _) | LitKind::Char(_) = lit.node . { 3,144 ( 0.00%) check_str(cx, lit.span, expr.hir_id); . } 327,150 ( 0.00%) } . } . . 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) { 6,288 ( 0.00%) if !span_is_local(span) { 366,565 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (1,572x) . 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 ---------------------------------------- 3,144 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . /// Allows access to the current `ImplicitCtxt` in a closure if one is available. . #[inline] . #[track_caller] . pub fn with_context_opt(f: F) -> R . where . F: for<'a, 'tcx> FnOnce(Option<&ImplicitCtxt<'a, 'tcx>>) -> R, . { . let context = TLV.get(); 409,882 ( 0.01%) if context.is_null() { . f(None) . } else { . // We could get an `ImplicitCtxt` pointer from another thread. . // Ensure that `ImplicitCtxt` is `DynSync`. . sync::assert_dyn_sync::>(); . 1,275,394 ( 0.02%) unsafe { f(Some(downcast(context))) } 33,201 ( 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/mod.rs:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} (1,581x) . } . } . . /// Allows access to the current `ImplicitCtxt`. . /// Panics if there is no `ImplicitCtxt` available. . #[inline] . pub fn with_context(f: F) -> R . where -- line 83 ---------------------------------------- 322,841 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/float_literal.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . pub fn new(conf: &'static Conf) -> Self { . Self { . const_literal_digits_threshold: conf.const_literal_digits_threshold, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for FloatLiteral { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 130,860 ( 0.00%) if let hir::ExprKind::Lit(lit) = expr.kind 20,428 ( 0.00%) && let LitKind::Float(sym, lit_float_ty) = lit.node . && let ty::Float(fty) = *cx.typeck_results().expr_ty(expr).kind() . { . let sym_str = sym.as_str(); . let formatter = FloatFormat::new(sym_str); . // Try to bail out if the float is for sure fine. . // If its within the 2 decimal digits of being out of precision we . // check if the parsed representation is the same as the string . // since we'll need the truncated string anyway. -- line 89 ---------------------------------------- -- line 168 ---------------------------------------- . "consider changing the type or truncating it to", . numeric_literal::format(&float_str, type_suffix, true), . Applicability::MachineApplicable, . ); . }, . ); . } . } 523,440 ( 0.01%) } . } . . #[must_use] . fn max_digits(fty: FloatTy) -> u32 { . match fty { . FloatTy::F16 => f16::DIGITS, . FloatTy::F32 => f32::DIGITS, . FloatTy::F64 => f64::DIGITS, -- line 184 ---------------------------------------- 10,214 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs -------------------------------------------------------------------------------- Ir -- line 136 ---------------------------------------- . . impl Lifetimes { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Lifetimes { 126,387 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 26,449 ( 0.00%) if let ItemKind::Fn { . ref sig, . generics, . body: id, . .. 28,086 ( 0.00%) } = item.kind . { . check_fn_inner(cx, sig, Some(id), None, generics, item.span, true, self.msrv, || { . is_from_proc_macro(cx, item) . }); . } else if let ItemKind::Impl(impl_) = &item.kind 15,680 ( 0.00%) && !item.span.from_expansion() 8,996 ( 0.00%) && !is_from_proc_macro(cx, item) . { . report_extra_impl_lifetimes(cx, impl_); . } 112,344 ( 0.00%) } . 1,152 ( 0.00%) fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly_trait_ref: &'tcx PolyTraitRef<'tcx>) { 256 ( 0.00%) if !poly_trait_ref.span.from_expansion() { 114 ( 0.00%) report_extra_trait_object_lifetimes(cx, poly_trait_ref.bound_generic_params, &poly_trait_ref.trait_ref); . } 1,024 ( 0.00%) } . 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 79,844 ( 0.00%) if let ImplItemKind::Fn(ref sig, id) = item.kind { 31,872 ( 0.00%) let report_extra_lifetimes = trait_ref_of_method(cx, item.owner_id).is_none(); 1,661,939 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (10,624x) 10,624 ( 0.00%) check_fn_inner( . cx, . sig, . Some(id), . None, 21,248 ( 0.00%) item.generics, 10,624 ( 0.00%) item.span, . report_extra_lifetimes, 10,624 ( 0.00%) self.msrv, . || is_from_proc_macro(cx, item), . ); . } 95,944 ( 0.00%) } . 28 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 16 ( 0.00%) if let TraitItemKind::Fn(ref sig, ref body) = item.kind { 11 ( 0.00%) let (body, trait_sig) = match *body { . TraitFn::Required(sig) => (None, Some(sig)), . TraitFn::Provided(id) => (Some(id), None), . }; 2 ( 0.00%) check_fn_inner( . cx, . sig, . body, . trait_sig, 2 ( 0.00%) item.generics, 1 ( 0.00%) item.span, . true, 1 ( 0.00%) self.msrv, . || is_from_proc_macro(cx, item), . ); . } 32 ( 0.00%) } . } . . #[expect(clippy::too_many_arguments)] . fn check_fn_inner<'tcx>( . cx: &LateContext<'tcx>, . sig: &'tcx FnSig<'_>, . body: Option, . trait_sig: Option<&[Option]>, . generics: &'tcx Generics<'_>, . span: Span, . report_extra_lifetimes: bool, . msrv: Msrv, . is_from_proc_macro: impl FnOnce() -> bool, . ) { 92,970 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) || has_where_lifetimes(cx, generics) { 194,672 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::has_where_lifetimes (8,964x) . return; . } . 17,930 ( 0.00%) let types = generics . .params . .iter() 6,376 ( 0.00%) .filter(|param| matches!(param.kind, GenericParamKind::Type { .. })); . . for typ in types { 3 ( 0.00%) if !typ.span.eq_ctxt(span) { . return; . } . . for pred in generics.bounds_for_param(typ.def_id) { 3 ( 0.00%) if pred.origin == PredicateOrigin::WhereClause { . // has_where_lifetimes checked that this predicate contains no lifetime. . continue; . } . . for bound in pred.bounds { . let mut visitor = RefVisitor::new(cx); . walk_param_bound(&mut visitor, bound); . if visitor.lts.iter().any(|lt| matches!(lt.kind, LifetimeKind::Param(_))) { -- line 242 ---------------------------------------- -- line 261 ---------------------------------------- . } . } . } . } . } . } . } . 116,543 ( 0.00%) let elidable = could_use_elision(cx, sig.decl, body, trait_sig, generics.params, msrv); 12,581,848 ( 0.16%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::could_use_elision (8,964x) . let has_elidable_lts = elidable . .as_ref() . .is_some_and(|(_, usages)| !usages.iter().any(|usage| !usage.ident.span.eq_ctxt(span))); . . // Only check is_from_proc_macro if we're about to emit a lint (it's an expensive check) 29,405 ( 0.00%) if (has_elidable_lts || report_extra_lifetimes) && is_from_proc_macro() { . return; . } . 6,814 ( 0.00%) if let Some((elidable_lts, usages)) = elidable . && has_elidable_lts . { . // async functions have usages whose spans point at the lifetime declaration which messes up . // suggestions . let include_suggestions = !sig.header.is_async(); . report_elidable_lifetimes(cx, generics, &elidable_lts, &usages, include_suggestions); . } . 6,813 ( 0.00%) if report_extra_lifetimes { 34,070 ( 0.00%) self::report_extra_lifetimes(cx, sig.decl, generics); 2,451,982 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_extra_lifetimes (6,813x) . } . } . 134,475 ( 0.00%) fn could_use_elision<'tcx>( . cx: &LateContext<'tcx>, . func: &'tcx FnDecl<'_>, . body: Option, . trait_sig: Option<&[Option]>, . named_generics: &'tcx [GenericParam<'_>], . msrv: Msrv, . ) -> Option<(Vec, Vec)> { . // There are two scenarios where elision works: -- line 301 ---------------------------------------- -- line 307 ---------------------------------------- . // check named LTs . let allowed_lts = allowed_lts_from(named_generics); . . // these will collect all the lifetimes for references in arg/return types . let mut input_visitor = RefVisitor::new(cx); . let mut output_visitor = RefVisitor::new(cx); . . // extract lifetimes in input argument types 8,965 ( 0.00%) for arg in func.inputs { . input_visitor.visit_ty_unambig(arg); . } . // extract lifetimes in output type 26,891 ( 0.00%) if let Return(ty) = func.output { . output_visitor.visit_ty_unambig(ty); . } . for lt in named_generics { . input_visitor.visit_generic_param(lt); . } . 35,860 ( 0.00%) if input_visitor.abort() || output_visitor.abort() { . return None; . } . 35,860 ( 0.00%) let input_lts = input_visitor.lts; 44,825 ( 0.00%) let output_lts = output_visitor.lts; . 53,790 ( 0.00%) if let Some(&[trait_sig]) = trait_sig . && non_elidable_self_type(cx, func, trait_sig, msrv) . { . return None; . } . 17,930 ( 0.00%) if let Some(body_id) = body { 53,784 ( 0.00%) let body = cx.tcx.hir_body(body_id); 632,649 ( 0.01%) => ???:::hir_body (8,964x) . 17,300 ( 0.00%) let first_ident = body.params.first().and_then(|param| param.pat.simple_ident()); 53,784 ( 0.00%) if non_elidable_self_type(cx, func, first_ident, msrv) { 238,808 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type (8,964x) . return None; . } . . let mut checker = BodyLifetimeChecker::new(cx); 26,892 ( 0.00%) if checker.visit_expr(body.value).is_break() { . return None; . } . } . . // check for lifetimes from higher scopes . for lt in input_lts.iter().chain(output_lts.iter()) { . if let Some(id) = named_lifetime(lt) . && !allowed_lts.contains(&id) . { . return None; . } . } . . // check for higher-ranked trait bounds 15,312 ( 0.00%) if !input_visitor.nested_elision_site_lts.is_empty() || !output_visitor.nested_elision_site_lts.is_empty() { . let allowed_lts: FxHashSet<_> = allowed_lts.iter().map(|id| cx.tcx.item_name(id.to_def_id())).collect(); . for lt in input_visitor.nested_elision_site_lts { . if allowed_lts.contains(<.ident.name) { . return None; . } . } . for lt in output_visitor.nested_elision_site_lts { . if allowed_lts.contains(<.ident.name) { -- line 371 ---------------------------------------- -- line 386 ---------------------------------------- . { . Some(def_id) . } else { . None . } . }) . .collect::>(); . 7,656 ( 0.00%) if elidable_lts.is_empty() { 7,656 ( 0.00%) return None; . } . . let usages = itertools::chain(input_lts, output_lts).collect(); . . Some((elidable_lts, usages)) 125,510 ( 0.00%) } . . fn allowed_lts_from(named_generics: &[GenericParam<'_>]) -> FxIndexSet { . named_generics . .iter() . .filter_map(|par| { 19,131 ( 0.00%) if let GenericParamKind::Lifetime { .. } = par.kind { . Some(par.def_id) . } else { . None . } . }) . .collect() . } . . // elision doesn't work for explicit self types before Rust 1.81, see rust-lang/rust#69064 35,856 ( 0.00%) fn non_elidable_self_type<'tcx>(cx: &LateContext<'tcx>, func: &FnDecl<'tcx>, ident: Option, msrv: Msrv) -> bool { 17,928 ( 0.00%) if let Some(ident) = ident 8,650 ( 0.00%) && ident.name == kw::SelfLower 22,788 ( 0.00%) && !func.implicit_self().has_implicit_self() 60,768 ( 0.00%) => ???:::implicit_self (7,596x) . && let Some(self_ty) = func.inputs.first() . && !msrv.meets(cx, msrvs::EXPLICIT_SELF_TYPE_ELISION) . { . let mut visitor = RefVisitor::new(cx); . visitor.visit_ty_unambig(self_ty); . . !visitor.all_lts().is_empty() . } else { . false . } 44,820 ( 0.00%) } . . /// Number of times each named lifetime occurs in the given slice. Returns a vector to preserve . /// relative order. . #[must_use] . fn named_lifetime_occurrences(lts: &[Lifetime]) -> Vec<(LocalDefId, usize)> { . let mut occurrences = Vec::new(); . for lt in lts { . if let Some(curr_def_id) = named_lifetime(lt) { -- line 439 ---------------------------------------- -- line 442 ---------------------------------------- . .find(|(prev_def_id, _)| *prev_def_id == curr_def_id) . { . pair.1 += 1; . } else { . occurrences.push((curr_def_id, 1)); . } . } . } 25,152 ( 0.00%) occurrences . } . . fn named_lifetime(lt: &Lifetime) -> Option { 67,106 ( 0.00%) match lt.kind { 16,780 ( 0.00%) LifetimeKind::Param(id) if !lt.is_anonymous() => Some(id), . _ => None, . } . } . . struct RefVisitor<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . lts: Vec, . nested_elision_site_lts: Vec, . unelided_trait_object_lifetime: bool, . } . . impl<'a, 'tcx> RefVisitor<'a, 'tcx> { . fn new(cx: &'a LateContext<'tcx>) -> Self { 152,456 ( 0.00%) Self { . cx, . lts: Vec::new(), . nested_elision_site_lts: Vec::new(), . unelided_trait_object_lifetime: false, . } . } . . fn all_lts(&self) -> Vec { -- line 477 ---------------------------------------- -- line 488 ---------------------------------------- . } . . impl<'tcx> Visitor<'tcx> for RefVisitor<'_, 'tcx> { . // for lifetimes as parameters of generics . fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) { . self.lts.push(*lifetime); . } . 27 ( 0.00%) fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>) { 3 ( 0.00%) let trait_ref = &poly_tref.trait_ref; 9 ( 0.00%) if let Some(id) = trait_ref.trait_def_id() 39 ( 0.00%) => ???:::trait_def_id (3x) 6 ( 0.00%) && lang_items::FN_TRAITS . .iter() 18 ( 0.00%) .any(|&item| self.cx.tcx.lang_items().get(item) == Some(id)) 360 ( 0.00%) => ???:::lang_items (9x) . { . let mut sub_visitor = RefVisitor::new(self.cx); . sub_visitor.visit_trait_ref(trait_ref); 3 ( 0.00%) self.nested_elision_site_lts.append(&mut sub_visitor.all_lts()); . } else { . walk_poly_trait_ref(self, poly_tref); . } 24 ( 0.00%) } . 227,144 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx Ty<'_, AmbigArg>) { 141,965 ( 0.00%) match ty.kind { . TyKind::FnPtr(&FnPtrTy { decl, .. }) => { . let mut sub_visitor = RefVisitor::new(self.cx); . sub_visitor.visit_fn_decl(decl); . self.nested_elision_site_lts.append(&mut sub_visitor.all_lts()); . }, . TyKind::TraitObject(bounds, lt) => { . if !lt.is_elided() { . self.unelided_trait_object_lifetime = true; . } . for bound in bounds { . self.visit_poly_trait_ref(bound); . } . }, 255,537 ( 0.00%) _ => walk_ty(self, ty), 2,705,725 ( 0.03%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: (17,932x) . } . } . } . . /// Are any lifetimes mentioned in the `where` clause? If so, we don't try to . /// reason about elision. 71,720 ( 0.00%) fn has_where_lifetimes<'tcx>(cx: &LateContext<'tcx>, generics: &'tcx Generics<'_>) -> bool { . for predicate in generics.predicates { 15 ( 0.00%) match *predicate.kind { . WherePredicateKind::RegionPredicate(..) => return true, . WherePredicateKind::BoundPredicate(ref pred) => { . // a predicate like F: Trait or F: for<'a> Trait<'a> . let mut visitor = RefVisitor::new(cx); . // walk the type F, it may not contain LT refs 3 ( 0.00%) walk_unambig_ty(&mut visitor, pred.bounded_ty); 3 ( 0.00%) if !visitor.all_lts().is_empty() { . return true; . } . // if the bounds define new lifetimes, they are fine to occur 6 ( 0.00%) let allowed_lts = allowed_lts_from(pred.bound_generic_params); . // now walk the bounds 3 ( 0.00%) for bound in pred.bounds { . walk_param_bound(&mut visitor, bound); . } . // and check that all lifetimes are allowed 14 ( 0.00%) for lt in visitor.all_lts() { . if let Some(id) = named_lifetime(<) 2 ( 0.00%) && !allowed_lts.contains(&id) . { . return true; . } . } . }, . } . } . false 71,720 ( 0.00%) } . . #[expect(clippy::struct_excessive_bools)] . struct Usage { . lifetime: Lifetime, . in_where_predicate: bool, . in_bounded_ty: bool, . in_generics_arg: bool, . lifetime_elision_impossible: bool, -- line 571 ---------------------------------------- -- line 583 ---------------------------------------- . . impl<'cx, 'tcx, F> LifetimeChecker<'cx, 'tcx, F> . where . F: NestedFilter<'tcx>, . { . fn new(cx: &'cx LateContext<'tcx>, generic_params: &'tcx [GenericParam<'_>]) -> LifetimeChecker<'cx, 'tcx, F> { . let map = generic_params . .iter() 24,830 ( 0.00%) .filter_map(|par| match par.kind { . GenericParamKind::Lifetime { . kind: LifetimeParamKind::Explicit, 483 ( 0.00%) } => Some((par.def_id, Vec::new())), . _ => None, . }) . .collect(); . 45,476 ( 0.00%) Self { . cx, . map, . where_predicate_depth: 0, . bounded_ty_depth: 0, . generic_args_depth: 0, . lifetime_elision_impossible: false, . phantom: std::marker::PhantomData, . } -- line 607 ---------------------------------------- -- line 613 ---------------------------------------- . &mut self, . hir_id: HirId, . bounded_ty: &'tcx Ty<'tcx>, . bounds: &'tcx [GenericBound<'tcx>], . bound_generic_params: &'tcx [GenericParam<'tcx>], . ) { . try_visit!(self.visit_id(hir_id)); . 96 ( 0.00%) self.bounded_ty_depth += 1; . try_visit!(self.visit_ty_unambig(bounded_ty)); 96 ( 0.00%) self.bounded_ty_depth -= 1; . . walk_list!(self, visit_param_bound, bounds); . walk_list!(self, visit_generic_param, bound_generic_params); . } . } . . impl<'tcx, F> Visitor<'tcx> for LifetimeChecker<'_, 'tcx, F> . where . F: NestedFilter<'tcx>, . { . type MaybeTyCtxt = TyCtxt<'tcx>; . type NestedFilter = F; . . // for lifetimes as parameters of generics . fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) { 85,420 ( 0.00%) if let LifetimeKind::Param(def_id) = lifetime.kind 93,529 ( 0.00%) && let Some(usages) = self.map.get_mut(&def_id) 84,672 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:, rustc_hash::FxBuildHasher>>::get_mut:: (7,056x) . { . usages.push(Usage { . lifetime: *lifetime, 3,532 ( 0.00%) in_where_predicate: self.where_predicate_depth != 0, 3,532 ( 0.00%) in_bounded_ty: self.bounded_ty_depth != 0, 4,815 ( 0.00%) in_generics_arg: self.generic_args_depth != 0, 1,766 ( 0.00%) lifetime_elision_impossible: self.lifetime_elision_impossible, . }); . } . } . 192 ( 0.00%) fn visit_where_predicate(&mut self, predicate: &'tcx WherePredicate<'tcx>) { 32 ( 0.00%) self.where_predicate_depth += 1; 32 ( 0.00%) if let &WherePredicateKind::BoundPredicate(WhereBoundPredicate { 32 ( 0.00%) bounded_ty, 64 ( 0.00%) bounds, 64 ( 0.00%) bound_generic_params, . origin: _, 64 ( 0.00%) }) = predicate.kind . { . self.visit_where_bound_predicate(predicate.hir_id, bounded_ty, bounds, bound_generic_params); . } else { . walk_where_predicate(self, predicate); . } 32 ( 0.00%) self.where_predicate_depth -= 1; 192 ( 0.00%) } . 6,516 ( 0.00%) fn visit_generic_args(&mut self, generic_args: &'tcx GenericArgs<'tcx>) -> Self::Result { 8,330 ( 0.00%) self.generic_args_depth += 1; . walk_generic_args(self, generic_args); 10,139 ( 0.00%) self.generic_args_depth -= 1; 6,516 ( 0.00%) } . . fn visit_fn_decl(&mut self, fd: &'tcx FnDecl<'tcx>) -> Self::Result { 14,371 ( 0.00%) self.lifetime_elision_impossible = !is_candidate_for_elision(fd); . walk_fn_decl(self, fd); 8,939 ( 0.00%) self.lifetime_elision_impossible = false; . } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 20,924 ( 0.00%) self.cx.tcx . } . } . . /// Check if `fd` supports function elision with an anonymous (or elided) lifetime, . /// and has a lifetime somewhere in its output type. . fn is_candidate_for_elision(fd: &FnDecl<'_>) -> bool { . struct V; . . impl Visitor<'_> for V { . type Result = ControlFlow; . . fn visit_lifetime(&mut self, lifetime: &Lifetime) -> Self::Result { 3,783 ( 0.00%) ControlFlow::Break(lifetime.is_elided() || lifetime.is_anonymous()) . } . } . 44,695 ( 0.00%) if fd.lifetime_elision_allowed() 6,286 ( 0.00%) && let Return(ret_ty) = fd.output 6,286 ( 0.00%) && walk_unambig_ty(&mut V, ret_ty).is_break() . { . // The first encountered input lifetime will either be one on `self`, or will be the only lifetime. 2,716 ( 0.00%) fd.inputs . .iter() . .find_map(|ty| walk_unambig_ty(&mut V, ty).break_value()) . .unwrap() . } else { . false . } . } . -- line 711 ---------------------------------------- -- line 717 ---------------------------------------- . let mut checker = LifetimeChecker::::new(cx, generic_params); . . for param in generic_params { . walk_generic_param(&mut checker, param); . } . . walk_trait_ref(&mut checker, trait_ref); . 228 ( 0.00%) for (def_id, usages) in checker.map { . if usages . .iter() . .all(|usage| usage.in_where_predicate && !usage.in_bounded_ty && !usage.in_generics_arg) . { . span_lint( . cx, . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the type", . ); . } . } . } . 68,140 ( 0.00%) fn report_extra_lifetimes<'tcx>(cx: &LateContext<'tcx>, func: &'tcx FnDecl<'_>, generics: &'tcx Generics<'_>) { 13,628 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, generics.params); . 20,442 ( 0.00%) walk_generics(&mut checker, generics); 231,171 ( 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::> (6,814x) . walk_fn_decl(&mut checker, func); . 27,256 ( 0.00%) for (def_id, usages) in checker.map { . if usages . .iter() . .all(|usage| usage.in_where_predicate && !usage.in_bounded_ty && !usage.in_generics_arg) . { . span_lint( . cx, . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the function definition", . ); . } . } 54,512 ( 0.00%) } . . fn report_extra_impl_lifetimes<'tcx>(cx: &LateContext<'tcx>, impl_: &'tcx Impl<'_>) { 13,494 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, impl_.generics.params); . 17,992 ( 0.00%) walk_generics(&mut checker, impl_.generics); 151,788 ( 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::> (4,498x) 13,494 ( 0.00%) if let Some(of_trait) = impl_.of_trait { . walk_trait_ref(&mut checker, &of_trait.trait_ref); . } 4,498 ( 0.00%) walk_unambig_ty(&mut checker, impl_.self_ty); 14,789 ( 0.00%) for &item in impl_.items { . walk_impl_item_ref(&mut checker, item); . } . 483 ( 0.00%) for (&def_id, usages) in &checker.map { . if usages . .iter() . .all(|usage| usage.in_where_predicate && !usage.in_bounded_ty && !usage.in_generics_arg) . { . span_lint( . cx, . EXTRA_UNUSED_LIFETIMES, . cx.tcx.def_span(def_id), . "this lifetime isn't used in the impl", . ); . } . } . 1,449 ( 0.00%) report_elidable_impl_lifetimes(cx, impl_, &checker.map); . } . . // An `impl` lifetime is elidable if it satisfies the following conditions: . // - It is used exactly once. . // - That single use is not in a `WherePredicate`. . fn report_elidable_impl_lifetimes<'tcx>( . cx: &LateContext<'tcx>, . impl_: &'tcx Impl<'_>, . map: &FxIndexMap>, . ) { 22,490 ( 0.00%) let (elidable_lts, usages): (Vec<_>, Vec<_>) = map . .iter() . .filter_map(|(def_id, usages)| { 974 ( 0.00%) if let [ . Usage { . lifetime, . in_where_predicate: false, . lifetime_elision_impossible: false, . .. . }, . ] = usages.as_slice() . { . Some((def_id, lifetime)) . } else { . None . } . }) 8,996 ( 0.00%) .unzip(); 161,676 ( 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> (4,498x) . 4,498 ( 0.00%) if elidable_lts.is_empty() { . return; . } . 12 ( 0.00%) report_elidable_lifetimes(cx, impl_.generics, &elidable_lts, &usages, true); 12,844 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_elidable_lifetimes (2x) . } . . #[derive(Copy, Clone)] . enum ElidableUsage { . /// Used in a ref (`&'a T`), can be removed . Ref(Span), . /// Used as a generic param (`T<'a>`) or an impl lifetime (`impl T + 'a`), can be replaced . /// with `'_` . Other(Span), . } . . /// Generate diagnostic messages for elidable lifetimes. 30 ( 0.00%) fn report_elidable_lifetimes( . cx: &LateContext<'_>, . generics: &Generics<'_>, . elidable_lts: &[LocalDefId], . usages: &[Lifetime], . include_suggestions: bool, . ) { . let lts = elidable_lts . .iter() . // In principle, the result of the call to `Node::ident` could be `unwrap`ped, as `DefId` should refer to a . // `Node::GenericParam`. 8 ( 0.00%) .filter_map(|&def_id| cx.tcx.hir_node_by_def_id(def_id).ident()) 28 ( 0.00%) => ???:::ident (2x) . .format(", "); . . let elidable_usages: Vec = usages . .iter() . .filter(|usage| named_lifetime(usage).is_some_and(|id| elidable_lts.contains(&id))) 24 ( 0.00%) .map(|usage| match cx.tcx.parent_hir_node(usage.hir_id) { 216 ( 0.00%) => ???:::parent_hir_node (2x) . Node::Ty(Ty { . kind: TyKind::Ref(..), .. . }) => ElidableUsage::Ref(usage.ident.span), . _ => ElidableUsage::Other(usage.ident.span), . }) . .collect(); . . let lint = if elidable_usages . .iter() 2 ( 0.00%) .any(|usage| matches!(usage, ElidableUsage::Other(_))) . { . ELIDABLE_LIFETIME_NAMES . } else { . NEEDLESS_LIFETIMES . }; . 14 ( 0.00%) span_lint_and_then( 2,170 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::, alloc::string::String, clippy_lints::lifetimes::report_elidable_lifetimes::{closure#6}> (2x) . cx, . lint, . elidable_lts . .iter() 2 ( 0.00%) .map(|<| cx.tcx.def_span(lt)) . .chain(usages.iter().filter_map(|usage| { 4 ( 0.00%) if let LifetimeKind::Param(def_id) = usage.kind . && elidable_lts.contains(&def_id) . { 2 ( 0.00%) return Some(usage.ident.span); . } . . None . })) . .collect_vec(), 6 ( 0.00%) format!("the following explicit lifetimes could be elided: {lts}"), 16 ( 0.00%) |diag| { . if !include_suggestions { . return; . } . . if let Some(suggestions) = elision_suggestions(cx, generics, elidable_lts, &elidable_usages) { . diag.multipart_suggestion("elide the lifetimes", suggestions, Applicability::MachineApplicable); . } . }, . ); 16 ( 0.00%) } . . fn elision_suggestions( . cx: &LateContext<'_>, . generics: &Generics<'_>, . elidable_lts: &[LocalDefId], . usages: &[ElidableUsage], . ) -> Option> { . let explicit_params = generics -- line 903 ---------------------------------------- -- line 971 ---------------------------------------- . } . . struct BodyLifetimeChecker<'tcx> { . tcx: TyCtxt<'tcx>, . } . . impl<'tcx> BodyLifetimeChecker<'tcx> { . fn new(cx: &LateContext<'tcx>) -> Self { 8,964 ( 0.00%) Self { tcx: cx.tcx } . } . } . . impl<'tcx> Visitor<'tcx> for BodyLifetimeChecker<'tcx> { . type Result = ControlFlow<()>; . type NestedFilter = middle_nested_filter::OnlyBodies; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.tcx . } . // for lifetimes as parameters of generics . fn visit_lifetime(&mut self, lifetime: &'tcx Lifetime) -> ControlFlow<()> { 3,298 ( 0.00%) if !lifetime.is_anonymous() && lifetime.ident.name != kw::StaticLifetime { . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) . } . } 256,176 ( 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) => { 9,045 ( 0.00%) v.insert(attr.span); 9,044 ( 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"); . }); . }, . } . } . 430,760 ( 0.01%) fn check_duplicated_attr( . cx: &EarlyContext<'_>, . attr: &MetaItem, . attr_paths: &mut FxHashMap, . parent: &mut Vec, . ) { 78,320 ( 0.00%) if attr.span.from_expansion() { . return; . } 167,960 ( 0.00%) let attr_path = if let Some(ident) = attr.ident() { 220,977 ( 0.00%) => ???:::ident (24,553x) 67,184 ( 0.00%) ident.name . } else { . Symbol::intern(&path_to_string(&attr.path)) . }; 240,296 ( 0.00%) if let Some(ident) = attr.ident() { 220,977 ( 0.00%) => ???:::ident (24,553x) . 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; . } . } 2 ( 0.00%) if let Some(value) = attr.value_str() { . emit_if_duplicated( . cx, . attr, . attr_paths, 15 ( 0.00%) format!("{}:{attr_path}={value}", parent.iter().join(":")), 24 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (1x) . ); 72,332 ( 0.00%) } else if let Some(sub_attrs) = attr.meta_item_list() { 54,254 ( 0.00%) => ???:::meta_item_list (9,044x) 9,039 ( 0.00%) parent.push(attr_path); 27,117 ( 0.00%) for sub_attr in sub_attrs { . if let Some(meta) = sub_attr.meta_item() { 54,234 ( 0.00%) check_duplicated_attr(cx, meta, attr_paths, parent); 14,144,609 ( 0.18%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr'2 (9,039x) . } . } . parent.pop(); . } else { 108,528 ( 0.00%) emit_if_duplicated(cx, attr, attr_paths, format!("{}:{attr_path}", parent.iter().join(":"))); 120 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (5x) . } 313,280 ( 0.00%) } . . pub fn check(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . let mut attr_paths = FxHashMap::default(); . . for attr in attrs { 452,685 ( 0.01%) if let Some(meta) = attr.meta() { 16,142,827 ( 0.20%) => ???:::meta (30,295x) 150,605 ( 0.00%) check_duplicated_attr(cx, &meta, &mut attr_paths, &mut Vec::new()); 16,804,074 ( 0.21%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr (30,121x) . } . } . } 27,123 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . derive_src: Option, . . // When a macro is disallowed in an early pass, it's stored . // and emitted during the late pass. This happens for attributes. . early_macro_cache: AttrStorage, . } . . impl DisallowedMacros { 6 ( 0.00%) pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf, early_macro_cache: AttrStorage) -> Self { 12 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_macros, . PathNS::Macro, . |def_kind| matches!(def_kind, DefKind::Macro(_)), . "macro", . false, . ); 6 ( 0.00%) Self { 4 ( 0.00%) disallowed, . seen: FxHashSet::default(), . derive_src: None, . early_macro_cache, . } 5 ( 0.00%) } . 2,463,856 ( 0.03%) fn check(&mut self, cx: &LateContext<'_>, span: Span, derive_src: Option) { 307,982 ( 0.00%) if self.disallowed.is_empty() { . return; . } . . for mac in macro_backtrace(span) { . if !self.seen.insert(mac.expn) { . return; . } . -- line 107 ---------------------------------------- -- line 119 ---------------------------------------- . msg, . add_note, . ); . } else { . span_lint_and_then(cx, DISALLOWED_MACROS, mac.span, msg, add_note); . } . } . } 2,463,856 ( 0.03%) } . } . . impl LateLintPass<'_> for DisallowedMacros { 6 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'_>) { . // once we check a crate in the late pass we can emit the early pass lints . if let Some(attr_spans) = self.early_macro_cache.clone().0.get() { . for span in attr_spans { 151,475 ( 0.00%) self.check(cx, *span, None); 545,310 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (30,295x) . } . } 7 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 327,150 ( 0.00%) self.check(cx, expr.span, None); 1,177,740 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (65,430x) . // `$t + $t` can have the context of $t, check also the span of the binary operator 137,383 ( 0.00%) if let ExprKind::Binary(op, ..) = expr.kind { 26,092 ( 0.00%) self.check(cx, op.span, None); 117,414 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (6,523x) . } . } . . fn check_stmt(&mut self, cx: &LateContext<'_>, stmt: &Stmt<'_>) { 4,764 ( 0.00%) self.check(cx, stmt.span, None); 21,438 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (1,191x) . } . . fn check_ty(&mut self, cx: &LateContext<'_>, ty: &Ty<'_, AmbigArg>) { 249,396 ( 0.00%) self.check(cx, ty.span, None); 1,122,282 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (62,349x) . } . . fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { 62,132 ( 0.00%) self.check(cx, pat.span, None); 279,594 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (15,533x) . } . 140,430 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 56,172 ( 0.00%) self.check(cx, item.span, self.derive_src); 252,774 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (14,043x) 70,215 ( 0.00%) self.check(cx, item.vis_span, None); 252,774 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (14,043x) . 42,129 ( 0.00%) if matches!( 14,043 ( 0.00%) item.kind, . ItemKind::Struct(..) | ItemKind::Enum(..) | ItemKind::Union(..) 14 ( 0.00%) ) && macro_backtrace(item.span).all(|m| !matches!(m.kind, MacroKind::Derive)) . { 2,830 ( 0.00%) self.derive_src = Some(item.owner_id); . } 112,344 ( 0.00%) } . . fn check_foreign_item(&mut self, cx: &LateContext<'_>, item: &ForeignItem<'_>) { 378 ( 0.00%) self.check(cx, item.span, None); 972 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (54x) 432 ( 0.00%) self.check(cx, item.vis_span, None); 972 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (54x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &ImplItem<'_>) { 59,965 ( 0.00%) self.check(cx, item.span, None); 215,874 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (11,993x) 30,860 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind { 27,496 ( 0.00%) self.check(cx, vis_span, None); 123,732 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (6,874x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { 16 ( 0.00%) self.check(cx, item.span, None); 72 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (4x) . } . . fn check_path(&mut self, cx: &LateContext<'_>, path: &Path<'_>, _: HirId) { 318,384 ( 0.00%) self.check(cx, path.span, None); 1,432,728 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (79,596x) . } . } 4,245 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 74,760 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 32,039 ( 0.00%) if let FnKind::Fn(_, _, Fn { generics, .. }) = kind 10,679 ( 0.00%) && !generics.params.is_empty() 3 ( 0.00%) && !generics.where_clause.predicates.is_empty() . { . let mut generic_params_with_bounds = FxHashMap::default(); . . for param in &generics.params { 3 ( 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 { 6 ( 0.00%) match &clause.kind { . WherePredicateKind::BoundPredicate(pred) => { 5 ( 0.00%) if (!pred.bound_generic_params.is_empty() || !pred.bounds.is_empty()) 15 ( 0.00%) && let Some(Some(bound_span)) = pred . .bounded_ty . .span 9 ( 0.00%) .with_source_text(cx, |src| generic_params_with_bounds.get(src)) 1,419 ( 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}> (3x) . { . 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); . } . }, . } . } 3 ( 0.00%) } 85,440 ( 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 ---------------------------------------- 9 ( 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 { 334,770 ( 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 { 1,068,248 ( 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. 105,943 ( 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])* 82 ( 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 ---------------------------------------- 367,371 ( 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 { 112,256 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { . // Handle module items: push state for their children. 43,324 ( 0.00%) match &item.kind { . ItemKind::Mod(.., ModKind::Loaded(_, Inline::No { .. }, mod_spans, ..)) => { 1,535 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); 45,743 ( 0.00%) => ???:::lookup_source_file (307x) . self.module_stack.push(is_mod_rs(&file)); . return; . }, . ItemKind::Mod(..) => { . // Inline module or unloaded — children are not in a root file. . self.module_stack.push(false); . return; . }, . _ => {}, . } . . // Skip items from macro expansion. 27,450 ( 0.00%) if item.span.from_expansion() { . return; . } . . // Only lint inside mod.rs files (not at crate root depth). 20,732 ( 0.00%) if !self.module_stack.last().copied().unwrap_or(false) { . return; . } . 642 ( 0.00%) let Some(kind) = definition_kind(item) else { . return; . }; . 188 ( 0.00%) let help = if let Some(ident) = item.kind.ident() { 329 ( 0.00%) format!("move {kind} `{ident}` to a dedicated file") . } else { 501 ( 0.00%) format!("move the {kind} to a dedicated file") . }; . . span_lint_and_help( . cx, . DEFINITION_IN_MODULE_ROOT, 214 ( 0.00%) item.span, . "definition in module root file", 428 ( 0.00%) None, . help, . ); 112,256 ( 0.00%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &ast::Item) { 112,256 ( 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 { 614 ( 0.00%) if let FileName::Real(name) = &file.name { . name.local_path() 307 ( 0.00%) .and_then(|p| p.file_name()) 62,415 ( 0.00%) => ???:::file_name (307x) . .is_some_and(|n| n == "mod.rs") . } else { . false . } . } 1,793 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . . declare_lint_pass!(SuspiciousImpl => [ . SUSPICIOUS_ARITHMETIC_IMPL, . SUSPICIOUS_OP_ASSIGN_IMPL, . ]); . . impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 261,720 ( 0.00%) match expr.kind { 6,523 ( 0.00%) hir::ExprKind::Binary(op, _, _) => { 26,092 ( 0.00%) check_expr_inner(cx, expr, op.node, op.span); . }, . hir::ExprKind::AssignOp(op, _, _) => { . check_expr_inner(cx, expr, op.node.into(), op.span); . }, . _ => {}, . } . } . } . 45,661 ( 0.00%) fn check_expr_inner<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, binop: hir::BinOpKind, span: Span) { . if let Some((binop_trait_lang, op_assign_trait_lang)) = binop_traits(binop) 21,924 ( 0.00%) && let Some(binop_trait_id) = cx.tcx.lang_items().get(binop_trait_lang) 125,280 ( 0.00%) => ???:::lang_items (3,132x) 12,528 ( 0.00%) && let Some(op_assign_trait_id) = cx.tcx.lang_items().get(op_assign_trait_lang) 125,280 ( 0.00%) => ???:::lang_items (3,132x) . . // Check for more than one binary operation in the implemented function . // Linting when multiple operations are involved can result in false positives 12,528 ( 0.00%) && let parent_fn = cx.tcx.hir_get_parent_item(expr.hir_id).def_id 59,508 ( 0.00%) => ???:::hir_get_parent_item (3,132x) 9,396 ( 0.00%) && let hir::Node::ImplItem(impl_item) = cx.tcx.hir_node_by_def_id(parent_fn) 12,520 ( 0.00%) && let hir::ImplItemKind::Fn(_, body_id) = impl_item.kind 6,256 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 212,164 ( 0.00%) => ???:::hir_body (3,128x) 12,512 ( 0.00%) && let parent_fn = cx.tcx.hir_get_parent_item(expr.hir_id) 59,432 ( 0.00%) => ???:::hir_get_parent_item (3,128x) 12,512 ( 0.00%) && let Some(trait_ref) = trait_ref_of_method(cx, parent_fn) 487,412 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (3,128x) . && let trait_id = trait_ref.path.res.def_id() . && ![binop_trait_id, op_assign_trait_id].contains(&trait_id) . && let Some(&(_, lint)) = [ . (&BINOP_TRAITS, SUSPICIOUS_ARITHMETIC_IMPL), . (&OP_ASSIGN_TRAITS, SUSPICIOUS_OP_ASSIGN_IMPL), . ] . .iter() . .find(|&(ts, _)| ts.iter().any(|&t| Some(trait_id) == cx.tcx.lang_items().get(t))) -- line 95 ---------------------------------------- -- line 101 ---------------------------------------- . span, . format!( . "suspicious use of `{}` in `{}` impl", . binop.as_str(), . cx.tcx.item_name(trait_id) . ), . ); . } 52,184 ( 0.00%) } . . fn count_binops(expr: &hir::Expr<'_>) -> u32 { . let mut count = 0u32; . let _: Option = for_each_expr_without_closures(expr, |e| { . if matches!( . e.kind, . hir::ExprKind::Binary(..) . | hir::ExprKind::Unary(hir::UnOp::Not | hir::UnOp::Neg, _) -- line 117 ---------------------------------------- 34,962 ( 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 { 85,656 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . for w in block.stmts.windows(2) { 2,376 ( 0.00%) if let (StmtKind::Expr(first), StmtKind::Expr(second) | StmtKind::Semi(second)) = (&w[0].kind, &w[1].kind) { . check_missing_else(cx, first, second); . } . } 85,656 ( 0.00%) } . 523,789 ( 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); 598,616 ( 0.01%) } . } . . /// Implementation of the `SUSPICIOUS_ASSIGNMENT_FORMATTING` lint. . fn check_assign(cx: &EarlyContext<'_>, expr: &Expr) { 224,481 ( 0.00%) if let ExprKind::Assign(ref lhs, ref rhs, _) = expr.kind 33 ( 0.00%) && !lhs.span.from_expansion() 6 ( 0.00%) && !rhs.span.from_expansion() . { 8 ( 0.00%) let eq_span = lhs.span.between(rhs.span); 214 ( 0.00%) => ???:::between (2x) 4 ( 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) { 149,632 ( 0.00%) if let ExprKind::Binary(ref binop, ref lhs, ref rhs) = expr.kind 37,596 ( 0.00%) && !lhs.span.from_expansion() && !rhs.span.from_expansion() . // span between BinOp LHS and RHS 24,036 ( 0.00%) && let binop_span = lhs.span.between(rhs.span) 642,963 ( 0.01%) => ???:::between (6,009x) . // if RHS is an UnOp 12,018 ( 0.00%) && let ExprKind::Unary(op, ref un_rhs) = rhs.kind . // from UnOp operator to UnOp operand . && let unop_operand_span = rhs.span.until(un_rhs.span) . && let Some(binop_snippet) = snippet_opt(cx, binop_span) . && let Some(unop_operand_snippet) = snippet_opt(cx, unop_operand_span) . && let binop_str = binop.node.as_str() . // no space after BinOp operator and space after UnOp operator . && binop_snippet.ends_with(binop_str) && unop_operand_snippet.ends_with(' ') . { -- line 209 ---------------------------------------- -- 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) { 136,589 ( 0.00%) if let ExprKind::If(_, then, Some(else_)) = &expr.kind 1 ( 0.00%) && (is_block(else_) || is_if(else_)) 5 ( 0.00%) && !then.span.from_expansion() && !else_.span.from_expansion() 4 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . . // workaround for rust-lang/rust#43081 4 ( 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) 4 ( 0.00%) && let else_span = then.span.between(else_.span) 107 ( 0.00%) => ???:::between (1x) . . // the snippet should look like " else \n " with maybe comments anywhere . // it’s bad when there is a ‘\n’ after the “else” 8 ( 0.00%) && let Some(else_snippet) = snippet_opt(cx, else_span) 448 ( 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> (1x) 8 ( 0.00%) && let Some((pre_else, post_else)) = else_snippet.split_once("else") 371 ( 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> (1x) 2 ( 0.00%) && !else_snippet.contains('/') 6 ( 0.00%) && let Some((_, post_else_post_eol)) = post_else.split_once('\n') 44 ( 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:: (1x) . { . // 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) { 136,584 ( 0.00%) if let ExprKind::Array(ref array) = expr.kind { . for element in array { 294 ( 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 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 { 2 ( 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(..)) . } 6,532 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs -------------------------------------------------------------------------------- Ir -- line 879 ---------------------------------------- . Self: Sized, . F: FnMut(Self::Item), . { . #[inline] . fn call(mut f: impl FnMut(T)) -> impl FnMut((), T) { . move |(), item| f(item) . } . 56,860 ( 0.00%) self.fold((), call(f)); 1,086,923 ( 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}> (23,489x) . } . . /// 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:?}"); . } . 29,552 ( 0.00%) FromIterator::from_iter(self) 390,486 ( 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}>> (4,498x) . } . . /// 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| { 9 ( 0.00%) let p = predicate(&**x); . *true_count += p as usize; . !p . } . } . . #[inline] . fn is_true(predicate: &mut impl FnMut(&T) -> bool) -> impl FnMut(&&mut T) -> bool + '_ { 27 ( 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); . true_count += 1; -- line 2362 ---------------------------------------- -- line 2474 ---------------------------------------- . /// } else { . /// ControlFlow::Break(prev) . /// } . /// }); . /// assert_eq!(triangular, ControlFlow::Continue(435)); . /// ``` . #[inline] . #[stable(feature = "iterator_try_fold", since = "1.27.0")] 289,824 ( 0.00%) 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; 3,441,699 ( 0.04%) while let Some(x) = self.next() { 2,518,518 ( 0.03%) => ???:::next (40,833x) 1,330,202 ( 0.02%) accum = f(accum, x)?; . } . try { accum } 193,330 ( 0.00%) } . . /// 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; 172,186 ( 0.00%) while let Some(x) = self.next() { 74,187 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/percent-encoding-2.3.2/src/lib.rs:::next (548x) 69,638 ( 0.00%) accum = f(accum, x); . } 1,002,705 ( 0.01%) 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 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| { 259 ( 0.00%) if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) } . } . } . . self.try_fold((), check(predicate)).break_value() . } . . /// Applies function to the elements of iterator and returns . /// the first non-none result. -- line 2971 ---------------------------------------- -- 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 { 52,669 ( 0.00%) move |(), x| match f(x) { . Some(x) => ControlFlow::Break(x), . None => ControlFlow::Continue(()), . } . } . 25,683 ( 0.00%) self.try_fold((), check(f)).break_value() 5,500,766 ( 0.07%) => /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> (24,152x) . } . . /// 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 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] 35,984 ( 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); 44,980 ( 0.00%) unzipped 40,482 ( 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, . { 6 ( 0.00%) self.eq_by(other, |x, y| x == y) 5 ( 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:::eq (1x) . } . . /// 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] 1 ( 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(()) } . } . } . 4 ( 0.00%) SpecIterEq::spec_iter_eq(self, other.into_iter(), compare(eq)) 2 ( 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 4202 ---------------------------------------- . B: Iterator, . { . move |x| match b.next() { . None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)), . Some(y) => f(x, y).map_break(ControlFlow::Break), . } . } . 2 ( 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 ---------------------------------------- 1,822,243 ( 0.02%) -------------------------------------------------------------------------------- -- 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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . // Skip expanded code, as we have no control over it anyway... 130,860 ( 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 = 40,964 ( 0.00%) |expr: &Expr<'_>| !expr.span.from_expansion() && is_none_expr(cx, peel_hir_expr_refs(expr).0); 255,224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (5,852x) 29,260 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (5,852x) . 53,826 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 131,688 ( 0.00%) if let ExprKind::Binary(op, left_side, right_side) = e.kind { . // All other comparisons (e.g. `>= None`) have special meaning wrt T 15,307 ( 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` 5,852 ( 0.00%) let scrutinee = match ( 5,852 ( 0.00%) is_none_ctor(left_side) && is_ty_option(right_side), 5,852 ( 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, . ); . } 523,440 ( 0.01%) } . } 4,492 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs -------------------------------------------------------------------------------- Ir -- line 110 ---------------------------------------- . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); . } . 27,972 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>) { 11,988 ( 0.00%) let ExprKind::Call(func, args) = expr.kind else { return }; . 23,976 ( 0.00%) if let ExprKind::Path(qpath) = func.kind 23,976 ( 0.00%) && let Some(def_id) = cx.typeck_results().qpath_res(&qpath, func.hir_id).opt_def_id() 232,528 ( 0.00%) => ???:::qpath_res (3,996x) 43,897 ( 0.00%) && cx.tcx.trait_of_assoc(def_id) == cx.tcx.lang_items().clone_trait() 518,210 ( 0.01%) => ???:::trait_of_assoc (3,993x) 159,720 ( 0.00%) => ???:::lang_items (3,993x) . && 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, . ); . } 31,968 ( 0.00%) } 15,981 ( 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/const_ptr.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . match (ptr).guaranteed_eq(null_mut()) { . Some(res) => res, . // To remain maximally conservative, we stop execution when we don't . // know whether the pointer is null or not. . // We can *not* return `false` here, that would be unsound in `NonNull::new`! . None => panic!("null-ness of this pointer cannot be determined in const context"), . } . } else { 1,071,739 ( 0.01%) ptr.addr() == 0 . } . ) . } . . /// Casts to a pointer of another type. . #[stable(feature = "ptr_cast", since = "1.38.0")] . #[rustc_const_stable(feature = "const_ptr_cast", since = "1.38.0")] . #[rustc_diagnostic_item = "const_ptr_cast"] -- line 46 ---------------------------------------- -- line 262 ---------------------------------------- . /// [`as_uninit_ref`]: #method.as_uninit_ref . /// [`as_ref_unchecked`]: #method.as_ref_unchecked . #[stable(feature = "ptr_as_ref", since = "1.9.0")] . #[rustc_const_stable(feature = "const_ptr_is_null", since = "1.84.0")] . #[inline] . pub const unsafe fn as_ref<'a>(self) -> Option<&'a T> { . // SAFETY: the caller must guarantee that `self` is valid . // for a reference if it isn't null. 202,087 ( 0.00%) if self.is_null() { None } else { unsafe { Some(&*self) } } . } . . /// Returns a shared reference to the value behind the pointer. . /// If the pointer may be null or the value may be uninitialized, [`as_uninit_ref`] must be used instead. . /// If the pointer may be null, but the value is known to have been initialized, [`as_ref`] must be used instead. . /// . /// [`as_ref`]: #method.as_ref . /// [`as_uninit_ref`]: #method.as_uninit_ref -- line 278 ---------------------------------------- -- line 381 ---------------------------------------- . ( . this: *const () = self as *const (), . count: isize = count, . size: usize = size_of::(), . ) => runtime_offset_nowrap(this, count, size) . ); . . // SAFETY: the caller must uphold the safety contract for `offset`. 395 ( 0.00%) unsafe { intrinsics::offset(self, count) } . } . . /// Adds a signed 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 [offset][pointer::offset] on it. See that method for documentation -- line 397 ---------------------------------------- -- line 615 ---------------------------------------- . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const unsafe fn offset_from(self, origin: *const T) -> isize . where . T: Sized, . { . let pointee_size = size_of::(); . assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); . // SAFETY: the caller must uphold the safety contract for `ptr_offset_from`. 40,788 ( 0.00%) unsafe { intrinsics::ptr_offset_from(self, origin) } . } . . /// Calculates the distance between two pointers within the same allocation. The returned value is in . /// units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`offset_from`][pointer::offset_from] on it. See that method for . /// documentation and safety requirements. -- line 631 ---------------------------------------- -- line 725 ---------------------------------------- . this: *const () = self as *const (), . origin: *const () = origin as *const (), . ) => runtime_ptr_ge(this, origin) . ); . . let pointee_size = size_of::(); . assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); . // SAFETY: the caller must uphold the safety contract for `ptr_offset_from_unsigned`. 253,963 ( 0.00%) unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } . } . . /// Calculates the distance between two pointers within the same allocation, *where it's known that . /// `self` is equal to or greater than `origin`*. The returned value is in . /// units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`offset_from_unsigned`][pointer::offset_from_unsigned] on it. -- line 741 ---------------------------------------- -- line 863 ---------------------------------------- . ( . this: *const () = self as *const (), . count: usize = count, . size: usize = size_of::(), . ) => runtime_add_nowrap(this, count, size) . ); . . // SAFETY: the caller must uphold the safety contract for `offset`. 362,257 ( 0.00%) unsafe { intrinsics::offset(self, count) } . } . . /// Adds an unsigned offset in bytes to a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [add][pointer::add] on it. See that method for documentation -- line 879 ---------------------------------------- -- line 1590 ---------------------------------------- . #[diagnostic::on_const( . message = "pointers cannot be reliably compared during const eval", . note = "see issue #53020 for more information" . )] . impl PartialEq for *const T { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn eq(&self, other: &*const T) -> bool { 140,387 ( 0.00%) *self == *other . } . } . . /// Pointer equality is an equivalence relation. . #[stable(feature = "rust1", since = "1.0.0")] . #[diagnostic::on_const( . message = "pointers cannot be reliably compared during const eval", . note = "see issue #53020 for more information" -- line 1606 ---------------------------------------- 99,177 ( 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_map.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[derive(Clone)] . pub struct FilterMap { . iter: I, . f: F, . } . impl FilterMap { . pub(in crate::iter) const fn new(iter: I, f: F) -> FilterMap { 237,474 ( 0.00%) FilterMap { iter, f } . } . } . . #[stable(feature = "core_impl_debug", since = "1.9.0")] . impl fmt::Debug for FilterMap { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . f.debug_struct("FilterMap").field("iter", &self.iter).finish() . } . } . . fn filter_map_fold( . mut f: impl FnMut(T) -> Option, . mut fold: impl FnMut(Acc, B) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { 46,986 ( 0.00%) move |acc, item| match f(item) { 2 ( 0.00%) Some(x) => fold(acc, x), . None => acc, . } . } . . fn filter_map_try_fold<'a, T, B, Acc, R: Try>( . f: &'a mut impl FnMut(T) -> Option, . mut fold: impl FnMut(Acc, B) -> R + 'a, . ) -> impl FnMut(Acc, T) -> R + 'a { 456 ( 0.00%) move |acc, item| match f(item) { . Some(x) => fold(acc, x), . None => try { acc }, . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for FilterMap . where . F: FnMut(I::Item) -> Option, . { . type Item = B; . . #[inline] . fn next(&mut self) -> Option { 610 ( 0.00%) self.iter.find_map(&mut self.f) . } . . #[inline] . fn next_chunk( . &mut self, . ) -> Result<[Self::Item; N], array::IntoIter> { . let mut array: [MaybeUninit; N] = [const { MaybeUninit::uninit() }; N]; . -- line 72 ---------------------------------------- -- line 130 ---------------------------------------- . . #[inline] . fn try_fold(&mut self, init: Acc, fold: Fold) -> R . where . Self: Sized, . Fold: FnMut(Acc, Self::Item) -> R, . R: Try, . { 6,770 ( 0.00%) self.iter.try_fold(init, filter_map_try_fold(&mut self.f, fold)) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 54,246 ( 0.00%) self.iter.fold(init, filter_map_fold(self.f, fold)) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl DoubleEndedIterator for FilterMap . where . F: FnMut(I::Item) -> Option, . { -- line 154 ---------------------------------------- 132,398 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 146,931 ( 0.00%) if let ExprKind::Call(box_from_raw, [arg]) = expr.kind 23,262 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_from_raw.kind 3,322 ( 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", . ); . } 523,440 ( 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: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs -------------------------------------------------------------------------------- Ir -- line 153 ---------------------------------------- . where . I: Iterator>, . for<'a> F: FnMut(GenericShunt<'a, I, R>) -> U, . R: Residual, . { . // FIXME(#11084): we might be able to get rid of GenericShunt in favor of . // Iterator::scan, as performance should be comparable . 27,583 ( 0.00%) let mut residual = None; . let shunt = GenericShunt { iter, residual: &mut residual }; . let value = f(shunt); 55,166 ( 0.00%) match residual { . Some(r) => FromResidual::from_residual(r), 79,394 ( 0.00%) None => Try::from_output(value), . } . } . . impl Iterator for GenericShunt<'_, I, R> . where . I: Iterator>, . { . type Item = ::Output; . 503,066 ( 0.01%) fn next(&mut self) -> Option { . self.try_for_each(ControlFlow::Break).break_value() 454,158 ( 0.01%) } . . fn size_hint(&self) -> (usize, Option) { . if self.residual.is_some() { . (0, Some(0)) . } else { . let (_, upper) = self.iter.size_hint(); . (0, upper) . } -- line 186 ---------------------------------------- -- line 187 ---------------------------------------- . } . . fn try_fold(&mut self, init: B, mut f: F) -> T . where . F: FnMut(B, Self::Item) -> T, . T: Try, . { . self.iter 3,108 ( 0.00%) .try_fold(init, |acc, x| match Try::branch(x) { . ControlFlow::Continue(x) => ControlFlow::from_try(f(acc, x)), . ControlFlow::Break(r) => { 494 ( 0.00%) *self.residual = Some(r); . ControlFlow::Break(try { acc }) 247 ( 0.00%) } . }) . .into_try() . } . . impl_fold_via_try_fold! { fold -> try_fold } . } . . #[unstable(issue = "none", feature = "inplace_iteration")] -- line 208 ---------------------------------------- 1,554 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs -------------------------------------------------------------------------------- Ir -- line 59 ---------------------------------------- . impl_lint_pass!(DisallowedFields => [DISALLOWED_FIELDS]); . . pub struct DisallowedFields { . disallowed: DefIdMap<(&'static str, &'static DisallowedPath)>, . } . . impl DisallowedFields { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 8 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_fields, . PathNS::Field, . |def_kind| matches!(def_kind, DefKind::Field), . "field", . false, . ); 4 ( 0.00%) Self { disallowed } . } . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedFields { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 282,314 ( 0.00%) let (id, span) = match &expr.kind { 208,861 ( 0.00%) ExprKind::Path(path) if let Res::Def(_, id) = cx.qpath_res(path, expr.hir_id) => (id, expr.span), 733,909 ( 0.01%) => ???:::qpath_res (22,418x) . ExprKind::Field(e, ident) => { . // Very round-about way to get the field `DefId` from the expr: first we get its . // parent `Ty`. Then we go through all its fields to find the one with the expected . // name and get the `DefId` from it. 12,928 ( 0.00%) if let Some(parent_ty) = cx.typeck_results().expr_ty_adjusted_opt(e) 146,000 ( 0.00%) => ???:::expr_ty_adjusted_opt (3,232x) 16,160 ( 0.00%) && let Some(field_def_id) = get_field_def_id_by_name(parent_ty, ident.name) 78,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::get_field_def_id_by_name (3,232x) . { 3,232 ( 0.00%) (field_def_id, ident.span) . } else { . return; . } . }, . _ => return, . }; . if let Some(&(path, disallowed_path)) = self.disallowed.get(&id) { . span_lint_and_then( . cx, . DISALLOWED_FIELDS, . span, . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(span), . ); . } 392,580 ( 0.00%) } . 124,264 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 31,066 ( 0.00%) let PatKind::Struct(struct_path, pat_fields, _) = pat.kind else { . return; . }; . match cx.typeck_results().qpath_res(&struct_path, pat.hir_id) { . Res::Def(DefKind::Struct, struct_def_id) => { . let adt_def = cx.tcx.adt_def(struct_def_id); . for field in pat_fields { . if let Some(def_id) = adt_def.all_fields().find_map(|adt_field| { . if field.ident.name == adt_field.name { -- line 117 ---------------------------------------- -- line 151 ---------------------------------------- . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(field.span), . ); . } . } . }, . _ => {}, . } 124,264 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . declare_lint_pass!(DropForgetRef => [DROP_NON_DROP, FORGET_NON_DROP, MEM_FORGET]); . . const DROP_NON_DROP_SUMMARY: &str = "call to `std::mem::drop` with a value that does not implement `Drop`. \ . Dropping such a type only extends its contained lifetimes"; . const FORGET_NON_DROP_SUMMARY: &str = "call to `std::mem::forget` with a value that does not implement `Drop`. \ . Forgetting such a type is the same as dropping it"; . . impl<'tcx> LateLintPass<'tcx> for DropForgetRef { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 146,931 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 14,955 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 19,940 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 297,365 ( 0.00%) => ???:::qpath_res (4,985x) 24,915 ( 0.00%) && let Some(fn_name) = cx.tcx.get_diagnostic_name(def_id) 295,881 ( 0.00%) => ???:::get_diagnostic_name (4,983x) . { 36 ( 0.00%) let arg_ty = cx.typeck_results().expr_ty(arg); 480 ( 0.00%) => ???:::expr_ty (12x) 60 ( 0.00%) let is_copy = is_copy(cx, arg_ty); 741,791 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (12x) 12 ( 0.00%) let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr); . let (lint, msg, note_span) = match fn_name { . // early return for uplifted lints: dropping_references, dropping_copy_types, forgetting_references, . // forgetting_copy_types 48 ( 0.00%) sym::mem_drop if arg_ty.is_ref() && !drop_is_single_call_in_arm => return, . sym::mem_forget if arg_ty.is_ref() => return, . sym::mem_drop if is_copy && !drop_is_single_call_in_arm => return, . sym::mem_forget if is_copy => return, . sym::mem_drop if arg_ty.is_lang_item(cx, LangItem::ManuallyDrop) => return, . sym::mem_drop . if !(arg_ty.needs_drop(cx.tcx, cx.typing_env()) . || is_must_use_func_call(cx, arg) . || opt_must_use_path(cx, arg_ty).is_some() -- line 101 ---------------------------------------- -- line 127 ---------------------------------------- . let note = format!("argument has type `{arg_ty}`"); . if let Some(span) = note_span { . diag.span_note(span, note); . } else { . diag.note(note); . } . }); . } 523,440 ( 0.01%) } . } . . // dropping returned value of a function like in the following snippet is considered idiomatic, see . // #9482 for examples match { . // => drop(fn_with_side_effect_and_returning_some_value()), . // .. . // } . fn is_single_call_in_arm<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'_>, drop_expr: &'tcx Expr<'_>) -> bool { 36 ( 0.00%) if matches!(arg.kind, ExprKind::Call(..) | ExprKind::MethodCall(..)) . && let Node::Arm(Arm { body, .. }) = cx.tcx.parent_hir_node(drop_expr.hir_id) . { . return body.hir_id == drop_expr.hir_id; . } . false . } 14,955 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/partial_pub_fields.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub PARTIAL_PUB_FIELDS, . restriction, . "partial fields of a struct are public" . } . . declare_lint_pass!(PartialPubFields => [PARTIAL_PUB_FIELDS]); . . impl EarlyLintPass for PartialPubFields { 98,224 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 28,925 ( 0.00%) let ItemKind::Struct(_, _, ref st) = item.kind else { . return; . }; . 1,722 ( 0.00%) let mut fields = st.fields().iter(); 4,886 ( 0.00%) => ???:::fields (861x) . let Some(first_field) = fields.next() else { . // Empty struct. . return; . }; . let all_pub = first_field.vis.kind.is_pub(); . let all_priv = !all_pub; . . let msg = "mixed usage of pub and non-pub fields"; . . for field in fields { 14 ( 0.00%) if all_priv && field.vis.kind.is_pub() { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, PARTIAL_PUB_FIELDS, field.vis.span, msg, |diag| { . diag.help("consider using private field here"); . }); . return; 253 ( 0.00%) } else if all_pub && !field.vis.kind.is_pub() { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 16 ( 0.00%) span_lint_and_then(cx, PARTIAL_PUB_FIELDS, field.vis.span, msg, |diag| { . diag.help("consider using public field here"); . }); . return; . } . } 112,256 ( 0.00%) } . } 1,033 ( 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(), . } . } . . fn check_if_or_match( . &mut self, . cx: &LateContext<'tcx>, -- line 84 ---------------------------------------- -- line 357 ---------------------------------------- . #[derive(Debug)] . struct GroupedLateInit<'tcx> { . usage: Usage<'tcx>, . assigns: Vec>, . decls: HirIdMap<&'tcx LetStmt<'tcx>>, . } . . impl<'tcx> LateLintPass<'tcx> for NeedlessLateInit<'tcx> { 7,448 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 1,862 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(local.hir_id); 931 ( 0.00%) if let LetStmt { . init: None, . pat: . Pat { . kind: PatKind::Binding(BindingMode::NONE, binding_id, _, None), . .. . }, . source: LocalSource::Normal, . .. 931 ( 0.00%) } = local . && let Some((_, Node::Stmt(local_stmt))) = parents.next() . && let Some((_, Node::Block(block))) = parents.next() . && let Some(usage) = first_usage(cx, *binding_id, local_stmt.hir_id, block) . { . if self.check_grouped_late_init . && let Some((hir_id, late_inits)) = self.grouped_late_inits.last_mut() . && *hir_id == block.hir_id . && let Some(late_init) = late_inits.get_mut(&usage.expr.hir_id) -- line 384 ---------------------------------------- -- line 437 ---------------------------------------- . self.check_if_or_match(cx, local, block, *binding_id, usage, exprs); . }, . ExprKind::Match(_, arms, MatchSource::Normal) => { . self.check_if_or_match(cx, local, block, *binding_id, usage, arms.iter().map(|arm| arm.body)); . }, . _ => {}, . } . } 7,448 ( 0.00%) } . 85,656 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 21,414 ( 0.00%) if self.check_grouped_late_init . && let Some((_, late_inits)) = self.grouped_late_inits.pop_if(|(hir_id, _)| *hir_id == block.hir_id) . { . 'outer: for (_, late_init) in late_inits { . if late_init.decls.len() < late_init.assigns[0].0.len() { . continue; . } . . let mut suggestions = vec![]; -- line 456 ---------------------------------------- -- line 513 ---------------------------------------- . format!("move the declarations here and remove the assignments from the {descriptor}"), . suggestions, . applicability, . ); . }, . ); . } . } 85,656 ( 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<'_>) { 8,295 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(item.owner_id.def_id) { 31,521 ( 0.00%) => ???:::is_exported (553x) . return; . } . . if (def.variants.len() as u64) < self.enum_threshold { . return; . } . . let Some(ident) = item.kind.ident() else { -- line 222 ---------------------------------------- -- line 227 ---------------------------------------- . check_enum_start(cx, item_name, var); . check_enum_end(cx, item_name, var); . } . . Self::check_enum_common_affix(cx, item, def); . } . . /// Lint the names of struct fields against the name of the struct. 747 ( 0.00%) fn check_fields(&self, cx: &LateContext<'_>, item: &Item<'_>, fields: &[FieldDef<'_>]) { 166 ( 0.00%) if (fields.len() as u64) < self.struct_threshold { . return; . } . 120 ( 0.00%) self.check_struct_name_repetition(cx, item, fields); . self.check_struct_common_affix(cx, item, fields); 664 ( 0.00%) } . . fn check_enum_common_affix(cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { . let first = match def.variants.first() { . Some(variant) => variant.ident.name.as_str(), . None => return, . }; . let mut pre = camel_case_split(first); . let mut post = pre.clone(); -- line 250 ---------------------------------------- -- 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; . } . 180 ( 0.00%) if self.avoid_breaking_exported_api . && fields . .iter() 30 ( 0.00%) .any(|field| cx.effective_visibilities.is_exported(field.def_id)) 1,710 ( 0.00%) => ???:::is_exported (30x) . { . return; . } . . let mut pre: Vec<&str> = match fields.first() { . Some(first_field) => first_field.ident.name.as_str().split('_').collect(), . None => return, . }; -- line 315 ---------------------------------------- -- 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<'_>]) { 120 ( 0.00%) let Some(ident) = item.kind.ident() else { return }; 60 ( 0.00%) let snake_name = to_snake_case(ident.name.as_str()); 27,282 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_snake_case (30x) . let item_name_words: Vec<&str> = snake_name.split('_').collect(); . for field in fields { 2,254 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(field.def_id) { 17,934 ( 0.00%) => ???:::is_exported (322x) . continue; . } . 28 ( 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(); 56 ( 0.00%) if field_words.len() >= item_name_words.len() { . // if the field name is shorter than the struct name it cannot contain it 28 ( 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", . ); . } 56 ( 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 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<'_>) { 28,086 ( 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<'_>) { 28,342 ( 0.00%) if let [.., last] = &mut *self.modules { 28,342 ( 0.00%) last.in_body_count += 1; . } . } . . fn check_body_post(&mut self, _: &LateContext<'_>, _: &Body<'_>) { 28,342 ( 0.00%) if let [.., last] = &mut *self.modules { 28,342 ( 0.00%) last.in_body_count -= 1; . } . } . 126,387 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 77,086 ( 0.00%) let ident = match item.kind { 614 ( 0.00%) ItemKind::Mod(ident, _) => { 921 ( 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 . }, . 3,871 ( 0.00%) ItemKind::Enum(ident, _, def) => { 2,765 ( 0.00%) if !ident.span.in_external_macro(cx.tcx.sess.source_map()) { 553 ( 0.00%) self.check_variants(cx, item, &def); . } . ident . }, 1,722 ( 0.00%) ItemKind::Struct(ident, _, data) => { 2,666 ( 0.00%) if let VariantData::Struct { fields, .. } = data 332 ( 0.00%) && !ident.span.in_external_macro(cx.tcx.sess.source_map()) . { 581 ( 0.00%) self.check_fields(cx, item, fields); 93,738 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/item_name_repetitions.rs:::check_fields (83x) . } . ident . }, . . ItemKind::Const(ident, ..) 1 ( 0.00%) | ItemKind::ExternCrate(_, ident) . | ItemKind::Fn { ident, .. } . | ItemKind::Macro(ident, ..) . | ItemKind::Static(_, ident, ..) . | ItemKind::Trait { ident, .. } . | ItemKind::TraitAlias(_, ident, ..) . | ItemKind::TyAlias(ident, ..) . | ItemKind::Union(ident, ..) . | ItemKind::Use(_, UseKind::Single(ident)) => ident, . . ItemKind::ForeignMod { .. } | ItemKind::GlobalAsm { .. } | ItemKind::Impl(_) | ItemKind::Use(..) => return, . }; . . let item_name = ident.name.as_str(); 12,398 ( 0.00%) let item_camel = to_camel_case(item_name); 752,663 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case (6,199x) . 12,398 ( 0.00%) if let [.., prev] = &*self.modules 18,588 ( 0.00%) && prev.is_public 12,322 ( 0.00%) && prev.in_body_count == 0 12,822 ( 0.00%) && !item.span.from_expansion() 11,822 ( 0.00%) && !matches!(item.kind, ItemKind::Macro(..)) 24,644 ( 0.00%) && cx.tcx.visibility(item.owner_id).is_public() . { 12,316 ( 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", . ); . } 12,316 ( 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() . && (c == '_' || c.is_uppercase() || c.is_numeric()) . { . if !is_from_proc_macro(cx, item) { . span_lint( . cx, . MODULE_NAME_REPETITIONS, -- line 567 ---------------------------------------- -- line 578 ---------------------------------------- . MODULE_NAME_REPETITIONS, . ident.span, . "item name ends with its containing module's name", . ); . } . } . } . 12,398 ( 0.00%) if matches!(item.kind, ItemKind::Mod(..)) { . self.modules.push(ModInfo { . name: ident.name, . name_camel: item_camel, 921 ( 0.00%) is_public: cx.tcx.visibility(item.owner_id).is_public(), . in_body_count: 0, . }); . } 112,344 ( 0.00%) } . } 78,734 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/mod.rs -------------------------------------------------------------------------------- Ir -- line 310 ---------------------------------------- . SEPARATED_LITERAL_SUFFIX, . UNNEEDED_FIELD_PATTERN, . UNNEEDED_WILDCARD_PATTERN, . UNSEPARATED_LITERAL_SUFFIX, . ZERO_PREFIXED_LITERAL, . ]); . . impl EarlyLintPass for MiscEarlyLints { 164,423 ( 0.00%) fn check_generics(&mut self, cx: &EarlyContext<'_>, generics: &Generics) { . for param in &generics.params { . builtin_type_shadow::check(cx, param); . } 187,912 ( 0.00%) } . 139,797 ( 0.00%) fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &Pat) { 46,599 ( 0.00%) unneeded_field_pattern::check(cx, pat); 279,594 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_field_pattern.rs:clippy_lints::misc_early::unneeded_field_pattern::check (15,533x) 46,599 ( 0.00%) redundant_pattern::check(cx, pat); 341,726 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_pattern.rs:clippy_lints::misc_early::redundant_pattern::check (15,533x) 46,599 ( 0.00%) redundant_at_rest_pattern::check(cx, pat); 46,599 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs:clippy_lints::misc_early::redundant_at_rest_pattern::check (15,533x) . unneeded_wildcard_pattern::check(cx, pat); 124,264 ( 0.00%) } . 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `check_lit` only lints integer literals and suffixed float literals. 203,804 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 62,947 ( 0.00%) && match lit.kind { . token::LitKind::Integer => true, . token::LitKind::Float => lit.suffix.is_some(), . _ => false, . } 27,417 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . MiscEarlyLints::check_lit(cx, lit, expr.span); . } 598,616 ( 0.01%) } . } . . impl MiscEarlyLints { . fn check_lit(cx: &EarlyContext<'_>, lit: token::Lit, span: Span) { . // We test if first character in snippet is a number, because the snippet could be an expansion . // from a built-in macro like `line!()` or a proc-macro like `#[wasm_bindgen]`. . // Note that this check also covers special case that `line!()` is eagerly expanded by compiler. . // See for a regression. . // FIXME: Find a better way to detect those cases. 18,278 ( 0.00%) let lit_snip = match snippet_opt(cx, span) { 9,139 ( 0.00%) Some(snip) if snip.starts_with(|c: char| c.is_ascii_digit()) => snip, . _ => return, . }; . 9,139 ( 0.00%) let lit_kind = LitKind::from_token_lit(lit); 1,367,978 ( 0.02%) => ???:::from_token_lit (9,139x) 54,834 ( 0.00%) if let Ok(LitKind::Int(value, lit_int_type)) = lit_kind { 36,556 ( 0.00%) let suffix = match lit_int_type { . LitIntType::Signed(ty) => ty.name_str(), . LitIntType::Unsigned(ty) => ty.name_str(), . LitIntType::Unsuffixed => "", . }; 91,390 ( 0.00%) literal_suffix::check(cx, span, &lit_snip, suffix, "integer"); 259,677 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs:clippy_lints::misc_early::literal_suffix::check (9,139x) 2,116 ( 0.00%) if lit_snip.starts_with("0x") { 2,696 ( 0.00%) mixed_case_hex_literals::check(cx, span, suffix, &lit_snip); 35,072 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/misc_early/mixed_case_hex_literals.rs:clippy_lints::misc_early::mixed_case_hex_literals::check (337x) 36,987 ( 0.00%) } else if lit_snip.starts_with("0b") || lit_snip.starts_with("0o") { . // nothing to do 6,156 ( 0.00%) } else if value != 0 && lit_snip.starts_with('0') { . zero_prefixed_literal::check(cx, span, &lit_snip); . } . } else if let Ok(LitKind::Float(_, LitFloatType::Suffixed(float_ty))) = lit_kind { . let suffix = float_ty.name_str(); . literal_suffix::check(cx, span, &lit_snip, suffix, "float"); . } . } . } -- line 378 ---------------------------------------- 145,593 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/derivable_impls.rs -------------------------------------------------------------------------------- Ir -- line 222 ---------------------------------------- . suggestions, . Applicability::MachineApplicable, . ); . }); . } . } . . impl<'tcx> LateLintPass<'tcx> for DerivableImpls { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 48,488 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 4,041 ( 0.00%) items: [child], 4,041 ( 0.00%) self_ty, 4,041 ( 0.00%) constness, . .. 15,680 ( 0.00%) }) = item.kind 44,451 ( 0.00%) && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) 536,747 ( 0.01%) => ???:::is_automatically_derived (4,041x) 4,762 ( 0.00%) && !item.span.from_expansion() 9,524 ( 0.00%) && let Some(def_id) = of_trait.trait_ref.trait_def_id() 30,953 ( 0.00%) => ???:::trait_def_id (2,381x) 14,286 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Default, def_id) 190,214 ( 0.00%) => ???:::is_diagnostic_item (2,381x) . && let impl_item_hir = child.hir_id() . && let Node::ImplItem(impl_item) = cx.tcx.hir_node(impl_item_hir) . && let ImplItemKind::Fn(_, b) = &impl_item.kind . && let Body { value: func_expr, .. } = cx.tcx.hir_body(*b) . && let &ty::Adt(adt_def, args) = cx . .tcx . .type_of(item.owner_id) . .instantiate_identity() -- line 249 ---------------------------------------- -- line 264 ---------------------------------------- . args, . cx.tcx.typeck_body(*b), . is_const, . ); . } else if adt_def.is_enum() && self.msrv.meets(cx, msrvs::DEFAULT_ENUM_ATTRIBUTE) { . check_enum(cx, item, func_expr, adt_def, is_const); . } . } 112,344 ( 0.00%) } . } 10,463 ( 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()`. 228,228 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 105,336 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 2,427,566 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (17,556x) . && 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 . } 158,004 ( 0.00%) } 17,556 ( 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 { 327,150 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 196,290 ( 0.00%) if cx.tcx.sess.edition() >= Edition::Edition2024 { . return; . } . 327,150 ( 0.00%) let (scrutinee, keyword_fallback) = match expr.kind { 2,883 ( 0.00%) ExprKind::Match(scrutinee, _, _) => (scrutinee, "`match`"), . ExprKind::Let(let_expr) => (let_expr.init, "`if let` / `while let`"), . _ => return, . }; . 2,914 ( 0.00%) if scrutinee.span.from_expansion() || expr.span.from_expansion() { . return; . } . 992 ( 0.00%) if let ExprKind::Block(block, _) = scrutinee.kind . && 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"; . -- line 58 ---------------------------------------- -- line 102 ---------------------------------------- . vec![ . (outer_span.shrink_to_lo(), format!("let res = {inner_snippet};\n{pad}")), . (scrutinee.span, "res".to_string()), . ], . Applicability::MaybeIncorrect, . ); . }); . } 327,150 ( 0.00%) } . } 961 ( 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; . 8,006 ( 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; 20,015 ( 0.00%) while let Some(parent) = get_parent_expr(cx, expr) 523,355 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (4,003x) 30 ( 0.00%) && let ExprKind::Call(recv, _) = parent.kind . && expr.span == recv.span . { . expr = parent; . depth += 1; . } . (expr, depth) . } . . impl<'tcx> LateLintPass<'tcx> for RedundantClosureCall { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 370,034 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 4,003 ( 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. 8,006 ( 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!()`. 8,006 ( 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); . } . }, . ); . } 523,440 ( 0.01%) } . 74,949 ( 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 . } . 11,173 ( 0.00%) for w in block.stmts.windows(2) { 1,398 ( 0.00%) if let hir::StmtKind::Let(local) = w[0].kind 1,398 ( 0.00%) && let Some(t) = local.init 932 ( 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", . ); . } . } 85,656 ( 0.00%) } . } 20,541 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 134,746 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner_expr) = expr.kind 1,157 ( 0.00%) && let ExprKind::Call(fun, args) = inner_expr.kind 3 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 4 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 78 ( 0.00%) => ???:::qpath_res (1x) 5 ( 0.00%) && let ty::Ref(_, inner_str, _) = cx.typeck_results().expr_ty_adjusted(expr).kind() 53 ( 0.00%) => ???:::expr_ty_adjusted (1x) 3 ( 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, . ); . } . } 523,440 ( 0.01%) } . } 7 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/util.rs -------------------------------------------------------------------------------- Ir -- line 1499 ---------------------------------------- . /// # Examples . /// . /// - `u8` -> `u8` . /// - `&'a mut u8` -> `u8` . /// - `&'a &'b u8` -> `u8` . /// - `&'a *const &'b u8 -> *const &'b u8` . pub fn peel_refs(self) -> Ty<'tcx> { . let mut ty = self; 249,271 ( 0.00%) while let ty::Ref(_, inner_ty, _) = ty.kind() { 7,091 ( 0.00%) ty = *inner_ty; . } . ty . } . } . . /// Returns a list of types such that the given type needs drop if and only if . /// *any* of the returned types need drop. Returns `Err(AlwaysRequiresDrop)` if . /// this type always needs drop. -- line 1516 ---------------------------------------- -- line 1597 ---------------------------------------- . } . } . . /// Does the equivalent of . /// ```ignore (illustrative) . /// let v = self.iter().map(|p| p.fold_with(folder)).collect::>(); . /// folder.tcx().intern_*(&v) . /// ``` 13,192 ( 0.00%) pub fn fold_list<'tcx, F, L, T>( . list: L, . folder: &mut F, . intern: impl FnOnce(TyCtxt<'tcx>, &[T]) -> L, . ) -> L . where . F: TypeFolder>, . L: AsRef<[T]>, . T: TypeFoldable> + PartialEq + Copy, -- line 1613 ---------------------------------------- -- line 1620 ---------------------------------------- . if new_t != t { Some((i, new_t)) } else { None } . }) { . Some((i, new_t)) => { . // An element changed, prepare to intern the resulting list . let mut new_list = SmallVec::<[_; 8]>::with_capacity(slice.len()); . new_list.extend_from_slice(&slice[..i]); . new_list.push(new_t); . for t in iter { 588 ( 0.00%) new_list.push(t.fold_with(folder)) . } 13,780 ( 0.00%) intern(folder.cx(), &new_list) . } . None => list, . } 14,841 ( 0.00%) } . . /// Does the equivalent of . /// ```ignore (illustrative) . /// let v = self.iter().map(|p| p.try_fold_with(folder)).collect::>(); . /// folder.tcx().intern_*(&v) . /// ``` . pub fn try_fold_list<'tcx, F, L, T>( . list: L, -- line 1642 ---------------------------------------- 31,780 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 27,972 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>]) { 19,303 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, p)) = func.kind 16,586 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, func_path)) = ty.kind 3,313 ( 0.00%) && p.ident.name == sym::new . && let Some(func_def_id) = func_path.res.opt_def_id() 3,310 ( 0.00%) && matches!( 13,240 ( 0.00%) cx.tcx.get_diagnostic_name(func_def_id), 175,430 ( 0.00%) => ???:::get_diagnostic_name (3,310x) . 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); . }); . } 31,968 ( 0.00%) } 16,553 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs -------------------------------------------------------------------------------- Ir -- line 518 ---------------------------------------- . Sugg::NonParen(format!("{}.{}", outer_sugg.maybe_paren(), first.name).into()), . ) . } else { . (outer_type, outer_sugg) . } . } . } . impl<'tcx> LateLintPass<'tcx> for Transmute { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 146,931 ( 0.00%) if let ExprKind::Call(path_expr, [arg]) = e.kind 24,929 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = path_expr.kind . && let Some(def_id) = path.res.opt_def_id() 11,627 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::transmute, def_id) 143,146 ( 0.00%) => ???:::is_diagnostic_item (1,661x) . { . // Avoid suggesting non-const operations in const contexts: . // - from/to bits (https://github.com/rust-lang/rust/issues/73736) . // - dereferencing raw pointers (https://github.com/rust-lang/rust/issues/51911) . // - char conversions (https://github.com/rust-lang/rust/issues/89259) . let const_context = is_in_const_context(cx); . . let (from_ty, from_ty_adjusted) = match cx.typeck_results().expr_adjustments(arg) { -- line 538 ---------------------------------------- -- line 563 ---------------------------------------- . | (unsound_collection_transmute::check(cx, e, from_ty, to_ty) . || transmute_undefined_repr::check(cx, e, from_ty, to_ty)) . | (eager_transmute::check(cx, e, arg, from_ty, to_ty)); . . if !linted { . transmutes_expressible_as_ptr_casts::check(cx, e, from_ty, from_ty_adjusted, to_ty, arg, const_context); . } . } 523,440 ( 0.01%) } . } 3,322 ( 0.00%) -------------------------------------------------------------------------------- -- 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)` 130,871 ( 0.00%) if let ExprKind::Assign(left, right, _) = expr.kind . && let Some(local_id) = left.res_local_id() . && let Some(size_expr) = Self::as_vec_initializer(cx, right) . { . let vi = VecAllocation { . local_id, . allocation_expr: right, . size_expr, . }; -- line 111 ---------------------------------------- -- line 112 ---------------------------------------- . . 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()` 3,313 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 6,517 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, local_id, _, None) = local.pat.kind . && let Some(init) = local.init . && let Some(size_expr) = Self::as_vec_initializer(cx, init) . { . let vi = VecAllocation { . local_id, . allocation_expr: init, . size_expr, . }; -- line 129 ---------------------------------------- -------------------------------------------------------------------------------- -- 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) { 8,996 ( 0.00%) if let ItemKind::Use(ref use_tree) = item.kind { 6,840 ( 0.00%) check_use_tree(use_tree, cx, item.span); 838,279 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree (2,280x) . } . } . } . 20,619 ( 0.00%) fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) { 13,743 ( 0.00%) match use_tree.kind { 11,365 ( 0.00%) UseTreeKind::Simple(Some(new_name)) => { 2,273 ( 0.00%) if new_name.as_str() == "_" { 72,736 ( 0.00%) => ???:::as_str (2,273x) . return; . } 2,273 ( 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, .. } => { 3 ( 0.00%) for (use_tree, _) in items { 33 ( 0.00%) check_use_tree(use_tree, cx, span); 253 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree'2 (11x) . } . }, . } 18,328 ( 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(); 4,546 ( 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 { 4,546 ( 0.00%) name.contains("Unsafe") || name.contains("unsafe") . } 6,838 ( 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 1,881 ( 0.00%) pub fn current(self, cx: &LateContext<'_>) -> Option { 163,972 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(cx.tcx, cx.last_node_with_lint_attrs) . } else { . self.0 . } 2,508 ( 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 { . if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(tcx, node) -- line 132 ---------------------------------------- -- 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 816,725 ( 0.01%) pub fn meets(self, cx: &LateContext<'_>, required: RustcVersion) -> bool { . self.current(cx).is_none_or(|msrv| msrv >= required) 653,380 ( 0.01%) } . /// Checks if a required version from [this module](self) is met at the specified node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations . pub fn meets_at(self, tcx: TyCtxt<'_>, node: HirId, required: RustcVersion) -> bool { . self.at(tcx, node).is_none_or(|msrv| msrv >= required) . } . -- line 159 ---------------------------------------- -- line 233 ---------------------------------------- . . impl MsrvStack { . pub fn current(&self) -> Option { . self.stack.last().copied() . } . . pub fn meets(&self, required: RustcVersion) -> bool { . self.current().is_none_or(|msrv| msrv >= required) 104,555 ( 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); . } 781,235 ( 0.01%) } . . pub fn check_attributes_post(&mut self, attrs: &[Attribute]) { . if parse_attrs(attrs).is_some() { . self.stack.pop(); . } 781,235 ( 0.01%) } . } . . fn parse_attrs(attrs: &[impl AttributeExt]) -> Option { 1,416,168 ( 0.02%) let msrv_attr = attrs.iter().find(|attr| attr.path_matches(&[sym::clippy, sym::msrv]))?; 1,412,212 ( 0.02%) => ???:::path_matches (177,021x) . . let msrv = msrv_attr.value_str()?; . . parse_version(msrv) . } . 1,071,296 ( 0.01%) pub fn check_attrs(sess: &Session, attrs: &[impl AttributeExt]) { 121,180 ( 0.00%) let mut msrv_attrs = attrs.iter().filter(|attr| attr.path_matches(&[sym::clippy, sym::msrv])); 241,664 ( 0.00%) => ???:::path_matches (30,295x) . . 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")); . } 1,071,296 ( 0.01%) } 298,195 ( 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); 3,013,265 ( 0.04%) self.msrv.check_attributes(attrs); 1,092,363 ( 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 (111,675x) . } . . fn check_attributes_post(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 2,879,353 ( 0.04%) self.msrv.check_attributes_post(attrs); 1,092,363 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post (111,675x) . } . }; . } . . /// 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 . /// ``` 190,710 ( 0.00%) pub fn expr_or_init<'a, 'b, 'tcx: 'b>(cx: &LateContext<'tcx>, mut expr: &'a Expr<'b>) -> &'a Expr<'b> { . while let Some(init) = expr . .res_local_id() . .and_then(|id| find_binding_init(cx, id)) . .filter(|init| cx.typeck_results().expr_adjustments(init).is_empty()) . { . expr = init; . } . expr 114,426 ( 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`. . pub fn find_binding_init<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 96 ( 0.00%) if let Node::Pat(pat) = cx.tcx.hir_node(hir_id) 828 ( 0.00%) => ???:::hir_node (12x) 72 ( 0.00%) && matches!(pat.kind, PatKind::Binding(BindingMode::NONE, ..)) 84 ( 0.00%) && let Node::LetStmt(local) = cx.tcx.parent_hir_node(hir_id) 1,464 ( 0.00%) => ???:::parent_hir_node (12x) . { . return local.init; . } . None . } . . /// Checks if the given local has an initializer or is from something other than a `let` statement . /// -- line 198 ---------------------------------------- -- 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"); 64,716 ( 0.00%) cx.enclosing_body.is_some_and(|id| { 32,358 ( 0.00%) cx.tcx 161,790 ( 0.00%) .hir_body_const_context(cx.tcx.hir_body_owner_def_id(id)) 6,914,495 ( 0.09%) => ???:::hir_body_const_context (32,358x) 4,345,241 ( 0.05%) => ???:::hir_body_owner_def_id (32,358x) . .is_some() . }) 32,358 ( 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 84,020 ( 0.00%) pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { . use rustc_hir::ConstContext::{Const, ConstFn, Static}; 336,080 ( 0.00%) let Some(ctx) = tcx.hir_body_const_context(tcx.hir_enclosing_body_owner(hir_id)) else { 17,613,528 ( 0.22%) => ???:::hir_enclosing_body_owner (42,010x) 8,944,686 ( 0.11%) => ???:::hir_body_const_context (42,010x) . return false; . }; . match ctx { . ConstFn => false, . Static(_) . | Const { . allow_const_fn_promotion: _, . } => true, . } 84,020 ( 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 293 ---------------------------------------- . _ => did, . }; . . cx.tcx.lang_items().get(item) == Some(did) . } . . /// Checks is `expr` is `None` . pub fn is_none_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 4,080 ( 0.00%) expr.basic_res().ctor_parent(cx).is_lang_item(cx, OptionNone) 29,260 ( 0.00%) } . . /// If `expr` is `Some(inner)`, returns `inner` . pub fn as_some_expr<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::Call(e, [arg]) = expr.kind . && e.basic_res().ctor_parent(cx).is_lang_item(cx, OptionSome) . { . Some(arg) . } else { -- line 310 ---------------------------------------- -- line 363 ---------------------------------------- . Some(inner) . } else { . None . } . } . . /// Checks if the `pat` is `None`. . pub fn is_none_pattern(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { 14,215 ( 0.00%) matches!(pat.kind, . PatKind::Expr(PatExpr { kind: PatExprKind::Path(qpath), .. }) . if cx.qpath_res(qpath, pat.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone)) 2,077 ( 0.00%) } . . /// Checks if `arm` has the form `None => None`. 4,848 ( 0.00%) pub fn is_none_arm(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { 808 ( 0.00%) is_none_pattern(cx, arm.pat) . && matches!( . 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) . ) 5,656 ( 0.00%) } . . /// Checks if the given `QPath` belongs to a type alias. . pub fn is_ty_alias(qpath: &QPath<'_>) -> bool { 14,632 ( 0.00%) match *qpath { 51,915 ( 0.00%) QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), 29,889 ( 0.00%) QPath::TypeRelative(ty, _) if let TyKind::Path(qpath) = ty.kind => is_ty_alias(&qpath), 53,126 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias'2 (3,316x) . QPath::TypeRelative(..) => false, . } 7,316 ( 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> { 18,276 ( 0.00%) match *path { 18,276 ( 0.00%) QPath::Resolved(_, path) => path.segments.last().expect("A path must have at least one segment"), . QPath::TypeRelative(_, seg) => seg, . } 9,138 ( 0.00%) } . . pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator> { . last_path_segment(qpath) . .args . .map_or(&[][..], |a| a.args) . .iter() . .filter_map(|a| match a { . GenericArg::Type(ty) => Some(ty.as_unambig_ty()), -- line 419 ---------------------------------------- -- line 448 ---------------------------------------- . /// impl std::ops::Add for Point { . /// type Output = Self; . /// . /// fn add(self, other: Self) -> Self { . /// Point(0, 0) . /// } . /// } . /// ``` 343,880 ( 0.00%) pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, owner: OwnerId) -> Option<&'tcx TraitRef<'tcx>> { 300,895 ( 0.00%) if let Node::Item(item) = cx.tcx.hir_node(cx.tcx.hir_owner_parent(owner)) 2,928,767 ( 0.04%) => ???:::hir_node (42,985x) 85,970 ( 0.00%) && let ItemKind::Impl(impl_) = &item.kind 42,985 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { . return Some(&of_trait.trait_ref); . } . None 343,880 ( 0.00%) } . . /// This method will return tuple of projection stack and root of the expression, . /// used in `can_mut_borrow_both`. . /// . /// For example, if `e` represents the `v[0].a.b[x]` . /// this method will return a tuple, composed of a `Vec` . /// containing the `Expr`s for `v[0], v[0].a, v[0].a.b, v[0].a.b[x]` . /// and an `Expr` for root of them, `v` -- line 472 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . /// Matches an `Expr` against a chain of methods, and return the matched `Expr`s. . /// . /// For example, if `expr` represents the `.baz()` in `foo.bar().baz()`, . /// `method_chain_args(expr, &[sym::bar, sym::baz])` will return a `Vec` . /// containing the `Expr`s for . /// `.bar()` and `.baz()` 835,681 ( 0.01%) 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 242,163 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, _) = current.kind { 3,397 ( 0.00%) if path.ident.name == *method_name { . if receiver.span.from_expansion() || args.iter().any(|e| e.span.from_expansion()) { . return None; . } . matched.push((receiver, args)); // build up `matched` backwards . current = receiver; // go to parent expression . } else { . return None; . } . } else { . return None; . } . } . // Reverse `matched` so that it is in the same order as `methods`. . matched.reverse(); . Some(matched) 1,074,447 ( 0.01%) } . . /// Returns `true` if the provided `def_id` is an entrypoint to a program. 43,587 ( 0.00%) pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool { 4,843 ( 0.00%) cx.tcx . .entry_fn(()) . .is_some_and(|(entry_fn_def_id, _)| def_id == entry_fn_def_id) 38,744 ( 0.00%) } . . /// Returns `true` if the expression is in the program's `#[panic_handler]`. . pub fn is_in_panic_handler(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { . let parent = cx.tcx.hir_get_parent_item(e.hir_id); . Some(parent.to_def_id()) == cx.tcx.lang_items().panic_impl() . } . . /// Gets the name of the item the expression is in, if available. -- line 1075 ---------------------------------------- -- line 1118 ---------------------------------------- . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Gets the parent expression, if any –- this is useful to constrain a lint. 86,076 ( 0.00%) pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 172,152 ( 0.00%) get_parent_expr_for_hir(cx, e.hir_id) 172,152 ( 0.00%) } . . /// This retrieves the parent for the given `HirId` if it's an expression. This is useful for . /// constraint lints 1,488 ( 0.00%) pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 346,288 ( 0.00%) match cx.tcx.parent_hir_node(hir_id) { 59,658 ( 0.00%) => ???:::parent_hir_node (496x) . Node::Expr(parent) => Some(parent), . _ => None, . } 992 ( 0.00%) } . . /// Gets the enclosing block, if any. . pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> { . let enclosing_node = cx . .tcx . .hir_get_enclosing_scope(hir_id) . .map(|enclosing_id| cx.tcx.hir_node(enclosing_id)); . enclosing_node.and_then(|node| match node { -- line 1145 ---------------------------------------- -- line 1203 ---------------------------------------- . Node::Stmt(_) | Node::Block(_) | Node::LetStmt(_) | Node::Arm(_) | Node::ExprField(_) => (), . _ => break, . } . } . None . } . . /// Gets the parent node if it's an impl block. 1,192 ( 0.00%) pub fn get_parent_as_impl(tcx: TyCtxt<'_>, id: HirId) -> Option<&Impl<'_>> { 8,344 ( 0.00%) match tcx.hir_parent_iter(id).next() { . Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(imp), . .. . }), . )) => Some(imp), . _ => None, . } 2,384 ( 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> { 1,736 ( 0.00%) while let ExprKind::Block( . Block { 21 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 1,101 ( 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 1253 ---------------------------------------- . /// Examples: . /// * `{}` -> `{}` . /// * `{ x }` -> `x` . /// * `{ x; }` -> `x` . /// * `{{ x; }}` -> `x` . /// * `{ x; y }` -> `{ x; y }` . /// * `{ unsafe { x } }` -> `unsafe { x }` . pub fn peel_blocks_with_stmt<'a>(mut expr: &'a Expr<'a>) -> &'a Expr<'a> { 2,261 ( 0.00%) while let ExprKind::Block( . Block { 12 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . } . | Block { . stmts: . [ . Stmt { -- line 1271 ---------------------------------------- -- line 1273 ---------------------------------------- . .. . }, . ], . expr: None, . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 7 ( 0.00%) ) = expr.kind . { 2 ( 0.00%) expr = inner; . } . expr . } . . /// Checks if the given expression is the else clause of either an `if` or `if let` expression. 6 ( 0.00%) pub fn is_else_clause(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 4 ( 0.00%) let mut iter = tcx.hir_parent_iter(expr.hir_id); 4 ( 0.00%) match iter.next() { . Some(( . _, . Node::Expr(Expr { . kind: ExprKind::If(_, _, Some(else_expr)), . .. . }), . )) => else_expr.hir_id == expr.hir_id, . _ => false, . } 8 ( 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 { 13,877 ( 0.00%) if let ExprKind::Lit(spanned) = expr.kind 176 ( 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 1380 ---------------------------------------- . . /// 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. 3 ( 0.00%) pub fn is_adjusted(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 2 ( 0.00%) cx.typeck_results().adjustments().get(e.hir_id).is_some() 4 ( 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] 489,005 ( 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(); 15,183 ( 0.00%) let new_span = data.call_site; . 21,468 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { . return Some(new_span); . } . . span = new_span; . } else { 57,530 ( 0.00%) return None; . } . } 258,885 ( 0.00%) } . . /// 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] 8,649 ( 0.00%) pub fn is_direct_expn_of(span: Span, name: Symbol) -> Option { . if span.from_expansion() { . let data = span.ctxt().outer_expn_data(); . let new_span = data.call_site; . 1,860 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { . return Some(new_span); . } . } . 961 ( 0.00%) None 4,805 ( 0.00%) } . . /// Convenience function to get the return type of a function. 91,280 ( 0.00%) pub fn return_ty<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId) -> Ty<'tcx> { 13,040 ( 0.00%) let ret_ty = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip().output(); 52,160 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ret_ty) 3,077,191 ( 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/fold.rs:::instantiate_bound_regions_with_erased:: (13,040x) 91,280 ( 0.00%) } . . /// Convenience function to get the nth argument type of a function. . pub fn nth_arg<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId, nth: usize) -> Ty<'tcx> { . let arg = cx . .tcx . .fn_sig(fn_def_id) . .instantiate_identity() . .skip_norm_wip() -- line 1453 ---------------------------------------- -- line 1545 ---------------------------------------- . && let Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } = path.res . { . return true; . } . false . } . . pub fn iter_input_pats<'tcx>(decl: &FnDecl<'_>, body: &'tcx Body<'_>) -> impl Iterator> { 67,782 ( 0.00%) (0..decl.inputs.len()).map(move |i| &body.params[i]) . } . . /// Checks if a given expression is a match expression expanded from the `?` . /// operator or the `try` macro. . pub fn is_try<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { . fn is_ok(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { . if let PatKind::TupleStruct(ref path, pat, ddpos) = arm.pat.kind . && ddpos.as_opt_usize().is_none() -- line 1561 ---------------------------------------- -- line 1628 ---------------------------------------- . . /// Returns `true` if the lint is allowed in the current context. This is useful for . /// skipping long running code when it's unnecessary . /// . /// This function should check the lint level for the same node, that the lint will . /// be emitted at. If the information is buffered to be emitted at a later point, please . /// make sure to use `span_lint_hir` functions to emit the lint. This ensures that . /// expectations at the checked nodes will be fulfilled. 272,532 ( 0.00%) pub fn is_lint_allowed(cx: &LateContext<'_>, lint: &'static Lint, id: HirId) -> bool { 136,266 ( 0.00%) cx.tcx.lint_level_spec_at_node(lint, id).is_allow() 56,870,014 ( 0.71%) => ???:::lint_level_spec_at_node (68,133x) 136,266 ( 0.00%) } . . pub fn strip_pat_refs<'hir>(mut pat: &'hir Pat<'hir>) -> &'hir Pat<'hir> { . while let PatKind::Ref(subpat, _, _) = pat.kind { . pat = subpat; . } . pat . } . -- line 1646 ---------------------------------------- -- line 1658 ---------------------------------------- . #[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); . ((u as u128) << amt) >> amt . } . . /// clip unused bytes 3,083 ( 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; 27,747 ( 0.00%) (u << amt) >> amt 9,249 ( 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. 382,389 ( 0.00%) pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_owner_iter(id) 859,378 ( 0.01%) .filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_)))) 107,204 ( 0.00%) .any(|(id, _)| find_attr!(tcx, id.def_id, AutomaticallyDerived)) 5,521,965 ( 0.07%) => ???:>::get_attrs (52,595x) 382,389 ( 0.00%) } . . /// Checks if the given `DefId` matches the `libc` item. 39,890 ( 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. 11,967 ( 0.00%) cx.tcx.crate_name(did.krate) == sym::libc && cx.tcx.def_path_str(did).ends_with(name.as_str()) 31,912 ( 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 }`. 8 ( 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); 3 ( 0.00%) if let ExprKind::Block(block, _) = then.kind { . blocks.push(block); . } else { . panic!("ExprKind::If node is not an ExprKind::Block"); . } . 2 ( 0.00%) if let Some(else_expr) = r#else { . expr = else_expr; . } else { . break; . } . } . . // final `else {..}` 1 ( 0.00%) if !blocks.is_empty() 3 ( 0.00%) && let ExprKind::Block(block, _) = expr.kind . { . blocks.push(block); . } . 12 ( 0.00%) (conds, blocks) 9 ( 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 1986 ---------------------------------------- . match expr.kind { . ExprKind::Closure(&Closure { body, .. }) => is_body_identity_function(cx, cx.tcx.hir_body(body)), . _ => expr.basic_res().is_diag_item(cx, sym::convert_identity), . } . } . . /// Gets the node where an expression is either used, or it's type is unified with another branch. . /// Returns both the node and the `HirId` of the closest child node. 72,920 ( 0.00%) pub fn get_expr_use_or_unification_node<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<(Node<'tcx>, HirId)> { 82,035 ( 0.00%) for (node, child_id) in hir_parent_with_src_iter(tcx, expr.hir_id) { 24,870 ( 0.00%) match node { . Node::Block(_) => {}, . Node::Arm(arm) if arm.body.hir_id == child_id => {}, 38,100 ( 0.00%) Node::Expr(expr) => match expr.kind { . ExprKind::Block(..) | ExprKind::DropTemps(_) => {}, . ExprKind::Match(_, [arm], _) if arm.hir_id == child_id => {}, . ExprKind::If(_, then_expr, None) if then_expr.hir_id == child_id => return None, 8,559 ( 0.00%) _ => return Some((Node::Expr(expr), child_id)), . }, 1,112 ( 0.00%) node => return Some((node, child_id)), . } . } . None 72,920 ( 0.00%) } . . /// Checks if the result of an expression is used, or it's type is unified with another branch. . pub fn is_expr_used_or_unified(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { . !matches!( . get_expr_use_or_unification_node(tcx, expr), . None | Some(( . Node::Stmt(Stmt { . kind: StmtKind::Expr(_) -- line 2017 ---------------------------------------- -- line 2026 ---------------------------------------- . .. . }), . _ . )) . ) . } . . /// Checks if the expression is the final expression returned from a block. 992 ( 0.00%) pub fn is_expr_final_block_expr(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 3,472 ( 0.00%) matches!(tcx.parent_hir_node(expr.hir_id), Node::Block(..)) 59,658 ( 0.00%) => ???:::parent_hir_node (496x) 992 ( 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() . .get(base.hir_id) . .is_some_and(|x| x.iter().any(|adj| matches!(adj.kind, Adjust::Deref(_)))) . }) . } . 12 ( 0.00%) pub fn std_or_core(cx: &LateContext<'_>) -> Option<&'static str> { . if is_no_core_crate(cx) { . None . } else if is_no_std_crate(cx) { . Some("core") . } else { . Some("std") . } 24 ( 0.00%) } . 1 ( 0.00%) pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool { 650 ( 0.00%) find_attr!(cx.tcx, crate, NoStd) 660 ( 0.00%) => ???:::hir_krate_attrs (12x) 3 ( 0.00%) } . . pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool { 516 ( 0.00%) find_attr!(cx.tcx, crate, NoCore) 660 ( 0.00%) => ???:::hir_krate_attrs (12x) . } . . /// 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() {} . /// } . /// ``` 58,779 ( 0.00%) pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool { 97,964 ( 0.00%) if let Node::Item(item) = cx.tcx.parent_hir_node(hir_id) { 2,653,434 ( 0.03%) => ???:::parent_hir_node (19,593x) 78,368 ( 0.00%) matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) . } else { . false . } 39,186 ( 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. 215,304 ( 0.00%) pub fn fn_def_id(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 53,826 ( 0.00%) fn_def_id_with_node_args(cx, expr).map(|(did, _)| did) 2,055,676 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (53,826x) 107,652 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call, . /// as well as its node args. 384,132 ( 0.00%) pub fn fn_def_id_with_node_args<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'_>, . ) -> Option<(DefId, GenericArgsRef<'tcx>)> { . let typeck = cx.typeck_results(); 278,874 ( 0.00%) match &expr.kind { 4,908 ( 0.00%) ExprKind::MethodCall(..) => Some(( 9,816 ( 0.00%) typeck.type_dependent_def_id(expr.hir_id)?, 83,436 ( 0.00%) => ???:::type_dependent_def_id (1,636x) 6,544 ( 0.00%) typeck.node_args(expr.hir_id), 63,804 ( 0.00%) => ???:::node_args (1,636x) 6,127 ( 0.00%) )), . ExprKind::Call( . Expr { 4,494 ( 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 22,461 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(..) | DefKind::AssocFn, id) = 44,925 ( 0.00%) typeck.qpath_res(qpath, *path_hir_id) 239,998 ( 0.00%) => ???:::qpath_res (4,494x) . { 26,946 ( 0.00%) Some((id, typeck.node_args(*path_hir_id))) 145,264 ( 0.00%) => ???:::node_args (4,491x) . } else { . None . } . }, . _ => None, . } 493,884 ( 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)` 21 ( 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 { 5 ( 0.00%) [a, b] if eq(a, b) => return vec![vec![a, b]], 4 ( 0.00%) _ if exprs.len() <= 2 => return vec![], . _ => {}, . } . . let mut buckets: UnindexMap>> = UnindexMap::default(); . . for expr in exprs { . match buckets.entry(hash(expr)) { . indexmap::map::Entry::Occupied(mut o) => { -- line 2203 ---------------------------------------- -- line 2213 ---------------------------------------- . } . } . . buckets . .into_values() . .flatten() . .filter(|group| group.len() > 1) . .collect() 18 ( 0.00%) } . . /// Peels off all references on the pattern. Returns the underlying pattern and the number of . /// references removed. . 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) { . if let PatKind::Ref(pat, _, _) = pat.kind { . peel(pat, count + 1) . } else { -- line 2229 ---------------------------------------- -- 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. 185,196 ( 0.00%) pub fn peel_hir_expr_refs<'a>(expr: &'a Expr<'a>) -> (&'a Expr<'a>, usize) { . let mut count = 0; 188,504 ( 0.00%) let e = peel_hir_expr_while(expr, |e| match e.kind { 827 ( 0.00%) ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) => { 827 ( 0.00%) count += 1; . Some(e) . }, . _ => None, . }); . (e, count) 92,598 ( 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. 27 ( 0.00%) pub fn peel_ref_operators<'hir>(cx: &LateContext<'_>, mut expr: &'hir Expr<'hir>) -> &'hir Expr<'hir> { . loop { 24 ( 0.00%) match expr.kind { . ExprKind::AddrOf(_, _, e) => expr = e, 6 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) if cx.typeck_results().expr_ty(e).is_ref() => expr = e, . _ => break, . } . } . expr 15 ( 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 . } . 1,172 ( 0.00%) pub fn is_hir_ty_cfg_dependant(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> bool { 5,326 ( 0.00%) if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind 1,988 ( 0.00%) && let Res::Def(_, def_id) = path.res . { . return find_attr!(cx.tcx, def_id, CfgTrace(..) | CfgAttrTrace(..)); . } . false 1,172 ( 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. 68,090 ( 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) { 27,310 ( 0.00%) if matches!(tcx.def_kind(id.owner_id), DefKind::Const { .. }) 3 ( 0.00%) && let item = tcx.hir_item(id) 63 ( 0.00%) => ???:::hir_item (1x) 3 ( 0.00%) && let ItemKind::Const(ident, _generics, ty, _body) = item.kind 5 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . // We could also check for the type name `test::TestDescAndFn` 2 ( 0.00%) && let Res::Def(DefKind::Struct, _) = path.res . && find_attr!(tcx, item.hir_id(), RustcTestMarker(..)) . { . names.push(ident.name); . } . } . names.sort_unstable(); 1,116 ( 0.00%) entry.insert(names).clone() . }, . } 54,472 ( 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 47,663 ( 0.00%) pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool { 27,236 ( 0.00%) let names = test_item_names(tcx, tcx.parent_module(id)); 7,636,541 ( 0.10%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::test_item_names (6,809x) 911,667 ( 0.01%) => ???:::parent_module (6,809x) . // Without `--test` there are no test items, so the parent walk can never match. 6,809 ( 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 . }) 40,854 ( 0.00%) } . . /// Checks if `fn_def_id` has a `#[test]` attribute applied . /// . /// This only checks directly applied attributes. To see if a node has a parent function marked with . /// `#[test]` use [`is_in_test_function`]. . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function . pub fn is_test_function(tcx: TyCtxt<'_>, fn_def_id: LocalDefId) -> bool { -- line 2410 ---------------------------------------- -- line 2420 ---------------------------------------- . } . } . . /// Checks if `id` has a `#[cfg(test)]` attribute applied . /// . /// This only checks directly applied attributes, to see if a node is inside a `#[cfg(test)]` parent . /// use [`is_in_cfg_test`] . pub fn is_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { 463,054 ( 0.01%) if let Some(cfgs) = find_attr!(tcx, id, CfgTrace(cfgs) => cfgs) 2,224,169 ( 0.03%) => ???:>::get_attrs (34,020x) . && cfgs . .iter() 6,771 ( 0.00%) .any(|(cfg, _)| matches!(cfg, CfgEntry::NameValue { name: sym::test, .. })) . { . true . } else { . false . } . } . . /// 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)]` 68,090 ( 0.00%) pub fn is_in_test(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { 34,045 ( 0.00%) is_in_test_function(tcx, hir_id) || is_in_cfg_test(tcx, hir_id) 8,718,433 ( 0.11%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test_function (6,809x) 54,472 ( 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> { 3,018 ( 0.00%) pub fn use_node(&self, cx: &LateContext<'tcx>) -> ExprUseNode<'tcx> { 37,526 ( 0.00%) match self.node { . Node::LetStmt(l) => ExprUseNode::LetStmt(l), . Node::ExprField(field) => ExprUseNode::Field(field), . . Node::Item(&Item { . kind: ItemKind::Static(..) | ItemKind::Const(..), . owner_id, . .. . }) -- line 2502 ---------------------------------------- -- line 2518 ---------------------------------------- . }) . | Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(..), . owner_id, . .. . }) . | Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(..), 1,640 ( 0.00%) owner_id, . .. . }) => ExprUseNode::Return(owner_id), . 11,024 ( 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()), . }), . . ExprKind::Closure(closure) => ExprUseNode::Return(OwnerId { def_id: closure.def_id }), 8 ( 0.00%) ExprKind::Call(func, args) => match args.iter().position(|arg| arg.hir_id == self.child_id) { 24 ( 0.00%) Some(i) => ExprUseNode::FnArg(func, i), . None => ExprUseNode::Callee, . }, 45 ( 0.00%) ExprKind::MethodCall(name, _, args, _) => ExprUseNode::MethodArg( 9 ( 0.00%) use_expr.hir_id, 9 ( 0.00%) name.args, . args.iter() . .position(|arg| arg.hir_id == self.child_id) . .map_or(0, |i| i + 1), . ), 5 ( 0.00%) ExprKind::Field(_, name) => ExprUseNode::FieldAccess(name), . ExprKind::AddrOf(kind, mutbl, _) => ExprUseNode::AddrOf(kind, mutbl), . _ => ExprUseNode::Other, . }, . _ => ExprUseNode::Other, . } 9,054 ( 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 { 4,135 ( 0.00%) matches!(self, Self::Return(_)) . } . . /// Checks if the value is used as a method call receiver. . pub fn is_recv(&self) -> bool { 2,732 ( 0.00%) matches!(self, Self::MethodArg(_, _, 0)) . } . . /// Gets the needed type as it's defined without any type inference. 21,098 ( 0.00%) pub fn defined_ty(&self, cx: &LateContext<'tcx>) -> Option> { 30,140 ( 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()), . }), 3,280 ( 0.00%) Self::Return(id) => { 4,920 ( 0.00%) if let Node::Expr(Expr { . kind: ExprKind::Closure(c), . .. 1,640 ( 0.00%) }) = cx.tcx.hir_node_by_def_id(id.def_id) . { . 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(); 6,560 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id.def_id.to_def_id()), . ty, . }) . } . }, . Self::Field(field) => match get_parent_expr_for_hir(cx, field.hir_id) { . Some(Expr { . hir_id, -- line 2617 ---------------------------------------- -- line 2626 ---------------------------------------- . .map(|f| (adt, f)) . }) . .map(|(adt, field_def)| DefinedTy::Mir { . def_site_def_id: Some(adt.did()), . ty: Binder::dummy(cx.tcx.type_of(field_def.did).instantiate_identity().skip_norm_wip()), . }), . _ => None, . }, 16 ( 0.00%) Self::FnArg(callee, i) => { 24 ( 0.00%) let sig = expr_sig(cx, callee)?; 6,064 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::expr_sig (8x) 64 ( 0.00%) let (hir_ty, ty) = sig.input_with_hir(i)?; 312 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::input_with_hir (8x) 48 ( 0.00%) Some(match hir_ty { . Some(hir_ty) => DefinedTy::Hir(hir_ty), . None => DefinedTy::Mir { . def_site_def_id: sig.predicates_id(), . ty, . }, . }) 8 ( 0.00%) }, 12 ( 0.00%) Self::MethodArg(id, _, i) => { 12 ( 0.00%) let id = cx.typeck_results().type_dependent_def_id(id)?; 306 ( 0.00%) => ???:::type_dependent_def_id (6x) 6 ( 0.00%) let sig = cx.tcx.fn_sig(id).skip_binder(); 24 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id), . ty: sig.input(i), . }) 6 ( 0.00%) }, . Self::LetStmt(_) | Self::FieldAccess(..) | Self::Callee | Self::Other | Self::AddrOf(..) => None, . } 27,126 ( 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 { 13,020 ( 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> { 9,054 ( 0.00%) let mut adjustments: &[_] = typeck.expr_adjustments(e); 129,746 ( 0.00%) => ???:::expr_adjustments (3,018x) . let mut is_ty_unified = false; . let mut moved_before_use = false; . let mut same_ctxt = true; 42,252 ( 0.00%) ReplacingFilterMap( 6,036 ( 0.00%) hir_parent_with_src_iter(tcx, e.hir_id), . move |iter: &mut _, (parent, child_id)| { . let parent_ctxt; . let mut parent_adjustments: &[_] = &[]; 26,040 ( 0.00%) match parent { . Node::Expr(parent_expr) => { 3,124 ( 0.00%) parent_ctxt = parent_expr.span.ctxt(); 9,372 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 9,372 ( 0.00%) parent_adjustments = typeck.expr_adjustments(parent_expr); 115,950 ( 0.00%) => ???:::expr_adjustments (3,124x) 19,115 ( 0.00%) match parent_expr.kind { . ExprKind::Match(scrutinee, arms, _) if scrutinee.hir_id != child_id => { . is_ty_unified |= arms.len() != 1; . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, -- line 2706 ---------------------------------------- -- 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; . }, 1,746 ( 0.00%) ExprKind::Block(b, _) => { 1,746 ( 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 2741 ---------------------------------------- . Node::Arm(arm) => { . parent_ctxt = arm.span.ctxt(); . same_ctxt &= parent_ctxt == ctxt; . if arm.body.hir_id == child_id { . return None; . } . }, . Node::Block(b) => { 6,984 ( 0.00%) same_ctxt &= b.span.ctxt() == ctxt; . return None; . }, . Node::ConstBlock(_) => parent_ctxt = ctxt, . Node::ExprField(&ExprField { span, .. }) => { . parent_ctxt = span.ctxt(); . same_ctxt &= parent_ctxt == ctxt; . }, . Node::AnonConst(&AnonConst { span, .. }) -- line 2757 ---------------------------------------- -- line 2759 ---------------------------------------- . | 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(); 3,280 ( 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), . }) . }, . ) . } . 36,216 ( 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, . } . }) 24,144 ( 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,788 ( 0.00%) let end = pos + t.len; . let range = pos as usize..end as usize; . let inner = InnerSpan::new(range.start, range.end); 2,593 ( 0.00%) pos = end; 2,212 ( 0.00%) (t.kind, s.get(range).unwrap_or_default(), inner) . }) . } . . /// 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| { 22,371 ( 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 { 3 ( 0.00%) sm.span_take_while(span, |&ch| ch == ' ' || ch == ';') 2,052 ( 0.00%) => /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:: (3x) . } . . /// 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)> { 38,102 ( 0.00%) match kind { . $(hir::BinOpKind::$name => Some((LangItem::$name, LangItem::$assign)),)* . _ => None, . } . } . }; . } . . op_utils! { -- line 2958 ---------------------------------------- -- line 3570 ---------------------------------------- . { . Some(into_future_arg) . } else { . None . } . } . . /// Checks if the given expression is a call to `Default::default()`. 1 ( 0.00%) pub fn is_expr_default<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { 2 ( 0.00%) if let ExprKind::Call(fn_expr, []) = &expr.kind . && let ExprKind::Path(qpath) = &fn_expr.kind . && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) . { . cx.tcx.is_diagnostic_item(sym::default_fn, def_id) . } else { . false . } 1 ( 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 3679 ---------------------------------------- . cx.tcx.sess.edition().at_least_rust_2024() && msrv.meets(cx, msrvs::LET_CHAINS) . } . . /// Returns an iterator over successive parent nodes paired with the ID of the node which . /// immediatly preceeded them. . #[inline] . pub fn hir_parent_with_src_iter(tcx: TyCtxt<'_>, mut id: HirId) -> impl Iterator, HirId)> { . tcx.hir_parent_id_iter(id) 114,302 ( 0.00%) .map(move |parent| (tcx.hir_node(parent), mem::replace(&mut id, parent))) 695,206 ( 0.01%) => ???:::hir_node (10,219x) . } 642,177 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/nonzero.rs -------------------------------------------------------------------------------- Ir -- line 478 ---------------------------------------- . // types, and it arguably wouldn't want to be anyway because if this is . // MIR-inlined, there's no opportunity to put that argument metadata anywhere. . // . // The good answer here will eventually be pattern types, which will hopefully . // allow it to go back to `.0`, maybe with a cast of some sort. . // . // SAFETY: `ZeroablePrimitive` guarantees that the size and bit validity . // of `.0` is such that this transmute is sound. 27,464 ( 0.00%) unsafe { intrinsics::transmute_unchecked(self) } . } . } . . macro_rules! nonzero_integer { . ( . #[$stability:meta] . Self = $Ty:ident, . Primitive = $signedness:ident $Int:ident, -- line 494 ---------------------------------------- -- line 590 ---------------------------------------- . #[stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")] . #[rustc_const_stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline] . pub const fn leading_zeros(self) -> u32 { . // SAFETY: since `self` cannot be zero, it is safe to call `ctlz_nonzero`. . unsafe { 524,234 ( 0.01%) intrinsics::ctlz_nonzero(self.get() as $Uint) . } . } . . /// Returns the number of trailing zeros in the binary representation . /// of `self`. . /// . /// On many architectures, this function can perform better than `trailing_zeros()` on the underlying integer type, as special handling of zero can be avoided. . /// -- line 606 ---------------------------------------- -- line 620 ---------------------------------------- . #[stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")] . #[rustc_const_stable(feature = "nonzero_leading_trailing_zeros", since = "1.53.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline] . pub const fn trailing_zeros(self) -> u32 { . // SAFETY: since `self` cannot be zero, it is safe to call `cttz_nonzero`. . unsafe { 169,587 ( 0.00%) intrinsics::cttz_nonzero(self.get() as $Uint) . } . } . . /// Returns `self` with only the most significant bit set. . /// . /// # Example . /// . /// ``` -- line 636 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 15,984 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(cstr, fn_name)) = &func.kind 16,595 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, ty_path)) = &cstr.kind 6,626 ( 0.00%) && cx.tcx.lang_items().c_str() == ty_path.res.opt_def_id() 132,520 ( 0.00%) => ???:::lang_items (3,313x) . { . 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(..)` 27,972 ( 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), . _ => {}, . } . } 31,968 ( 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 ---------------------------------------- 26,504 ( 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; . 108,731 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, pat: &Pat<'_>) { 31,066 ( 0.00%) if !pat.span.from_expansion() 20,814 ( 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, . ); . }, . ); . } 124,264 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/integer_division_remainder_used.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use rustc_ast::BinOpKind; . use rustc_hir::Expr; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::Span; . . use super::INTEGER_DIVISION_REMAINDER_USED; . 52,184 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>, span: Span) { 19,569 ( 0.00%) if let BinOpKind::Div | BinOpKind::Rem = op . && let lhs_ty = cx.typeck_results().expr_ty(lhs) . && let rhs_ty = cx.typeck_results().expr_ty(rhs) . && let ty::Int(_) | ty::Uint(_) = lhs_ty.peel_refs().kind() . && let ty::Int(_) | ty::Uint(_) = rhs_ty.peel_refs().kind() . { . span_lint( . cx, . INTEGER_DIVISION_REMAINDER_USED, . span.source_callsite(), . format!("use of `{}` has been disallowed in this context", op.as_str()), . ); . } 52,184 ( 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/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] 172,052 ( 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); 130,641 ( 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 { 1,186,797 ( 0.01%) self.tcx.sess . } . . fn opt_span_lint>( . &self, . lint: &'static Lint, . span: Option, . decorate: impl for<'a> Diagnostic<'a, ()>, . ) { 29,156 ( 0.00%) let hir_id = self.last_node_with_lint_attrs; . 29,156 ( 0.00%) match span { 102,046 ( 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> { 336,178 ( 0.00%) 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> { 18,328 ( 0.00%) self.tcx . } . } . . impl<'tcx> ty::layout::HasTypingEnv<'tcx> for LateContext<'tcx> { . #[inline] . fn typing_env(&self) -> ty::TypingEnv<'tcx> { 1,900 ( 0.00%) self.typing_env() 28,500 ( 0.00%) => ???:::typing_env (950x) . } . } . . 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 ---------------------------------------- 183,695 ( 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); 185 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_no_std_crate (1x) . } . 261,720 ( 0.00%) fn check_expr_post(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 130,860 ( 0.00%) if self.has_no_std_attr { . return; . } . . if let ExprKind::Call(func, []) = &expr.kind . && let ExprKind::Path(QPath::Resolved(_, path)) = &func.kind . && let Some(def_id) = path.res.opt_def_id() . && is_entrypoint_fn(cx, def_id) . { -- line 49 ---------------------------------------- -- line 51 ---------------------------------------- . cx, . MAIN_RECURSION, . func.span, . format!("recursing into entrypoint `{}`", snippet(cx, func.span, "main")), . None, . "consider using another function for this recursion", . ); . } 327,150 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs -------------------------------------------------------------------------------- Ir -- line 247 ---------------------------------------- . } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.cx.tcx . } . } . . fn is_empty_body(cx: &LateContext<'_>, body: BodyId) -> bool { 49,131 ( 0.00%) matches!(cx.tcx.hir_body(body).value.kind, ExprKind::Block(b, _) if b.stmts.is_empty() && b.expr.is_none()) 393,961 ( 0.00%) => ???:::hir_body (5,459x) . } . . impl<'tcx> LateLintPass<'tcx> for ExtraUnusedTypeParameters { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 28,086 ( 0.00%) if let ItemKind::Fn { . generics, . body: body_id, . .. . } = item.kind . && !generics.params.is_empty() . && !is_empty_body(cx, body_id) . && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) . && !item.span.in_external_macro(cx.sess().source_map()) . && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, generics); . walk_item(&mut walker, item); . walker.emit_lint(); . } 112,344 ( 0.00%) } . 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { . // Only lint on inherent methods, not trait methods. 23,986 ( 0.00%) if let ImplItemKind::Fn(.., body_id) = item.kind 21,248 ( 0.00%) && !item.generics.params.is_empty() 39,740 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 1,243,512 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (7,948x) 10,668 ( 0.00%) && !is_empty_body(cx, body_id) 38,213 ( 0.00%) && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) 311,163 ( 0.00%) => ???:::is_exported (5,459x) . && !item.span.in_external_macro(cx.sess().source_map()) . && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, item.generics); . walk_impl_item(&mut walker, item); . walker.emit_lint(); . } 95,944 ( 0.00%) } . } 53,040 ( 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 } . } . 264,970 ( 0.00%) fn check_res_emit(&self, cx: &LateContext<'_>, res: &Res, span: Span) { 248,836 ( 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), . ); 317,964 ( 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>) { 32,668 ( 0.00%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind 18,299 ( 0.00%) && let Some(res) = path.res.type_ns . { 9,148 ( 0.00%) self.check_res_emit(cx, &res, item.span); 41,166 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (2,287x) . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx, AmbigArg>) { 175,277 ( 0.00%) if let TyKind::Path(path) = &ty.kind { 556,369 ( 0.01%) self.check_res_emit(cx, &cx.qpath_res(path, ty.hir_id), ty.span); 1,183,474 ( 0.01%) => ???:::qpath_res (50,579x) 868,636 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (50,579x) . } . } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { 1,152 ( 0.00%) self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span); 2,304 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (128x) . } . } 2,287 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . use rustc_middle::ty::adjustment::Adjust; . use rustc_middle::ty::{self, FloatTy, GenericArg, InferTy, Ty}; . use rustc_span::Symbol; . use std::ops::ControlFlow; . . use super::UNNECESSARY_CAST; . . #[expect(clippy::too_many_lines)] 15,210 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'tcx>, . cast_expr: &Expr<'tcx>, . cast_from: Ty<'tcx>, . cast_to: Ty<'tcx>, . ) -> bool { 1,170 ( 0.00%) let mut app = Applicability::MachineApplicable; 1,170 ( 0.00%) let cast_str = snippet_with_applicability(cx, cast_expr.span, "_", &mut app); . 2,340 ( 0.00%) if let ty::RawPtr(..) = cast_from.kind() . // check both mutability and type are the same 48 ( 0.00%) && cast_from.kind() == cast_to.kind() . && let ExprKind::Cast(_, cast_to_hir) = expr.kind . // Ignore casts to e.g. type aliases and infer types . // - p as pointer_alias . // - p as _ . && let TyKind::Ptr(to_pointee) = cast_to_hir.kind . { . match to_pointee.ty.kind { . // Ignore casts to pointers that are aliases or cfg dependant, e.g. -- line 41 ---------------------------------------- -- line 65 ---------------------------------------- . ), . &cast_str, . surrounding, . app.max(Applicability::MaybeIncorrect), . ); . } . . // skip cast of local that is a type alias 4,656 ( 0.00%) if let ExprKind::Cast(inner, ..) = expr.kind 2,340 ( 0.00%) && let ExprKind::Path(qpath) = inner.kind 2,260 ( 0.00%) && let QPath::Resolved(None, Path { res, .. }) = qpath 1,130 ( 0.00%) && let Res::Local(hir_id) = res 2,825 ( 0.00%) && let parent = cx.tcx.parent_hir_node(*hir_id) 68,006 ( 0.00%) => ???:::parent_hir_node (565x) 1,130 ( 0.00%) && let Node::LetStmt(local) = parent . { . if let Some(ty) = local.ty . && let TyKind::Path(qpath) = ty.kind . && is_ty_alias(&qpath) . { . return false; . } . -- line 86 ---------------------------------------- -- line 89 ---------------------------------------- . && let TyKind::Path(qpath) = cast_to.kind . && is_ty_alias(&qpath) . { . return false; . } . } . . // skip cast to non-primitive type 1,170 ( 0.00%) if let ExprKind::Cast(_, cast_to) = expr.kind 4,324 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, path)) = &cast_to.kind 2,976 ( 0.00%) && let Res::PrimTy(_) = path.res . { . } else { . return false; . } . . // skip cast of fn call that returns type alias . if let ExprKind::Cast(inner, ..) = expr.kind 1,984 ( 0.00%) && is_cast_from_ty_alias(cx, inner) . { . return false; . } . . if let Some(lit) = get_numeric_literal(cast_expr) { . let literal_str = &cast_str; . . if let LitKind::Int(n, _) = lit.node -- line 115 ---------------------------------------- -- line 146 ---------------------------------------- . lint_unnecessary_cast(cx, expr, num_lit.integer, cast_from, cast_to); . return true; . } . }, . _ => {}, . } . } . 2,992 ( 0.00%) if cast_from.kind() == cast_to.kind() && !expr.span.in_external_macro(cx.sess().source_map()) { 468 ( 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 (4x) 8 ( 0.00%) fn is_borrow_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 8 ( 0.00%) matches!(expr.kind, ExprKind::AddrOf(..)) . || cx . .typeck_results() 4 ( 0.00%) .expr_adjustments(expr) 144 ( 0.00%) => ???:::expr_adjustments (4x) . .first() . .is_some_and(|adj| matches!(adj.kind, Adjust::Borrow(_))) 8 ( 0.00%) } . . fn is_in_allowed_macro(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . const ALLOWED_MACROS: &[Symbol] = &[ . sym::format_args_macro, . sym::assert_eq_macro, . sym::debug_assert_eq_macro, . sym::assert_ne_macro, . sym::debug_assert_ne_macro, . ]; . matches!(expr.span.ctxt().outer_expn_data().macro_def_id, Some(def_id) if . cx.tcx.get_diagnostic_name(def_id).is_some_and(|sym| ALLOWED_MACROS.contains(&sym))) . } . . // Removing the cast here can change inference along the path to an outer . // method receiver, so avoid linting in that case. 28 ( 0.00%) if is_inference_sensitive_inner_expr(cx, cast_expr) 260 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::is_inference_sensitive_inner_expr (4x) . && contains_unsuffixed_numeric_literal(cast_expr) . && feeds_outer_method_receiver(cx, expr) . && has_lint_blocking_context_on_receiver_path(cx, expr) . { . return false; . } . . if let Some(id) = cast_expr.res_local_id() -- line 186 ---------------------------------------- -- line 188 ---------------------------------------- . { . // Binding context is different than the identifiers context. . // Weird macro wizardry could be involved here. . return false; . } . . // Changing `&(x as i32)` to `&x` would change the meaning of the code because the previous creates . // a reference to the temporary while the latter creates a reference to the original value. 28 ( 0.00%) let surrounding = match cx.tcx.parent_hir_node(expr.hir_id) { 488 ( 0.00%) => ???:::parent_hir_node (4x) 24 ( 0.00%) Node::Expr(parent) if is_borrow_expr(cx, parent) && !is_in_allowed_macro(cx, parent) => { 192 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::check::is_borrow_expr (4x) . MaybeParenOrBlock::Block . }, 28 ( 0.00%) Node::Expr(parent) if cx.precedence(cast_expr) < cx.precedence(parent) => MaybeParenOrBlock::Paren, 516 ( 0.00%) => ???:::precedence (8x) . _ => MaybeParenOrBlock::Nothing, . }; . 32 ( 0.00%) emit_lint( 965,469 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::emit_lint (4x) . cx, . expr, 24 ( 0.00%) format!("casting to the same type is unnecessary (`{cast_from}` -> `{cast_to}`)"), . &cast_str, . surrounding, . app, . ); . return true; . } . . false 13,676 ( 0.00%) } . . fn lint_unnecessary_cast( . cx: &LateContext<'_>, . expr: &Expr<'_>, . raw_literal_str: &str, . cast_from: Ty<'_>, . cast_to: Ty<'_>, . ) { -- line 224 ---------------------------------------- -- line 246 ---------------------------------------- . format!("casting {literal_kind_name} literal to `{cast_to}` is unnecessary"), . "try", . sugg, . Applicability::MachineApplicable, . ); . } . . fn get_numeric_literal<'e>(expr: &'e Expr<'e>) -> Option { 6,944 ( 0.00%) match expr.kind { . ExprKind::Lit(lit) => Some(lit), . ExprKind::Unary(UnOp::Neg | UnOp::Not, e) => { . if let ExprKind::Lit(lit) = e.kind { . Some(lit) . } else { . None . } . }, -- line 262 ---------------------------------------- -- line 278 ---------------------------------------- . /// . /// When in doubt, for example because it calls a non-local function that we don't have the . /// declaration for, assume if might be a type alias. . fn is_cast_from_ty_alias<'tcx>(cx: &LateContext<'tcx>, expr: impl Visitable<'tcx>) -> bool { . for_each_expr_without_closures(expr, |expr| { . // Calls are a `Path`, and usage of locals are a `Path`. So, this checks . // - call() as i32 . // - local as i32 10,808 ( 0.00%) if let ExprKind::Path(qpath) = expr.kind { 5,952 ( 0.00%) let res = cx.qpath_res(&qpath, expr.hir_id); 10,396 ( 0.00%) => ???:::qpath_res (452x) 2,976 ( 0.00%) if let Res::Def(DefKind::Fn, def_id) = res { . let Some(def_id) = def_id.as_local() else { . // External function, we can't know, better be safe . return ControlFlow::Break(()); . }; . if let Some(FnRetTy::Return(ty)) = cx.tcx.hir_get_fn_output(def_id) . && let TyKind::Path(qpath) = ty.kind . && is_ty_alias(&qpath) . { . // Function call to a local function returning a type alias . return ControlFlow::Break(()); . } . // Local usage 1,984 ( 0.00%) } else if let Res::Local(hir_id) = res 4,960 ( 0.00%) && let Node::LetStmt(l) = cx.tcx.parent_hir_node(hir_id) 54,388 ( 0.00%) => ???:::parent_hir_node (452x) . { . if let Some(e) = l.init . && is_cast_from_ty_alias(cx, e) . { . return ControlFlow::Break::<()>(()); . } . . if let Some(ty) = l.ty -- line 310 ---------------------------------------- -- line 323 ---------------------------------------- . . #[derive(Clone, Copy)] . enum MaybeParenOrBlock { . Paren, . Block, . Nothing, . } . 48 ( 0.00%) fn emit_lint( . cx: &LateContext<'_>, . expr: &Expr<'_>, . msg: String, . sugg: &str, . surrounding: MaybeParenOrBlock, . applicability: Applicability, . ) { 60 ( 0.00%) span_lint_and_sugg( 961,508 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (4x) . cx, . UNNECESSARY_CAST, . expr.span, . msg, . "try", 8 ( 0.00%) match surrounding { 12 ( 0.00%) MaybeParenOrBlock::Paren => format!("({sugg})"), . MaybeParenOrBlock::Block => format!("{{ {sugg} }}"), . MaybeParenOrBlock::Nothing => sugg.to_string(), . }, . applicability, . ); 28 ( 0.00%) } . . fn contains_unsuffixed_numeric_literal<'e>(expr: &'e Expr<'e>) -> bool { . for_each_expr_without_closures(expr, |e| { . if let Some(lit) = get_numeric_literal(e) . && matches!( . lit.node, . LitKind::Int(_, LitIntType::Unsuffixed) | LitKind::Float(_, LitFloatType::Unsuffixed) . ) -- line 360 ---------------------------------------- -- line 363 ---------------------------------------- . } . . ControlFlow::Continue(()) . }) . .is_some() . } . . // Returns `true` for expressions whose resolved type or method depends on inference. 8 ( 0.00%) fn is_inference_sensitive_inner_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 16 ( 0.00%) match expr.kind { . ExprKind::MethodCall(..) | ExprKind::Binary(..) | ExprKind::Unary(..) | ExprKind::Index(..) => cx . .typeck_results() 20 ( 0.00%) .type_dependent_def_id(expr.hir_id) 168 ( 0.00%) => ???:::type_dependent_def_id (4x) . .and_then(|def_id| cx.tcx.opt_associated_item(def_id)) . .is_some_and(|assoc| assoc.trait_container(cx.tcx).is_some()), . _ => false, . } 12 ( 0.00%) } . . // Returns `true` if the function's output type contains a type parameter . // originating from the selected input. . fn output_depends_on_input_param(cx: &LateContext<'_>, def_id: rustc_hir::def_id::DefId, input_index: usize) -> bool { . let sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_binder(); . . let Some(input_ty) = sig.inputs().get(input_index) else { . return false; -- line 388 ---------------------------------------- 7,901 ( 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/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")] 221,906 ( 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 1104 ---------------------------------------- . } . } . . #[derive_where(Clone, Copy, PartialEq, Hash; I: Interner)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] 14,436 ( 0.00%) #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] 8,501,973 ( 0.11%) => /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::> (7,218x) . pub struct FnSig { . pub inputs_and_output: I::Tys, 14,436 ( 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 { 29,983 ( 0.00%) self.inputs_and_output.inputs() 47,698 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs (6,814x) . } . . pub fn output(self) -> I::Ty { 39,160 ( 0.00%) self.inputs_and_output.output() 5 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output (1x) . } . . 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 ---------------------------------------- 43,604 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // (x % c + c) % c 130,860 ( 0.00%) if let ExprKind::Binary(rem_op, rem_lhs, rem_rhs) = expr.kind 6,523 ( 0.00%) && rem_op.node == BinOpKind::Rem . && let ExprKind::Binary(add_op, add_lhs, add_rhs) = rem_lhs.kind . && add_op.node == BinOpKind::Add . && let ctxt = expr.span.ctxt() . && rem_lhs.span.ctxt() == ctxt . && rem_rhs.span.ctxt() == ctxt . && add_lhs.span.ctxt() == ctxt . && add_rhs.span.ctxt() == ctxt . && !expr.span.in_external_macro(cx.sess().source_map()) -- line 62 ---------------------------------------- -- line 93 ---------------------------------------- . MANUAL_REM_EUCLID, . expr.span, . "manual `rem_euclid` implementation", . "consider using", . format!("{rem_of}.rem_euclid({const1})"), . app, . ); . } 523,440 ( 0.01%) } . } . . // Checks if either the left or right expressions can be an unsigned int constant and returns that . // constant along with the other expression unchanged if so . fn check_for_either_unsigned_int_constant<'a>( . cx: &'a LateContext<'_>, . ctxt: SyntaxContext, . left: &'a Expr<'_>, -- line 109 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . . pub struct RawStrings { . pub allow_one_hash_in_raw_strings: bool, . } . . impl RawStrings { . pub fn new(conf: &'static Conf) -> Self { . Self { 1 ( 0.00%) allow_one_hash_in_raw_strings: conf.allow_one_hash_in_raw_strings, . } . } . } . . impl EarlyLintPass for RawStrings { 673,443 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 319,985 ( 0.00%) if let ExprKind::FormatArgs(format_args) = &expr.kind . && !format_args.span.in_external_macro(cx.sess().source_map()) . && format_args.span.check_text(cx, |src| src.starts_with('r')) . && let Some(str) = snippet_opt(cx.sess(), format_args.span) . && let count_hash = str.bytes().skip(1).take_while(|b| *b == b'#').count() . && let Some(str) = str.get(count_hash + 2..str.len() - count_hash - 1) . { . self.check_raw_string( . cx, -- line 83 ---------------------------------------- -- line 84 ---------------------------------------- . str, . format_args.span, . "r", . u8::try_from(count_hash).unwrap(), . "string", . ); . } . 108,300 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 135,253 ( 0.00%) && let (prefix, max) = match lit.kind { . LitKind::StrRaw(max) => ("r", max), . LitKind::ByteStrRaw(max) => ("br", max), . LitKind::CStrRaw(max) => ("cr", max), . _ => return, . } 366 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . && expr.span.check_text(cx, |src| src.starts_with(prefix)) . { 1,464 ( 0.00%) self.check_raw_string(cx, lit.symbol.as_str(), expr.span, prefix, max, lit.kind.descr()); 195,057 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs:::check_raw_string (122x) . } 598,616 ( 0.01%) } . } . . impl RawStrings { 1,586 ( 0.00%) fn check_raw_string(&self, cx: &EarlyContext<'_>, str: &str, lit_span: Span, prefix: &str, max: u8, descr: &str) { . if !str.contains(['\\', '"']) { 1,220 ( 0.00%) span_lint_and_then( 87,589 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_raw_string::{closure#0}> (122x) . cx, . NEEDLESS_RAW_STRINGS, . lit_span, . "unnecessary raw string literal", 976 ( 0.00%) |diag| { . let (start, end) = hash_spans(lit_span, prefix.len(), 0, max); . . // BytePos: skip over the `b` in `br`, we checked the prefix appears in the source text . let r_pos = lit_span.lo() + BytePos::from_usize(prefix.len() - 1); . let start = start.with_lo(r_pos); . . let mut remove = vec![(start, String::new())]; . // avoid debug ICE from empty suggestions -- line 123 ---------------------------------------- -- line 127 ---------------------------------------- . . diag.multipart_suggestion( . format!("use a plain {descr} literal instead"), . remove, . Applicability::MachineApplicable, . ); . }, . ); 488 ( 0.00%) if !cx.get_lint_level_spec(NEEDLESS_RAW_STRINGS).is_allow() { 20,608 ( 0.00%) => ???:::get_lint_level_spec (122x) . return; . } . } . . let mut req = { . let mut following_quote = false; . let mut req = 0; . // `once` so a raw string ending in hashes is still checked . let num = str.as_bytes().iter().chain(once(&0)).try_fold(0u8, |acc, &b| { 10,497 ( 0.00%) match b { . b'"' if !following_quote => (following_quote, req) = (true, 1), . b'#' => req += u8::from(following_quote), . _ => { 10,863 ( 0.00%) if following_quote { . following_quote = false; . . if req == max { . return ControlFlow::Break(req); . } . . return ControlFlow::Continue(acc.max(req)); . } -- line 157 ---------------------------------------- -- line 160 ---------------------------------------- . . ControlFlow::Continue(acc) . }); . . match num { . ControlFlow::Continue(num) | ControlFlow::Break(num) => num, . } . }; 732 ( 0.00%) if self.allow_one_hash_in_raw_strings { . req = req.max(1); . } 976 ( 0.00%) if req < max { . span_lint_and_then( . cx, . NEEDLESS_RAW_STRING_HASHES, . lit_span, . "unnecessary hashes around raw string literal", . |diag| { . let (start, end) = hash_spans(lit_span, prefix.len(), req, max); . -- line 179 ---------------------------------------- -- line 186 ---------------------------------------- . diag.multipart_suggestion( . message, . vec![(start, String::new()), (end, String::new())], . Applicability::MachineApplicable, . ); . }, . ); . } 976 ( 0.00%) } . } . . /// Returns spans pointing at the unneeded hashes, e.g. for a `req` of `1` and `max` of `3`: . /// . /// ```ignore . /// r###".."### . /// ^^ ^^ . /// ``` -- line 202 ---------------------------------------- 4,231 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bool_comparison.rs -------------------------------------------------------------------------------- Ir -- line 31 ---------------------------------------- . pub BOOL_COMPARISON, . complexity, . "comparing a variable to a boolean, e.g., `if x == true` or `if x != true`" . } . . declare_lint_pass!(BoolComparison => [BOOL_COMPARISON]); . . impl<'tcx> LateLintPass<'tcx> for BoolComparison { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 143,108 ( 0.00%) if e.span.from_expansion() { . return; . } . 18,027 ( 0.00%) if let ExprKind::Binary(Spanned { node, .. }, left_side, right_side) = e.kind 36,054 ( 0.00%) && is_expn_of(left_side.span, sym::cfg).is_none() 204,306 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of (6,009x) 36,054 ( 0.00%) && is_expn_of(right_side.span, sym::cfg).is_none() 204,306 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of (6,009x) 30,045 ( 0.00%) && cx.typeck_results().expr_ty(left_side).is_bool() 240,360 ( 0.00%) => ???:::expr_ty (6,009x) . && cx.typeck_results().expr_ty(right_side).is_bool() . { . let ignore_case = None::<(fn(_) -> _, &str)>; . let ignore_no_literal = None::<(fn(_, _) -> _, &str)>; . match node { . BinOpKind::Eq => { . let true_case = Some((|h| h, "equality checks against true are unnecessary")); . let false_case = Some(( -- line 55 ---------------------------------------- -- line 94 ---------------------------------------- . Some(( . |l: Sugg<'tcx>, r: Sugg<'tcx>| l.bit_and(&(!r)), . "order comparisons between booleans can be simplified", . )), . ), . _ => (), . } . } 523,440 ( 0.01%) } . } . . fn check_comparison<'a, 'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . left_true: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, . left_false: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, . right_true: Option<(impl FnOnce(Sugg<'a>) -> Sugg<'a>, &'static str)>, -- line 110 ---------------------------------------- 107,652 ( 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. 156,816 ( 0.00%) unsafe { *self.value.get() } . } . . /// Updates the contained value using a function. . /// . /// # Examples . /// . /// ``` . /// use std::cell::Cell; -- line 566 ---------------------------------------- 1,464 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/new_without_default.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . #[clippy::version = "pre 1.29.0"] . pub NEW_WITHOUT_DEFAULT, . style, . "`pub fn new() -> Self` method without `Default` implementation" . } . . impl_lint_pass!(NewWithoutDefault => [NEW_WITHOUT_DEFAULT]); . 1 ( 0.00%) #[derive(Clone, Default)] . pub struct NewWithoutDefault { . impling_types: Option, . } . . impl<'tcx> LateLintPass<'tcx> for NewWithoutDefault { . #[expect(clippy::too_many_lines)] 126,387 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 43,766 ( 0.00%) let hir::ItemKind::Impl(hir::Impl { . of_trait: None, . generics, . self_ty: impl_self_ty, . .. . }) = item.kind . else { . return; . }; . 17,069 ( 0.00%) for assoc_item in cx . .tcx 3,118 ( 0.00%) .associated_items(item.owner_id.def_id) 3,118 ( 0.00%) .filter_by_name_unhygienic(sym::new) 106,156 ( 0.00%) => ???:::filter_by_name_unhygienic (1,559x) . { 16 ( 0.00%) if let AssocKind::Fn { has_self: false, .. } = assoc_item.kind 16 ( 0.00%) && let assoc_item_hir_id = cx.tcx.local_def_id_to_hir_id(assoc_item.def_id.expect_local()) 40 ( 0.00%) && let impl_item = cx.tcx.hir_node(assoc_item_hir_id).expect_impl_item() 248 ( 0.00%) => ???:::hir_node (4x) 20 ( 0.00%) => ???:::expect_impl_item (4x) 16 ( 0.00%) && !impl_item.span.in_external_macro(cx.sess().source_map()) 8 ( 0.00%) && let hir::ImplItemKind::Fn(ref sig, _) = impl_item.kind . && let id = impl_item.owner_id . // can't be implemented for unsafe new . && !sig.header.is_unsafe() . // shouldn't be implemented when it is hidden in docs 8 ( 0.00%) && !cx.tcx.is_doc_hidden(impl_item.owner_id.def_id) . // when the result of `new()` depends on a parameter we should not require . // an impl of `Default` 8 ( 0.00%) && impl_item.generics.params.is_empty() 8 ( 0.00%) && sig.decl.inputs.is_empty() . && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id) . && let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() . && self_ty == return_ty(cx, impl_item.owner_id) . && let Some(default_trait_id) = cx.tcx.get_diagnostic_item(sym::Default) . { . if self.impling_types.is_none() { . let mut impls = HirIdSet::default(); . for &d in cx.tcx.local_trait_impls(default_trait_id) { -- line 99 ---------------------------------------- -- line 190 ---------------------------------------- . &where_clause_sugg, . ), . app, . ); . }, . ); . } . } 112,344 ( 0.00%) } . } . . fn create_new_without_default_suggest_msg( . attrs_sugg: &str, . self_type_snip: &str, . generics_sugg: &str, . where_clause_sugg: &str, . ) -> String { -- line 206 ---------------------------------------- 32,700 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs -------------------------------------------------------------------------------- Ir -- line 852 ---------------------------------------- . Self { . msrv: conf.msrv.into(), . enforce_iter_loop_reborrow: conf.enforce_iter_loop_reborrow, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Loops { 719,730 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) let for_loop = higher::ForLoop::hir(expr); 981,450 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) 65,430 ( 0.00%) if let Some(higher::ForLoop { . pat, . arg, . body, . loop_id, . span, . label, 130,860 ( 0.00%) }) = for_loop . { . // we don't want to check expanded macros . // this check is not at the top of the function . // since higher::for_loop expressions are marked as expansions . if body.span.from_expansion() { . return; . } . self.check_for_loop(cx, pat, arg, body, expr, span, label); . if let ExprKind::Block(block, _) = body.kind { . never_loop::check(cx, block, loop_id, span, for_loop.as_ref()); . } . } . . // we don't want to check expanded macros 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . . // check for never_loop 161,478 ( 0.00%) if let ExprKind::Loop(block, ..) = expr.kind { . never_loop::check(cx, block, expr.hir_id, expr.span, None); . } . . // check for `loop { if let {} else break }` that could be `while let` . // (also matches an explicit "match" instead of "if let") . // (even if the "match" or "if let" is used for declaration) . // (also matches on `let {} else break`) . if let ExprKind::Loop(block, label, LoopSource::Loop, _) = expr.kind { . // also check for empty `loop {}` statements, skipping those in #[panic_handler] . empty_loop::check(cx, expr, block); . while_let_loop::check(cx, expr, block); . infinite_loop::check(cx, expr, block, label); . } . 107,652 ( 0.00%) while_let_on_iterator::check(cx, expr); 915,042 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::check (53,826x) . . if let Some(higher::While { . condition, body, span, .. . }) = higher::While::hir(expr) . { . while_immutable_condition::check(cx, condition, body); . while_float::check(cx, condition); . missing_spin_loop::check(cx, condition, body); . manual_while_let_some::check(cx, condition, body, span); . } . 114,196 ( 0.00%) if let ExprKind::MethodCall(path, recv, args, _) = expr.kind { 1,636 ( 0.00%) let name = path.ident.name; . . let is_iterator_method = || { . cx.ty_based_def(expr) . .assoc_fn_parent(cx) . .is_diag_item(cx, sym::Iterator) . }; . . // is_iterator_method is a bit expensive, so we call it last in each match arm . match (name, args) { 20,525 ( 0.00%) (sym::for_each | sym::all | sym::any, [arg]) => { . if let ExprKind::Closure(closure) = arg.kind . && is_iterator_method() . { . unused_enumerate_index::check_method(cx, recv, arg, closure); . never_loop::check_iterator_reduction(cx, expr, recv, closure); . } . }, . -- line 935 ---------------------------------------- -- line 947 ---------------------------------------- . { . never_loop::check_iterator_reduction(cx, expr, recv, closure); . } . }, . . _ => {}, . } . } 523,440 ( 0.01%) } . } . . impl Loops { . #[expect(clippy::too_many_arguments)] . fn check_for_loop<'tcx>( . &self, . cx: &LateContext<'tcx>, . pat: &'tcx Pat<'_>, -- line 963 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /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 -------------------------------------------------------------------------------- Ir -- line 53 ---------------------------------------- . } . . /// Indicates the confidence in the correctness of a suggestion. . /// . /// All suggestions are marked with an `Applicability`. Tools use the applicability of a suggestion . /// to determine whether it should be automatically applied or if the user should be consulted . /// before applying the suggestion. . #[derive(Copy, Clone, Debug, Hash, Encodable, Decodable, Serialize, Deserialize)] 2,583 ( 0.00%) #[derive(PartialEq, Eq, PartialOrd, Ord)] . pub enum Applicability { . /// The suggestion is definitely what the user intended, or maintains the exact meaning of the code. . /// This suggestion should be automatically applied. . /// . /// In case of multiple `MachineApplicable` suggestions (whether as part of . /// the same `multipart_suggestion` or not), all of them should be . /// automatically applied. . MachineApplicable, -- line 69 ---------------------------------------- -- line 144 ---------------------------------------- . fn from(id: StableLintExpectationId) -> LintExpectationId { . LintExpectationId::Stable(id) . } . } . . /// Setting for how to handle a lint. . /// . /// See: 220,581 ( 0.00%) #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] . #[derive(Encodable, Decodable, StableHash)] . pub enum Level { . /// The `allow` level will not issue any message. . Allow, . /// The `expect` level will suppress the lint message but in turn produce a message . /// if the lint wasn't issued in the expected scope. `Expect` should not be used as . /// an initial level for a lint. . /// -- line 160 ---------------------------------------- -- line 212 ---------------------------------------- . /// Converts an `Option` to a level. . pub fn from_opt_symbol(s: Option) -> Option { . s.and_then(Self::from_symbol) . } . . /// Converts a `Symbol` to a level. . pub fn from_symbol(s: Symbol) -> Option { . match s { 14 ( 0.00%) sym::allow => Some(Level::Allow), . sym::expect => Some(Level::Expect), . sym::warn => Some(Level::Warn), . sym::deny => Some(Level::Deny), . sym::forbid => Some(Level::Forbid), . _ => None, . } . } . -- line 228 ---------------------------------------- -- line 778 ---------------------------------------- . } . . /// Implements `LintPass for $ty` with the given list of `Lint` statics. . #[macro_export] . macro_rules! impl_lint_pass { . ($ty:ty => [$($lint:expr),* $(,)?]) => { . impl $crate::LintPass for $ty { . fn name(&self) -> &'static str { stringify!($ty) } 2,868 ( 0.00%) fn get_lints(&self) -> $crate::LintVec { vec![$($lint),*] } . } . impl $ty { . #[allow(unused)] . pub fn lint_vec() -> $crate::LintVec { vec![$($lint),*] } . } . }; . } . -- line 794 ---------------------------------------- -------------------------------------------------------------------------------- -- 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. 97,933 ( 0.00%) #[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 || { 87,791 ( 0.00%) let token = cursor.advance_token(); 2,797,786 ( 0.04%) => ???:::advance_token (22,869x) 77,989 ( 0.00%) 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. . 6,448 ( 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 ---------------------------------------- 4,962 ( 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 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)`. 276 ( 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. 60 ( 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. 72 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 528 ( 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'2 (12x) . 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 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`. 12,931 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct Pat { . pub id: NodeId, . pub kind: PatKind, . pub span: Span, . } . . impl Pat { . /// Attempt reparsing the pattern as a type. -- line 632 ---------------------------------------- -- 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`. 22,782 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 42,160 ( 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 (1,360x) . 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`), -- line 879 ---------------------------------------- -- 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, . } . 109,742 ( 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 1070 ---------------------------------------- . Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => { . Fixity::Left . } . } . } . . pub fn is_comparison(self) -> bool { . use BinOpKind::*; 38,110 ( 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 1156 ---------------------------------------- . } . } . . pub type AssignOp = Spanned; . . /// Unary operator. . /// . /// Note that `&data` is not an operator, it's an `AddrOf` expression. 2,017 ( 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>)> { 5 ( 0.00%) match self { . Self::Decl => None, 1 ( 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 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, . } . 102 ( 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 2011 ---------------------------------------- . /// of `x` and treat `x.use` as either a copy/clone/move as appropriate. . Use { . /// The span of the `use` keyword. . use_kw: Span, . }, . } . . /// Closure lifetime binder, `for<'a, 'b>` in `for<'a, 'b> |_: &'a (), _: &'b ()|`. 3 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum ClosureBinder { . /// The binder is not present, all closure lifetimes are inferred. . NotPresent, . /// The binder is present. . For { . /// Span of the whole `for<>` clause . /// . /// ```text -- line 2027 ---------------------------------------- -- line 2244 ---------------------------------------- . } . . /// This type is used within both `ast::MetaItemLit` and `hir::Lit`. . /// . /// Note that the entire literal (including the suffix) is considered when . /// deciding the `LitKind`. This means that float literals like `1f32` are . /// classified by this type as `Float`. This is different to `token::LitKind` . /// which does *not* consider the suffix. 276 ( 0.00%) #[derive(Clone, Copy, Encodable, Decodable, Debug, Hash, Eq, PartialEq, StableHash)] . pub enum LitKind { . /// A string literal (`"foo"`). The symbol is unescaped, and so may differ . /// from the original token's symbol. . Str(Symbol, StrStyle), . /// A byte string (`b"foo"`). The symbol is unescaped, and so may differ . /// from the original token's symbol. . ByteStr(ByteSymbol, StrStyle), . /// A C String (`c"foo"`). Guaranteed to only have `\0` at the end. The -- line 2260 ---------------------------------------- -- line 2275 ---------------------------------------- . Bool(bool), . /// Placeholder for a literal that wasn't well-formed in some way. . Err(ErrorGuaranteed), . } . . impl LitKind { . pub fn str(&self) -> Option { . match *self { 1 ( 0.00%) LitKind::Str(s, _) => Some(s), . _ => None, . } . } . . /// Returns `true` if this literal is a string. . pub fn is_str(&self) -> bool { . matches!(self, LitKind::Str(..)) . } -- line 2291 ---------------------------------------- -- line 2292 ---------------------------------------- . . /// Returns `true` if this literal is byte literal string. . pub fn is_bytestr(&self) -> bool { . matches!(self, LitKind::ByteStr(..)) . } . . /// Returns `true` if this is a numeric literal. . pub fn is_numeric(&self) -> bool { 36,960 ( 0.00%) matches!(self, LitKind::Int(..) | LitKind::Float(..)) . } . . /// Returns `true` if this literal has no suffix. . /// Note: this will return true for literals with prefixes such as raw strings and byte strings. . pub fn is_unsuffixed(&self) -> bool { . !self.is_suffixed() . } . -- line 2308 ---------------------------------------- -- line 2433 ---------------------------------------- . Equality { term: Term }, . /// A bound on an associated type (e.g., `AssocTy: Bound` in `Trait`). . Bound { . #[visitable(extra = BoundKind::Bound)] . bounds: GenericBounds, . }, . } . 18,384 ( 0.00%) #[derive(Encodable, Decodable, Debug, Walkable)] . pub struct Ty { . pub id: NodeId, . pub kind: TyKind, . pub span: Span, . } . . impl Clone for Ty { . fn clone(&self) -> Self { -- line 2449 ---------------------------------------- -- line 2501 ---------------------------------------- . pub struct UnsafeBinderTy { . pub generic_params: ThinVec, . pub inner_ty: Box, . } . . /// The various kinds of type recognized by the compiler. . // . // Adding a new variant? Please update `test_ty` in `tests/ui/macros/stringify.rs`. 5,961 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum TyKind { . /// A variable-length slice (`[T]`). . Slice(Box), . /// A fixed length array (`[T; n]`). . Array(Box, AnonConst), . /// A raw pointer (`*const T` or `*mut T`). . Ptr(MutTy), . /// A reference (`&'a T` or `&'a mut T`). -- line 2517 ---------------------------------------- -- line 2911 ---------------------------------------- . #[visitable(ignore)] . pub options: InlineAsmOptions, . pub line_spans: Vec, . } . . /// A parameter in a function header. . /// . /// E.g., `bar: usize` as in `fn foo(bar: usize)`. 9 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct Param { . pub attrs: AttrVec, . pub ty: Box, . pub pat: Box, . pub id: NodeId, . pub span: Span, . pub is_placeholder: bool, . } -- line 2927 ---------------------------------------- -- line 2979 ---------------------------------------- . }; . } . } . None . } . . /// Returns `true` if parameter is `self`. . pub fn is_self(&self) -> bool { 35,187 ( 0.00%) if let PatKind::Ident(_, ident, _) = self.pat.kind { . ident.name == kw::SelfLower . } else { . false . } . } . . /// Builds a `Param` object from `ExplicitSelf`. . pub fn from_self(attrs: AttrVec, eself: ExplicitSelf, eself_ident: Ident) -> Param { -- line 2995 ---------------------------------------- -- line 3187 ---------------------------------------- . match *self { . ImplPolarity::Positive => "positive".fmt(f), . ImplPolarity::Negative(_) => "negative".fmt(f), . } . } . } . . /// The polarity of a trait bound. 46 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, Hash)] . #[derive(StableHash, Walkable)] . pub enum BoundPolarity { . /// `Type: Trait` . Positive, . /// `Type: !Trait` . Negative(Span), . /// `Type: ?Trait` . Maybe(Span), -- line 3203 ---------------------------------------- -- line 3209 ---------------------------------------- . Self::Positive => "", . Self::Negative(_) => "!", . Self::Maybe(_) => "?", . } . } . } . . /// The constness of a trait bound. 46 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, Hash)] . #[derive(StableHash, Walkable)] . pub enum BoundConstness { . /// `Type: Trait` . Never, . /// `Type: const Trait` . Always(Span), . /// `Type: [const] Trait` . Maybe(Span), -- line 3225 ---------------------------------------- -- line 3249 ---------------------------------------- . pub fn as_str(self) -> &'static str { . match self { . Self::Normal => "", . Self::Async(_) => "async", . } . } . } . 2 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum FnRetTy { . /// Returns type is not specified. . /// . /// Functions default to `()` and closures default to inference. . /// Span points to where return type would be inserted. . Default(Span), . /// Everything else. . Ty(Box), -- line 3265 ---------------------------------------- -- line 3615 ---------------------------------------- . pub enum VisibilityKind { . Public, . Restricted { path: Box, id: NodeId, shorthand: bool }, . Inherited, . } . . impl VisibilityKind { . pub fn is_pub(&self) -> bool { 306 ( 0.00%) matches!(self, VisibilityKind::Public) . } . } . . #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct ImplRestriction { . pub kind: RestrictionKind, . pub span: Span, . } -- line 3631 ---------------------------------------- -- line 4197 ---------------------------------------- . Delegation(Box), . /// A list or glob delegation item (`reuse prefix::{a, b, c}`, `reuse prefix::*`). . /// Treated similarly to a macro call and expanded early. . DelegationMac(Box), . } . . impl ItemKind { . pub fn ident(&self) -> Option { 74,072 ( 0.00%) match *self { 1 ( 0.00%) ItemKind::ExternCrate(_, ident) 8 ( 0.00%) | ItemKind::Static(StaticItem { ident, .. }) 4 ( 0.00%) | ItemKind::Const(ConstItem { ident, .. }) . | ItemKind::Fn(Fn { ident, .. }) . | ItemKind::Mod(_, ident, _) . | ItemKind::TyAlias(TyAlias { ident, .. }) . | ItemKind::Enum(ident, ..) . | ItemKind::Struct(ident, ..) 1 ( 0.00%) | ItemKind::Union(ident, ..) . | ItemKind::Trait(Trait { ident, .. }) . | ItemKind::TraitAlias(TraitAlias { ident, .. }) . | ItemKind::MacroDef(ident, _) . | ItemKind::Delegation(Delegation { ident, .. }) => Some(ident), . . ItemKind::ConstBlock(_) => Some(ConstBlockItem::IDENT), . . ItemKind::Use(_) -- line 4222 ---------------------------------------- -- line 4235 ---------------------------------------- . Use(..) | Static(..) | Const(..) | ConstBlock(..) | Fn(..) | Mod(..) . | GlobalAsm(..) | TyAlias(..) | Struct(..) | Union(..) | Trait(..) | TraitAlias(..) . | MacroDef(..) | Delegation(..) | DelegationMac(..) => "a", . ExternCrate(..) | ForeignMod(..) | MacCall(..) | Enum(..) | Impl { .. } => "an", . } . } . . pub fn descr(&self) -> &'static str { 1,070 ( 0.00%) match self { . ItemKind::ExternCrate(..) => "extern crate", . ItemKind::Use(..) => "`use` import", . ItemKind::Static(..) => "static item", . ItemKind::Const(..) => "constant item", . ItemKind::ConstBlock(..) => "const block", . ItemKind::Fn(..) => "function", . ItemKind::Mod(..) => "module", . ItemKind::ForeignMod(..) => "extern block", -- line 4251 ---------------------------------------- -- line 4253 ---------------------------------------- . ItemKind::TyAlias(..) => "type alias", . ItemKind::Enum(..) => "enum", . ItemKind::Struct(..) => "struct", . ItemKind::Union(..) => "union", . ItemKind::Trait(..) => "trait", . ItemKind::TraitAlias(..) => "trait alias", . ItemKind::MacCall(..) => "item macro invocation", . ItemKind::MacroDef(..) => "macro definition", 166 ( 0.00%) ItemKind::Impl { .. } => "implementation", . ItemKind::Delegation(..) => "delegated function", . ItemKind::DelegationMac(..) => "delegation", . } . } . . pub fn generics(&self) -> Option<&Generics> { . match self { . Self::Fn(Fn { generics, .. }) -- line 4269 ---------------------------------------- -- line 4316 ---------------------------------------- . /// An associated delegation item. . Delegation(Box), . /// An associated list or glob delegation item. . DelegationMac(Box), . } . . impl AssocItemKind { . pub fn ident(&self) -> Option { 11,997 ( 0.00%) match *self { 183 ( 0.00%) AssocItemKind::Const(ConstItem { ident, .. }) 31,875 ( 0.00%) | AssocItemKind::Fn(Fn { ident, .. }) 3,933 ( 0.00%) | AssocItemKind::Type(TyAlias { ident, .. }) . | AssocItemKind::Delegation(Delegation { ident, .. }) => Some(ident), . . AssocItemKind::MacCall(_) | AssocItemKind::DelegationMac(_) => None, . } . } . . pub fn defaultness(&self) -> Defaultness { . match *self { -- line 4335 ---------------------------------------- 43,407 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . sym::add, . sym::wrapping_add, . sym::sub, . sym::wrapping_sub, . sym::offset, . sym::wrapping_offset, . ]; . 345,986 ( 0.00%) if let ExprKind::Call(func, [.., count]) = expr.kind . // Find calls to ptr::{copy, copy_nonoverlapping} . // and ptr::swap_nonoverlapping, 16,617 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 27,695 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 340,522 ( 0.00%) => ???:::qpath_res (5,539x) 71,968 ( 0.00%) && matches!(cx.tcx.get_diagnostic_name(def_id), Some( 340,121 ( 0.00%) => ???:::get_diagnostic_name (5,536x) . 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)); . } 11,414 ( 0.00%) if let ExprKind::MethodCall(method_path, ptr_self, [.., count], _) = expr.kind . // Find calls to copy_{from,to}{,_nonoverlapping} 1,604 ( 0.00%) && let method_ident = method_path.ident.name . && METHODS.contains(&method_ident) . . // Get the pointee type 24 ( 0.00%) && let ty::RawPtr(pointee_ty, _) = 12 ( 0.00%) cx.typeck_results().expr_ty(ptr_self).kind() 480 ( 0.00%) => ???:::expr_ty (12x) . { 12 ( 0.00%) return Some((*pointee_ty, count)); . } . None . } . . impl<'tcx> LateLintPass<'tcx> for SizeOfInElementCount { 392,580 ( 0.00%) 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 24 ( 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 . && let Some(ty_used_for_size_of) = get_size_of_ty(cx, count_expr, false) . && pointee_ty == ty_used_for_size_of . { . span_lint_and_help(cx, SIZE_OF_IN_ELEMENT_COUNT, count_expr.span, LINT_MSG, None, HELP_MSG); . } 392,580 ( 0.00%) } . } 11,078 ( 0.00%) -------------------------------------------------------------------------------- -- 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<'_>) { 48,488 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . self_ty, . items: [impl_item_ref], . .. 15,680 ( 0.00%) }) = item.kind 12,123 ( 0.00%) && let Some(into_trait_seg) = of_trait.trait_ref.path.segments.last() . // `impl Into for self_ty` 17,388 ( 0.00%) && let Some(GenericArgs { args: [GenericArg::Type(target_ty)], .. }) = into_trait_seg.args 7,371 ( 0.00%) && span_is_local(item.span) 16,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (1,053x) 9,477 ( 0.00%) && let middle_trait_ref = cx.tcx.impl_trait_ref(item.owner_id).instantiate_identity().skip_norm_wip() 80,277 ( 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:: (1,053x) 5,265 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Into, middle_trait_ref.def_id) 105,300 ( 0.00%) => ???:::is_diagnostic_item (1,053x) . && !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); . } . }, . ); . } 14,043 ( 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 ---------------------------------------- 60,786 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/needless_bitwise_bool.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use clippy_utils::source::snippet_with_context; . use rustc_errors::Applicability; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . . use super::NEEDLESS_BITWISE_BOOL; . 60,090 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, e: &Expr<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>) { 25,080 ( 0.00%) let op_str = match op { . BinOpKind::BitAnd => "&&", . BinOpKind::BitOr => "||", . _ => return, . }; 1,655 ( 0.00%) if matches!( 3,310 ( 0.00%) rhs.kind, . ExprKind::Call(..) | ExprKind::MethodCall(..) | ExprKind::Binary(..) | ExprKind::Unary(..) . ) && cx.typeck_results().expr_ty(e).is_bool() . && !rhs.can_have_side_effects() . { . span_lint_and_then( . cx, . NEEDLESS_BITWISE_BOOL, . e.span, -- line 24 ---------------------------------------- -- line 28 ---------------------------------------- . let expr_span_ctxt = e.span.ctxt(); . let (lhs_snip, _) = snippet_with_context(cx, lhs.span, expr_span_ctxt, "..", &mut applicability); . let (rhs_snip, _) = snippet_with_context(cx, rhs.span, expr_span_ctxt, "..", &mut applicability); . . diag.span_suggestion(e.span, "try", format!("{lhs_snip} {op_str} {rhs_snip}"), applicability); . }, . ); . } 36,054 ( 0.00%) } 4,965 ( 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; . 8,176 ( 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, . ) { 2,336 ( 0.00%) if let ty::RawPtr(from_ty, from_mutbl) = cast_from.kind() 48 ( 0.00%) && let ty::RawPtr(to_ty, to_mutbl) = cast_to.kind() 24 ( 0.00%) && 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() . && let Some(prefix) = std_or_core(cx) . && let mut app = Applicability::MachineApplicable -- line 31 ---------------------------------------- -- 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, . ); . } . } 9,344 ( 0.00%) } . 392,556 ( 0.00%) pub(super) fn check_null_ptr_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 134,246 ( 0.00%) if let ExprKind::MethodCall(method, cast_from_expr, [], _) = expr.kind 124 ( 0.00%) && let ExprKind::Call(func, []) = cast_from_expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = func.kind . && let Some(defid) = path.res.opt_def_id() . && let method = match (cx.tcx.get_diagnostic_name(defid), method.ident.name) { . (Some(sym::ptr_null), sym::cast_mut) => "null_mut", . (Some(sym::ptr_null_mut), sym::cast_const) => "null", . _ => return, . } . && let Some(prefix) = std_or_core(cx) -- line 89 ---------------------------------------- -- 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, . ); . } 457,982 ( 0.01%) } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs -------------------------------------------------------------------------------- Ir -- line 24 ---------------------------------------- . pub(super) trait SpecFromIter { . fn from_iter(iter: I) -> Self; . } . . impl SpecFromIter for Vec . where . I: Iterator, . { 275,830 ( 0.00%) default fn from_iter(iterator: I) -> Self { 153,140 ( 0.00%) SpecFromIterNested::from_iter(iterator) 53,133 ( 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, ::len>>>::from_iter (337x) 248,247 ( 0.00%) } . } . . impl SpecFromIter> for Vec { . fn from_iter(iterator: IntoIter) -> Self { . // A common case is passing a vector into a function which immediately . // re-collects into a vector. We can short circuit this if the IntoIter . // has not been advanced at all. . // When it has been advanced We can also reuse the memory and move the data to the front. -- line 42 ---------------------------------------- 7 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_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> { 56,320 ( 0.00%) pub fn typeck(self, def_id: impl IntoQueryKey) -> &'tcx ty::TypeckResults<'tcx> { . self.typeck_root( 45,056 ( 0.00%) self.typeck_root_def_id(def_id.into_query_key().to_def_id()).expect_local(), 846,404 ( 0.01%) => ???:::typeck_root_def_id (11,264x) . ) 56,320 ( 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}; . 70,456 ( 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 ---------------------------------------- 1,104 ( 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<'_>) { 2 ( 0.00%) if let Some(else_) = expr_block(else_block) 2 ( 0.00%) && !else_.span.from_expansion() 2 ( 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 256 ---------------------------------------- . . // There are other attributes, which are significant tokens -- check failed . _ => false, . } . } . } . . impl LateLintPass<'_> for CollapsibleIf { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::If(cond, then, else_) = &expr.kind 2 ( 0.00%) && !expr.span.from_expansion() . { 3 ( 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) 1 ( 0.00%) && !(single_inner_if_else(then) && single_inner_if_else(else_)) 5 ( 0.00%) && let ExprKind::Block(else_, None) = else_.kind . { 1 ( 0.00%) self.check_collapsible_else_if(cx, then.span, else_); . } else if else_.is_none() . && self.eligible_condition(cx, cond) . && let ExprKind::Block(then, None) = then.kind . { . self.check_collapsible_if_if(cx, expr, cond, then); . } . } 523,440 ( 0.01%) } . } . . /// Returns true if `expr` is a block that contains only one `if {..} else {}` statement . fn single_inner_if_else(expr: &Expr<'_>) -> bool { 5 ( 0.00%) if let ExprKind::Block(block, None) = expr.kind 2 ( 0.00%) && let Some(inner_expr) = expr_block(block) 2 ( 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>> { 4 ( 0.00%) match (block.stmts, block.expr) { 8 ( 0.00%) ([], expr) => expr, . ([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 -- line 310 ---------------------------------------- 2 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/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 { 255,532 ( 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 { 12,649 ( 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 { 23,243 ( 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] 147 ( 0.00%) fn next(&mut self) -> Option { 134,932 ( 0.00%) self.iter.next().map(&mut self.f) 84,562 ( 0.00%) => ???:::next (1,192x) 54 ( 0.00%) } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.iter.size_hint() . } . 654,314 ( 0.01%) fn try_fold(&mut self, init: Acc, g: G) -> R . where . Self: Sized, . G: FnMut(Acc, Self::Item) -> R, . R: Try, . { . self.iter.try_fold(init, map_try_fold(&mut self.f, g)) 523,448 ( 0.01%) } . 269,212 ( 0.00%) fn fold(self, init: Acc, g: G) -> Acc . where . G: FnMut(Acc, Self::Item) -> Acc, . { 1,397 ( 0.00%) self.iter.fold(init, map_fold(self.f, g)) 246,184 ( 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 ---------------------------------------- 50,768 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . .tcx . .normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(proj)); . . nty.is_bool() . }) . } . . impl<'tcx> LateLintPass<'tcx> for BoolAssertComparison { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 342 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 798 ( 0.00%) let eq_macro = match cx.tcx.get_diagnostic_name(macro_call.def_id) { 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . Some(sym::assert_eq_macro | sym::debug_assert_eq_macro) => true, . Some(sym::assert_ne_macro | sym::debug_assert_ne_macro) => false, . _ => return, . }; . let Some((a, b, _)) = find_assert_eq_args(cx, expr, macro_call.expn) else { . return; . }; . -- line 88 ---------------------------------------- -- line 148 ---------------------------------------- . . diag.multipart_suggestion( . format!("replace it with `{non_eq_mac}!(..)`"), . suggestions, . applicability, . ); . }, . ); 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/large_enum_variant.rs -------------------------------------------------------------------------------- Ir -- line 68 ---------------------------------------- . pub fn new(conf: &'static Conf) -> Self { . Self { . maximum_size_difference_allowed: conf.enum_variant_size_threshold, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for LargeEnumVariant { 112,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &Item<'tcx>) { 30,298 ( 0.00%) if let ItemKind::Enum(ident, _, ref def) = item.kind 2,212 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 1,106 ( 0.00%) && let ty::Adt(adt, subst) = ty.kind() 1,659 ( 0.00%) && adt.variants().len() > 1 2,790 ( 0.00%) && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { 2,790 ( 0.00%) let variants_size = AdtVariantInfo::new(cx, *adt, subst); 187,301 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::new (465x) . 1,395 ( 0.00%) let mut difference = variants_size[0].size - variants_size[1].size; 930 ( 0.00%) if difference > self.maximum_size_difference_allowed { . let help_text = "consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum"; . span_lint_and_then( . cx, . LARGE_ENUM_VARIANT, . item.span, . "large size difference between variants", . |diag| { . diag.span_label( -- line 94 ---------------------------------------- -- line 150 ---------------------------------------- . return; . } . } . diag.span_help(def.variants[variants_size[0].ind].span, help_text); . }, . ); . } . } 112,344 ( 0.00%) } . } . . fn maybe_copy<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . if let ty::Adt(_def, args) = ty.kind() . && args.types().next().is_some() . && let Some(copy_trait) = cx.tcx.lang_items().copy_trait() . { . return cx.tcx.non_blanket_impls_for_ty(copy_trait, ty).next().is_some(); -- line 166 ---------------------------------------- 1,106 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/pointers_in_nomem_asm_block.rs -------------------------------------------------------------------------------- Ir -- line 30 ---------------------------------------- . suspicious, . "pointers in nomem asm block" . } . . declare_lint_pass!(PointersInNomemAsmBlock => [POINTERS_IN_NOMEM_ASM_BLOCK]); . . impl<'tcx> LateLintPass<'tcx> for PointersInNomemAsmBlock { . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 130,860 ( 0.00%) if let ExprKind::InlineAsm(asm) = &expr.kind { . check_asm(cx, asm); . } . } . } . . fn check_asm(cx: &LateContext<'_>, asm: &InlineAsm<'_>) { . if !asm.options.contains(InlineAsmOptions::NOMEM) { . return; -- line 46 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . /// work, we get a false positive warning on the `$v.push(3)` which really requires `$v` to . /// be a vector. . span_to_state: BTreeMap, . allow_in_test: bool, . } . . impl UselessVec { . pub fn new(conf: &'static Conf) -> Self { 5 ( 0.00%) Self { . too_large_for_stack: conf.too_large_for_stack, . msrv: conf.msrv.into(), . span_to_state: BTreeMap::new(), 2 ( 0.00%) allow_in_test: conf.allow_useless_vec_in_tests, . } . } . } . . declare_clippy_lint! { . /// ### What it does . /// Checks for usage of `vec![..]` when using `[..]` would . /// be possible. -- line 63 ---------------------------------------- -- line 166 ---------------------------------------- . VecToArray::Impossible . } . }, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for UselessVec { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 261,720 ( 0.00%) if let Some(vec_args) = higher::VecArgs::hir(cx, expr.peel_borrows()) 1,575,738 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . // The `vec![]` or `&vec![]` invocation span. . && let vec_span = expr.span.parent_callsite().unwrap_or(expr.span) . && !vec_span.from_expansion() . { . if self.allow_in_test && is_in_test(cx.tcx, expr.hir_id) { . return; . } . -- line 183 ---------------------------------------- -- line 232 ---------------------------------------- . }); . } . }, . VecToArray::Impossible => { . self.span_to_state.insert(vec_span, VecState::NoChange); . }, . } . } 523,440 ( 0.01%) } . 8 ( 0.00%) fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { 10 ( 0.00%) for (span, state) in mem::take(&mut self.span_to_state) { . if let VecState::Change { . suggest_ty, . vec_snippet, . expr_hir_id, . } = state . { . span_lint_hir_and_then(cx, USELESS_VEC, expr_hir_id, span, "useless use of `vec!`", |diag| { . let help_msg = format!("you can use {} directly", suggest_ty.desc()); -- line 251 ---------------------------------------- -- line 255 ---------------------------------------- . Applicability::Unspecified . } else { . Applicability::MachineApplicable . }; . diag.span_suggestion(span, help_msg, vec_snippet, applicability); . }); . } . } 8 ( 0.00%) } . } . . #[derive(Copy, Clone)] . pub(crate) enum SuggestedType { . /// Suggest using a slice `&[..]` / `&mut [..]` . SliceRef(Mutability), . /// Suggest using an array: `[..]` . Array, -- line 271 ---------------------------------------- 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 146,931 ( 0.00%) if let ExprKind::Call(func, [arg]) = expr.kind 23,262 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(func_ty, func_name)) = func.kind 3,322 ( 0.00%) && func_name.ident.name == sym::new 6,620 ( 0.00%) && !expr.span.from_expansion() 19,860 ( 0.00%) && cx.typeck_results().node_type(func_ty.hir_id).is_diag_item(cx, sym::Arc) 135,710 ( 0.00%) => ???:::node_type (3,310x) . && 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`" . )); . }); . }, . ); . } 523,440 ( 0.01%) } . } 6,620 ( 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, . { 1,278,329 ( 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. 104,115 ( 0.00%) let mut vector = match iterator.next() { 314,285 ( 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:, 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> as core::iter::traits::iterator::Iterator>::next (1,554x) . None => return Vec::new(), 1 ( 0.00%) Some(element) => { . let (lower, _) = iterator.size_hint(); . let initial_capacity = . cmp::max(RawVec::::MIN_NON_ZERO_CAP, lower.saturating_add(1)); . let mut vector = Vec::with_capacity(initial_capacity); . unsafe { . // SAFETY: We requested capacity at least 1 . ptr::write(vector.as_mut_ptr(), element); . vector.set_len(1); . } 49,162 ( 0.00%) vector . } . }; . // must delegate to spec_extend() since extend() itself delegates . // to spec_from for empty Vecs 84,078 ( 0.00%) as SpecExtend>::spec_extend(&mut vector, iterator); 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) 82,722 ( 0.00%) vector 1,401,481 ( 0.02%) } . } . . impl SpecFromIterNested for Vec . where . I: TrustedLen, . { 26,351 ( 0.00%) fn from_iter(iterator: I) -> Self { 3,702 ( 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 3,054 ( 0.00%) vector.spec_extend(iterator); 53,808 ( 0.00%) vector 30,058 ( 0.00%) } . } 138,378 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs -------------------------------------------------------------------------------- Ir -- line 88 ---------------------------------------- . "function cannot return without recursing", . |diag| { . diag.span_note(expr.span, "recursive call site"); . }, . ); . } . . fn get_hir_ty_def_id<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: rustc_hir::Ty<'tcx>) -> Option { 141 ( 0.00%) let TyKind::Path(qpath) = hir_ty.kind else { return None }; 94 ( 0.00%) match qpath { . QPath::Resolved(_, path) => path.res.opt_def_id(), . QPath::TypeRelative(_, _) => { . let ty = lower_ty(tcx, &hir_ty); . . match ty.kind() { . ty::Alias( . _, . proj @ ty::AliasTy { -- line 105 ---------------------------------------- -- line 111 ---------------------------------------- . } . }, . } . } . . fn get_return_calls_in_body<'tcx>(body: &'tcx Body<'tcx>) -> Vec<&'tcx Expr<'tcx>> { . let mut visitor = ReturnsVisitor::default(); . 21,248 ( 0.00%) visitor.visit_body(body); 2,244,016 ( 0.03%) => ???:::visit_body (10,624x) 31,872 ( 0.00%) visitor.returns . } . . fn has_conditional_return(body: &Body<'_>, expr: &Expr<'_>) -> bool { . match get_return_calls_in_body(body).as_slice() { 42,488 ( 0.00%) [] => false, 10,124 ( 0.00%) [return_expr] => return_expr.hir_id != expr.hir_id, . _ => true, . } . } . 17,316 ( 0.00%) fn get_impl_trait_def_id(cx: &LateContext<'_>, method_def_id: LocalDefId) -> Option { . let hir_id = cx.tcx.local_def_id_to_hir_id(method_def_id); 7,696 ( 0.00%) if let Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(impl_), . owner_id, . .. . }), 1,924 ( 0.00%) )) = cx.tcx.hir_parent_iter(hir_id).next() . // We exclude `impl` blocks generated from rustc's proc macros. 11,544 ( 0.00%) && !cx.tcx.is_automatically_derived(owner_id.to_def_id()) 249,029 ( 0.00%) => ???:::is_automatically_derived (1,924x) . // It is a implementation of a trait. 4,113 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { 3,972 ( 0.00%) of_trait.trait_ref.trait_def_id() 17,212 ( 0.00%) => ???:::trait_def_id (1,324x) . } else { . None . } 17,316 ( 0.00%) } . . /// When we have `x == y` where `x = &T` and `y = &T`, then that resolves to . /// `<&T as PartialEq<&T>>::eq`, which is not the same as `>::eq`, . /// however we still would want to treat it the same, because we know that it's a blanket impl . /// that simply delegates to the `PartialEq` impl with one reference removed. . /// . /// Still, we can't just do `lty.peel_refs() == rty.peel_refs()` because when we have `x = &T` and . /// `y = &&T`, this is not necessarily the same as `>::eq` -- line 158 ---------------------------------------- -- line 160 ---------------------------------------- . /// So to avoid these FNs and FPs, we keep removing a layer of references from *both* sides . /// until both sides match the expected LHS and RHS type (or they don't). . fn matches_ty<'tcx>( . mut left: Ty<'tcx>, . mut right: Ty<'tcx>, . expected_left: Ty<'tcx>, . expected_right: Ty<'tcx>, . ) -> bool { 24 ( 0.00%) while let (&ty::Ref(_, lty, _), &ty::Ref(_, rty, _)) = (left.kind(), right.kind()) { 3 ( 0.00%) if lty == expected_left && rty == expected_right { . return true; . } . left = lty; . right = rty; . } . false . } . . fn check_partial_eq(cx: &LateContext<'_>, method_span: Span, method_def_id: LocalDefId, name: Ident, expr: &Expr<'_>) { . let Some(sig) = cx . .typeck_results() . .liberated_fn_sigs() 556 ( 0.00%) .get(cx.tcx.local_def_id_to_hir_id(method_def_id)) . else { . return; . }; . . // That has two arguments. 1,668 ( 0.00%) if let [self_arg, other_arg] = sig.inputs() 1,668 ( 0.00%) && let &ty::Ref(_, self_arg, _) = self_arg.kind() 2,224 ( 0.00%) && let &ty::Ref(_, other_arg, _) = other_arg.kind() . // The two arguments are of the same type. 2,224 ( 0.00%) && let Some(trait_def_id) = get_impl_trait_def_id(cx, method_def_id) 215,635 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:clippy_lints::unconditional_recursion::get_impl_trait_def_id (556x) . // The trait is `PartialEq`. 18 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::PartialEq, trait_def_id) 309 ( 0.00%) => ???:::is_diagnostic_item (3x) . { . let to_check_op = if name.name == sym::eq { . BinOpKind::Eq . } else { . BinOpKind::Ne . }; 15 ( 0.00%) let is_bad = match expr.kind { . ExprKind::Binary(op, left, right) if op.node == to_check_op => { . // Then we check if the LHS matches self_arg and RHS matches other_arg . let left_ty = cx.typeck_results().expr_ty_adjusted(left); . let right_ty = cx.typeck_results().expr_ty_adjusted(right); . matches_ty(left_ty, right_ty, self_arg, other_arg) . }, 18 ( 0.00%) ExprKind::MethodCall(segment, receiver, [arg], _) if segment.ident.name == name.name => { 6 ( 0.00%) let receiver_ty = cx.typeck_results().expr_ty_adjusted(receiver); 159 ( 0.00%) => ???:::expr_ty_adjusted (3x) 12 ( 0.00%) let arg_ty = cx.typeck_results().expr_ty_adjusted(arg); 159 ( 0.00%) => ???:::expr_ty_adjusted (3x) . 21 ( 0.00%) if let Some(fn_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) 153 ( 0.00%) => ???:::type_dependent_def_id (3x) 12 ( 0.00%) && let Some(trait_id) = cx.tcx.trait_of_assoc(fn_id) 2,669 ( 0.00%) => ???:::trait_of_assoc (3x) 3 ( 0.00%) && trait_id == trait_def_id . && matches_ty(receiver_ty, arg_ty, self_arg, other_arg) . { . true . } else { . false . } . }, . _ => false, -- line 222 ---------------------------------------- -- line 327 ---------------------------------------- . span_error(self.cx, self.method_span, expr); . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) . } . } . . impl UnconditionalRecursion { 376 ( 0.00%) fn init_default_impl_for_type_if_needed(&mut self, cx: &LateContext<'_>) { 47 ( 0.00%) if self.default_impl_for_type.is_empty() 235 ( 0.00%) && let Some(default_trait_id) = cx.tcx.get_diagnostic_item(sym::Default) 4,982 ( 0.00%) => ???:::get_diagnostic_item (47x) . { . let impls = cx.tcx.trait_impls_of(default_trait_id); . for (ty, impl_def_ids) in impls.non_blanket_impls() { 9,494 ( 0.00%) let Some(self_def_id) = ty.def() else { continue }; 7,144 ( 0.00%) for &impl_def_id in impl_def_ids { 21,432 ( 0.00%) if !cx.tcx.is_automatically_derived(impl_def_id) && 1,170,650 ( 0.01%) => ???:::is_automatically_derived (3,572x) . let Some(assoc_item) = cx . .tcx . .associated_items(impl_def_id) . .in_definition_order() . // We're not interested in foreign implementations of the `Default` trait. . .find(|item| { 11,750 ( 0.00%) item.is_fn() && item.def_id.is_local() && item.name() == kw::Default . }) . && let Some(body_node) = cx.tcx.hir_get_if_local(assoc_item.def_id) . && let Some(body_id) = body_node.body_id() . && let body = cx.tcx.hir_body(body_id) . // We don't want to keep it if it has conditional return. . && let [return_expr] = get_return_calls_in_body(body).as_slice() . && let ExprKind::Call(call_expr, _) = return_expr.kind . // We need to use typeck here to infer the actual function being called. -- line 358 ---------------------------------------- -- line 361 ---------------------------------------- . && let typeck = cx.tcx.typeck_body(body_owner.id()) . && let Some(call_def_id) = typeck.type_dependent_def_id(call_expr.hir_id) . { . self.default_impl_for_type.insert(self_def_id, call_def_id); . } . } . } . } 376 ( 0.00%) } . . fn check_default_new<'tcx>( . &mut self, . cx: &LateContext<'tcx>, . decl: &FnDecl<'tcx>, . body: &'tcx Body<'tcx>, . method_span: Span, . method_def_id: LocalDefId, . ) { . // We're only interested into static methods. 20,256 ( 0.00%) if decl.implicit_self().has_implicit_self() { 81,024 ( 0.00%) => ???:::implicit_self (10,128x) . return; . } . // We don't check trait implementations. 6,840 ( 0.00%) if get_impl_trait_def_id(cx, method_def_id).is_some() { 532,585 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:clippy_lints::unconditional_recursion::get_impl_trait_def_id (1,368x) . return; . } . . let hir_id = cx.tcx.local_def_id_to_hir_id(method_def_id); 188 ( 0.00%) if let Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(impl_), . .. . }), 47 ( 0.00%) )) = cx.tcx.hir_parent_iter(hir_id).next() 470 ( 0.00%) && let Some(implemented_ty_id) = get_hir_ty_def_id(cx.tcx, *impl_.self_ty) . && { 141 ( 0.00%) self.init_default_impl_for_type_if_needed(cx); 2,077,771 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::init_default_impl_for_type_if_needed (47x) . true . } 94 ( 0.00%) && let Some(return_def_id) = self.default_impl_for_type.get(&implemented_ty_id) . && method_def_id.to_def_id() == *return_def_id . { . let mut c = CheckCalls { . cx, . implemented_ty_id, . method_span, . }; . let _ = walk_body(&mut c, body); -- line 409 ---------------------------------------- -- line 410 ---------------------------------------- . } . } . } . . fn check_from(cx: &LateContext<'_>, method_span: Span, method_def_id: LocalDefId, expr: &Expr<'_>) { . let Some(sig) = cx . .typeck_results() . .liberated_fn_sigs() 1,050 ( 0.00%) .get(cx.tcx.local_def_id_to_hir_id(method_def_id)) . else { . return; . }; . . // Check if we are calling `Into::into` where the node args match with our `From::from` signature: . // From::from signature: fn(S1) -> S2 . // >::into(s1), node_args=[S1, S2] . // If they do match, then it must mean that it is the blanket impl, . // which calls back into our `From::from` again (`Into` is not specializable). . // rustc's unconditional_recursion already catches calling `From::from` directly 5,748 ( 0.00%) if let Some((fn_def_id, node_args)) = fn_def_id_with_node_args(cx, expr) 52,698 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (1,050x) 996 ( 0.00%) && let [s1, s2] = **node_args . && let (Some(s1), Some(s2)) = (s1.as_type(), s2.as_type()) . && let Some(trait_def_id) = cx.tcx.trait_of_assoc(fn_def_id) . && cx.tcx.is_diagnostic_item(sym::Into, trait_def_id) . && get_impl_trait_def_id(cx, method_def_id) == cx.tcx.get_diagnostic_item(sym::From) . && s1 == sig.inputs()[0] . && s2 == sig.output() . { . span_error(cx, method_span, expr); . } . } . . impl<'tcx> LateLintPass<'tcx> for UnconditionalRecursion { 85,000 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'tcx>, . body: &'tcx Body<'tcx>, . method_span: Span, . method_def_id: LocalDefId, . ) { . // If the function is a method... 31,874 ( 0.00%) if let FnKind::Method(name, _) = kind 53,170 ( 0.00%) && let expr = expr_or_init(cx, body.value).peel_blocks() 276,224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (10,624x) . // Doesn't have a conditional return. 31,372 ( 0.00%) && !has_conditional_return(body, expr) . { . match name.name { 69,784 ( 0.00%) sym::eq | sym::ne => check_partial_eq(cx, method_span, method_def_id, name, expr), . sym::to_string => check_to_string(cx, method_span, method_def_id, name, expr), . sym::from => check_from(cx, method_span, method_def_id, expr), . _ => {}, . } . self.check_default_new(cx, decl, body, method_span, method_def_id); . } 85,000 ( 0.00%) } . } 103,629 ( 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. 57,475 ( 0.00%) __rust_no_alloc_shim_is_unstable_v2(); 43 ( 0.00%) => ???:std::exception::~exception() (43x) . 1,099,608 ( 0.01%) __rust_alloc(layout.size(), layout.alignment()) 9,315 ( 0.00%) => ???:__rustc::__rust_alloc (43x) . } . } . . /// 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) { 1,047,269 ( 0.01%) unsafe { __rust_dealloc(ptr, layout.size(), layout.alignment()) } 58,330 ( 0.00%) => ???:__rustc::__rdl_dealloc (1,535x) . } . . /// 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 { 31,822 ( 0.00%) unsafe { __rust_realloc(ptr, layout.size(), layout.alignment(), new_size) } 1,669,318 ( 0.02%) => ???:__rustc::__rust_realloc (6,953x) . } . . /// Allocates zero-initialized memory with the global allocator. . /// . /// This function forwards calls to the [`GlobalAlloc::alloc_zeroed`] method . /// of the allocator registered with the `#[global_allocator]` attribute . /// if there is one, or the `std` crate’s default. . /// -- line 230 ---------------------------------------- -- line 284 ---------------------------------------- . __rust_alloc_zeroed(layout.size(), layout.alignment()) . } . } . . impl Global { . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . fn alloc_impl_runtime(layout: Layout, zeroed: bool) -> Result, AllocError> { 131,838 ( 0.00%) match layout.size() { . 0 => Ok(layout.dangling_ptr().cast_slice(0)), . // SAFETY: `layout` is non-zero in size, . size => unsafe { 65,926 ( 0.00%) let raw_ptr = if zeroed { alloc_zeroed(layout) } else { alloc(layout) }; 65,917 ( 0.00%) => ???:std::exception::~exception() (65,917x) . 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) { 118,642 ( 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 ---------------------------------------- 457,535 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs -------------------------------------------------------------------------------- Ir -- line 64 ---------------------------------------- . impl_lint_pass!(DisallowedMethods => [DISALLOWED_METHODS]); . . pub struct DisallowedMethods { . disallowed: DefIdMap<(&'static str, &'static DisallowedPath)>, . } . . impl DisallowedMethods { . pub fn new(tcx: TyCtxt<'_>, conf: &'static Conf) -> Self { 10 ( 0.00%) let (disallowed, _) = create_disallowed_map( 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_config/src/types.rs:clippy_config::types::create_disallowed_map::::new::{closure#0}> (1x) . tcx, . &conf.disallowed_methods, . PathNS::Value, . |def_kind| { . matches!( . def_kind, . DefKind::Fn | DefKind::Ctor(_, CtorKind::Fn) | DefKind::AssocFn . ) . }, . "function", . false, 1 ( 0.00%) ); 4 ( 0.00%) Self { disallowed } . } . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedMethods { 327,150 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 65,430 ( 0.00%) if self.disallowed.is_empty() { . return; . } . if expr.span.desugaring_kind().is_some() { . return; . } . let (id, span) = match &expr.kind { . ExprKind::Path(path) if let Res::Def(_, id) = cx.qpath_res(path, expr.hir_id) => (id, expr.span), . ExprKind::MethodCall(name, ..) if let Some(id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) => { -- line 99 ---------------------------------------- -- line 105 ---------------------------------------- . span_lint_and_then( . cx, . DISALLOWED_METHODS, . span, . format!("use of a disallowed method `{path}`"), . disallowed_path.diag_amendment(span), . ); . } 392,580 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . #[must_use = "iterators are lazy and do nothing unless consumed"] . #[stable(feature = "rust1", since = "1.0.0")] . pub struct FlatMap { . inner: FlattenCompat, ::IntoIter>, . } . . impl U> FlatMap { . pub(in crate::iter) fn new(iter: I, f: F) -> FlatMap { 523,448 ( 0.01%) FlatMap { inner: FlattenCompat::new(iter.map(f)) } . } . . pub(crate) fn into_parts(self) -> (Option, Option, Option) { . ( . self.inner.frontiter, . self.inner.iter.into_inner().map(Map::into_inner), . self.inner.backiter, . ) -- line 31 ---------------------------------------- -- line 183 ---------------------------------------- . #[stable(feature = "iterator_flatten", since = "1.29.0")] . pub struct Flatten> { . inner: FlattenCompat::IntoIter>, . } . . #[rustc_const_unstable(feature = "const_iter", issue = "92476")] . const impl> Flatten { . pub(in super::super) fn new(iter: I) -> Flatten { 34,335 ( 0.00%) Flatten { inner: FlattenCompat::new(iter) } . } . } . . #[stable(feature = "iterator_flatten", since = "1.29.0")] . impl fmt::Debug for Flatten . where . I: fmt::Debug + Iterator>, . U: fmt::Debug + Iterator, -- line 199 ---------------------------------------- -- line 242 ---------------------------------------- . self.inner.try_fold(init, fold) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 305,357 ( 0.00%) self.inner.fold(init, fold) . } . . #[inline] . fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { . self.inner.advance_by(n) . } . . #[inline] -- line 258 ---------------------------------------- -- line 383 ---------------------------------------- . fn iter_fold(self, mut acc: Acc, mut fold: Fold) -> Acc . where . Fold: FnMut(Acc, U) -> Acc, . { . #[inline] . fn flatten( . fold: &mut impl FnMut(Acc, T::IntoIter) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc + '_ { 6 ( 0.00%) move |acc, iter| fold(acc, iter.into_iter()) . } . 46,999 ( 0.00%) if let Some(iter) = self.frontiter { . acc = fold(acc, iter); . } . 15 ( 0.00%) acc = self.iter.fold(acc, flatten(&mut fold)); . 117,461 ( 0.00%) if let Some(iter) = self.backiter { . acc = fold(acc, iter); . } . . acc . } . . /// Folds over the inner iterators as long as the given function returns successfully, . /// always storing the most recent inner iterator in `self.frontiter`. . /// . /// Folds over the inner iterators, not over their elements. Is used by the `try_fold` and . /// `advance_by` methods. . #[inline] 4,968 ( 0.00%) fn iter_try_fold(&mut self, mut acc: Acc, mut fold: Fold) -> R . where . Fold: FnMut(Acc, &mut U) -> R, . R: Try, . { . #[inline] . fn flatten<'a, T: IntoIterator, Acc, R: Try>( . frontiter: &'a mut Option, . fold: &'a mut impl FnMut(Acc, &mut T::IntoIter) -> R, . ) -> impl FnMut(Acc, T) -> R + 'a { 4,773 ( 0.00%) move |acc, iter| fold(acc, frontiter.insert(iter.into_iter())) 36,537 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/take_while.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} (57x) . } . 7,872 ( 0.00%) if let Some(iter) = &mut self.frontiter { . acc = fold(acc, iter)?; . } 202,506 ( 0.00%) self.frontiter = None; . . acc = self.iter.try_fold(acc, flatten(&mut self.frontiter, &mut fold))?; 67,346 ( 0.00%) self.frontiter = None; . 136,551 ( 0.00%) if let Some(iter) = &mut self.backiter { . acc = fold(acc, iter)?; . } 3,718 ( 0.00%) self.backiter = None; . . try { acc } 4,416 ( 0.00%) } . } . . impl FlattenCompat . where . I: DoubleEndedIterator>, . { . /// Folds the inner iterators into an accumulator by applying an operation, starting form the . /// back. -- line 448 ---------------------------------------- -- line 514 ---------------------------------------- . where . I: Iterator>, . U: Iterator, . { . type Item = U::Item; . . #[inline] . default fn next(&mut self) -> Option { 162 ( 0.00%) loop { . if let elt @ Some(_) = and_then_or_clear(&mut self.frontiter, Iterator::next) { . return elt; . } 42,096 ( 0.00%) match self.iter.next() { . None => return and_then_or_clear(&mut self.backiter, Iterator::next), . Some(inner) => self.frontiter = Some(inner.into_iter()), . } . } . } . . #[inline] . default fn size_hint(&self) -> (usize, Option) { -- line 534 ---------------------------------------- -- line 558 ---------------------------------------- . Self: Sized, . Fold: FnMut(Acc, Self::Item) -> R, . R: Try, . { . #[inline] . fn flatten>( . mut fold: impl FnMut(Acc, U::Item) -> R, . ) -> impl FnMut(Acc, &mut U) -> R { 12,243 ( 0.00%) move |acc, iter| iter.try_fold(acc, &mut fold) . } . 552 ( 0.00%) self.iter_try_fold(init, flatten(fold)) 45,904 ( 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:, ::all_fields::{closure#0}>, core::slice::iter::Iter>>::iter_try_fold::<(), as core::iter::traits::iterator::Iterator>::try_fold::flatten, (), core::ops::control_flow::ControlFlow<()>, core::iter::adapters::map::map_try_fold<&rustc_middle::ty::FieldDef, rustc_type_ir::unnormalized::Unnormalized, (), core::ops::control_flow::ControlFlow<()>, clippy_lints::derive::derive_partial_eq_without_eq::check::{closure#0}, core::iter::traits::iterator::Iterator::all::check, clippy_lints::derive::derive_partial_eq_without_eq::check::{closure#1}>::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<()>> (552x) . } . . #[inline] . default fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { . #[inline] -- line 577 ---------------------------------------- -- line 602 ---------------------------------------- . } . } . . #[inline] . default fn count(self) -> usize { . #[inline] . #[rustc_inherit_overflow_checks] . fn count(acc: usize, iter: U) -> usize { 46 ( 0.00%) acc + iter.count() . } . 46 ( 0.00%) self.iter_fold(0, count) . } . . #[inline] . default fn last(self) -> Option { . #[inline] . fn last(last: Option, iter: U) -> Option { . iter.last().or(last) . } -- line 621 ---------------------------------------- -- line 847 ---------------------------------------- . // `frontiter` or `backiter` without consuming the item, so we **must** override those. . impl Iterator for FlattenCompat . where . I: Iterator>, . U: Iterator + OneShot, . { . #[inline] . fn next(&mut self) -> Option { 36,618 ( 0.00%) while let Some(inner) = self.iter.next() { 4,578 ( 0.00%) if let item @ Some(_) = inner.into_iter().next() { . return item; . } . } . None . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { -- line 864 ---------------------------------------- 167,949 ( 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/non_null.rs -------------------------------------------------------------------------------- Ir -- line 378 ---------------------------------------- . /// . /// For more details, see the equivalent method on a raw pointer, [`pointer::map_addr`]. . /// . /// This is a [Strict Provenance][crate::ptr#strict-provenance] API. . #[must_use] . #[inline] . #[stable(feature = "strict_provenance", since = "1.84.0")] . pub fn map_addr(self, f: impl FnOnce(NonZero) -> NonZero) -> Self { 227 ( 0.00%) self.with_addr(f(self.addr())) . } . . /// Acquires the underlying `*mut` pointer. . /// . /// # Examples . /// . /// ``` . /// use std::ptr::NonNull; -- line 394 ---------------------------------------- -- line 446 ---------------------------------------- . #[stable(feature = "nonnull", since = "1.25.0")] . #[rustc_const_stable(feature = "const_nonnull_as_ref", since = "1.73.0")] . #[must_use] . #[inline(always)] . pub const unsafe fn as_ref<'a>(&self) -> &'a T { . // SAFETY: the caller must guarantee that `self` meets all the . // requirements for a reference. . // `cast_const` avoids a mutable raw pointer deref. 1,004,783 ( 0.01%) unsafe { &*self.as_ptr().cast_const() } . } . . /// Returns a unique reference to the value. If the value may be uninitialized, [`as_uninit_mut`] . /// must be used instead. . /// . /// For the shared counterpart see [`as_ref`]. . /// . /// [`as_uninit_mut`]: NonNull::as_uninit_mut -- line 462 ---------------------------------------- -- line 564 ---------------------------------------- . pub const unsafe fn offset(self, count: isize) -> Self . where . T: Sized, . { . // SAFETY: the caller must uphold the safety contract for `offset`. . // Additionally safety contract of `offset` guarantees that the resulting pointer is . // pointing to an allocation, there can't be an allocation at null, thus it's safe to . // construct `NonNull`. 18 ( 0.00%) unsafe { transmute(intrinsics::offset(self.as_ptr(), count)) } . } . . /// Calculates the offset from a pointer in bytes. . /// . /// `count` is in units of **bytes**. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [offset][pointer::offset] on it. See that method for documentation -- line 580 ---------------------------------------- -- line 619 ---------------------------------------- . pub const unsafe fn add(self, count: usize) -> Self . where . T: Sized, . { . // SAFETY: the caller must uphold the safety contract for `offset`. . // Additionally safety contract of `offset` guarantees that the resulting pointer is . // pointing to an allocation, there can't be an allocation at null, thus it's safe to . // construct `NonNull`. 2,995,581 ( 0.04%) unsafe { transmute(intrinsics::offset(self.as_ptr(), count)) } . } . . /// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`). . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [`add`][NonNull::add] on it. See that method for documentation -- line 635 ---------------------------------------- -- line 1655 ---------------------------------------- . #[stable(feature = "nonnull", since = "1.25.0")] . impl Eq for NonNull {} . . #[stable(feature = "nonnull", since = "1.25.0")] . impl PartialEq for NonNull { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn eq(&self, other: &Self) -> bool { 9,325,036 ( 0.12%) self.as_ptr() == other.as_ptr() . } . } . . #[stable(feature = "nonnull", since = "1.25.0")] . impl Ord for NonNull { . #[inline] . #[allow(ambiguous_wide_pointer_comparisons)] . fn cmp(&self, other: &Self) -> Ordering { -- line 1671 ---------------------------------------- 375,820 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { . match kind { . ManualPopIfKind::Vec => self.msrv.meets(cx, msrvs::VEC_POP_IF), . ManualPopIfKind::VecDequeBack => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_BACK_IF), . ManualPopIfKind::VecDequeFront => self.msrv.meets(cx, msrvs::VEC_DEQUE_POP_FRONT_IF), -- line 79 ---------------------------------------- -- line 455 ---------------------------------------- . ControlFlow::Break((collection_expr, span, false)) . } else { . ControlFlow::Continue(()) . } . }) . } . . impl<'tcx> LateLintPass<'tcx> for ManualPopIf { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,862 ( 0.00%) let ExprKind::If(cond, then_block, None) = expr.kind else { . return; . }; . . let in_else_clause = is_else_clause(cx.tcx, expr); . . for kind in [ . ManualPopIfKind::Vec, . ManualPopIfKind::VecDequeBack, -- line 472 ---------------------------------------- -- line 482 ---------------------------------------- . if in_else_clause { . pattern.suggestable = false; . } . . pattern.emit_lint(cx); . return; . } . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/zero_repeat_side_effects.rs -------------------------------------------------------------------------------- Ir -- line 40 ---------------------------------------- . pub ZERO_REPEAT_SIDE_EFFECTS, . suspicious, . "usage of zero-sized initializations of arrays or vecs causing side effects" . } . . declare_lint_pass!(ZeroRepeatSideEffects => [ZERO_REPEAT_SIDE_EFFECTS]); . . impl LateLintPass<'_> for ZeroRepeatSideEffects { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 261,720 ( 0.00%) if let Some(args) = VecArgs::hir(cx, expr) 1,575,542 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . && let VecArgs::Repeat(inner_expr, len) = args . && let ExprKind::Lit(l) = len.kind . && let LitKind::Int(Pu128(0), _) = l.node . { . inner_check(cx, expr, inner_expr, true); . } . // Lint only if the length is a literal zero, and not a path to any constants. . // NOTE(@y21): When reading `[f(); LEN]`, I intuitively expect that the function is called and it . // doesn't seem as confusing as `[f(); 0]`. It would also have false positives when eg. . // the const item depends on `#[cfg]s` and has different values in different compilation . // sessions). 130,860 ( 0.00%) else if let ExprKind::Repeat(inner_expr, const_arg) = expr.kind . && let ConstArgKind::Anon(anon_const) = const_arg.kind . && let length_expr = cx.tcx.hir_body(anon_const.body).value . && !length_expr.span.from_expansion() . && let ExprKind::Lit(literal) = length_expr.kind . && let LitKind::Int(Pu128(0), _) = literal.node . { . inner_check(cx, expr, inner_expr, false); . } 327,150 ( 0.00%) } . } . . fn inner_check(cx: &LateContext<'_>, expr: &'_ Expr<'_>, inner_expr: &'_ Expr<'_>, is_vec: bool) { . // check if expr is a call or has a call inside it . if inner_expr.can_have_side_effects() { . let parent_hir_node = cx.tcx.parent_hir_node(expr.hir_id); . let inner_expr_ty = cx.typeck_results().expr_ty(inner_expr); . let return_type = cx.typeck_results().expr_ty(expr); -- line 78 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/count.rs -------------------------------------------------------------------------------- Ir -- line 20 ---------------------------------------- . . use core::intrinsics::unlikely; . . const USIZE_SIZE: usize = size_of::(); . const UNROLL_INNER: usize = 4; . . #[inline] . pub(super) fn count_chars(s: &str) -> usize { 102,622 ( 0.00%) if cfg!(feature = "optimize_for_size") || s.len() < USIZE_SIZE * UNROLL_INNER { . // Avoid entering the optimized implementation for strings where the . // difference is not likely to matter, or where it might even be slower. . // That said, a ton of thought was not spent on the particular threshold . // here, beyond "this value seems to make sense". 105,044 ( 0.00%) char_count_general_case(s.as_bytes()) 2,176,594 ( 0.03%) => ???:core::str::count::char_count_general_case (23,603x) . } else { 35,951 ( 0.00%) do_count_chars(s) 2,502,036 ( 0.03%) => ???:core::str::count::do_count_chars (18,789x) . } . } . . fn do_count_chars(s: &str) -> usize { . // For correctness, `CHUNK_SIZE` must be: . // . // - Less than or equal to 255, otherwise we'll overflow bytes in `counts`. . // - A multiple of `UNROLL_INNER`, otherwise our `break` inside the -- line 43 ---------------------------------------- 33,234 ( 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<'_>) { 196,290 ( 0.00%) if let Some(VecArgs::Repeat(repeat_expr, len_expr)) = VecArgs::hir(cx, expr) 1,575,542 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . && 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) { 130,860 ( 0.00%) if !expr.span.from_expansion() 206,510 ( 0.00%) && fn_def_id(cx, expr).is_some_and(|did| cx.tcx.is_diagnostic_item(sym::iter_repeat, did)) 2,540,110 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (53,826x) 316,892 ( 0.00%) => ???:::is_diagnostic_item (5,629x) . && 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 { 719,730 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . check_vec_macro(cx, expr); 65,430 ( 0.00%) check_repeat_fn(cx, expr, self.msrv); 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . * Return statement . * A body's value (single line closure) . * . * What do we not match: . * Implicit calls to `from(..)` on the error value . */ . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::Ret(Some(e)) = expr.kind { . check(cx, e); . } . } . . fn check_body(&mut self, cx: &LateContext<'_>, body: &'_ Body<'_>) { 60,209 ( 0.00%) if let ExprKind::Block( . Block { . expr: . Some(Expr { . kind: ExprKind::DropTemps(async_body), . .. . }), . .. . }, . _, 46,046 ( 0.00%) ) = body.value.kind . { . if let ExprKind::Block(Block { expr: Some(expr), .. }, ..) = async_body.kind { . check(cx, expr.peel_blocks()); . } . } else { . check(cx, body.value.peel_blocks()); . } . } . } . . fn check(cx: &LateContext<'_>, expr: &Expr<'_>) { 40,878 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 16,236 ( 0.00%) && let Res::Def(DefKind::Ctor(..), ctor_id) = path.res(cx) . && let Some(variant_id) = cx.tcx.opt_parent(ctor_id) 996 ( 0.00%) && let variant = if cx.tcx.lang_items().option_some_variant() == Some(variant_id) { 19,920 ( 0.00%) => ???:::lang_items (498x) . "Some" 996 ( 0.00%) } else if cx.tcx.lang_items().result_ok_variant() == Some(variant_id) { 19,920 ( 0.00%) => ???:::lang_items (498x) . "Ok" . } else { . return; . } . && let ExprKind::Match(inner_expr_with_q, _, MatchSource::TryDesugar(_)) = &arg.kind . && let ExprKind::Call(called, [inner_expr]) = &inner_expr_with_q.kind . && let ExprKind::Path(qpath) = called.kind . && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitBranch) -- line 109 ---------------------------------------- -- line 128 ---------------------------------------- . String::new(), . ), . ], . Applicability::MachineApplicable, . ); . }, . ); . } 14,171 ( 0.00%) } 31,974 ( 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); 264,718 ( 0.00%) let mut other_attrs = ThinVec::::with_capacity(if doc_only { 0 } else { size_hint }); . for (attr, item_id) in attrs { . if let Some((doc_str, fragment_kind)) = attr.doc_str_and_fragment_kind() { 47,007 ( 0.00%) let doc = beautify_doc_string(doc_str, fragment_kind.comment_kind()); 2,760,193 ( 0.03%) => ???:rustc_ast::util::comments::beautify_doc_string (15,669x) 62,676 ( 0.00%) let attr_span = attr.span(); 62,338 ( 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(); . 110,236 ( 0.00%) unindent_doc_fragments(&mut doc_fragments); 6,018,495 ( 0.08%) => ???:rustc_resolve::rustdoc::unindent_doc_fragments (110,236x) . 661,416 ( 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 ---------------------------------------- 75,584 ( 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 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 { 16,176 ( 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); 837,148 ( 0.01%) simd_bitmask::<_, u16>(m) as u32 as i32 . } . } . . /// Shuffles 32-bit integers in `a` using the control in `IMM8`. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_shuffle_epi32) . #[inline] . #[target_feature(enable = "sse2")] -- line 1629 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/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 { 52,272 ( 0.00%) if self.count >= CACHE_CUTOFF { . self.cold_insert(key, value) . } else { 34,848 ( 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> { 17,424 ( 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 ---------------------------------------- 17,424 ( 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/predicate.rs -------------------------------------------------------------------------------- Ir -- line 117 ---------------------------------------- . /// calling [`TraitRef::new_from_args`]. . _use_trait_ref_new_instead: (), . } . . impl Eq for TraitRef {} . . impl TraitRef { . pub fn new_from_args(interner: I, trait_def_id: I::TraitId, args: I::GenericArgs) -> Self { 34,165 ( 0.00%) interner.debug_assert_args_compatible(trait_def_id.into(), args); 24 ( 0.00%) => ???:std::exception::~exception() (24x) 27,332 ( 0.00%) Self { def_id: trait_def_id, args, _use_trait_ref_new_instead: () } . } . . pub fn new( . interner: I, . trait_def_id: I::TraitId, . args: impl IntoIterator>, . ) -> Self { . let args = interner.mk_args_from_iter(args.into_iter().map(Into::into)); -- line 134 ---------------------------------------- -- line 155 ---------------------------------------- . interner, . self.def_id, . [self_ty.into()].into_iter().chain(self.args.iter().skip(1)), . ) . } . . #[inline] . pub fn self_ty(&self) -> I::Ty { 32 ( 0.00%) self.args.type_at(0) 96 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::inherent::GenericArgs>::type_at (8x) . } . } . . impl ty::Binder> { . pub fn self_ty(&self) -> ty::Binder { . self.map_bound_ref(|tr| tr.self_ty()) . } . -- line 171 ---------------------------------------- 6,833 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs -------------------------------------------------------------------------------- Ir -- line 213 ---------------------------------------- . impl Usage { . fn new(span: Span, idx: usize) -> Self { . Self { span, idx } . } . } . . /// The parameters being checked by the lint, indexed by both the parameter's `HirId` and the . /// `DefId` of the function paired with the parameter's index. 2 ( 0.00%) #[derive(Default)] . #[expect(clippy::struct_field_names)] . struct Params { . params: Vec, . by_id: HirIdMap, . by_fn: FxHashMap<(DefId, usize), usize>, . } . impl Params { . fn insert(&mut self, param: Param, id: HirId) { -- line 229 ---------------------------------------- -- line 230 ---------------------------------------- . let idx = self.params.len(); . self.by_id.insert(id, idx); . self.by_fn.insert((param.fn_id, param.idx), idx); . self.params.push(param); . } . . fn remove_by_id(&mut self, id: HirId) { . if let Some(param) = self.get_by_id_mut(id) { 24,264 ( 0.00%) param.uses = Vec::new(); 32,352 ( 0.00%) let key = (param.fn_id, param.idx); . self.by_fn.remove(&key); . // FIXME(rust/#120456) - is `swap_remove` correct? 16,176 ( 0.00%) self.by_id.swap_remove(&id); 723,965 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (8,088x) . } . } . . fn get_by_id_mut(&mut self, id: HirId) -> Option<&mut Param> { 82,668 ( 0.00%) self.params.get_mut(*self.by_id.get(&id)?) 507,684 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (20,667x) . } . . 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 { 24,264 ( 0.00%) self.try_disable_lint_for_param(param, &mut eval_stack); 56,616 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::try_disable_lint_for_param (8,088x) . } . } . . // Use by calling `flag_for_linting`. . fn try_disable_lint_for_param(&self, param: &Param, eval_stack: &mut Vec) -> bool { 16,176 ( 0.00%) if !param.apply_lint.get() { . true 8,088 ( 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 . } 8,088 ( 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 { 113,368 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 42,513 ( 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. 201,503 ( 0.00%) let (fn_id, fn_kind, skip_params) = match cx.tcx.parent_hir_node(body.value.hir_id) { 1,498,580 ( 0.02%) => ???:::parent_hir_node (12,469x) 6 ( 0.00%) Node::Item(i) => (i.owner_id.to_def_id(), FnKind::Fn, 0), . Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(ref sig, _), . owner_id, . .. . }) => ( . owner_id.to_def_id(), . FnKind::TraitFn, . usize::from(sig.decl.implicit_self().has_implicit_self()), . ), . Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(ref sig, _), 8,938 ( 0.00%) owner_id, 8,938 ( 0.00%) impl_kind, . .. . }) => { 33,601 ( 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); 4,302 ( 0.00%) let trait_ref = cx.tcx.impl_trait_ref(impl_id).instantiate_identity().skip_norm_wip(); 163,923 ( 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:: (2,151x) . ( . 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, . }; 17,882 ( 0.00%) body.params . .iter() . .enumerate() . .skip(skip_params) 32,352 ( 0.00%) .filter_map(|(idx, p)| match p.pat.kind { 80,880 ( 0.00%) PatKind::Binding(_, id, ident, None) if !ident.as_str().starts_with('_') => { 258,816 ( 0.00%) => ???:::as_str (8,088x) . Some((id, Param::new(fn_id, fn_kind, idx, ident))) . }, . _ => None, . }) . .for_each(|(id, param)| self.params.insert(param, id)); 8,941 ( 0.00%) if self.entered_body.is_none() { 17,882 ( 0.00%) self.entered_body = Some(body.value.hir_id); . } 113,368 ( 0.00%) } . 458,010 ( 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(); 8,088 ( 0.00%) let span = e.span; . let mut e = e; . loop { 56,914 ( 0.00%) match get_expr_use_or_unification_node(cx.tcx, e) { 2,040,430 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (9,115x) . None | Some((Node::Stmt(_), _)) => return, 102,708 ( 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) 30,513 ( 0.00%) if callee.res(cx).opt_def_id().is_some_and(|id| { 3,729 ( 0.00%) id == param.fn_id && has_matching_args(param.fn_kind, typeck.node_args(callee.hir_id)) 14,916 ( 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, _) 20,566 ( 0.00%) if typeck.type_dependent_def_id(parent.hir_id).is_some_and(|id| { 80,682 ( 0.00%) => ???:::type_dependent_def_id (1,582x) . 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. 2 ( 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) 2 ( 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) 3,608 ( 0.00%) if typeck.expr_ty(lhs).is_primitive() && typeck.expr_ty(rhs).is_primitive() => 36,080 ( 0.00%) => ???:::expr_ty (902x) . { . e = parent; . continue; . }, 6,815 ( 0.00%) ExprKind::Unary(_, arg) if typeck.expr_ty(arg).is_primitive() => { 54,520 ( 0.00%) => ???:::expr_ty (1,363x) . 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; . } . } 523,440 ( 0.01%) } . 99,197 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 8,942 ( 0.00%) if self.entered_body == Some(body.value.hir_id) { 8,941 ( 0.00%) self.entered_body = None; . self.params.flag_for_linting(); . for param in &self.params.params { 16,176 ( 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(); . } 113,368 ( 0.00%) } . } . . fn has_matching_args(kind: FnKind, args: GenericArgsRef<'_>) -> bool { . match kind { . FnKind::Fn => true, . FnKind::TraitFn => args.iter().enumerate().all(|(idx, subst)| match subst.kind() { . GenericArgKind::Lifetime(_) => true, . GenericArgKind::Type(ty) => matches!(*ty.kind(), ty::Param(ty) if ty.index as usize == idx), -- line 489 ---------------------------------------- 178,547 ( 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<'_>) { 2,642 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 520 ( 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); . }, . ); . } 1,191 ( 0.00%) } . 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) 162,471 ( 0.00%) || expr.span.desugaring_kind().is_some() 5,197,122 ( 0.07%) => ???:::desugaring_kind (54,157x) 433,256 ( 0.01%) || in_automatically_derived(cx.tcx, expr.hir_id) 58,479,085 ( 0.73%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (54,157x) . { . return; . } . . used_underscore_binding(cx, expr); . used_underscore_items(cx, expr); 523,440 ( 0.01%) } . } . . fn used_underscore_items<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 317,376 ( 0.00%) let (def_id, ident) = match expr.kind { 4,003 ( 0.00%) ExprKind::Call(func, ..) => { 16,689 ( 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, ..) => { 4,998 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 84,966 ( 0.00%) => ???:::type_dependent_def_id (1,666x) 1,666 ( 0.00%) (def_id, path.ident) . } else { . return; . } 1,666 ( 0.00%) }, . ExprKind::Struct(QPath::Resolved(_, path), ..) => { 149 ( 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); 2,485 ( 0.00%) if name.starts_with('_') . && !name.starts_with("__") . && !definition_span.from_expansion() . && def_id.is_local() . && !cx.tcx.is_foreign_item(def_id) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_ITEMS, -- line 181 ---------------------------------------- -- line 184 ---------------------------------------- . |diag| { . diag.span_note(definition_span, "item is defined here".to_string()); . }, . ); . } . } . . fn used_underscore_binding<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 314,788 ( 0.00%) let (definition_hir_id, ident) = match expr.kind { . ExprKind::Path(ref qpath) => { 62,956 ( 0.00%) if let QPath::Resolved(None, path) = qpath 69,537 ( 0.00%) && let Res::Local(id) = path.res 58 ( 0.00%) && is_used(cx, expr) . { 45,690 ( 0.00%) (id, last_path_segment(qpath).ident) 109,656 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (9,138x) . } else { . return; . } 9,138 ( 0.00%) }, 9,696 ( 0.00%) ExprKind::Field(recv, ident) => { 3,232 ( 0.00%) if let Some(adt_def) = cx.typeck_results().expr_ty_adjusted(recv).ty_adt_def() 171,744 ( 0.00%) => ???:::expr_ty_adjusted (3,232x) . && let Some(field) = adt_def.all_fields().find(|field| field.name == ident.name) . && let Some(local_did) = field.did.as_local() 997 ( 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(); 12,370 ( 0.00%) if name.starts_with('_') . && !name.starts_with("__") . && let definition_span = cx.tcx.hir_span(definition_hir_id) . && !definition_span.from_expansion() . && !fulfill_or_allowed(cx, USED_UNDERSCORE_BINDING, [expr.hir_id, definition_hir_id]) . { . span_lint_and_then( . cx, . USED_UNDERSCORE_BINDING, -- line 226 ---------------------------------------- -- line 232 ---------------------------------------- . ); . } . } . . /// Heuristic to see if an expression is used. Should be compatible with . /// `unused_variables`'s idea . /// of what it means for an expression to be "used". . fn is_used(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 159,419 ( 0.00%) get_parent_expr(cx, expr).is_none_or(|parent| match parent.kind { 3,664,437 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (27,985x) 29 ( 0.00%) ExprKind::Assign(_, rhs, _) | ExprKind::AssignOp(_, _, rhs) => { 145 ( 0.00%) SpanlessEq::new(cx).eq_expr(parent.span.ctxt(), rhs, expr) 498,093 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (29x) . }, . _ => is_used(cx, parent), . }) . } 188,284 ( 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}; . 588,870 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,860 ( 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. 119,640 ( 0.00%) if is_questionmark_desugar_marked_call(expr) { . return; . } 461,089 ( 0.01%) if let Node::Expr(parent_expr) = cx.tcx.parent_hir_node(expr.hir_id) 6,455,290 ( 0.08%) => ???:::parent_hir_node (53,826x) 23,967 ( 0.00%) && is_questionmark_desugar_marked_call(parent_expr) . { . return; . } . 207,312 ( 0.00%) let (receiver, args) = match expr.kind { . ExprKind::Call(_, args) => (None, args), 6,544 ( 0.00%) ExprKind::MethodCall(_, receiver, args, _) => (Some(receiver), args), . _ => return, . }; . . let args_to_recover = receiver . .into_iter() . .chain(args) . .filter(|arg| { 14,432 ( 0.00%) if cx.typeck_results().expr_ty(arg).is_unit() && !utils::is_unit_literal(arg) { 288,640 ( 0.00%) => ???:::expr_ty (7,216x) . !matches!( . &arg.kind, . ExprKind::Match(.., MatchSource::TryDesugar(_)) | ExprKind::Path(..) . ) . } else { . false . } . }) . .collect::>(); 5,632 ( 0.00%) if !args_to_recover.is_empty() && !is_from_proc_macro(cx, expr) { . lint_unit_args(cx, expr, args_to_recover.as_slice()); . } 523,440 ( 0.01%) } . . fn is_questionmark_desugar_marked_call(expr: &Expr<'_>) -> bool { . use rustc_span::hygiene::DesugaringKind; 114,788 ( 0.00%) if let ExprKind::Call(callee, _) = expr.kind { 35,955 ( 0.00%) callee.span.is_desugaring(DesugaringKind::QuestionMark) 1,150,560 ( 0.01%) => ???:::is_desugaring (11,985x) . } 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 ---------------------------------------- 23,252 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs -------------------------------------------------------------------------------- Ir -- line 268 ---------------------------------------- . /// . /// This default shouldn't be overridden without good reason, . /// such as when forwarding to another PartialEq implementation. . #[inline] . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "cmp_partialeq_ne"] . fn ne(&self, other: &Rhs) -> bool { 121,212 ( 0.00%) !self.eq(other) 115,341 ( 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:::eq (22,869x) . } . } . . /// Derive macro generating an impl of the trait [`PartialEq`]. . /// The behavior of this macro is described in detail [here](PartialEq#derivable). . #[rustc_builtin_macro] . #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] . #[allow_internal_unstable(core_intrinsics, structural_match)] -- line 284 ---------------------------------------- -- line 402 ---------------------------------------- . /// . /// assert_eq!(1.cmp(&2), Ordering::Less); . /// . /// assert_eq!(1.cmp(&1), Ordering::Equal); . /// . /// assert_eq!(2.cmp(&1), Ordering::Greater); . /// ``` . #[derive(Copy, Debug, Hash)] 2,380 ( 0.00%) #[derive_const(Clone, Eq, PartialOrd, Ord, PartialEq)] . #[stable(feature = "rust1", since = "1.0.0")] . // This is a lang item only so that `BinOp::Cmp` in MIR can return it. . // It has no special behavior, but does require that the three variants . // `Less`/`Equal`/`Greater` remain `-1_i8`/`0_i8`/`+1_i8` respectively. . #[lang = "Ordering"] . #[repr(i8)] . pub enum Ordering { . /// An ordering where a compared value is less than another. -- line 418 ---------------------------------------- -- line 486 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_lt(), false); . /// assert_eq!(Ordering::Greater.is_lt(), false); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_lt(self) -> bool { 33 ( 0.00%) self.as_raw() < 0 . } . . /// Returns `true` if the ordering is the `Greater` variant. . /// . /// # Examples . /// . /// ``` . /// use std::cmp::Ordering; -- line 502 ---------------------------------------- -- line 505 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_gt(), false); . /// assert_eq!(Ordering::Greater.is_gt(), true); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_gt(self) -> bool { 147,312 ( 0.00%) self.as_raw() > 0 . } . . /// Returns `true` if the ordering is either the `Less` or `Equal` variant. . /// . /// # Examples . /// . /// ``` . /// use std::cmp::Ordering; -- line 521 ---------------------------------------- -- line 524 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_le(), true); . /// assert_eq!(Ordering::Greater.is_le(), false); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_le(self) -> bool { 1 ( 0.00%) self.as_raw() <= 0 . } . . /// Returns `true` if the ordering is either the `Greater` or `Equal` variant. . /// . /// # Examples . /// . /// ``` . /// use std::cmp::Ordering; -- line 540 ---------------------------------------- -- line 543 ---------------------------------------- . /// assert_eq!(Ordering::Equal.is_ge(), true); . /// assert_eq!(Ordering::Greater.is_ge(), true); . /// ``` . #[inline] . #[must_use] . #[rustc_const_stable(feature = "ordering_helpers", since = "1.53.0")] . #[stable(feature = "ordering_helpers", since = "1.53.0")] . pub const fn is_ge(self) -> bool { 149,139 ( 0.00%) self.as_raw() >= 0 . } . . /// Reverses the `Ordering`. . /// . /// * `Less` becomes `Greater`. . /// * `Greater` becomes `Less`. . /// * `Equal` becomes `Equal`. . /// -- line 559 ---------------------------------------- -- line 1043 ---------------------------------------- . #[inline] . #[must_use] . #[rustc_diagnostic_item = "cmp_ord_max"] . fn max(self, other: Self) -> Self . where . Self: Sized + [const] Destruct, . { . if other < self { self } else { other } 275,199 ( 0.00%) } . . /// Compares and returns the minimum of two values. . /// . /// Returns the first argument if the comparison determines them to be equal. . /// . /// # Examples . /// . /// ``` -- line 1059 ---------------------------------------- -- line 1082 ---------------------------------------- . #[inline] . #[must_use] . #[rustc_diagnostic_item = "cmp_ord_min"] . fn min(self, other: Self) -> Self . where . Self: Sized + [const] Destruct, . { . if other < self { other } else { self } 113,826 ( 0.00%) } . . /// Restrict a value to a certain interval. . /// . /// Returns `max` if `self` is greater than `max`, and `min` if `self` is . /// less than `min`. Otherwise this returns `self`. . /// . /// # Panics . /// -- line 1098 ---------------------------------------- -- line 1722 ---------------------------------------- . #[stable(feature = "cmp_min_max_by", since = "1.53.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . pub const fn max_by Ordering>( . v1: T, . v2: T, . compare: F, . ) -> T { . if compare(&v1, &v2).is_gt() { v1 } else { v2 } 7,416 ( 0.00%) } . . /// Returns the element that gives the maximum value from the specified function. . /// . /// Returns the second argument if the comparison determines them to be equal. . /// . /// # Examples . /// . /// ``` -- line 1738 ---------------------------------------- -- line 1889 ---------------------------------------- . /// NOTE: Calling this on a non-primitive type (such as `()`) . /// leads to an infinitely-looping self-recursive implementation. . macro_rules! impl_partial_eq_for_primitive { . ($($t:ty)*) => ($( . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq for $t { . #[inline] 738,397 ( 0.01%) fn eq(&self, other: &Self) -> bool { *self == *other } . // Override the default to use the primitive implementation for `!=`. . #[inline] . fn ne(&self, other: &Self) -> bool { *self != *other } . } . )*) . } . . impl_partial_eq_for_primitive! { -- line 1905 ---------------------------------------- -- line 1928 ---------------------------------------- . } . . eq_impl! { () bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } . . #[rustfmt::skip] . macro_rules! partial_ord_methods_primitive_impl { . () => { . #[inline(always)] 89,449 ( 0.00%) fn lt(&self, other: &Self) -> bool { *self < *other } . #[inline(always)] . fn le(&self, other: &Self) -> bool { *self <= *other } . #[inline(always)] . fn gt(&self, other: &Self) -> bool { *self > *other } . #[inline(always)] . fn ge(&self, other: &Self) -> bool { *self >= *other } . . // These implementations are the same for `Ord` or `PartialOrd` types -- line 1944 ---------------------------------------- -- line 2023 ---------------------------------------- . partial_ord_methods_primitive_impl!(); . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl Ord for $t { . #[inline] . fn cmp(&self, other: &Self) -> Ordering { 2,405 ( 0.00%) crate::intrinsics::three_way_compare(*self, *other) . } . . #[inline] . #[track_caller] . fn clamp(self, min: Self, max: Self) -> Self . { . const_assert!( . min <= max, -- line 2039 ---------------------------------------- -- line 2135 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq<&B> for &A . where . A: [const] PartialEq, . { . #[inline] . fn eq(&self, other: &&B) -> bool { 9,292 ( 0.00%) PartialEq::eq(*self, *other) 23,056 ( 0.00%) => ???:::eq (1,048x) . } . #[inline] . fn ne(&self, other: &&B) -> bool { . PartialEq::ne(*self, *other) . } . } . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] -- line 2151 ---------------------------------------- 73,250 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs -------------------------------------------------------------------------------- Ir -- line 124 ---------------------------------------- . "consider using `expect{method_suffix}()` to provide a better panic message" . )); . } . }, . ); . } . . #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] 27,972 ( 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; . }; 41,881 ( 0.00%) let Some((DefKind::AssocFn, def_id)) = cx.typeck_results().type_dependent_def(func.hir_id) else { 193,282 ( 0.00%) => ???:::type_dependent_def (3,992x) . return; . }; . 3,315 ( 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, . ); . }, . _ => (), . } 31,968 ( 0.00%) } 3,992 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 134,192 ( 0.00%) if let hir::ExprKind::MethodCall(is_some_path, to_digit_expr, [], _) = &expr.kind 124 ( 0.00%) && is_some_path.ident.name == sym::is_some . { . let match_result = match to_digit_expr.kind { . hir::ExprKind::MethodCall(to_digits_path, char_arg, [radix_arg], _) => { . if to_digits_path.ident.name == sym::to_digit . && cx.typeck_results().expr_ty_adjusted(char_arg).is_char() . { . Some((true, char_arg, radix_arg)) . } else { -- line 61 ---------------------------------------- -- line 89 ---------------------------------------- . format!("{char_arg_snip}.is_digit({radix_snip})") . } else { . format!("char::is_digit({char_arg_snip}, {radix_snip})") . }, . applicability, . ); . } . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs -------------------------------------------------------------------------------- Ir -- line 104 ---------------------------------------- . Self { . allow_indexing_slicing_in_tests: conf.allow_indexing_slicing_in_tests, . suppress_restriction_lint_in_const: conf.suppress_restriction_lint_in_const, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for IndexingSlicing { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::Index(array, index, _) = &expr.kind 46 ( 0.00%) && (!self.suppress_restriction_lint_in_const || !cx.tcx.hir_is_inside_const_context(expr.hir_id)) 115 ( 0.00%) && let expr_ty = cx.typeck_results().expr_ty(array) 920 ( 0.00%) => ???:::expr_ty (23x) . && let mut deref = deref_chain(cx, expr_ty) . && deref.any(|l| { . l.peel_refs().is_slice() . || l.peel_refs().is_array() . || ty_has_applicable_get_function(cx, l.peel_refs(), expr_ty, expr) . }) 46 ( 0.00%) && !is_from_proc_macro(cx, expr) . { 115 ( 0.00%) let note = "the suggestion might not be applicable in constant blocks"; 46 ( 0.00%) let ty = cx.typeck_results().expr_ty(array).peel_refs(); 920 ( 0.00%) => ???:::expr_ty (23x) 46 ( 0.00%) let allowed_in_tests = self.allow_indexing_slicing_in_tests && is_in_test(cx.tcx, expr.hir_id); 138 ( 0.00%) if let Some(range) = higher::Range::hir(cx, index) { 1,035 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (23x) . // Ranged indexes, i.e., &x[n..m], &x[n..], &x[..n] and &x[..] . if let ty::Array(_, s) = ty.kind() { . let size: u128 = if let Some(size) = s.try_to_target_usize(cx.tcx) { . size.into() . } else { . return; . }; . -- line 135 ---------------------------------------- -- line 181 ---------------------------------------- . diag.help(help_msg); . . if cx.tcx.hir_is_inside_const_context(expr.hir_id) { . diag.note(note); . } . }); . } else { . // Catchall non-range index, i.e., [n] or [n << m] 46 ( 0.00%) if let ty::Array(..) = ty.kind() { . // Index is a const block. 46 ( 0.00%) if let ExprKind::ConstBlock(..) = index.kind { . return; . } . // Index is a constant uint. 207 ( 0.00%) if let Some(constant) = ConstEvalCtxt::new(cx).eval(index) { 3,174 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (23x) 1,288 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (23x) . // only `usize` index is legal in rust array index . // leave other type to rustc 92 ( 0.00%) if let Constant::Int(off) = constant . && off <= usize::MAX as u128 92 ( 0.00%) && let ty::Uint(utype) = cx.typeck_results().expr_ty(index).kind() 920 ( 0.00%) => ???:::expr_ty (23x) 23 ( 0.00%) && *utype == ty::UintTy::Usize 46 ( 0.00%) && let ty::Array(_, s) = ty.kind() 92 ( 0.00%) && let Some(size) = s.try_to_target_usize(cx.tcx) . { . // get constant offset and check whether it is in bounds . let off = usize::try_from(off).unwrap(); . let size = usize::try_from(size).unwrap(); . . if off >= size { . span_lint(cx, OUT_OF_BOUNDS_INDEXING, expr.span, "index is out of bounds"); . } . } . // Let rustc's `const_err` lint handle constant `usize` indexing on arrays. . return; 23 ( 0.00%) } 575 ( 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:: (23x) . } . . if allowed_in_tests { . return; . } . . span_lint_and_then(cx, INDEXING_SLICING, expr.span, "indexing may panic", |diag| { . diag.help("consider using `.get(n)` or `.get_mut(n)` instead"); . . if cx.tcx.hir_is_inside_const_context(expr.hir_id) { . diag.note(note); . } . }); . } . } 523,440 ( 0.01%) } . } . . /// Returns a tuple of options with the start and end (exclusive) values of . /// the range. If the start or end is not constant, None is returned. . fn to_const_range(cx: &LateContext<'_>, range: higher::Range<'_>, array_size: u128) -> (Option, Option) { . let ecx = ConstEvalCtxt::new(cx); . let s = range.start.map(|expr| ecx.eval(expr)); . let start = match s { -- line 239 ---------------------------------------- 506 ( 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 { 47,007 ( 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. 54,150 ( 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 284 ---------------------------------------- . pub fn article(self) -> &'static str { . match self { . Integer | Err(_) => "an", . _ => "a", . } . } . . pub fn descr(self) -> &'static str { 854 ( 0.00%) match self { . Bool => "boolean", . Byte => "byte", . Char => "char", . Integer => "integer", . Float => "float", . Str | StrRaw(..) => "string", . ByteStr | ByteStrRaw(..) => "byte string", . CStr | CStrRaw(..) => "C string", -- line 300 ---------------------------------------- 36,556 ( 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)] 46 ( 0.00%) #[derive(Copy, Debug, Hash)] . #[derive_const(Eq)] . #[rustc_diagnostic_item = "Option"] . #[lang = "Option"] . #[stable(feature = "rust1", since = "1.0.0")] . #[allow(clippy::derived_hash_with_manual_eq)] // PartialEq is manually implemented equivalently . pub enum Option { . /// No value. . #[lang = "None"] -- line 600 ---------------------------------------- -- line 626 ---------------------------------------- . /// let x: Option = None; . /// assert_eq!(x.is_some(), false); . /// ``` . #[must_use = "if you intended to assert that this has a value, consider `.unwrap()` instead"] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . pub const fn is_some(&self) -> bool { 585,562 ( 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 { 291,132 ( 0.00%) match self { . None => false, 120,308 ( 0.00%) Some(x) => f(x), 41,019 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr::{closure#0} (3,729x) . } . } . . /// Returns `true` if the option is a [`None`] value. . /// . /// # Examples . /// . /// ``` -- line 670 ---------------------------------------- -- line 701 ---------------------------------------- . /// assert_eq!(x.as_ref().is_none_or(|x| x.len() > 1), true); . /// println!("still alive {:?}", x); . /// ``` . #[must_use] . #[inline] . #[stable(feature = "is_none_or", since = "1.82.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn is_none_or(self, f: impl [const] FnOnce(T) -> bool + [const] Destruct) -> bool { 404,696 ( 0.01%) match self { . None => true, . Some(x) => f(x), . } . } . . ///////////////////////////////////////////////////////////////////////// . // Adapter for working with references . ///////////////////////////////////////////////////////////////////////// -- line 717 ---------------------------------------- -- line 735 ---------------------------------------- . /// // then consume *that* with `map`, leaving `text` on the stack. . /// let text_length: Option = text.as_ref().map(|s| s.len()); . /// println!("still can print text: {text:?}"); . /// ``` . #[inline] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . #[stable(feature = "rust1", since = "1.0.0")] . pub const fn as_ref(&self) -> Option<&T> { 340,048 ( 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> { 420,472 ( 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. 9,484 ( 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 { 710,663 ( 0.01%) match self { 18,254 ( 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 { 72,624 ( 0.00%) match self { 25,733 ( 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, . { 190,534 ( 0.00%) match self { 60,242 ( 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, . { 37,493 ( 0.00%) match self { 27,258 ( 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, . { 52,114 ( 0.00%) match self { 78,087 ( 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, . { 707,197 ( 0.01%) match self { 135,998 ( 0.00%) Some(x) => Some(f(x)), . None => None, . } 8 ( 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, . { 95,604 ( 0.00%) match self { 10,979 ( 0.00%) Some(t) => f(t), . None => default, . } 36,960 ( 0.00%) } . . /// Computes a default function result (if none), or . /// applies a different function to the contained value (if any). . /// . /// # Basic examples . /// . /// ``` . /// let k = 21; -- line 1239 ---------------------------------------- -- line 1266 ---------------------------------------- . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn map_or_else(self, default: D, f: F) -> U . where . D: [const] FnOnce() -> U + [const] Destruct, . F: [const] FnOnce(T) -> U + [const] Destruct, . { 26,127 ( 0.00%) match self { . Some(t) => f(t), . None => default(), . } 2,561 ( 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, . { 47,360 ( 0.00%) match self { 177,592 ( 0.00%) Some(x) => f(x), 52 ( 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} (4x) 435 ( 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, . { 220,464 ( 0.00%) if let Some(x) = self { 28,119 ( 0.00%) if predicate(&x) { 4,490 ( 0.00%) return Some(x); . } . } 66,391 ( 0.00%) None . } . . /// Returns the option if it contains a value, otherwise returns `optb`. . /// . /// Arguments passed to `or` are eagerly evaluated; if you are passing the . /// result of a function call, it is recommended to use [`or_else`], which is . /// lazily evaluated. . /// -- line 1592 ---------------------------------------- -- line 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, . { 2 ( 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, . { 93,989 ( 0.00%) match self { 34 ( 0.00%) x @ Some(_) => x, . None => f(), . } 2 ( 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, . { 8,508 ( 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 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 { 96,025 ( 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 { 356,146 ( 0.00%) match self { . Some(x) => Some(x.clone()), . None => None, . } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . match (self, source) { -- line 2282 ---------------------------------------- -- line 2431 ---------------------------------------- . impl crate::marker::StructuralPartialEq for Option {} . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq for Option { . #[inline] . fn eq(&self, other: &Self) -> bool { . // Spelling out the cases explicitly optimizes better than . // `_ => false` 1,573,864 ( 0.02%) match (self, other) { 3,310 ( 0.00%) (Some(l), Some(r)) => *l == *r, 64,545 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (1,655x) . (Some(_), None) => false, . (None, Some(_)) => false, . (None, None) => true, . } . } . } . . // Manually implementing here somewhat improves codegen for -- line 2448 ---------------------------------------- -- line 2861 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . Some(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 477,816 ( 0.01%) match self { 36,005 ( 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 { 32,954 ( 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 ---------------------------------------- 909,051 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs -------------------------------------------------------------------------------- Ir -- line 506 ---------------------------------------- . . impl Attributes { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for Attributes { 126,387 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 70,215 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 946,062 ( 0.01%) => ???:::hir_attrs (14,043x) 28,086 ( 0.00%) if let ItemKind::Fn { ident, body, .. } = item.kind { . inline_always::check(cx, item.span, ident.name, attrs, Some(body)); . } 14,043 ( 0.00%) repr_attributes::check(cx, item.span, attrs, self.msrv); 98,301 ( 0.00%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 55,858 ( 0.00%) if let ImplItemKind::Fn(_, body) = item.kind { 74,368 ( 0.00%) inline_always::check( 17,148,130 ( 0.22%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (10,624x) . cx, 10,624 ( 0.00%) item.span, 10,624 ( 0.00%) item.ident.name, 42,496 ( 0.00%) cx.tcx.hir_attrs(item.hir_id()), 723,679 ( 0.01%) => ???:::hir_attrs (10,624x) . Some(body), . ); . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 8 ( 0.00%) if let TraitItemKind::Fn(_, kind) = item.kind { 6 ( 0.00%) let body = match kind { . TraitFn::Required(_) => None, . TraitFn::Provided(body) => Some(body), . }; 14 ( 0.00%) inline_always::check(cx, item.span, item.ident.name, cx.tcx.hir_attrs(item.hir_id()), body); 62 ( 0.00%) => ???:::hir_attrs (1x) 33 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (1x) . } . } . } . . pub struct EarlyAttributes { . msrv: MsrvStack, . } . . impl EarlyAttributes { . pub fn new(conf: &'static Conf) -> Self { 308 ( 0.00%) Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for EarlyAttributes { 153,276 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 76,638 ( 0.00%) deprecated_cfg_attr::check(cx, attr, &self.msrv); 689,147 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check (25,546x) 76,638 ( 0.00%) deprecated_cfg_attr::check_clippy(cx, attr); 726,598 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy (25,546x) . non_minimal_cfg::check(cx, attr); 102,184 ( 0.00%) } . . extract_msrv_attr!(); . } . . pub struct PostExpansionEarlyAttributes { . msrv: MsrvStack, . } . . impl PostExpansionEarlyAttributes { . pub fn new(conf: &'static Conf) -> Self { 1 ( 0.00%) Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for PostExpansionEarlyAttributes { . fn check_crate(&mut self, cx: &EarlyContext<'_>, _krate: &ast::Crate) { . blanket_clippy_restriction_lints::check_command_line(cx); . } . 302,950 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 90,885 ( 0.00%) check_clippy_attr(cx.sess(), attr); 2,687,729 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::check_clippy_attr:: (30,295x) 151,475 ( 0.00%) if let Some(items) = &attr.meta_item_list() 3,226,761 ( 0.04%) => ???:::meta_item_list (30,295x) 115,599 ( 0.00%) && let Some(name) = attr.name() 86,715 ( 0.00%) => ???:::name (9,635x) . { 35 ( 0.00%) if matches!(name, sym::allow) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 56 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (7x) 21 ( 0.00%) allow_attributes::check(cx, attr); 7,012 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/allow_attributes.rs:clippy_lints::attrs::allow_attributes::check (7x) . } 35 ( 0.00%) if matches!(name, sym::allow | sym::expect) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 56 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (7x) . allow_attributes_without_reason::check(cx, name, items, attr); . } . if is_lint_level(name) { . blanket_clippy_restriction_lints::check(cx, name, items); . } 19,270 ( 0.00%) if items.is_empty() || !attr.has_name(sym::deprecated) { . return; . } . for item in items { . if let MetaItemInner::MetaItem(mi) = &item . && let MetaItemKind::NameValue(lit) = &mi.kind . && mi.has_name(sym::since) . { . deprecated_semver::check(cx, item.span(), lit); -- line 602 ---------------------------------------- -- line 603 ---------------------------------------- . } . } . } . . if attr.has_name(sym::should_panic) { . should_panic_without_expect::check(cx, attr); . } . 20,486 ( 0.00%) if attr.has_name(sym::ignore) . && let AttrKind::Normal(normal_attr) = &attr.kind . && !matches!(normal_attr.item.args, AttrArgs::Eq { .. }) . { . span_lint_and_help( . cx, . IGNORE_WITHOUT_REASON, . attr.span, . "`#[ignore]` without reason", . None, . "add a reason with `= \"..\"`", . ); . } 242,360 ( 0.00%) } . . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &'_ ast::Item) { 42,096 ( 0.00%) match item.kind { 6,843 ( 0.00%) ast::ItemKind::ExternCrate(..) | ast::ItemKind::Use(..) => useless_attribute::check(cx, item, &item.attrs), 170,730 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs:clippy_lints::attrs::useless_attribute::check (2,281x) . _ => {}, . } . 70,160 ( 0.00%) mixed_attributes_style::check(cx, item.span, &item.attrs); 7,685,335 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:clippy_lints::attrs::mixed_attributes_style::check (14,032x) . } . 1,339,120 ( 0.02%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[Attribute]) { 401,736 ( 0.01%) self.msrv.check_attributes(attrs); 1,324,511 ( 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 (133,912x) . duplicated_attributes::check(cx, attrs); 267,824 ( 0.00%) msrvs::check_attrs(cx.sess(), attrs); 3,181,950 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:clippy_utils::msrvs::check_attrs:: (133,912x) 1,071,296 ( 0.01%) } . . fn check_attributes_post(&mut self, _cx: &EarlyContext<'_>, attrs: &[Attribute]) { 535,648 ( 0.01%) self.msrv.check_attributes_post(attrs); 1,324,511 ( 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 (133,912x) . } . } 15 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 74,375 ( 0.00%) pub fn check_fn(cx: &LateContext<'_>, kind: FnKind<'_>, decl: &FnDecl<'_>, body: &Body<'_>, span: Span) { 21,250 ( 0.00%) let FnKind::Method(ref ident, sig) = kind else { . return; . }; . . // Takes only &(mut) self 21,248 ( 0.00%) if decl.inputs.len() != 1 { . return; . } . . let name = ident.name.as_str(); . 44,415 ( 0.00%) let name = match decl.implicit_self() { 71,136 ( 0.00%) => ???:::implicit_self (8,892x) . 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… . 24,756 ( 0.00%) let block_expr = if let ExprKind::Block(block, _) = body.value.kind 6,189 ( 0.00%) && block.stmts.is_empty() 18,567 ( 0.00%) && let Some(block_expr) = block.expr . { 18,617 ( 0.00%) if let ExprKind::Block(unsafe_block, _) = block_expr.kind 53 ( 0.00%) && unsafe_block.stmts.is_empty() 106 ( 0.00%) && matches!( . unsafe_block.rules, . BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) . ) 159 ( 0.00%) && let Some(unsafe_block_expr) = unsafe_block.expr . { . unsafe_block_expr . } else { . block_expr . } . } else { . return; . }; 18,564 ( 0.00%) let expr_span = block_expr.span; . . // Accept &, &mut and 13,249 ( 0.00%) let expr = if let ExprKind::AddrOf(_, _, tmp) = block_expr.kind { . tmp . } else { . block_expr . }; 16,931 ( 0.00%) let (self_data, used_ident) = if let ExprKind::Field(self_data, ident) = expr.kind 2 ( 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(); 2,980 ( 0.00%) for adjusted_type in iter::once(typeck_results.expr_ty(self_data)) 29,800 ( 0.00%) => ???:::expr_ty (745x) 2,980 ( 0.00%) .chain(typeck_results.expr_adjustments(self_data).iter().map(|adj| adj.target)) 32,035 ( 0.00%) => ???:::expr_adjustments (745x) . { 4,470 ( 0.00%) let ty::Adt(def, _) = adjusted_type.kind() else { . continue; . }; . 745 ( 0.00%) for f in def.all_fields() { 746 ( 0.00%) if f.name.as_str() == name { . correct_field = Some(f); . } 746 ( 0.00%) if f.name == used_ident.name { . used_field = Some(f); . } . } . } . 3,725 ( 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); . }, . ); . } 85,000 ( 0.00%) } 80,344 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/integer_division.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use clippy_utils::res::MaybeDef as _; . use rustc_hir as hir; . use rustc_lint::LateContext; . use rustc_span::symbol::sym; . . use super::INTEGER_DIVISION; . 45,661 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx hir::Expr<'_>, . op: hir::BinOpKind, . left: &'tcx hir::Expr<'_>, . right: &'tcx hir::Expr<'_>, . ) { 6,523 ( 0.00%) if op == hir::BinOpKind::Div . && cx.typeck_results().expr_ty(left).is_integral() . && let right_ty = cx.typeck_results().expr_ty(right) . && (right_ty.is_integral() || right_ty.is_diag_item(cx, sym::NonZero)) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, INTEGER_DIVISION, expr.span, "integer division", |diag| { . diag.help("division of integers may cause loss of precision. consider using floats"); . }); . } 52,184 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/replace_box.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . #[clippy::version = "1.92.0"] . pub REPLACE_BOX, . perf, . "assigning a newly created box to `Box` is inefficient" . } . . impl_lint_pass!(ReplaceBox => [REPLACE_BOX]); . 5 ( 0.00%) #[derive(Default)] . pub struct ReplaceBox { . consumed_locals: FxHashSet, . loaded_bodies: SmallVec<[BodyId; 2]>, . } . . impl ReplaceBox { . fn get_consumed_locals(&mut self, cx: &LateContext<'_>) -> &FxHashSet { . if let Some(body_id) = cx.enclosing_body -- line 53 ---------------------------------------- -- line 66 ---------------------------------------- . } . . &self.consumed_locals . } . } . . impl LateLintPass<'_> for ReplaceBox { . fn check_body_post(&mut self, _: &LateContext<'_>, body: &Body<'_>) { 28,342 ( 0.00%) if self.loaded_bodies.first().is_some_and(|&x| x == body.id()) { . self.consumed_locals.clear(); . self.loaded_bodies.clear(); . } . } . 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = &expr.kind 33 ( 0.00%) && !lhs.span.from_expansion() 6 ( 0.00%) && !rhs.span.from_expansion() 4 ( 0.00%) && let lhs_ty = cx.typeck_results().expr_ty(lhs) 80 ( 0.00%) => ???:::expr_ty (2x) 8 ( 0.00%) && let Some(inner_ty) = lhs_ty.boxed_ty() 12 ( 0.00%) => ???:::boxed_ty (2x) . // 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 . && local_base(lhs).is_none_or(|(base_id, _)| { . !self.get_consumed_locals(cx).contains(&base_id) . }) . { -- line 93 ---------------------------------------- -- line 132 ---------------------------------------- . expr.span, . "replace existing content with inner value instead", . suggestion, . app, . ); . }); . } . } 523,440 ( 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 ---------------------------------------- 24 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/match_result_ok.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub MATCH_RESULT_OK, . style, . "usage of `ok()` in `let Some(pat)` statements is unnecessary, match on `Ok(pat)` instead" . } . . declare_lint_pass!(MatchResultOk => [MATCH_RESULT_OK]); . . impl<'tcx> LateLintPass<'tcx> for MatchResultOk { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let (let_pat, let_expr, ifwhile) = 261,720 ( 0.00%) if let Some(higher::IfLet { let_pat, let_expr, .. }) = higher::IfLet::hir(cx, expr) { 327,153 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (65,430x) . (let_pat, let_expr, "if") . } else if let Some(higher::WhileLet { let_pat, let_expr, .. }) = higher::WhileLet::hir(expr) { . (let_pat, let_expr, "while") . } else { . return; . }; . . if let ExprKind::MethodCall(ok_path, recv, [], ..) = let_expr.kind //check is expr.ok() has type Result.ok(, _) -- line 57 ---------------------------------------- -- line 74 ---------------------------------------- . MATCH_RESULT_OK, . expr.span.with_hi(let_expr.span.hi()), . "matching on `Some` with `ok()` is redundant", . format!("consider matching on `Ok({some_expr_string})` and removing the call to `ok` instead"), . sugg, . applicability, . ); . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs -------------------------------------------------------------------------------- Ir -- line 321 ---------------------------------------- . { . emit_lint(cx, poly_trait, bounds, index, implied_constraints, bound); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for ImpliedBoundsInImpls { . fn check_generics(&mut self, cx: &LateContext<'tcx>, generics: &rustc_hir::Generics<'tcx>) { 23,489 ( 0.00%) for predicate in generics.predicates { 252 ( 0.00%) if let WherePredicateKind::BoundPredicate(predicate) = predicate.kind . // In theory, the origin doesn't really matter, . // we *could* also lint on explicit where clauses written out by the user, . // not just impl trait desugared ones, but that contradicts with the lint name... . && let PredicateOrigin::ImplTrait = predicate.origin . { . check(cx, predicate.bounds); . } . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &rustc_hir::Ty<'tcx, AmbigArg>) { 124,698 ( 0.00%) if let TyKind::OpaqueDef(opaque_ty, ..) = ty.kind { . check(cx, opaque_ty.bounds); . } . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_sub.rs -------------------------------------------------------------------------------- Ir -- line 90 ---------------------------------------- . . impl ImplicitSaturatingSub { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ImplicitSaturatingSub { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . if let Some(higher::If { cond, then, r#else: None }) = higher::If::hir(expr) . . // Check if the conditional expression is a binary operation . && let ExprKind::Binary(ref cond_op, cond_left, cond_right) = cond.kind . { . check_with_condition(cx, expr, cond_op.node, cond_left, cond_right, then, self.msrv); . } else if let Some(higher::If { . cond, . then: if_block, . r#else: Some(else_block), . }) = higher::If::hir(expr) 2 ( 0.00%) && let ExprKind::Binary(ref cond_op, cond_left, cond_right) = cond.kind . { . check_manual_check( . cx, expr, cond_op, cond_left, cond_right, if_block, else_block, self.msrv, . ); . } 523,440 ( 0.01%) } . } . . #[expect(clippy::too_many_arguments)] . fn check_manual_check<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'tcx>, . condition: &BinOp, . left_hand: &Expr<'tcx>, -- line 127 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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; . 775,635 ( 0.01%) pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) -> bool { . let replacements: Vec<_> = collect_doc_replacements(attrs); . 221,610 ( 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 . } 886,440 ( 0.01%) } . . fn collect_doc_replacements(attrs: &[Attribute]) -> Vec<(Span, String)> { . attrs . .iter() . .filter_map(|attr| { 123,230 ( 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 { 30,295 ( 0.00%) None . } . }) . .collect() . } 15,669 ( 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 { 937,384 ( 0.01%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[rustc_ast::Attribute]) { . include_in_doc_without_cfg::check(cx, attrs); 1,071,296 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for Documentation { 1,108,050 ( 0.01%) fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) { 1,134,095 ( 0.01%) let Some(headers) = check_attrs(cx, self.valid_idents, attrs) else { . return; . }; . 1,753,927 ( 0.02%) match cx.tcx.hir_node(cx.last_node_with_lint_attrs) { 7,516,544 ( 0.09%) => ???:::hir_node (110,236x) 5,304 ( 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`", . ), . _ => (), . }, 13,475 ( 0.00%) Node::Item(item) => { . too_long_first_doc_paragraph::check( . cx, . item, . attrs, 26,950 ( 0.00%) headers.first_paragraph_text_len, 13,475 ( 0.00%) headers.first_paragraph_md_len, 13,475 ( 0.00%) self.check_private_items, . ); 67,375 ( 0.00%) match item.kind { . ItemKind::Fn { sig, body, .. } . if !(is_entrypoint_fn(cx, item.owner_id.to_def_id()) . || item.span.in_external_macro(cx.tcx.sess.source_map())) => . { . missing_headers::check(cx, item.owner_id, sig, headers, Some(body), self.check_private_items); . }, 20 ( 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", . ), . _ => (), . }, . _ => (), . } . }, 4 ( 0.00%) Node::TraitItem(trait_item) => { 9 ( 0.00%) if let TraitItemKind::Fn(sig, ..) = trait_item.kind 5 ( 0.00%) && !trait_item.span.in_external_macro(cx.tcx.sess.source_map()) . { 9 ( 0.00%) missing_headers::check(cx, trait_item.owner_id, sig, headers, None, self.check_private_items); 2,251 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (1x) . } . }, 11,992 ( 0.00%) Node::ImplItem(impl_item) => { 62,667 ( 0.00%) if let ImplItemKind::Fn(sig, body_id) = impl_item.kind 53,115 ( 0.00%) && !impl_item.span.in_external_macro(cx.tcx.sess.source_map()) 44,820 ( 0.00%) && !is_trait_impl_item(cx, impl_item.hir_id()) 1,347,156 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (8,964x) . { 47,691 ( 0.00%) missing_headers::check( 181,280,359 ( 2.27%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check (6,813x) . cx, 13,626 ( 0.00%) impl_item.owner_id, . sig, . headers, . Some(body_id), 6,813 ( 0.00%) self.check_private_items, . ); . } . }, . _ => {}, . } 886,440 ( 0.01%) } . } . . #[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) . } . } . 62,332 ( 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())) . } . 664,830 ( 0.01%) if suspicious_doc_comments::check(cx, attrs) || is_doc_hidden(attrs) { 7,402,868 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check (110,805x) . return None; . } . 220,472 ( 0.00%) let (fragments, _) = attrs_to_doc_fragments( . attrs.iter().filter_map(|attr| { 78,345 ( 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, . ); . 15,583 ( 0.00%) let mut doc = String::with_capacity(fragments.iter().map(|frag| frag.doc.as_str().len() + 1).sum()); . . for fragment in &fragments { 47,007 ( 0.00%) add_doc_fragment(&mut doc, fragment); 4,487,703 ( 0.06%) => ???:rustc_resolve::rustdoc::add_doc_fragment (15,669x) . } . doc.pop(); . 110,236 ( 0.00%) if doc.trim().is_empty() { 283,959 ( 0.00%) if let Some(span) = span_of_fragments(&fragments) { 1,135,836 ( 0.01%) => ???:rustc_resolve::rustdoc::span_of_fragments (94,653x) . span_lint_and_help( . cx, . EMPTY_DOCS, . span, . "empty doc comment", . None, . "consider removing or filling it", . ); . } 283,959 ( 0.00%) return Some(DocHeaders::default()); . } . . // Only emits the allow-by-default `DOC_LINK_CODE`; skip its extra markdown reparse when it's off. 140,247 ( 0.00%) if !clippy_utils::is_lint_allowed(cx, DOC_LINK_CODE, cx.last_node_with_lint_attrs) { 9,798,959 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (15,583x) . 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. 109,081 ( 0.00%) if !clippy_utils::is_lint_allowed(cx, DOC_PARAGRAPHS_MISSING_PUNCTUATION, cx.last_node_with_lint_attrs) { 9,798,895 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (15,583x) . 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. 77,915 ( 0.00%) let mut full_fake_broken_link_callback = |bl: BrokenLink<'_>| -> Option<(CowStr<'_>, CowStr<'_>)> { . broken_link::check(cx, &bl, &doc, &fragments); . 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)); . 296,077 ( 0.00%) Some(check_doc( 58,296,502 ( 0.73%) => site/frontend/rust-clippy/clippy_lints/src/doc/mod.rs:clippy_lints::doc::check_doc::> (15,583x) . cx, . valid_idents, . parser.into_offset_iter(), . &doc, 62,332 ( 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; 98 ( 0.00%) for item in lang.split([',', ' ', '\t']) { . match item.trim() { . "" => {}, . "rust" => { . tags.rust = true; . seen_rust_tags = true; . }, 14 ( 0.00%) "ignore" => { . tags.ignore = true; 7 ( 0.00%) seen_rust_tags = !seen_other_tags; . }, . "no_run" => { . tags.no_run = true; . seen_rust_tags = !seen_other_tags; . }, . "should_panic" => seen_rust_tags = !seen_other_tags, . "compile_fail" => { . tags.compile_fail = true; -- line 1078 ---------------------------------------- -- line 1086 ---------------------------------------- . seen_rust_tags = !seen_other_tags || seen_rust_tags; . }, . _ if item.starts_with("ignore-") => seen_rust_tags = true, . _ if item.starts_with("edition") => {}, . _ => seen_other_tags = true, . } . } . 14 ( 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")] 186,996 ( 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; 15,583 ( 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. 109,081 ( 0.00%) let check_doc_markdown = !clippy_utils::is_lint_allowed(cx, DOC_MARKDOWN, cx.last_node_with_lint_attrs); 9,798,895 ( 0.12%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (15,583x) . 46,749 ( 0.00%) let mut events = events.peekable(); 1,199,891 ( 0.02%) => ???:0x0000000000173dc0 (15,583x) . 1,089,234 ( 0.01%) while let Some((event, range)) = events.next() { 888,535 ( 0.01%) match event { . Html(tag) | InlineHtml(tag) => { . if tag.starts_with(" { . blockquote_level -= 1; . containers.pop(); . }, . Start(CodeBlock(ref kind)) => { 14 ( 0.00%) code = Some(match kind { . CodeBlockKind::Indented => CodeTags::default(), 42 ( 0.00%) CodeBlockKind::Fenced(lang) => CodeTags::parse(lang), 77 ( 0.00%) => ???:::deref (7x) . }); . }, 7 ( 0.00%) End(TagEnd::CodeBlock) => code = None, 11,325 ( 0.00%) Start(Link { dest_url, .. }) => in_link = Some(dest_url), 4,530 ( 0.00%) End(TagEnd::Link) => in_link = None, . Start(Heading { .. } | Paragraph | Item) => { 33,404 ( 0.00%) if let Start(Heading { .. }) = event { . in_heading = true; . } 33,404 ( 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 1226 ---------------------------------------- . } . } else { . 0 . }; . containers.push(Container::List(indent)); . } . ticks_unbalanced = false; . paragraph_range = range; 66,808 ( 0.00%) if is_first_paragraph { 77,915 ( 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; . } 83,510 ( 0.00%) if let End(TagEnd::Heading(_)) = event { . in_heading = false; . } 100,212 ( 0.00%) if let End(TagEnd::Item) = event { . containers.pop(); . } 33,404 ( 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 => { 92 ( 0.00%) if is_first_paragraph { 111 ( 0.00%) headers.first_paragraph_text_len += 1; . } 184 ( 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, -- line 1285 ---------------------------------------- -- line 1294 ---------------------------------------- . if event == HardBreak . && !doc[range.clone()].trim().starts_with('\\') . && let Some(span) = fragments.span(cx, range.clone()) . && !span.from_expansion() . { . collected_breaks.push(span); . } . }, 29,872 ( 0.00%) Code(code) | InlineMath(code) | DisplayMath(code) => { 22,404 ( 0.00%) if is_first_paragraph { 24,932 ( 0.00%) headers.first_paragraph_text_len += code.chars().count(); 68,563 ( 0.00%) => ???:::deref (6,233x) . } . } 96,140 ( 0.00%) Text(text) => { 48,070 ( 0.00%) if is_first_paragraph { 146,531 ( 0.00%) headers.first_paragraph_text_len += text.chars().count(); 226,336 ( 0.00%) => ???:::deref (20,576x) . } . paragraph_range.end = range.end; . let range_ = range.clone(); 127,070 ( 0.00%) ticks_unbalanced |= text.contains('`') 264,385 ( 0.00%) => ???:::deref (24,035x) . && 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'\\')) . }); 49,118 ( 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; . } 48,070 ( 0.00%) let trimmed_text = text.trim(); 264,385 ( 0.00%) => ???:::deref (24,035x) 48,070 ( 0.00%) headers.safety |= in_heading && trimmed_text == "Safety"; 2 ( 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"; 169,607 ( 0.00%) headers.errors |= in_heading && trimmed_text == "Errors"; 92,272 ( 0.00%) headers.panics |= in_heading && trimmed_text == "Panics"; . 48,070 ( 0.00%) if let Some(tags) = code { 42 ( 0.00%) if tags.rust && !tags.compile_fail && !tags.ignore { . needless_doctest_main::check(cx, &text, range.start, fragments); . . if !tags.no_run && !tags.test_harness { . test_attr_in_doctest::check(cx, &text, range.start, fragments); . } . } . } else { 24,028 ( 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() 7,125 ( 0.00%) && let Ok(url) = Url::parse(link) 11,528 ( 0.00%) => ???:::deref (1,048x) 279 ( 0.00%) && (url.scheme() == "https" || url.scheme() == "http") . { . // Don't check the text associated with external URLs . continue; . } 47,498 ( 0.00%) if check_doc_markdown { . text_to_check.push((text, range.clone(), code_level)); . } 261,239 ( 0.00%) doc_suspicious_footnotes::check(cx, doc, range, &fragments, attrs); 7,150,612 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/doc/doc_suspicious_footnotes.rs:clippy_lints::doc::doc_suspicious_footnotes::check (23,749x) . } 23,756 ( 0.00%) } . FootnoteReference(_) => {} . } 777,127 ( 0.01%) } 250,747 ( 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:: (16,710x) 228,068 ( 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:: (19,021x) . 15,583 ( 0.00%) doc_comment_double_space_linebreaks::check(cx, &collected_breaks); 233,745 ( 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 (15,583x) . . headers 124,664 ( 0.00%) } . . fn looks_like_refdef(doc: &str, range: Range) -> Option> { . if range.end < range.start { . return None; . } . . let offset = range.start; . let mut iterator = doc.as_bytes()[range].iter().copied().enumerate(); -- line 1378 ---------------------------------------- 1,672,116 ( 0.02%) -------------------------------------------------------------------------------- -- 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 { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use rustc_ast::LitKind; . 528,425 ( 0.01%) if let ExprKind::Call(fun, [bytes_arg]) = e.kind . // Find `std::str::converts::from_utf8` or `std::primitive::str::from_utf8` 14,949 ( 0.00%) && let Some(sym::str_from_utf8 | sym::str_inherent_from_utf8) = 4,985 ( 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, . ); . } . 134,192 ( 0.00%) if !e.span.in_external_macro(cx.sess().source_map()) . && let ExprKind::MethodCall(path, receiver, ..) = &e.kind 3,332 ( 0.00%) && path.ident.name == sym::as_bytes . && let ExprKind::Lit(lit) = &receiver.kind . && let LitKind::Str(lit_content, _) = &lit.node . { . let callsite = snippet(cx, receiver.span.source_callsite(), r#""foo""#); . let mut applicability = Applicability::MachineApplicable; . if callsite.starts_with("include_str!") { . span_lint_and_sugg( . cx, -- line 333 ---------------------------------------- -- line 362 ---------------------------------------- . snippet_with_applicability(cx, receiver.span, r#""foo""#, &mut applicability) . ), . applicability, . ); . } . } . } . 68,762 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = &e.kind 124 ( 0.00%) && path.ident.name == sym::into_bytes . && let ExprKind::MethodCall(path, recv, [], _) = &recv.kind . && matches!(path.ident.name, sym::to_owned | sym::to_string) . && let ExprKind::Lit(lit) = &recv.kind . && let LitKind::Str(lit_content, _) = &lit.node . && lit_content.as_str().is_ascii() . && lit_content.as_str().len() <= MAX_LENGTH_BYTE_STRING_LIT . && !recv.span.from_expansion() . { -- line 379 ---------------------------------------- -- line 387 ---------------------------------------- . "consider using a byte string literal instead", . format!( . "b{}.to_vec()", . snippet_with_applicability(cx, recv.span, r#""..""#, &mut applicability) . ), . applicability, . ); . } 523,440 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . let tyckres = cx.typeck_results(); 134,254 ( 0.00%) if let ExprKind::MethodCall(path, split_recv, [], split_ws_span) = expr.kind 62 ( 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, . ); . } 523,440 ( 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 ---------------------------------------- 70,415 ( 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/const_kind.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash, StableHash_NoContext}; . use rustc_type_ir_macros::{ . GenericTypeVisitable, Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic, . }; . . use crate::{self as ty, AliasConst, BoundVarIndexKind, Interner}; . . /// Represents a constant in Rust. 52,128 ( 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 ConstKind { . /// A const generic parameter. . Param(I::ParamConst), -- line 23 ---------------------------------------- -- line 196 ---------------------------------------- . /// Since CTFE uses `AllocId` to represent pointers, it often happens that two different . /// `AllocId`s point to equal values. So we may end up with different representations for . /// two constants whose value is `&42`. Furthermore any kind of struct that has padding will . /// have arbitrary values within that padding, even if the values of the struct are the same. . /// . /// `ValTree` does not have this problem with representation, as it only contains integers or . /// lists of (nested) `ty::Const`s (which may indirectly contain more `ValTree`s). . #[derive_where(Clone, Copy, Debug, Hash, Eq, PartialEq; I: Interner)] 17,376 ( 0.00%) #[derive(TypeVisitable_Generic, TypeFoldable_Generic, GenericTypeVisitable)] . #[cfg_attr( . feature = "nightly", . derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext) . )] . pub enum ValTreeKind { . /// integers, `bool`, `char` are represented as scalars. . /// See the `ScalarInt` documentation for how `ScalarInt` guarantees that equal values . /// of these types have the same representation. 52,128 ( 0.00%) Leaf(I::ScalarInt), . . /// The fields of any kind of aggregate. Structs, tuples and arrays are represented by . /// listing their fields' values in order. . /// . /// Enums are represented by storing their variant index as a u32 field, followed by all . /// the fields of the variant. . /// . /// ZST types are represented as an empty slice. -- line 221 ---------------------------------------- -- line 255 ---------------------------------------- . pub fn try_to_branch(&self) -> Option { . match self { . ValTreeKind::Branch(branch) => Some(*branch), . ValTreeKind::Leaf(_) => None, . } . } . } . 13,928 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] . #[cfg_attr(feature = "nightly", derive(Encodable_NoContext, Decodable_NoContext, StableHash))] . pub enum AnonConstKind { . /// `feature(generic_const_exprs)` anon consts are allowed to use arbitrary generic parameters in scope . GCE, . /// stable `min_const_generics` anon consts are not allowed to use any generic parameters . /// . /// under `feature(min_generic_const_args)`, these may be inline consts as well, and should be . /// treated the same as anon consts. -- line 271 ---------------------------------------- -------------------------------------------------------------------------------- -- 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. 24,622 ( 0.00%) if matches!(kind, FnKind::Closure) || (span.from_expansion() && span.in_external_macro(cx.sess().source_map())) { . return; . } . 17,928 ( 0.00%) let mut line_count: u64 = 0; 8,964 ( 0.00%) let too_many = body.value.span.check_text(cx, |src| { . let mut in_comment = false; . let mut code_in_line; . 26,892 ( 0.00%) let function_lines = if matches!(body.value.kind, hir::ExprKind::Block(..)) 8,964 ( 0.00%) && src.as_bytes().first().copied() == Some(b'{') 8,964 ( 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(); 11,412 ( 0.00%) if line.is_empty() { . break; . } 22,824 ( 0.00%) if in_comment { . 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()); 68,472 ( 0.00%) code_in_line |= multi_idx > 0 && single_idx > 0; . // Implies multi_idx is below line.len() 22,824 ( 0.00%) if multi_idx < single_idx { . line = &line[multi_idx + 2..]; . in_comment = true; . continue; . } . } . break; . } 22,824 ( 0.00%) if code_in_line { 45,648 ( 0.00%) line_count += 1; . } . } 35,856 ( 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})"), . ); . } . } 116,570 ( 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/methods.rs -------------------------------------------------------------------------------- Ir -- line 973 ---------------------------------------- . /// assert!(CAPITAL_DELTA_IS_UPPERCASE); . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")] . #[inline] . pub const fn is_uppercase(self) -> bool { . match self { 143,717 ( 0.00%) 'A'..='Z' => true, 79,982 ( 0.00%) '\0'..='\u{BF}' => false, . _ => unicode::Uppercase(self), . } . } . . /// Returns `true` if this `char` has one of the general categories for numbers. . /// . /// The general categories for numbers (`Nd` for decimal digits, `Nl` for letter-like numeric . /// characters, and `No` for other numeric characters) are [specified] in the Unicode Character -- line 990 ---------------------------------------- -- line 1080 ---------------------------------------- . /// . /// assert!(!'越'.is_whitespace()); . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_char_classify", since = "1.87.0")] . #[inline] . pub const fn is_whitespace(self) -> bool { 1,837,765 ( 0.02%) match self { . ' ' | '\x09'..='\x0d' => true, 351,560 ( 0.00%) '\0'..='\u{84}' => false, . _ => unicode::White_Space(self), . } . } . . /// Returns `true` if this `char` has the general category for control codes. . /// . /// Control codes (code points with the general category of `Cc`) are [described] in Chapter 23 . /// (Special Areas and Format Characters) of the Unicode Standard, and [specified] in the Unicode Character -- line 1098 ---------------------------------------- -- line 1414 ---------------------------------------- . /// holds across languages. . /// . /// [`SpecialCasing.txt`]: https://www.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt . #[must_use = "this returns the lowercased character as a new iterator, \ . without modifying the original"] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn to_lowercase(self) -> ToLowercase { 177 ( 0.00%) ToLowercase(CaseMappingIter::new(conversions::to_lower(self))) 1,239 ( 0.00%) => ???:core::unicode::unicode_data::conversions::to_lower (59x) . } . . /// Returns an iterator that yields the titlecase mapping of this `char` as one or more . /// `char`s. . /// . /// This is usually, but not always, equivalent to the uppercase mapping . /// returned by [`to_uppercase()`]. Prefer this method when seeking to capitalize . /// Only The First Letter of a word, but use [`to_uppercase()`] for ALL CAPS. -- line 1430 ---------------------------------------- -- line 1703 ---------------------------------------- . /// holds across languages. . /// . /// [`to_titlecase()`]: Self::to_titlecase() . #[must_use = "this returns the uppercased character as a new iterator, \ . without modifying the original"] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn to_uppercase(self) -> ToUppercase { 1,056 ( 0.00%) ToUppercase(CaseMappingIter::new(conversions::to_upper(self))) 7,744 ( 0.00%) => ???:core::unicode::unicode_data::conversions::to_upper (352x) . } . . /// Returns an iterator that yields the case folding of this `char` as one or more . /// `char`s. . /// . /// Case folding is meant to be used when performing case-insensitive string comparisons. . /// Case-folded strings should not usually be exposed directly to users. For most, . /// but not all, characters, the casefold mapping is identical to the lowercase one. -- line 1719 ---------------------------------------- -- line 2206 ---------------------------------------- . /// assert!(!lf.is_ascii_digit()); . /// assert!(!esc.is_ascii_digit()); . /// ``` . #[must_use] . #[stable(feature = "ascii_ctype_on_intrinsics", since = "1.24.0")] . #[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")] . #[inline] . pub const fn is_ascii_digit(&self) -> bool { 90,593 ( 0.00%) matches!(*self, '0'..='9') . } . . /// Checks if the value is an ASCII octal digit: . /// U+0030 '0' ..= U+0037 '7'. . /// . /// # Examples . /// . /// ``` -- line 2222 ---------------------------------------- -- line 2475 ---------------------------------------- . escape_double_quote: true, . }; . } . . #[inline] . #[must_use] . const fn len_utf8(code: u32) -> usize { . match code { 7,618 ( 0.00%) ..MAX_ONE_B => 1, . ..MAX_TWO_B => 2, . ..MAX_THREE_B => 3, . _ => 4, . } . } . . #[inline] . #[must_use] -- line 2491 ---------------------------------------- -- line 2547 ---------------------------------------- . #[doc(hidden)] . #[inline] . pub const unsafe fn encode_utf8_raw_unchecked(code: u32, dst: *mut u8) { . let len = len_utf8(code); . // SAFETY: The caller must guarantee that the buffer pointed to by `dst` . // is at least `len` bytes long. . unsafe { . if len == 1 { 10,468 ( 0.00%) *dst = code as u8; . return; . } . . let last1 = (code >> 0 & 0x3F) as u8 | TAG_CONT; . let last2 = (code >> 6 & 0x3F) as u8 | TAG_CONT; . let last3 = (code >> 12 & 0x3F) as u8 | TAG_CONT; . let last4 = (code >> 18 & 0x3F) as u8 | TAG_FOUR_B; . -- line 2563 ---------------------------------------- 2,380 ( 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 { 107,070 ( 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); 85,656 ( 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>) { 32,121 ( 0.00%) if is_in_const_context(cx) { 3,888,208 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (10,707x) . return; . } . . for [s1, s2, s3] in block.stmts.array_windows::<3>() { . if let StmtKind::Let(tmp) = s1.kind . // let t = foo(); . && let Some(tmp_init) = tmp.init . && let PatKind::Binding(.., ident, None) = tmp.pat.kind -- line 179 ---------------------------------------- -- 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() { 2,330 ( 0.00%) if let Some((lhs0, rhs0)) = parse(first) 2,327 ( 0.00%) && let Some((lhs1, rhs1)) = parse(second) 465 ( 0.00%) && let ctxt = first.span.ctxt() 930 ( 0.00%) && ctxt == second.span.ctxt() 1,860 ( 0.00%) && !ctxt.in_external_macro(cx.sess().source_map()) 49,290 ( 0.00%) => ???:::in_external_macro (465x) . && is_same(cx, ctxt, lhs0, rhs1) . && is_same(cx, ctxt, lhs1, rhs0) . && !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) -- line 223 ---------------------------------------- -- line 261 ---------------------------------------- . . #[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>)> { 1,866 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind { 2 ( 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,793 ( 0.00%) && let Some(rhs) = expr.init 5,586 ( 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>) { -- line 283 ---------------------------------------- 62,371 ( 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 80,420 ( 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 266 ( 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> { 550,817 ( 0.01%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. 6,588 ( 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> { 16,176 ( 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()); 467 ( 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. 1,617 ( 0.00%) unsafe { slice_get_unchecked(slice, self) } . } . . #[inline] . fn index(self, slice: &[T]) -> &T { . // N.B., use intrinsic indexing 1,465,469 ( 0.02%) &(*slice)[self] . } . . #[inline] . #[rustc_no_writable] . fn index_mut(self, slice: &mut [T]) -> &mut T { . // N.B., use intrinsic indexing 144,739 ( 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 { 3 ( 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) 1,780 ( 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] { 36,238 ( 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 { 7,898 ( 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 ---------------------------------------- 173,357 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::span_lint; . use rustc_ast::{AttrKind, AttrStyle, Attribute, SyntheticAttr}; . use rustc_data_structures::fx::FxHashSet; . use rustc_lint::{EarlyContext, LintContext as _}; . use rustc_span::source_map::SourceMap; . use rustc_span::{SourceFile, Span, Symbol}; . use std::sync::Arc; . 21,504 ( 0.00%) #[derive(Hash, PartialEq, Eq)] . enum SimpleAttrKind { . Doc, . /// A normal attribute, with its name symbols. . Normal(Vec), . CfgTrace, . CfgAttrTrace, . } . . impl From<&AttrKind> for SimpleAttrKind { . fn from(value: &AttrKind) -> Self { 21,343 ( 0.00%) match value { . AttrKind::Normal(attr) => { 7,061 ( 0.00%) let path_symbols = attr . .item . .path . .segments . .iter() . .map(|seg| seg.ident.name) . .collect::>(); . Self::Normal(path_symbols) . }, 10 ( 0.00%) AttrKind::Synthetic(synthetic) => match &**synthetic { . SyntheticAttr::CfgTrace(_) => Self::CfgTrace, . SyntheticAttr::CfgAttrTrace(_) => Self::CfgAttrTrace, . }, . AttrKind::DocComment(..) => Self::Doc, . } . } . } . 140,320 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, item_span: Span, attrs: &[Attribute]) { . let mut inner_attr_kind: FxHashSet = FxHashSet::default(); . let mut outer_attr_kind: FxHashSet = FxHashSet::default(); . . let source_map = cx.sess().source_map(); 42,096 ( 0.00%) let item_src = source_map.lookup_source_file(item_span.lo()); 2,090,768 ( 0.03%) => ???:::lookup_source_file (14,032x) . . for attr in attrs { 43,244 ( 0.00%) if attr.span.from_expansion() || !attr_in_same_src_as_item(source_map, &item_src, attr.span) { . continue; . } . . let kind: SimpleAttrKind = (&attr.kind).into(); 14,186 ( 0.00%) match attr.style { . AttrStyle::Inner => { . if outer_attr_kind.contains(&kind) { . lint_mixed_attrs(cx, attrs); . return; . } . inner_attr_kind.insert(kind); . }, . AttrStyle::Outer => { 14,186 ( 0.00%) if inner_attr_kind.contains(&kind) { . lint_mixed_attrs(cx, attrs); . return; . } 28,372 ( 0.00%) outer_attr_kind.insert(kind); . }, . } . } 112,256 ( 0.00%) } . . fn lint_mixed_attrs(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . let mut attrs_iter = attrs.iter().filter(|attr| !attr.span.from_expansion()); . let span = if let (Some(first), Some(last)) = (attrs_iter.next(), attrs_iter.next_back()) { . first.span.with_hi(last.span.hi()) . } else { . return; . }; -- line 79 ---------------------------------------- -- line 81 ---------------------------------------- . cx, . MIXED_ATTRIBUTES_STYLE, . span, . "item has both inner and outer attributes", . ); . } . . fn attr_in_same_src_as_item(source_map: &SourceMap, item_src: &Arc, attr_span: Span) -> bool { 28,376 ( 0.00%) let attr_src = source_map.lookup_source_file(attr_span.lo()); 1,057,006 ( 0.01%) => ???:::lookup_source_file (7,094x) . Arc::ptr_eq(item_src, &attr_src) . } 42,503 ( 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 { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 197,057 ( 0.00%) if !matches!( 130,860 ( 0.00%) expr.kind, 2,627 ( 0.00%) ExprKind::Match(_, [_, ..], _) | ExprKind::MethodCall(_, _, [_], _) . ) { . return; . } . 17,955 ( 0.00%) if !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT) { 38,475 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2,565x) . return; . } . 10,260 ( 0.00%) if is_in_const_context(cx) && !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT_CONST) { 932,790 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (2,565x) . return; . } . 19,877 ( 0.00%) let (arg, span, range) = if let ExprKind::Match(recv, [arm, ..], _) = expr.kind 6,727 ( 0.00%) && let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::matches_macro) 209,901 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (961x) . { . let recv = peel_ref_operators(cx, recv); . let range = check_pat(&arm.pat.kind); . (recv, macro_call.span, range) 8,020 ( 0.00%) } else if let ExprKind::MethodCall(path, receiver, [arg], ..) = expr.kind 1,604 ( 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 127 ---------------------------------------- . let range = check_expr_range(start, end); . (arg, expr.span, range) . } else { . return; . }; . . let ty_sugg = get_ty_sugg(cx, arg); . check_is_ascii(cx, span, arg, &range, ty_sugg); 523,440 ( 0.01%) } . } . . fn get_ty_sugg<'tcx>(cx: &LateContext<'tcx>, arg: &Expr<'_>) -> Option<(Span, Ty<'tcx>)> { . let local_hid = arg.res_local_id()?; . if let Node::Param(Param { ty_span, span, .. }) = cx.tcx.parent_hir_node(local_hid) . // `ty_span` and `span` are the same for inferred type, thus a type suggestion must be given . && ty_span == span . { -- line 143 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/tabs_in_doc_comments.rs -------------------------------------------------------------------------------- Ir -- line 57 ---------------------------------------- . style, . "using tabs in doc comments is not recommended" . } . . declare_lint_pass!(TabsInDocComments => [TABS_IN_DOC_COMMENTS]); . . impl TabsInDocComments { . fn warn_if_tabs_in_doc(cx: &EarlyContext<'_>, attr: &ast::Attribute) { 60,759 ( 0.00%) if let ast::AttrKind::DocComment(_, comment) = attr.kind { . let comment = comment.as_str(); . . for (lo, hi) in get_chunks_of_tabs(comment) { . // +3 skips the opening delimiter . let new_span = Span::new( . attr.span.lo() + BytePos(3 + lo), . attr.span.lo() + BytePos(3 + hi), . attr.span.ctxt(), -- line 73 ---------------------------------------- -- line 83 ---------------------------------------- . Applicability::MaybeIncorrect, . ); . } . } . } . } . . impl EarlyLintPass for TabsInDocComments { 242,360 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attribute: &ast::Attribute) { . Self::warn_if_tabs_in_doc(cx, attribute); 242,360 ( 0.00%) } . } . . /// . /// scans the string for groups of tabs and returns the start(inclusive) and end positions . /// (exclusive) of all groups . /// e.g. "sd\tasd\t\taa" will yield [(2, 3), (6, 8)] as . /// 012 3456 7 89 . /// ^-^ ^---^ -- line 101 ---------------------------------------- 169 ( 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; . 74,949 ( 0.00%) pub(super) fn check_block<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { . // we need both a let-binding stmt and an expr 32,121 ( 0.00%) if let Some(retexpr) = block.expr 11,425 ( 0.00%) && let Some(stmt) = block.stmts.last() 1,444 ( 0.00%) && let StmtKind::Let(local) = &stmt.kind 930 ( 0.00%) && local.ty.is_none() 465 ( 0.00%) && local.els.is_none() 3,255 ( 0.00%) && cx.tcx.hir_attrs(local.hir_id).is_empty() 31,620 ( 0.00%) => ???:::hir_attrs (465x) 1,860 ( 0.00%) && let Some(initexpr) = &local.init 1,395 ( 0.00%) && let PatKind::Binding(_, local_id, _, _) = local.pat.kind . && retexpr.res_local_id() == Some(local_id) . && (cx.sess().edition() >= Edition::Edition2024 || !last_statement_borrows(cx, initexpr)) . && !initexpr.span.in_external_macro(cx.sess().source_map()) . && !retexpr.span.in_external_macro(cx.sess().source_map()) . && !local.span.from_expansion() . && !span_contains_non_whitespace(cx, stmt.span.between(retexpr.span), false) . { . span_lint_hir_and_then( -- line 33 ---------------------------------------- -- line 60 ---------------------------------------- . err.multipart_suggestion( . "return the expression directly", . vec![(local.span, String::new()), (retexpr.span, sugg)], . app, . ); . }, . ); . } 74,949 ( 0.00%) } . fn last_statement_borrows<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_expr(cx.tcx, expr, |e| { . if let Some(def_id) = fn_def_id(cx, e) . && cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() -- line 76 ---------------------------------------- 465 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/source.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . #[inline] . fn source_map(self) -> &'sm SourceMap { . ::rustc_lint::LintContext::sess(self).source_map() . } . } . impl<'sm> HasSourceMap<'sm> for &LateContext<'sm> { . #[inline] . fn source_map(self) -> &'sm SourceMap { 18,486 ( 0.00%) self.tcx.sess.source_map() . } . } . . /// Conversion of a value into the range portion of a `Span`. . pub trait SpanRange: Sized { . fn into_range(self) -> Range; . } . impl SpanRange for Span { 129,445 ( 0.00%) fn into_range(self) -> Range { . let data = self.data(); 51,778 ( 0.00%) data.lo..data.hi 51,778 ( 0.00%) } . } . impl SpanRange for SpanData { . fn into_range(self) -> Range { . self.lo..self.hi . } . } . impl SpanRange for Range { . fn into_range(self) -> Range { -- line 74 ---------------------------------------- -- line 104 ---------------------------------------- . fn with_ctxt(self, ctxt: SyntaxContext) -> Span { . Span::new(self.start, self.end, ctxt, None) . } . } . . pub trait SpanExt: SpanRange { . /// Attempts to get a handle to the source text. Returns `None` if either the span is malformed, . /// or the source text is not accessible. 404 ( 0.00%) fn get_text<'sm>(self, sm: impl HasSourceMap<'sm>) -> Option { 101,023 ( 0.00%) get_source_range(sm.source_map(), self.into_range()).and_then(SourceText::new) 38,683 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range (101x) 1,717 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (101x) 505 ( 0.00%) } . . /// Gets the source file, and range in the file, of the given span. Returns `None` if the span . /// extends through multiple files, or is malformed. . fn get_source_range<'sm>(self, sm: impl HasSourceMap<'sm>) -> Option { 3,474 ( 0.00%) get_source_range(sm.source_map(), self.into_range()) 383 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range (1x) . } . . /// Calls the given function with the source text referenced and returns the value. Returns . /// `None` if the source text cannot be retrieved. 3,124 ( 0.00%) fn with_source_text<'sm, T>(self, sm: impl HasSourceMap<'sm>, f: impl for<'a> FnOnce(&'a str) -> T) -> Option { 20,065 ( 0.00%) with_source_text(sm.source_map(), self.into_range(), f) 51 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (3x) 3,625 ( 0.00%) } . . /// Checks if the referenced source text satisfies the given predicate. Returns `false` if the . /// source text cannot be retrieved. . fn check_text<'sm>(self, sm: impl HasSourceMap<'sm>, pred: impl for<'a> FnOnce(&'a str) -> bool) -> bool { 1,857 ( 0.00%) self.with_source_text(sm, pred).unwrap_or(false) 58,682 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:::with_source_text::::check_expr::{closure#2}> (122x) . } . . /// Calls the given function with the both the text of the source file and the referenced range, . /// and returns the value. Returns `None` if the source text cannot be retrieved. . fn with_source_text_and_range<'sm, T>( . self, . sm: impl HasSourceMap<'sm>, . f: impl for<'a> FnOnce(&'a str, Range) -> T, -- line 139 ---------------------------------------- -- line 177 ---------------------------------------- . } . } . impl SpanExt for T {} . . /// Handle to a range of text in a source file. . pub struct SourceText(SourceFileRange); . impl SourceText { . /// Takes ownership of the source file handle if the source text is accessible. 15,802 ( 0.00%) pub fn new(text: SourceFileRange) -> Option { . if text.as_str().is_some() { 63,208 ( 0.00%) Some(Self(text)) . } else { . None . } 15,802 ( 0.00%) } . . /// Gets the source text. . pub fn as_str(&self) -> &str { . self.0.as_str().unwrap() . } . . /// Converts this into an owned string. . pub fn to_owned(&self) -> String { . self.as_str().to_owned() . } . } . impl Deref for SourceText { . type Target = str; . fn deref(&self) -> &Self::Target { . self.as_str() 15,802 ( 0.00%) } . } . impl AsRef for SourceText { . fn as_ref(&self) -> &str { . self.as_str() . } . } . impl Index for SourceText . where -- line 215 ---------------------------------------- -- line 226 ---------------------------------------- . } . } . impl fmt::Debug for SourceText { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . self.as_str().fmt(f) . } . } . 258,900 ( 0.00%) fn get_source_range(sm: &SourceMap, sp: Range) -> Option { 207,120 ( 0.00%) let start = sm.lookup_byte_offset(sp.start); 3,987,060 ( 0.05%) => ???:::lookup_byte_offset (25,890x) 129,450 ( 0.00%) let end = sm.lookup_byte_offset(sp.end); 3,987,060 ( 0.05%) => ???:::lookup_byte_offset (25,890x) 77,670 ( 0.00%) if !Arc::ptr_eq(&start.sf, &end.sf) || start.pos > end.pos { . return None; . } 77,670 ( 0.00%) sm.ensure_source_file_source_present(&start.sf); 595,470 ( 0.01%) => ???:::ensure_source_file_source_present (25,890x) . let range = start.pos.to_usize()..end.pos.to_usize(); 103,560 ( 0.00%) Some(SourceFileRange { sf: start.sf, range }) 233,010 ( 0.00%) } . 44 ( 0.00%) fn with_source_text(sm: &SourceMap, sp: Range, f: impl for<'a> FnOnce(&'a str) -> T) -> Option { 95,898 ( 0.00%) if let Some(src) = get_source_range(sm, sp) 1,149 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::get_source_range (3x) 37,728 ( 0.00%) && let Some(src) = src.as_str() 84 ( 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 (3x) . { . Some(f(src)) . } else { . None . } 32 ( 0.00%) } . . fn with_source_text_and_range( . sm: &SourceMap, . sp: Range, . f: impl for<'a> FnOnce(&'a str, Range) -> T, . ) -> Option { . if let Some(src) = get_source_range(sm, sp) . && let Some(text) = &src.sf.src -- line 261 ---------------------------------------- -- line 355 ---------------------------------------- . } . impl SourceFileRange { . /// Attempts to get the text from the source file. This can fail if the source text isn't . /// loaded. . pub fn as_str(&self) -> Option<&str> { . (self.sf.src.as_ref().map(|src| src.as_str())) . .or_else(|| self.sf.external_src.get()?.get_source()) . .and_then(|x| x.get(self.range.clone())) 9,588 ( 0.00%) } . } . . /// Like [`snippet_block`], but add braces if the expr is not an `ExprKind::Block` with no label. . pub fn expr_block<'sm>( . sm: impl HasSourceMap<'sm>, . expr: &Expr<'_>, . outer: SyntaxContext, . default: &str, -- line 371 ---------------------------------------- -- line 559 ---------------------------------------- . /// If the span might realistically contain a macro call (e.g. `vec![]`), consider using . /// [`snippet_with_context`] instead. . pub fn snippet_with_applicability<'a, 'sm>( . sm: impl HasSourceMap<'sm>, . span: Span, . default: &'a str, . applicability: &mut Applicability, . ) -> Cow<'a, str> { 4,860 ( 0.00%) snippet_with_applicability_sm(sm.source_map(), span, default, applicability) 6,396 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::snippet_with_applicability_sm (12x) . } . 12,060 ( 0.00%) fn snippet_with_applicability_sm<'a>( . sm: &SourceMap, . span: Span, . default: &'a str, . applicability: &mut Applicability, . ) -> Cow<'a, str> { 1,255 ( 0.00%) if *applicability != Applicability::Unspecified && span.from_expansion() { . *applicability = Applicability::MaybeIncorrect; . } 5,069 ( 0.00%) if let Some(t) = snippet_opt(sm, span) { 1,206 ( 0.00%) Cow::Owned(t) . } else { . if *applicability == Applicability::MachineApplicable { . *applicability = Applicability::HasPlaceholders; . } . Cow::Borrowed(default) . } 9,648 ( 0.00%) } . . /// Converts a span to a code snippet. Returns `None` if not available. 3 ( 0.00%) pub fn snippet_opt<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> Option { 19,773 ( 0.00%) sm.source_map().span_to_snippet(span).ok() 430 ( 0.00%) => ???:::span_to_snippet (1x) 4 ( 0.00%) } . . /// Converts a span (from a block) to a code snippet if available, otherwise use default. . /// . /// This trims the code of indentation, except for the first line. Use it for blocks or block-like . /// things which need to be printed as such. . /// . /// The `indent_relative_to` arg can be used, to provide a span, where the indentation of the . /// resulting snippet of the given span. -- line 600 ---------------------------------------- -- line 676 ---------------------------------------- . /// This will also return whether or not the snippet is a macro call. . pub fn snippet_with_context<'a, 'sm>( . sm: impl HasSourceMap<'sm>, . span: Span, . outer: SyntaxContext, . default: &'a str, . applicability: &mut Applicability, . ) -> (Cow<'a, str>, bool) { 293 ( 0.00%) snippet_with_context_sm(sm.source_map(), span, outer, default, applicability) 746 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::snippet_with_context_sm (1x) . } . 637 ( 0.00%) fn snippet_with_context_sm<'a>( . sm: &SourceMap, . span: Span, . outer: SyntaxContext, . default: &'a str, . applicability: &mut Applicability, . ) -> (Cow<'a, str>, bool) { . // If it is just range desugaring, use the desugaring span since it may include parenthesis. 98 ( 0.00%) if span.desugaring_kind() == Some(DesugaringKind::RangeExpr) && span.parent_callsite().unwrap().ctxt() == outer { 4,704 ( 0.00%) => ???:::desugaring_kind (49x) . return (snippet_with_applicability_sm(sm, span, default, applicability), false); . } . . let (span, is_macro_call) = walk_span_to_context(span, outer).map_or_else( . || { . // The span is from a macro argument, and the outer context is the macro using the argument . if *applicability != Applicability::Unspecified { . *applicability = Applicability::MaybeIncorrect; -- line 703 ---------------------------------------- -- line 707 ---------------------------------------- . }, . |outer_span| (outer_span, span.ctxt() != outer), . ); . . ( . snippet_with_applicability_sm(sm, span, default, applicability), . is_macro_call, . ) 441 ( 0.00%) } . . /// Walks the span up to the target context, thereby returning the macro call site if the span is . /// inside a macro expansion, or the original span if it is not. . /// . /// Note this will return `None` in the case of the span being in a macro expansion, but the target . /// context is from expanding a macro argument. . /// . /// Given the following -- line 723 ---------------------------------------- -- line 736 ---------------------------------------- . /// ```rust,ignore . /// macro_rules! m { ($e:expr) => { n!($e, 0) }; } . /// macro_rules! n { ($e:expr, $f:expr) => { f($e, $f) }; } . /// g(m!(0)) . /// ``` . /// . /// If called with a span of the call to `f` and a context of the call to `g` this will return a . /// span containing `m!(0)`. 13,386 ( 0.00%) pub fn walk_span_to_context(span: Span, outer: SyntaxContext) -> Option { 6,889 ( 0.00%) let outer_span = hygiene::walk_chain(span, outer); 120,474 ( 0.00%) => ???:rustc_span::hygiene::walk_chain (2,231x) . (outer_span.ctxt() == outer).then_some(outer_span) 13,386 ( 0.00%) } . . /// Trims the whitespace from the start and the end of the span. . pub fn trim_span(sm: &SourceMap, span: Span) -> Span { . let data = span.data(); . let sf: &_ = &sm.lookup_source_file(data.lo); . let Some(src) = sf.src.as_deref() else { . return span; . }; -- line 755 ---------------------------------------- 126,620 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs -------------------------------------------------------------------------------- Ir -- line 43 ---------------------------------------- . . impl NonnullUncheckedOnBoxPtr { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for NonnullUncheckedOnBoxPtr { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 143,108 ( 0.00%) if !expr.span.from_expansion() 11,983 ( 0.00%) && let ExprKind::Call(nonnull_new_unchecked, [arg]) = expr.kind 7,982 ( 0.00%) && let ExprKind::Call(box_into_raw, [arg]) = arg.kind . && nonnull_new_unchecked . .ty_rel_def_if_named(cx, sym::new_unchecked) . .opt_parent(cx) . .opt_impl_ty(cx) . .is_diag_item(cx, sym::NonNull) . && box_into_raw . .ty_rel_def_if_named(cx, sym::into_raw) . .opt_parent(cx) -- line 62 ---------------------------------------- -- line 89 ---------------------------------------- . } else { . format!("NonNull::from(Box::leak({arg_name}))") . }; . . diag.span_suggestion(span, "try", sugg, app); . }, . ); . } 523,440 ( 0.01%) } . } 107,652 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/mod.rs -------------------------------------------------------------------------------- Ir -- line 406 ---------------------------------------- . . pub struct Types { . vec_box_size_threshold: u64, . type_complexity_threshold: u64, . avoid_breaking_exported_api: bool, . } . . impl<'tcx> LateLintPass<'tcx> for Types { 127,500 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: FnKind<'_>, . decl: &FnDecl<'tcx>, . _: &Body<'_>, . _: Span, . def_id: LocalDefId, . ) { 53,124 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 21,250 ( 0.00%) .hir_node_by_def_id(cx.tcx.hir_get_parent_item(cx.tcx.local_def_id_to_hir_id(def_id)).def_id) 1,543,813 ( 0.02%) => ???:::hir_get_parent_item (10,625x) . { 53,120 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 21,250 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(def_id); 605,610 ( 0.01%) => ???:::is_exported (10,625x) . 13,628 ( 0.00%) self.check_fn_decl( . cx, . decl, . CheckTyContext { . is_in_trait_impl, 42,500 ( 0.00%) in_body: matches!(fn_kind, FnKind::Closure), . is_exported, . ..CheckTyContext::default() . }, . ); 85,000 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 42,129 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 800,286 ( 0.01%) => ???:::is_exported (14,043x) . 70,211 ( 0.00%) match item.kind { 15 ( 0.00%) ItemKind::Static(_, _, ty, _) | ItemKind::Const(_, _, ty, _) => self.check_ty( 731 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (3x) . cx, . ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ), . // functions, enums, structs, impls and traits are covered . _ => (), . } . } . 83,951 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { 23,986 ( 0.00%) match item.kind { 61 ( 0.00%) ImplItemKind::Const(ty, _) => { 244 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 244 ( 0.00%) .hir_node_by_def_id(cx.tcx.hir_get_parent_item(item.hir_id()).def_id) 8,813 ( 0.00%) => ???:::hir_get_parent_item (61x) . { 488 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 183 ( 0.00%) self.check_ty( 44,601 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (61x) . cx, . ty, . CheckTyContext { . is_in_trait_impl, . ..CheckTyContext::default() . }, . ); . }, . // Methods are covered by check_fn. . // Type aliases are ignored because oftentimes it's impossible to . // make type alias declaration in trait simpler, see #1013 . ImplItemKind::Fn(..) | ImplItemKind::Type(..) => (), . } 95,944 ( 0.00%) } . . fn check_field_def(&mut self, cx: &LateContext<'tcx>, field: &hir::FieldDef<'tcx>) { 1,768 ( 0.00%) if field.span.from_expansion() { . return; . } . 2,652 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(field.def_id); 41,733 ( 0.00%) => ???:::is_exported (884x) . 4,420 ( 0.00%) self.check_ty( 1,212,204 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (884x) . cx, 884 ( 0.00%) field.ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ); . } . 40 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &TraitItem<'tcx>) { 12 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 228 ( 0.00%) => ???:::is_exported (4x) . . let context = CheckTyContext { . is_exported, . ..CheckTyContext::default() . }; . 41 ( 0.00%) match item.kind { . TraitItemKind::Const(ty, _) | TraitItemKind::Type(_, Some(ty)) => { . self.check_ty(cx, ty, context); . }, . TraitItemKind::Fn(ref sig, trait_method) => { . // Check only methods without body . // Methods with body are covered by check_fn. 2 ( 0.00%) if let TraitFn::Required(_) = trait_method { 3 ( 0.00%) self.check_fn_decl(cx, sig.decl, context); . } . }, . TraitItemKind::Type(..) => (), . } 24 ( 0.00%) } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) { 2,793 ( 0.00%) if let Some(ty) = local.ty { . self.check_ty( . cx, . ty, . CheckTyContext { . in_body: true, . ..CheckTyContext::default() . }, . ); . } . } . } . . impl Types { . pub fn new(conf: &'static Conf) -> Self { . Self { 2 ( 0.00%) vec_box_size_threshold: conf.vec_box_size_threshold, 1 ( 0.00%) type_complexity_threshold: conf.type_complexity_threshold, 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, . } . } . . fn check_fn_decl<'tcx>(&mut self, cx: &LateContext<'tcx>, decl: &FnDecl<'tcx>, context: CheckTyContext) { . // Ignore functions in trait implementations as they are usually forced by the trait definition. . // . // FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard . // to check. 31,875 ( 0.00%) if context.is_in_trait_impl { . return; . } . 6,815 ( 0.00%) for input in decl.inputs { 28,156 ( 0.00%) self.check_ty(cx, input, context); 2,025,783 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (7,039x) . } . 20,440 ( 0.00%) if let FnRetTy::Return(ty) = decl.output { 27,240 ( 0.00%) self.check_ty(cx, ty, context); 1,740,724 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (6,809x) . } . } . . /// Recursively check for `TypePass` lints in the given type. Stop at the first . /// lint found. . /// . /// The parameter `is_local` distinguishes the context of the type. 172,986 ( 0.00%) fn check_ty<'tcx>(&mut self, cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, mut context: CheckTyContext) { 46,082 ( 0.00%) if hir_ty.span.from_expansion() { . return; . } . . // Skip trait implementations; see issue #605. 45,662 ( 0.00%) if context.is_in_trait_impl { . return; . } . 45,997 ( 0.00%) if !context.is_nested_call && type_complexity::check(cx, hir_ty, self.type_complexity_threshold) { . return; . } . 182,228 ( 0.00%) match hir_ty.kind { 46,791 ( 0.00%) TyKind::Path(ref qpath) if !context.in_body => { 31,194 ( 0.00%) let hir_id = hir_ty.hir_id; 46,791 ( 0.00%) let res = cx.qpath_res(qpath, hir_id); 339,675 ( 0.00%) => ???:::qpath_res (14,711x) . if let Some(def_id) = res.opt_def_id() . && self.is_type_change_allowed(context) . { . // All lints that are being checked in this block are guarded by . // the `avoid_breaking_exported_api` configuration. When adding a . // new lint, please also add the name to the configuration documentation . // in `clippy_config::conf` . . let mut triggered = false; 6,630 ( 0.00%) triggered |= box_collection::check(cx, hir_ty, qpath, def_id); 38,940 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check (590x) 8,840 ( 0.00%) triggered |= redundant_allocation::check(cx, hir_ty, qpath, def_id); 77,406 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check (590x) 7,735 ( 0.00%) triggered |= rc_buffer::check(cx, hir_ty, qpath, def_id); 49,676 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check (590x) 9,945 ( 0.00%) triggered |= vec_box::check(cx, hir_ty, qpath, def_id, self.vec_box_size_threshold); 49,724 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check (590x) 7,735 ( 0.00%) triggered |= option_option::check(cx, hir_ty, qpath, def_id); 49,998 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check (590x) 6,630 ( 0.00%) triggered |= linked_list::check(cx, hir_ty, def_id); 41,464 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs:clippy_lints::types::linked_list::check (590x) 8,840 ( 0.00%) triggered |= rc_mutex::check(cx, hir_ty, qpath, def_id); 46,774 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check (590x) 5,525 ( 0.00%) triggered |= owned_cow::check(cx, qpath, def_id); 47,954 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check (590x) . 17,680 ( 0.00%) if triggered { . return; . } . } 62,364 ( 0.00%) match *qpath { . QPath::Resolved(Some(ty), p) => { . context.is_nested_call = true; . self.check_ty(cx, ty, context); . for ty in p.segments.iter().flat_map(|seg| { . seg.args . .as_ref() . .map_or_else(|| [].iter(), |params| params.args.iter()) . .filter_map(|arg| match arg { -- line 624 ---------------------------------------- -- line 626 ---------------------------------------- . _ => None, . }) . }) { . self.check_ty(cx, ty.as_unambig_ty(), context); . } . }, . QPath::Resolved(None, p) => { . context.is_nested_call = true; 32,082 ( 0.00%) for ty in p.segments.iter().flat_map(|seg| { . seg.args . .as_ref() 5,122 ( 0.00%) .map_or_else(|| [].iter(), |params| params.args.iter()) 8,420 ( 0.00%) .filter_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), . _ => None, . }) . }) { 5,472 ( 0.00%) self.check_ty(cx, ty.as_unambig_ty(), context); 480,199 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 (912x) . } . }, 12 ( 0.00%) QPath::TypeRelative(ty, seg) => { . context.is_nested_call = true; 72 ( 0.00%) self.check_ty(cx, ty, context); 5,651 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 (11x) 36 ( 0.00%) if let Some(params) = seg.args { . for ty in params.args.iter().filter_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), . _ => None, . }) { . self.check_ty(cx, ty.as_unambig_ty(), context); . } . } . }, -- line 657 ---------------------------------------- -- line 660 ---------------------------------------- . TyKind::Path(ref qpath) => { . let res = cx.qpath_res(qpath, hir_ty.hir_id); . if let Some(def_id) = res.opt_def_id() . && self.is_type_change_allowed(context) . { . owned_cow::check(cx, qpath, def_id); . } . }, 14,052 ( 0.00%) TyKind::Ref(lt, ref mut_ty) => { . context.is_nested_call = true; 42,156 ( 0.00%) if !borrowed_box::check(cx, hir_ty, lt, mut_ty) { 171,224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/borrowed_box.rs:clippy_lints::types::borrowed_box::check (7,026x) . self.check_ty(cx, mut_ty.ty, context); . } . }, 163 ( 0.00%) TyKind::Slice(ty) | TyKind::Array(ty, _) | TyKind::Ptr(MutTy { ty, .. }) => { . context.is_nested_call = true; . self.check_ty(cx, ty, context); . }, 43 ( 0.00%) TyKind::Tup(tys) => { . context.is_nested_call = true; . for ty in tys { 20 ( 0.00%) self.check_ty(cx, ty, context); 4,255 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 (5x) . } . }, . _ => {}, . } 125,808 ( 0.00%) } . . /// This function checks if the type is allowed to change in the current context . /// based on the `avoid_breaking_exported_api` configuration . fn is_type_change_allowed(&self, context: CheckTyContext) -> bool { . !(context.is_exported && self.avoid_breaking_exported_api) . } . } . -- line 694 ---------------------------------------- 141,485 ( 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/iter.rs -------------------------------------------------------------------------------- Ir -- line 181 ---------------------------------------- . #[inline] . fn next(&mut self) -> Option<(usize, char)> { . let pre_len = self.iter.iter.len(); . match self.iter.next() { . None => None, . Some(ch) => { . let index = self.front_offset; . let len = self.iter.iter.len(); 463,334 ( 0.01%) self.front_offset += pre_len - len; . Some((index, ch)) . } . } . } . . #[inline] . fn count(self) -> usize { . self.iter.count() -- line 197 ---------------------------------------- -- line 543 ---------------------------------------- . impl<'a, P> Iterator for $reverse_iterator<'a, P> . where . P: Pattern: ReverseSearcher<'a>>, . { . type Item = $iterty; . . #[inline] . fn next(&mut self) -> Option<$iterty> { 18,533 ( 0.00%) self.0.next_back() 1,084,009 ( 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:>::next_back (18,254x) . } . } . . $(#[$common_stability_attribute])* . impl<'a, P> Clone for $reverse_iterator<'a, P> . where . P: Pattern: Clone>, . { -- line 559 ---------------------------------------- -- line 636 ---------------------------------------- . .finish() . } . } . . impl<'a, P: Pattern> SplitInternal<'a, P> { . #[inline] . fn get_end(&mut self) -> Option<&'a str> { . if !self.finished { 578 ( 0.00%) self.finished = true; . 299 ( 0.00%) if self.allow_trailing_empty || self.end - self.start > 0 { . // SAFETY: `self.start` and `self.end` always lie on unicode boundaries. 13 ( 0.00%) let string = unsafe { self.matcher.haystack().get_unchecked(self.start..self.end) }; . return Some(string); . } . } . . None . } . . #[inline] . fn next(&mut self) -> Option<&'a str> { 20,415 ( 0.00%) if self.finished { . return None; . } . 541 ( 0.00%) let haystack = self.matcher.haystack(); . match self.matcher.next_match() { . // SAFETY: `Searcher` guarantees that `a` and `b` lie on unicode boundaries. . Some((a, b)) => unsafe { 66 ( 0.00%) let elt = haystack.get_unchecked(self.start..a); 125 ( 0.00%) self.start = b; . Some(elt) 57 ( 0.00%) }, 117 ( 0.00%) None => self.get_end(), . } . } . . #[inline] . fn next_inclusive(&mut self) -> Option<&'a str> { 22,824 ( 0.00%) if self.finished { . return None; . } . . let haystack = self.matcher.haystack(); . match self.matcher.next_match() { . // SAFETY: `Searcher` guarantees that `b` lies on unicode boundary, . // and self.start is either the start of the original string, . // or `b` was assigned to it, so it also lies on unicode boundary. . Some((_, b)) => unsafe { . let elt = haystack.get_unchecked(self.start..b); . self.start = b; . Some(elt) . }, 17,928 ( 0.00%) None => self.get_end(), . } . } . . #[inline] 129,731 ( 0.00%) fn next_back(&mut self) -> Option<&'a str> . where . P::Searcher<'a>: ReverseSearcher<'a>, . { 37,066 ( 0.00%) if self.finished { . return None; . } . 18,930 ( 0.00%) if !self.allow_trailing_empty { . self.allow_trailing_empty = true; . match self.next_back() { . Some(elt) if !elt.is_empty() => return Some(elt), . _ => { . if self.finished { . return None; . } . } . } . } . 28,395 ( 0.00%) let haystack = self.matcher.haystack(); . match self.matcher.next_match_back() { . // SAFETY: `Searcher` guarantees that `a` and `b` lie on unicode boundaries. . Some((a, b)) => unsafe { 338 ( 0.00%) let elt = haystack.get_unchecked(b..self.end); 338 ( 0.00%) self.end = a; . Some(elt) . }, . // SAFETY: `self.start` and `self.end` always lie on unicode boundaries. . None => unsafe { 9,127 ( 0.00%) self.finished = true; 18,254 ( 0.00%) Some(haystack.get_unchecked(self.start..self.end)) . }, . } 148,602 ( 0.00%) } . . #[inline] . fn next_back_inclusive(&mut self) -> Option<&'a str> . where . P::Searcher<'a>: ReverseSearcher<'a>, . { . if self.finished { . return None; -- line 737 ---------------------------------------- 85,473 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,862 ( 0.00%) let ExprKind::Closure(Closure { . kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, kind)), . body: body_id, . .. 1 ( 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, . ); . }, . ); . } 523,440 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/chars_last_cmp_with_unwrap.rs -------------------------------------------------------------------------------- Ir . use crate::methods::chars_cmp_with_unwrap; . use clippy_utils::sym; . use rustc_lint::LateContext; . . use super::CHARS_LAST_CMP; . . /// Checks for the `CHARS_LAST_CMP` lint with `unwrap()`. 14,630 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, info: &crate::methods::BinaryExprInfo<'_>) -> bool { 52,668 ( 0.00%) if chars_cmp_with_unwrap::check( 491,571 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp_with_unwrap.rs:clippy_lints::methods::chars_cmp_with_unwrap::check (2,926x) . cx, . info, . &[sym::chars, sym::last, sym::unwrap], . CHARS_LAST_CMP, . "ends_with", . ) { . true . } else { 46,816 ( 0.00%) chars_cmp_with_unwrap::check( 491,568 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp_with_unwrap.rs:clippy_lints::methods::chars_cmp_with_unwrap::check (2,926x) . cx, . info, . &[sym::chars, sym::next_back, sym::unwrap], . CHARS_LAST_CMP, . "ends_with", . ) . } 11,704 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs -------------------------------------------------------------------------------- Ir -- line 292 ---------------------------------------- . . impl MemReplace { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for MemReplace { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 142,500 ( 0.00%) if let ExprKind::Call(func, [dest, src]) = expr.kind . // Check that `expr` is a call to `mem::replace()` 1,662 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 2,216 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 43,157 ( 0.00%) => ???:::qpath_res (554x) 3,318 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_replace, def_id) 55,300 ( 0.00%) => ???:::is_diagnostic_item (553x) . // Check that second argument is `Option::None` . && !check_replace_option_with_none(cx, src, dest, expr.span) . && !check_replace_option_with_some(cx, src, dest, expr.span, self.msrv) . && !check_replace_with_default(cx, src, dest, expr, self.msrv) . { . check_replace_with_uninit(cx, src, dest, expr.span); . } 523,440 ( 0.01%) } . } 2,216 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/modulo_arithmetic.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::sext; . use rustc_hir::{BinOpKind, Expr, ExprKind, Node}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . use std::fmt::Display; . . use super::MODULO_ARITHMETIC; . 45,661 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . allow_comparison_to_zero: bool, . ) { 6,523 ( 0.00%) if op == BinOpKind::Rem { . if allow_comparison_to_zero && used_in_comparison_with_zero(cx, e) { . return; . } . . let lhs_operand = analyze_operand(lhs, cx, e); . let rhs_operand = analyze_operand(rhs, cx, e); . if let Some(lhs_operand) = lhs_operand . && let Some(rhs_operand) = rhs_operand . { . check_const_operands(cx, e, &lhs_operand, &rhs_operand); . } else { . check_non_const_operands(cx, e, lhs); . } . } 52,184 ( 0.00%) } . . fn used_in_comparison_with_zero(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . if let Node::Expr(parent_expr) = cx.tcx.parent_hir_node(expr.hir_id) . && let ExprKind::Binary(op, lhs, rhs) = parent_expr.kind . && let BinOpKind::Eq | BinOpKind::Ne = op.node . { . let ecx = ConstEvalCtxt::new(cx); . let ctxt = expr.span.ctxt(); -- line 42 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/non_canonical_impls.rs -------------------------------------------------------------------------------- Ir -- line 125 ---------------------------------------- . partial_ord_trait: Option, . ord_trait: Option, . clone_trait: Option, . copy_trait: Option, . } . . impl NonCanonicalImpls { . pub(crate) fn new(tcx: TyCtxt<'_>) -> Self { 2 ( 0.00%) let lang_items = tcx.lang_items(); 40 ( 0.00%) => ???:::lang_items (1x) . Self { . partial_ord_trait: lang_items.partial_ord_trait(), 3 ( 0.00%) ord_trait: tcx.get_diagnostic_item(sym::Ord), 106 ( 0.00%) => ???:::get_diagnostic_item (1x) . clone_trait: lang_items.clone_trait(), . copy_trait: lang_items.copy_trait(), . } . } . } . . /// The traits that this lint looks at . enum Trait { . Clone, . PartialOrd, . } . . impl LateLintPass<'_> for NonCanonicalImpls { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 43,766 ( 0.00%) if let ItemKind::Impl(impl_) = item.kind . // Both `PartialOrd` and `Clone` have one required method, and `PartialOrd` can have 5 methods in total 15,680 ( 0.00%) && (1..=5).contains(&impl_.items.len()) . && let Some(of_trait) = impl_.of_trait 22,900 ( 0.00%) && let Some(trait_did) = of_trait.trait_ref.trait_def_id() 59,540 ( 0.00%) => ???:::trait_def_id (4,580x) . // Check this early to hopefully bail out as soon as possible 1,106 ( 0.00%) && let trait_ = if Some(trait_did) == self.clone_trait { . Trait::Clone . } else if Some(trait_did) == self.partial_ord_trait { . Trait::PartialOrd . } else { . return; . } 4,424 ( 0.00%) && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) 77,420 ( 0.00%) => ???:::is_automatically_derived (553x) . { . let mut assoc_fns = impl_ . .items . .iter() . .map(|id| cx.tcx.hir_impl_item(*id)) . .filter_map(|assoc| { . if let ImplItemKind::Fn(_, body_id) = assoc.kind . && let body = cx.tcx.hir_body(body_id) -- line 172 ---------------------------------------- -- line 201 ---------------------------------------- . && let Some((assoc, body, block)) = . assoc_fns.find(|(assoc, _, _)| assoc.ident.name == sym::partial_cmp) . { . check_partial_ord_on_ord(cx, assoc, item, body, block); . } . }, . } . } 112,344 ( 0.00%) } . } . . fn is_deref_self(expr: &Expr<'_>) -> bool { . if let ExprKind::Unary(UnOp::Deref, deref) = expr.kind . && let ExprKind::Path(qpath) = deref.kind . && last_path_segment(&qpath).ident.name == kw::SelfLower . { . return true; -- line 217 ---------------------------------------- 33,169 ( 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 = 94,010 ( 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 { 137,027 ( 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 338 ---------------------------------------- . 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), . } . } . . fn fold_with>>(self, folder: &mut F) -> Self { . match self.kind() { 41 ( 0.00%) GenericArgKind::Lifetime(lt) => lt.fold_with(folder).into(), . GenericArgKind::Type(ty) => ty.fold_with(folder).into(), 8,688 ( 0.00%) GenericArgKind::Const(ct) => ct.fold_with(folder).into(), . } . } . } . . impl<'tcx> TypeVisitable> for GenericArg<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 3,204 ( 0.00%) match self.kind() { . GenericArgKind::Lifetime(lt) => lt.visit_with(visitor), . GenericArgKind::Type(ty) => ty.visit_with(visitor), . GenericArgKind::Const(ct) => ct.visit_with(visitor), . } . } . } . . impl<'tcx, E: TyEncoder<'tcx>> Encodable for GenericArg<'tcx> { -- line 363 ---------------------------------------- -- 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> { 880 ( 0.00%) Self::for_item(tcx, def_id.into(), |param, _| tcx.mk_param_from_def(param)) 30,680 ( 0.00%) => ???:::mk_param_from_def (240x) . } . . /// 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. 480 ( 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); 160 ( 0.00%) Self::fill_item(&mut args, tcx, defs, &mut mk_kind); 42,800 ( 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}> (40x) 80 ( 0.00%) tcx.mk_args(&args) 5,560 ( 0.00%) => ???:::mk_args (40x) 280 ( 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)) . }) . } . 800 ( 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>, . { 360 ( 0.00%) if let Some(def_id) = defs.parent { . let parent_defs = tcx.generics_of(def_id); 200 ( 0.00%) Self::fill_item(args, tcx, parent_defs, mk_kind); 38,560 ( 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}>'2 (40x) . } 80 ( 0.00%) Self::fill_single(args, defs, mk_kind) 640 ( 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>, . { . args.reserve(defs.own_params.len()); . for param in &defs.own_params { . let kind = mk_kind(param, args); 960 ( 0.00%) assert_eq!(param.index as usize, args.len(), "{args:#?}, {defs:#?}"); . args.push(kind); . } . } . . // Extend an `original_args` list to the full number of args expected by `def_id`, . // filling in the missing parameters with error ty/ct or 'static regions. . pub fn extend_with_error( . tcx: TyCtxt<'tcx>, -- line 493 ---------------------------------------- -- line 525 ---------------------------------------- . ty::GenericArgKind::Lifetime(_) => None, . generic => Some(generic), . }) . } . . #[inline] . #[track_caller] . pub fn type_at(&self, i: usize) -> Ty<'tcx> { 147 ( 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)), . } . } . 53,137 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See justification for this behavior in `try_fold_with`. 44,728 ( 0.00%) match self.len() { . 1 => { 41 ( 0.00%) let param0 = self[0].fold_with(folder); 328 ( 0.00%) if param0 == self[0] { self } else { folder.cx().mk_args(&[param0]) } . } . 2 => { . let param0 = self[0].fold_with(folder); . let param1 = self[1].fold_with(folder); . if param0 == self[0] && param1 == self[1] { . self . } else { . folder.cx().mk_args(&[param0, param1]) . } . } . 0 => self, 23,086 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_args(v)), 1,956,939 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/util.rs:rustc_middle::ty::util::fold_list::, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>, rustc_middle::ty::generic_args::GenericArg, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with>::{closure#0}> (1,649x) 723,834 ( 0.01%) => ???:::mk_args (4,947x) . } 44,892 ( 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)), . } . } . 64,962 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See comment justifying behavior in `try_fold_with`. 14,436 ( 0.00%) match self.len() { . 2 => { 6,924 ( 0.00%) let param0 = self[0].fold_with(folder); 20,772 ( 0.00%) let param1 = self[1].fold_with(folder); 20,772 ( 0.00%) if param0 == self[0] && param1 == self[1] { . self . } else { 48,468 ( 0.00%) folder.cx().mk_type_list(&[param0, param1]) 712,095 ( 0.01%) => ???:::mk_type_list (6,924x) . } . } 294 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_type_list(v)), 30,930 ( 0.00%) => ???:::mk_type_list (294x) . } 64,962 ( 0.00%) } . } . . impl<'tcx, T: TypeVisitable>> TypeVisitable> for &'tcx ty::List { . #[inline] . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 15,502 ( 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 ---------------------------------------- 50,942 ( 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. 228,228 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 87,780 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 2,424,220 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (17,556x) . && 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 140,448 ( 0.00%) } 17,556 ( 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 { 38,364 ( 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 { 138,915 ( 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),* $(,)?) => {{ 9,032 ( 0.00%) $(try_visit!(Visitable::visit($expr, $visitor, ()));)* 2,159 ( 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 (102x) . }}; . } . . 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, ) => { 140,714 ( 0.00%) Walkable::walk_ref($expr, $visitor) 98 ( 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 (1x) . }; . } . . 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 { 283,510 ( 0.00%) fn walk_ref(&$lt $self, $vis: &mut $vis_ty) -> V::Result { . $block 241,128 ( 0.00%) } . } . }; . } . . macro_rules! impl_visitable_noop { . (<$lt:lifetime> $($ty:ty,)*) => { . $( . impl_visitable!(|&$lt self: $ty, _vis: &mut V, _extra: ()| { -- line 250 ---------------------------------------- -- line 286 ---------------------------------------- . . 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; 642 ( 0.00%) visitor.$method(self $(, $extra_name)?) 34,888 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block (67x) . }); . 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 { 1 ( 0.00%) walk_fn(self, fk) 1,321 ( 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:: (1x) . } . . // (non-mut) `Visitor`-only methods . $( . fn visit_stmt(&mut self, s: &$lt Stmt) -> Self::Result { 27,828 ( 0.00%) walk_stmt(self, s) 13,626 ( 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 (77x) . } . . 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 922 ---------------------------------------- . visit_visitable!($($mut)? vis, alias), . ForeignItemKind::MacCall(mac) => . visit_visitable!($($mut)? vis, mac), . } . V::Result::output() . } . } . 8 ( 0.00%) pub fn walk_fn<$($lt,)? V: $Visitor$(<$lt>)?>(vis: &mut V, kind: FnKind<$($lt)? $(${ignore($mut)} '_)?>) -> V::Result { 3 ( 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 . ); . } 1 ( 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; 1,664 ( 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); 230,425 ( 0.00%) 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 1001 ---------------------------------------- . visit_visitable!($($mut)? vis, subexpression, block, opt_label), . 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 { 1 ( 0.00%) binder, . capture_clause, 1 ( 0.00%) coroutine_kind, . constness, . movability, 1 ( 0.00%) fn_decl, 1 ( 0.00%) body, . fn_decl_span, . fn_arg_span, . }) => { . visit_visitable!($($mut)? vis, constness, movability, capture_clause); 4 ( 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); 1 ( 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), -- line 1031 ---------------------------------------- -- line 1161 ---------------------------------------- . . fn $name<'a, V: Visitor<'a>>( . vis: &mut V, . values: &'a ThinVec<$Ty>, . $( . $param: $ParamTy, . )* . ) -> V::Result { 7,248 ( 0.00%) walk_list!(vis, $visit_fn, values$(,$param)*); 499,657 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_arm (1,487x) . 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; . } . 74,424 ( 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)); 46,515 ( 0.00%) match kind { 10 ( 0.00%) StmtKind::Let(local) => try_visit!(visitor.visit_local(local)), 606 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_local (1x) . StmtKind::Item(item) => try_visit!(visitor.visit_item(item)), 9,302 ( 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() -- line 1206 ---------------------------------------- 131,115 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/mod.rs -------------------------------------------------------------------------------- Ir -- line 174 ---------------------------------------- . . pub struct CopyAndPaste<'tcx> { . interior_mut: InteriorMut<'tcx>, . } . . impl<'tcx> CopyAndPaste<'tcx> { . pub fn new(tcx: TyCtxt<'tcx>, conf: &'static Conf) -> Self { . Self { 4 ( 0.00%) interior_mut: InteriorMut::new(tcx, &conf.ignore_interior_mutability), 15,437 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::new (1x) . } . } . } . . impl<'tcx> LateLintPass<'tcx> for CopyAndPaste<'tcx> { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } 269,134 ( 0.00%) if matches!(expr.kind, ExprKind::If(..)) && !is_else_clause(cx.tcx, expr) { 176 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (1x) 9 ( 0.00%) let (conds, blocks) = if_sequence(expr); 230 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::if_sequence (1x) 6 ( 0.00%) ifs_same_cond::check(cx, &conds, &mut self.interior_mut); 72 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/ifs_same_cond.rs:clippy_lints::ifs::ifs_same_cond::check (1x) 4 ( 0.00%) same_functions_in_if_cond::check(cx, &conds); 71 ( 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 (1x) . let all_same = 13 ( 0.00%) !is_lint_allowed(cx, IF_SAME_THEN_ELSE, expr.hir_id) && if_same_then_else::check(cx, &conds, &blocks); 1,284 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (1x) 795 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/if_same_then_else.rs:clippy_lints::ifs::if_same_then_else::check (1x) 4 ( 0.00%) if !all_same && conds.len() != blocks.len() { 7 ( 0.00%) branches_sharing_code::check(cx, &conds, &blocks, expr); 2,997 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs:clippy_lints::ifs::branches_sharing_code::check (1x) . } 992 ( 0.00%) } else if let ExprKind::Match(_, arms, _) = expr.kind { 5,456 ( 0.00%) branches_sharing_code::check_match(cx, expr, arms); 130,794 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs:clippy_lints::ifs::branches_sharing_code::check_match (496x) . } 519,464 ( 0.01%) } . } 3 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . "using `map`/`map_err` on `Option` or `Result` constructors" . } . . declare_lint_pass!(UnnecessaryMapOnConstructor => [ . UNNECESSARY_MAP_ON_CONSTRUCTOR, . ]); . . impl<'tcx> LateLintPass<'tcx> for UnnecessaryMapOnConstructor { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { 143,108 ( 0.00%) if !expr.span.from_expansion() 8,033 ( 0.00%) && let hir::ExprKind::MethodCall(path, recv, [map_arg], ..) = expr.kind 3,174 ( 0.00%) && !map_arg.span.from_expansion() 9,282 ( 0.00%) && let hir::ExprKind::Path(fun) = map_arg.kind 9,162 ( 0.00%) && let Some(sym::Option | sym::Result) = cx.typeck_results().expr_ty(recv).opt_diag_name(cx) 61,080 ( 0.00%) => ???:::expr_ty (1,527x) . { . let (constructor_path, constructor_item) = if let hir::ExprKind::Call(constructor, [arg, ..]) = recv.kind . && let hir::ExprKind::Path(constructor_path) = constructor.kind . && !constructor.span.from_expansion() . && !arg.span.from_expansion() . { . (constructor_path, arg) . } else { -- line 53 ---------------------------------------- -- line 81 ---------------------------------------- . "unnecessary `{}` on constructor `{constructor_snippet}(_)`", . path.ident.name . ), . "try", . format!("{constructor_snippet}({fun_snippet}({constructor_arg_snippet}))"), . app, . ); . } 523,440 ( 0.01%) } . } 107,652 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/init_numbered_fields.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . pub INIT_NUMBERED_FIELDS, . style, . "numbered fields in tuple struct initializer" . } . . declare_lint_pass!(NumberedFields => [INIT_NUMBERED_FIELDS]); . . impl<'tcx> LateLintPass<'tcx> for NumberedFields { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 131,903 ( 0.00%) if let ExprKind::Struct(path, fields @ [field, ..], StructTailExpr::None) = e.kind . // If the first character of any field is a digit it has to be a tuple. 298 ( 0.00%) && field.ident.as_str().as_bytes().first().is_some_and(u8::is_ascii_digit) 4,768 ( 0.00%) => ???:::as_str (149x) . // Type aliases can't be used as functions. . && !matches!( . cx.qpath_res(path, e.hir_id), . Res::Def(DefKind::TyAlias | DefKind::AssocTy, _) . ) . // This is the only syntax macros can use that works for all struct types. . && !e.span.from_expansion() . && let mut has_side_effects = false -- line 56 ---------------------------------------- -- line 89 ---------------------------------------- . .intersperse(Cow::Borrowed(", ")) . .collect::() . ), . app, . ); . }, . ); . } 458,010 ( 0.01%) } . } 298 ( 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 { 279 ( 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, . { 20,581 ( 0.00%) match self { . Err(_) => false, 41 ( 0.00%) Ok(x) => f(x), . } . } . . /// Returns `true` if the result is [`Err`]. . /// . /// # Examples . /// . /// ``` -- line 636 ---------------------------------------- -- 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, . { 27,278 ( 0.00%) match self { 21,231 ( 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, . { 2 ( 0.00%) match self { . Ok(t) => Ok(op(t)), . Err(e) => Err(e), . } . } . . /// Returns the provided default (if [`Err`]), or . /// applies a function to the contained value (if [`Ok`]). . /// -- line 844 ---------------------------------------- -- line 957 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_result_trait_fn", issue = "144211")] . pub const fn map_err(self, op: O) -> Result . where . O: [const] FnOnce(E) -> F + [const] Destruct, . { 150,196 ( 0.00%) match self { 133,440 ( 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, . { 23,538 ( 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, . { 25,445 ( 0.00%) match self { . Ok(t) => t, . Err(e) => unwrap_failed("called `Result::unwrap()` on an `Err` value", &e), . } . } . . /// Returns the contained [`Ok`] value or a default . /// . /// Consumes the `self` argument then, if [`Ok`], returns the contained -- line 1238 ---------------------------------------- -- line 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, . { 1,570 ( 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 { 67,315 ( 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 { 26,958 ( 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 { 137,629 ( 0.00%) match self { 50,887 ( 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 ---------------------------------------- 230,387 ( 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 { 98,301 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 35,926 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 6,281 ( 0.00%) self_ty, . .. 15,680 ( 0.00%) }) = item.kind 12,562 ( 0.00%) && let Res::Def(_, def_id) = *self_ty.basic_res() . && let Some(local_def_id) = def_id.as_local() . { 5,729 ( 0.00%) let adt_hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id); . let trait_ref = &of_trait.trait_ref; 11,458 ( 0.00%) let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 28,645 ( 0.00%) let is_automatically_derived = cx.tcx.is_automatically_derived(item.owner_id.to_def_id()); 772,334 ( 0.01%) => ???:::is_automatically_derived (5,729x) . 45,832 ( 0.00%) derived_hash_with_manual_eq::check(cx, item.span, trait_ref, ty, adt_hir_id, is_automatically_derived); 57,290 ( 0.00%) derive_ord_xor_partial_ord::check(cx, item, trait_ref, ty, adt_hir_id, is_automatically_derived); 1,162,987 ( 0.01%) => /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 (5,729x) . 11,458 ( 0.00%) if is_automatically_derived { 23,233 ( 0.00%) unsafe_derive_deserialize::check(cx, item, trait_ref, ty, adt_hir_id); 159,527 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/derive/unsafe_derive_deserialize.rs:clippy_lints::derive::unsafe_derive_deserialize::check (3,319x) 26,552 ( 0.00%) derive_partial_eq_without_eq::check(cx, item.span, trait_ref, ty, adt_hir_id); 2,530,650 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/derive/derive_partial_eq_without_eq.rs:clippy_lints::derive::derive_partial_eq_without_eq::check (3,319x) . } else { 12,050 ( 0.00%) expl_impl_clone_on_copy::check(cx, item, trait_ref, ty, adt_hir_id); 209,670 ( 0.00%) => /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 (2,410x) . } . } 112,344 ( 0.00%) } . } 13,868 ( 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, . ) { 22,916 ( 0.00%) if let Some(peq_trait_def_id) = cx.tcx.lang_items().eq_trait() 229,160 ( 0.00%) => ???:::lang_items (5,729x) 22,916 ( 0.00%) && let Some(def_id) = trait_ref.trait_def_id() 74,477 ( 0.00%) => ???:::trait_def_id (5,729x) 34,374 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Hash, def_id) 525,014 ( 0.01%) => ???:::is_diagnostic_item (5,729x) . { . // Look for the PartialEq implementations for `ty` . cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| { . let peq_is_automatically_derived = cx.tcx.is_automatically_derived(impl_id); . . if !hash_is_automatically_derived || peq_is_automatically_derived { . return; . } -- line 28 ---------------------------------------- 17,187 ( 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 94 ---------------------------------------- . FuseImpl::try_fold(self, acc, fold) . } . . #[inline] . fn fold(self, mut acc: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 70,485 ( 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> { 37,605 ( 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, . { 132,516 ( 0.00%) if let Some(ref mut iter) = self.iter { 65,430 ( 0.00%) acc = iter.try_fold(acc, fold)?; 1,606,287 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> (65,430x) . } . try { acc } . } . . #[inline] . fn find

(&mut self, predicate: P) -> Option . where . P: FnMut(&Self::Item) -> bool, -- line 438 ---------------------------------------- 4,217 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs -------------------------------------------------------------------------------- Ir -- line 1048 ---------------------------------------- . msrv: conf.msrv.into(), . infallible_destructuring_match_linted: false, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for Matches { . #[expect(clippy::too_many_lines)] 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let from_expansion = expr.span.from_expansion(); . 203,017 ( 0.00%) if let ExprKind::Match(ex, arms, source) = expr.kind { 7,316 ( 0.00%) if is_direct_expn_of(expr.span, sym::matches).is_some() 70,463 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of (961x) . && let [arm, _] = arms . { . redundant_pattern_match::check_match(cx, expr, ex, arms); . redundant_pattern_match::check_matches_true(cx, expr, arm, ex); . } 5,766 ( 0.00%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . 1,488 ( 0.00%) if source == MatchSource::Normal && !is_span_match(cx, expr.span) { . return; . } 4,960 ( 0.00%) if matches!(source, MatchSource::Normal | MatchSource::ForLoopDesugar) { 3,472 ( 0.00%) significant_drop_in_scrutinee::check_match(cx, expr, ex, arms, source); 420,278 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/significant_drop_in_scrutinee.rs:clippy_lints::matches::significant_drop_in_scrutinee::check_match (496x) . } . 2,976 ( 0.00%) collapsible_match::check_match(cx, ex, arms, self.msrv); 104,833 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_match (496x) 992 ( 0.00%) if !from_expansion { . // These don't depend on a relationship between multiple arms 2,480 ( 0.00%) match_wild_err_arm::check(cx, ex, arms); 215,678 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_err_arm.rs:clippy_lints::matches::match_wild_err_arm::check (496x) 2,480 ( 0.00%) wild_in_or_pats::check(cx, ex, arms); 46,122 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/wild_in_or_pats.rs:clippy_lints::matches::wild_in_or_pats::check (496x) . } . 1,488 ( 0.00%) if let MatchSource::TryDesugar(_) = source { . try_err::check(cx, expr, ex); . } . . if !from_expansion 496 ( 0.00%) && let mut has_cfg = false 496 ( 0.00%) && let mut has_comments = false 20,327 ( 0.00%) && walk_intra_arm_text(cx, expr.span, ex.span, arms, |s| { 20,324 ( 0.00%) let mut iter = tokenize_with_text(s).filter(|(t, ..)| match t { . TokenKind::Whitespace => false, . TokenKind::LineComment { .. } | TokenKind::BlockComment { .. } => { . has_comments = true; . false . }, . _ => true, . }); . while let Some((t, ..)) = iter.next() { . if matches!(t, TokenKind::Pound) . && matches!(iter.next(), Some((TokenKind::OpenBracket, ..))) . && matches!(iter.next(), Some((TokenKind::Ident, "cfg", _))) . { . has_cfg = true; . } . } 15,864 ( 0.00%) }) . && !has_cfg . { 496 ( 0.00%) if source == MatchSource::Normal { 3,472 ( 0.00%) let is_match_like_matches = self.msrv.meets(cx, msrvs::MATCHES_MACRO) 7,440 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (496x) 2,480 ( 0.00%) && match_like_matches::check_match(cx, expr, ex, arms); 3,330,486 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_like_matches.rs:clippy_lints::matches::match_like_matches::check_match (496x) . // Even when the lint is allowed on the match expression, an arm can carry its . // own `#[expect]`/`#[warn]` attribute, which `match_same_arms::check` handles . // at arm granularity. Only skip the check when no arm has attributes. 992 ( 0.00%) if !(is_match_like_matches 3,472 ( 0.00%) || (is_lint_allowed(cx, MATCH_SAME_ARMS, expr.hir_id) 406,886 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (496x) 1,487 ( 0.00%) && arms.iter().all(|arm| cx.tcx.hir_attrs(arm.hir_id).is_empty()))) 99,835 ( 0.00%) => ???:::hir_attrs (1,487x) . { . match_same_arms::check(cx, arms); . } . 3,968 ( 0.00%) redundant_pattern_match::check_match(cx, expr, ex, arms); 15,023 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/redundant_pattern_match.rs:clippy_lints::matches::redundant_pattern_match::check_match (496x) 3,472 ( 0.00%) single_match::check(cx, ex, arms, expr, has_comments); 20,956 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/single_match.rs:clippy_lints::matches::single_match::check (496x) 2,976 ( 0.00%) match_bool::check(cx, ex, arms, expr); 625,356 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_bool.rs:clippy_lints::matches::match_bool::check (496x) 2,480 ( 0.00%) overlapping_arms::check(cx, ex, arms); 477,180 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/overlapping_arms.rs:clippy_lints::matches::overlapping_arms::check (496x) 2,480 ( 0.00%) match_wild_enum::check(cx, ex, arms); 34,224 ( 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 (496x) 2,976 ( 0.00%) match_as_ref::check(cx, ex, arms, expr); 31,355 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_as_ref.rs:clippy_lints::matches::match_as_ref::check (496x) 2,976 ( 0.00%) needless_match::check_match(cx, ex, arms, expr); 232,046 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/needless_match.rs:clippy_lints::matches::needless_match::check_match (496x) 2,480 ( 0.00%) match_str_case_mismatch::check(cx, ex, arms); 32,240 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_str_case_mismatch.rs:clippy_lints::matches::match_str_case_mismatch::check (496x) 2,480 ( 0.00%) redundant_guards::check(cx, arms, self.msrv); 23,306 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/redundant_guards.rs:clippy_lints::matches::redundant_guards::check (496x) . 1,984 ( 0.00%) if !is_in_const_context(cx) { 179,966 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (496x) 3,472 ( 0.00%) manual_unwrap_or::check_match(cx, expr, ex, arms); 29,768 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_unwrap_or.rs:clippy_lints::matches::manual_unwrap_or::check_match (496x) 2,976 ( 0.00%) manual_map::check_match(cx, expr, ex, arms); 51,180 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_map.rs:clippy_lints::matches::manual_map::check_match (496x) 2,976 ( 0.00%) manual_filter::check_match(cx, ex, arms, expr); 71,675 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_filter.rs:clippy_lints::matches::manual_filter::check_match (496x) 3,472 ( 0.00%) manual_ok_err::check_match(cx, expr, ex, arms); 50,764 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_ok_err.rs:clippy_lints::matches::manual_ok_err::check_match (496x) . } . 992 ( 0.00%) if self.infallible_destructuring_match_linted { . self.infallible_destructuring_match_linted = false; . } else { 2,976 ( 0.00%) match_single_binding::check(cx, ex, arms, expr); 13,888 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_single_binding.rs:clippy_lints::matches::match_single_binding::check (496x) . } . } . match_ref_pats::check(cx, ex, arms.iter().map(|el| el.pat), expr); . } 386,814 ( 0.00%) } else if let Some(if_let) = higher::IfLet::hir(cx, expr) { 322,348 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (64,469x) . if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . collapsible_match::check_if_let( . cx, . if_let.let_span.ctxt(), . if_let.let_pat, . if_let.if_then, -- line 1157 ---------------------------------------- -- line 1206 ---------------------------------------- . if_let.let_pat, . if_let.let_expr, . if_let.if_else.is_some(), . if_let.let_span, . ); . needless_match::check_if_let(cx, expr, &if_let); . } . } else { 322,345 ( 0.00%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . if let Some(while_let) = higher::WhileLet::hir(expr) { . significant_drop_in_scrutinee::check_while_let(cx, expr, while_let.let_expr, while_let.if_then); . } . if !from_expansion { . redundant_pattern_match::check(cx, expr); . } . } 523,440 ( 0.01%) } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'_>) { 931 ( 0.00%) self.infallible_destructuring_match_linted |= 3,724 ( 0.00%) local.els.is_none() && infallible_destructuring_match::check(cx, local); 20,491 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/infallible_destructuring_match.rs:clippy_lints::matches::infallible_destructuring_match::check (931x) . } . . fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 46,599 ( 0.00%) rest_pat_in_fully_bound_struct::check(cx, pat); 388,635 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/rest_pat_in_fully_bound_struct.rs:clippy_lints::matches::rest_pat_in_fully_bound_struct::check (15,533x) . } . } . . /// Calls the given function for each segment of the source text within the . /// match block which is not part of any arm. For the purposes of this function . /// attributes on an arm are not considered part of the arm. . /// . /// This will return whether all the relevant source text could be retrieved. If -- line 1240 ---------------------------------------- -- line 1243 ---------------------------------------- . #[must_use] . fn walk_intra_arm_text( . cx: &LateContext<'_>, . match_sp: Span, . scrutinee_sp: Span, . arms: &[Arm<'_>], . mut f: impl FnMut(&str), . ) -> bool { 2,976 ( 0.00%) if let Some(src) = match_sp.get_source_range(cx) 992 ( 0.00%) && let scrutinee_sp = scrutinee_sp.source_callsite().data() 11,904 ( 0.00%) => ???:::source_callsite (496x) . && let block_start = (scrutinee_sp.hi.0 - src.sf.start_pos.0) as usize . && let Some(src_text) = src.sf.src.as_ref().map(|x| &***x) 496 ( 0.00%) && let Some(block_text) = src_text.get(block_start..src.range.end) 992 ( 0.00%) && let Some(stripped_text) = block_text.trim_start_matches(is_whitespace).strip_prefix('{') 23,312 ( 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:: (496x) . && let arms_start = block_start + (block_text.len() - stripped_text.len()) . && let Some(arms_end) = stripped_text 1,488 ( 0.00%) .trim_end_matches(|c| is_whitespace(c) || c == ')') 12,896 ( 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_end_matches::::check_expr::{closure#0}>::{closure#1}> (496x) . .strip_suffix('}') 992 ( 0.00%) .map(|s| src.range.end - (stripped_text.len() - s.len())) . && let Some(range) = arms.iter().try_fold(arms_start..arms_end, |range, arm| { 1,487 ( 0.00%) let arm_sp: rustc_span::SpanData = arm.span.source_callsite().data(); 35,688 ( 0.00%) => ???:::source_callsite (1,487x) 4,461 ( 0.00%) let arm_range = (arm_sp.lo.0 - src.sf.start_pos.0) as usize..(arm_sp.hi.0 - src.sf.start_pos.0) as usize; 8,922 ( 0.00%) if range.start <= arm_range.start . && arm_range.end <= range.end . && let Some(src) = src_text.get(range.start..arm_range.start) . { 5,948 ( 0.00%) f(src); 600,718 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr::{closure#0} (1,487x) . Some(arm_range.end..range.end) . } else { . None . } . }) . && let Some(src) = src_text.get(range) . { 496 ( 0.00%) f(src); 179,552 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr::{closure#0} (496x) . true . } else { . false . } . } . . /// Checks if `pat` contains OR patterns that cannot be nested due to a too low MSRV. . fn pat_contains_disallowed_or(cx: &LateContext<'_>, pat: &Pat<'_>, msrv: Msrv) -> bool { -- line 1285 ---------------------------------------- 38,056 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::span_lint_and_then; . use clippy_utils::visitors::contains_unsafe_block; . use rustc_errors::MultiSpan; . use rustc_hir::intravisit::Visitor; . use rustc_hir::{self as hir, Body, FnRetTy, FnSig, GenericArg, Lifetime, Mutability, TyKind}; . use rustc_lint::LateContext; . use rustc_span::Span; . 54,512 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, sig: &FnSig<'_>, body: Option<&Body<'tcx>>) { 27,252 ( 0.00%) let FnRetTy::Return(ty) = sig.decl.output else { return }; 3,238 ( 0.00%) for (out, mutability, out_span) in get_lifetimes(ty) { . if mutability != Some(Mutability::Mut) { . continue; . } 7,770 ( 0.00%) let out_region = cx.tcx.named_bound_var(out.hir_id); 6,609,133 ( 0.08%) => ???:::named_bound_var (1,554x) . // `None` if one of the types contains `&'a mut T` or `T<'a>`. . // Else, contains all the locations of `&'a T` types. 3,108 ( 0.00%) let args_immut_refs: Option> = sig . .decl . .inputs . .iter() . .flat_map(get_lifetimes) 1,235 ( 0.00%) .filter(|&(lt, _, _)| cx.tcx.named_bound_var(lt.hir_id) == out_region) 20,281 ( 0.00%) => ???:::named_bound_var (247x) . .map(|(_, mutability, span)| (mutability == Some(Mutability::Not)).then_some(span)) . .collect(); 2,614 ( 0.00%) if let Some(args_immut_refs) = args_immut_refs 1,307 ( 0.00%) && !args_immut_refs.is_empty() . && body.is_none_or(|body| sig.header.is_unsafe() || contains_unsafe_block(cx, body.value)) . { . span_lint_and_then( . cx, . MUT_FROM_REF, . out_span, . "mutable borrow from immutable input(s)", . |diag| { . let ms = MultiSpan::from_spans(args_immut_refs); . diag.span_note(ms, "immutable borrow here"); . }, . ); . } . } 54,512 ( 0.00%) } . . struct LifetimeVisitor<'tcx> { . result: Vec<(&'tcx Lifetime, Option, Span)>, . } . . impl<'tcx> Visitor<'tcx> for LifetimeVisitor<'tcx> { . fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx, hir::AmbigArg>) { 20,750 ( 0.00%) if let TyKind::Ref(lt, ref m) = ty.kind { 3,919 ( 0.00%) self.result.push((lt, Some(m.mutbl), ty.span)); . } 18,608 ( 0.00%) hir::intravisit::walk_ty(self, ty); 775,540 ( 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:: (6,810x) . } . . fn visit_generic_arg(&mut self, generic_arg: &'tcx GenericArg<'tcx>) { 10,212 ( 0.00%) if let GenericArg::Lifetime(lt) = generic_arg { 3,298 ( 0.00%) self.result.push((lt, None, generic_arg.span())); . } . hir::intravisit::walk_generic_arg(self, generic_arg); . } . } . . /// Visit `ty` and collect the all the lifetimes appearing in it, implicit or not. . /// . /// The second field of the vector's elements indicate if the lifetime is attached to a . /// shared reference, a mutable reference, or neither. . fn get_lifetimes<'tcx>(ty: &'tcx hir::Ty<'tcx>) -> Vec<(&'tcx Lifetime, Option, Span)> { . use hir::intravisit::VisitorExt as _; . 25,146 ( 0.00%) let mut visitor = LifetimeVisitor { result: Vec::new() }; . visitor.visit_ty_unambig(ty); 31,956 ( 0.00%) visitor.result . } 9,925 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/toplevel_ref_arg.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . pub TOPLEVEL_REF_ARG, . style, . "an entire binding declared as `ref`, in a function argument or a `let` statement" . } . . declare_lint_pass!(ToplevelRefArg => [TOPLEVEL_REF_ARG]); . . impl<'tcx> LateLintPass<'tcx> for ToplevelRefArg { 85,000 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . k: FnKind<'tcx>, . decl: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . _: Span, . _: LocalDefId, . ) { 21,250 ( 0.00%) if !matches!(k, FnKind::Closure) { . for arg in iter_input_pats(decl, body) { 58,640 ( 0.00%) if let PatKind::Binding(BindingMode(ByRef::Yes(..), _), ..) = arg.pat.kind . && is_lint_allowed(cx, REF_PATTERNS, arg.pat.hir_id) . && !arg.span.in_external_macro(cx.tcx.sess.source_map()) . { . span_lint_hir( . cx, . TOPLEVEL_REF_ARG, . arg.hir_id, . arg.pat.span, . "`ref` directly on a function parameter does not prevent taking ownership of the passed argument. \ . Consider using a reference type instead", . ); . } . } . } 85,000 ( 0.00%) } . 9,528 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 3,313 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 4,655 ( 0.00%) && let PatKind::Binding(BindingMode(ByRef::Yes(_, mutabl), _), .., name, None) = local.pat.kind . && let Some(init) = local.init . // Do not emit if clippy::ref_patterns is not allowed to avoid having two lints for the same issue. . && is_lint_allowed(cx, REF_PATTERNS, local.pat.hir_id) . && !stmt.span.in_external_macro(cx.tcx.sess.source_map()) . { . let ctxt = local.span.ctxt(); . let mut app = Applicability::MachineApplicable; . let sugg_init = Sugg::hir_with_context(cx, init, ctxt, "..", &mut app); -- line 91 ---------------------------------------- -- line 110 ---------------------------------------- . stmt.span, . "try", . format!("let {name}{tyopt} = {initref};", name = snippet(cx, name.span, "..")), . app, . ); . }, . ); . } 9,528 ( 0.00%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs -------------------------------------------------------------------------------- Ir -- line 201 ---------------------------------------- . } . } . . pub struct LiteralDigitGrouping { . lint_fraction_readability: bool, . } . . impl EarlyLintPass for LiteralDigitGrouping { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `NumericLiteral::from_lit_kind` only accepts integer and float literals. 176,729 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 81,225 ( 0.00%) && matches!(lit.kind, token::LitKind::Integer | token::LitKind::Float) 36,556 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . self.check_lit(cx, lit, expr.span); . } 598,616 ( 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) { 63,973 ( 0.00%) if let Some(src) = span.get_text(cx) 73,112 ( 0.00%) && let Ok(lit_kind) = LitKind::from_token_lit(lit) 1,365,553 ( 0.02%) => ???:::from_token_lit (9,139x) 191,919 ( 0.00%) && let Some(mut num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 1,356,959 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (9,139x) 228,475 ( 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 (9,139x) . { . if !Self::check_for_mistyped_suffix(cx, span, &mut num_lit) { . return; . } . . if Self::is_literal_uuid_formatted(&num_lit) { . return; . } . 27,417 ( 0.00%) let result = (|| { 337 ( 0.00%) let integral_group_size = Self::get_group_size(num_lit.integer.split('_'), num_lit.radix, true)?; 27,417 ( 0.00%) if let Some(fraction) = num_lit.fraction { . let fractional_group_size = . Self::get_group_size(fraction.rsplit('_'), num_lit.radix, self.lint_fraction_readability)?; . . let consistent = Self::parts_consistent( . integral_group_size, . fractional_group_size, . num_lit.integer.len(), . fraction.len(), -- line 253 ---------------------------------------- -- line 272 ---------------------------------------- . warning_type.display(&num_lit, cx, span); . } . } . } . } . . // Returns `false` if the check fails . fn check_for_mistyped_suffix(cx: &EarlyContext<'_>, span: Span, num_lit: &mut NumericLiteral<'_>) -> bool { 9,139 ( 0.00%) if num_lit.suffix.is_some() { . return true; . } . 27,381 ( 0.00%) let (part, mistyped_suffixes, is_float) = if let Some((_, exponent)) = &mut num_lit.exponent { . (exponent, &["32", "64"][..], true) 9,127 ( 0.00%) } else if num_lit.fraction.is_some() { . return true; . } else { . (&mut num_lit.integer, &["8", "16", "32", "64"][..], false) . }; . 18,254 ( 0.00%) let mut split = part.rsplit('_'); 18,254 ( 0.00%) let last_group = split.next().expect("At least one group"); 9,245 ( 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 { 674 ( 0.00%) if num_lit.radix != Radix::Hexadecimal { . return false; . } . . // UUIDs should not have a fraction . if num_lit.fraction.is_some() { . return false; . } . 674 ( 0.00%) let group_sizes: Vec = num_lit.integer.split('_').map(str::len).collect(); 674 ( 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"); . 18,278 ( 0.00%) if (radix == Radix::Binary || radix == Radix::Octal || radix == Radix::Hexadecimal) . && let Some(second_size) = groups.next() 59 ( 0.00%) && (!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)) . } 18,278 ( 0.00%) } else if first > 5 && lint_unreadable { . Err(WarningType::UnreadableLiteral) . } else { . Ok(None) . } . } . } . . pub struct DecimalLiteralRepresentation { . threshold: u64, . } . . impl EarlyLintPass for DecimalLiteralRepresentation { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // Only integer tokens can produce `LitKind::Int`. 149,654 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind . && lit.kind == token::LitKind::Integer 27,417 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { 45,695 ( 0.00%) self.check_lit(cx, lit, expr.span); . } 598,616 ( 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. 63,973 ( 0.00%) if let Ok(lit_kind) = LitKind::from_token_lit(lit) 1,365,553 ( 0.02%) => ???:::from_token_lit (9,139x) 36,556 ( 0.00%) && let LitKind::Int(val, _) = lit_kind 9,139 ( 0.00%) && val >= u128::from(self.threshold) 1,010 ( 0.00%) && let Some(src) = span.get_text(cx) 46,157 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::get_text::<&rustc_lint::context::EarlyContext> (101x) 606 ( 0.00%) && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 15,649 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (101x) 2,525 ( 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 (101x) . && num_lit.radix == Radix::Decimal . { 9 ( 0.00%) let hex = format!("{val:#X}"); 15 ( 0.00%) let num_lit = NumericLiteral::new(&hex, num_lit.suffix, false); 213 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (3x) 6 ( 0.00%) let _: Result<(), ()> = Self::do_lint(num_lit.integer).map_err(|warning_type| { . warning_type.display(&num_lit, cx, span); . }); . } . } . . fn do_lint(digits: &str) -> Result<(), WarningType> { 6 ( 0.00%) if digits.len() == 1 { . // Lint for 1 digit literals, if someone really sets the threshold that low . if digits == "1" . || digits == "2" . || digits == "4" . || digits == "8" . || digits == "3" . || digits == "7" . || digits == "F" . { . return Err(WarningType::DecimalRepresentation); . } 6 ( 0.00%) } else if digits.len() < 4 { . // Lint for Literals with a hex-representation of 2 or 3 digits . let f = &digits[0..1]; // first digit . let s = &digits[1..]; // suffix . . // Powers of 2 . if ((f.eq("1") || f.eq("2") || f.eq("4") || f.eq("8")) && s.chars().all(|c| c == '0')) . // Powers of 2 minus 1 . || ((f.eq("1") || f.eq("3") || f.eq("7") || f.eq("F")) && s.chars().all(|c| c == 'F')) -- line 477 ---------------------------------------- -- line 480 ---------------------------------------- . } . } else { . // Lint for Literals with a hex-representation of 4 digits or more . let f = &digits[0..1]; // first digit . let m = &digits[1..digits.len() - 1]; // middle digits, except last . let s = &digits[1..]; // suffix . . // Powers of 2 with a margin of +15/-16 9 ( 0.00%) if ((f.eq("1") || f.eq("2") || f.eq("4") || f.eq("8")) && m.chars().all(|c| c == '0')) . || ((f.eq("1") || f.eq("3") || f.eq("7") || f.eq("F")) && m.chars().all(|c| c == 'F')) . // Lint for representations with only 0s and Fs, while allowing 7 as the first . // digit . || ((f.eq("7") || f.eq("F")) && s.chars().all(|c| c == '0' || c == 'F')) . { . return Err(WarningType::DecimalRepresentation); . } . } -- line 496 ---------------------------------------- 137,485 ( 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; . 56 ( 0.00%) fn check_ty<'a>(cx: &LateContext<'a>, param: &hir::Ty<'a>, param_ty: Ty<'a>, fixes: &mut Vec<(Span, String)>) { 20 ( 0.00%) if let ty::Ref(_, opt_ty, Mutability::Not) = param_ty.kind() . && let Some(gen_ty) = option_arg_ty(cx, *opt_ty) . && !gen_ty.is_ref() . // Need to gen the original spans, so first parsing mid, and hir parsing afterward . && let hir::TyKind::Ref(lifetime, hir::MutTy { ty, .. }) = param.kind . && let hir::TyKind::Path(hir::QPath::Resolved(_, path)) = ty.kind . && let (Some(first), Some(last)) = (path.segments.first(), path.segments.last()) . && let Some(hir::GenericArgs { . args: [hir::GenericArg::Type(opt_ty)], -- line 23 ---------------------------------------- -- line 32 ---------------------------------------- . format!( . "{}<&{lifetime}{}{}>", . snippet(cx, first.ident.span.to(last.ident.span), ".."), . if lifetime.is_empty() { "" } else { " " }, . snippet(cx, opt_ty.span, "..") . ), . )); . } 64 ( 0.00%) } . 40 ( 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 8 ( 0.00%) for (param, param_ty) in decl.inputs.iter().zip(sig.inputs()) { 20 ( 0.00%) check_ty(cx, param, *param_ty, &mut fixes); 72 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_ty (4x) . } . // Check return type 8 ( 0.00%) if let hir::FnRetTy::Return(ty) = &decl.output { 24 ( 0.00%) check_ty(cx, ty, sig.output(), &mut fixes); 68 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_ty (4x) . } 4 ( 0.00%) if !fixes.is_empty() { . span_lint_and_then( . cx, . REF_OPTION, . span, . "it is more idiomatic to use `Option<&T>` instead of `&Option`", . |diag| { . diag.multipart_suggestion("change this to", fixes, Applicability::Unspecified); . }, . ); . } 32 ( 0.00%) } . . #[expect(clippy::too_many_arguments)] 148,750 ( 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, . ) { 74,375 ( 0.00%) if avoid_breaking_exported_api && cx.effective_visibilities.is_exported(def_id) { 605,610 ( 0.01%) => ???:::is_exported (10,625x) . return; . } 10 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) { . return; . } . 10 ( 0.00%) if let FnKind::Closure = kind { . // Compute the span of the closure parameters + return type if set 2 ( 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()) . } 2 ( 0.00%) } else if let (Some(first), Some(last)) = (decl.inputs.first(), decl.inputs.last()) { 4 ( 0.00%) first.span.to(last.span) 138 ( 0.00%) => ???:::to (1x) . } else { . // No parameters - no point in checking . return; . }; . . // Figure out the signature of the closure 4 ( 0.00%) let ty::Closure(_, args) = cx.typeck_results().expr_ty(body.value).kind() else { 40 ( 0.00%) => ???:::expr_ty (1x) . 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); 24 ( 0.00%) } else if !is_trait_impl_item(cx, hir_id) { 560 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (4x) . let sig = cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); . 36 ( 0.00%) if is_from_proc_macro(cx, &(&kind, body, hir_id, span)) { . return; . } . 20 ( 0.00%) check_fn_sig(cx, decl, span, sig); . } 85,000 ( 0.00%) } . 40 ( 0.00%) pub(super) fn check_trait_item<'a>( . cx: &LateContext<'a>, . trait_item: &hir::TraitItem<'a>, . avoid_breaking_exported_api: bool, . ) { 12 ( 0.00%) if !trait_item.span.in_external_macro(cx.sess().source_map()) 8 ( 0.00%) && let hir::TraitItemKind::Fn(ref sig, _) = trait_item.kind 7 ( 0.00%) && !(avoid_breaking_exported_api && cx.effective_visibilities.is_exported(trait_item.owner_id.def_id)) 57 ( 0.00%) => ???:::is_exported (1x) . && !is_from_proc_macro(cx, trait_item) . { . 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(); . check_fn_sig(cx, sig.decl, sig.span, ty_sig); . } 32 ( 0.00%) } 33 ( 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; . 62,748 ( 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 51,993 ( 0.00%) if !impl_implements_trait && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id) 388,341 ( 0.00%) => ???:::is_exported (6,813x) . // check missing trait implementations . && let Some(method_config) = TRAIT_METHODS.iter().find(|case| case.method_name == impl_item.ident.name) 31 ( 0.00%) && sig.decl.inputs.len() == method_config.param_count 3 ( 0.00%) && 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 2 ( 0.00%) && first_arg_ty_opt 5 ( 0.00%) .is_none_or(|first_arg_ty| method_config.self_kind.matches(cx, self_ty, first_arg_ty)) 51,721 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/lib.rs:::matches (1x) . && sig.header.is_safe() . && matches!(sig.header.constness, hir::Constness::NotConst) . && !sig.header.is_async() . && sig.header.abi == ExternAbi::Rust . && method_config.lifetime_param_cond(impl_item) . && method_config.in_prelude_since <= cx.tcx.sess.edition() . { . span_lint_and_help( -- line 38 ---------------------------------------- -- line 45 ---------------------------------------- . ), . None, . format!( . "consider implementing the trait `{}` or choosing a less ambiguous method name", . method_config.trait_name . ), . ); . } 71,712 ( 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 ---------------------------------------- -- line 138 ---------------------------------------- . Unit, . Bool, . Any, . Ref, . } . . impl OutType { . fn matches(self, ty: &FnRetTy<'_>) -> bool { 2 ( 0.00%) let is_unit = |ty: &hir::Ty<'_>| matches!(ty.kind, hir::TyKind::Tup(&[])); 5 ( 0.00%) match (self, ty) { . (Self::Unit, &FnRetTy::DefaultReturn(_)) => true, . (Self::Unit, &FnRetTy::Return(ty)) if is_unit(ty) => true, . (Self::Bool, &FnRetTy::Return(ty)) if is_bool(ty) => true, . (Self::Any, &FnRetTy::Return(ty)) if !is_unit(ty) => true, . (Self::Ref, &FnRetTy::Return(ty)) => matches!(ty.kind, hir::TyKind::Ref(_, _)), . _ => false, . } . } -- line 155 ---------------------------------------- 40,881 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . } . } . . pub(super) fn check_fn<'tcx>(cx: &LateContext<'tcx>, kind: FnKind<'tcx>, body: &'tcx Body<'tcx>, sp: Span) { . if sp.from_expansion() { . return; . } . 17,878 ( 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) 2 ( 0.00%) let replacement = if let ExprKind::Ret(None) = &body.value.kind { . RetReplacement::Block . } else { . RetReplacement::Empty . }; 2 ( 0.00%) check_final_expr(cx, body.value, vec![], replacement, None); 367 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr (1x) . }, . FnKind::ItemFn(..) | FnKind::Method(..) => { 26,814 ( 0.00%) check_block_return(cx, &body.value.kind, sp, vec![]); 961,676 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (8,938x) . }, . } . } . . // if `expr` is a block, check if there are needless returns in it 132,475 ( 0.00%) fn check_block_return<'tcx>(cx: &LateContext<'tcx>, expr_kind: &ExprKind<'tcx>, sp: Span, mut semi_spans: Vec) { 37,850 ( 0.00%) if let ExprKind::Block(block, _) = expr_kind { 35,976 ( 0.00%) if let Some(block_expr) = block.expr { 17,982 ( 0.00%) check_final_expr(cx, block_expr, semi_spans, RetReplacement::Empty, None); 6 ( 0.00%) } else if let Some(stmt) = block.stmts.last() { 15 ( 0.00%) if span_contains_cfg( 1,569 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (3x) . cx, 9 ( 0.00%) Span::between( 591 ( 0.00%) => ???:::between (3x) 6 ( 0.00%) stmt.span, 6 ( 0.00%) cx.sess().source_map().end_point(block.span), // the closing brace of the block 1,251 ( 0.00%) => ???:::end_point (3x) . ), . ) { . return; . } 18 ( 0.00%) match stmt.kind { . StmtKind::Expr(expr) => { . check_final_expr(cx, expr, semi_spans, RetReplacement::Empty, None); . }, 3 ( 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 21 ( 0.00%) if let Some(semi_span) = stmt.span.trim_start(semi_expr.span) { 387 ( 0.00%) => ???:::trim_start (3x) . let semi_span_to_remove = 12 ( 0.00%) span_find_starting_semi(cx.sess().source_map(), semi_span.with_hi(sp.hi())); 2,055 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::span_find_starting_semi (3x) . semi_spans.push(semi_span_to_remove); . } 30 ( 0.00%) check_final_expr(cx, semi_expr, semi_spans, RetReplacement::Empty, None); . }, . _ => (), . } . } . } 151,376 ( 0.00%) } . 125,796 ( 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(); 992 ( 0.00%) match &peeled_drop_expr.kind { . // simple return is always "bad" . ExprKind::Ret(inner) => { . // check if expr return nothing . let ret_span = if inner.is_none() && replacement == RetReplacement::Empty { . extend_span_to_previous_non_ws(cx, peeled_drop_expr.span) . } else { . peeled_drop_expr.span . }; -- line 132 ---------------------------------------- -- line 205 ---------------------------------------- . peeled_drop_expr.span, . ret_span, . semi_spans, . &replacement, . expr.hir_id, . ); . }, . ExprKind::If(_, then, else_clause_opt) => { 6 ( 0.00%) check_block_return(cx, &then.kind, peeled_drop_expr.span, semi_spans.clone()); 91 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (1x) 3 ( 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. 7 ( 0.00%) check_final_expr(cx, else_clause, semi_spans, RetReplacement::Empty, match_ty_opt); 134 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (1x) . } . }, . // 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) => { 992 ( 0.00%) let match_ty = cx.typeck_results().expr_ty(peeled_drop_expr); 19,840 ( 0.00%) => ???:::expr_ty (496x) 496 ( 0.00%) for arm in *arms { 10,409 ( 0.00%) check_final_expr(cx, arm.body, semi_spans.clone(), RetReplacement::Unit, Some(match_ty)); 93,681 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (1,487x) . } . }, . // if it's a whole block, check it 99,860 ( 0.00%) other_expr_kind => check_block_return(cx, other_expr_kind, peeled_drop_expr.span, semi_spans), 172,726 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (8,442x) 324 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (1x) . } 83,864 ( 0.00%) } . . fn emit_return_lint( . cx: &LateContext<'_>, . lint_span: Span, . ret_span: Span, . semi_spans: Vec, . replacement: &RetReplacement<'_>, . at: HirId, -- line 241 ---------------------------------------- 77,301 ( 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 { 241,338 ( 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/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 { 7,609 ( 0.00%) self.expr_id.is_some() || self.const_span.is_some_and(|span| span.contains(e.span)) 18,145 ( 0.00%) => ???:::contains (181x) . } . 45,661 ( 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<'_>, . ) { 6,885 ( 0.00%) if self.skip_expr(expr) { . return; . } 13,038 ( 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, . _ => (), . } . 13,014 ( 0.00%) let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); 115,680 ( 0.00%) => ???:::expr_ty (2,892x) . 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); . } 52,184 ( 0.00%) } . . pub fn check_negate<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, arg: &'tcx hir::Expr<'_>) { . if self.skip_expr(expr) { . return; . } . let ty = cx.typeck_results().expr_ty(arg); . if ConstEvalCtxt::new(cx).eval_local(expr, expr.span.ctxt()).is_none() && ty.is_floating_point() { . span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); -- line 59 ---------------------------------------- -- line 63 ---------------------------------------- . . pub fn expr_post(&mut self, id: hir::HirId) { . if Some(id) == self.expr_id { . self.expr_id = None; . } . } . . pub fn enter_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) { 70,855 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 2,688,302 ( 0.03%) => ???:::hir_body_owner (14,171x) 28,342 ( 0.00%) let body_owner_def_id = cx.tcx.hir_body_owner_def_id(body.id()); 1,883,975 ( 0.02%) => ???:::hir_body_owner_def_id (14,171x) . 85,026 ( 0.00%) match cx.tcx.hir_body_owner_kind(body_owner_def_id) { 1,578,489 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::hir_body_owner_kind:: (14,171x) . hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const { .. } => { 17,730 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 274,236 ( 0.00%) => ???:::hir_span_with_body (3,546x) . 8,178 ( 0.00%) if let Some(span) = self.const_span 4,344 ( 0.00%) && span.contains(body_span) 122,709 ( 0.00%) => ???:::contains (1,086x) . { . return; . } 7,092 ( 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<'_>) { 42,513 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 2,688,302 ( 0.03%) => ???:::hir_body_owner (14,171x) 42,513 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 1,094,018 ( 0.01%) => ???:::hir_span_with_body (14,171x) . 34,348 ( 0.00%) if let Some(span) = self.const_span 24,024 ( 0.00%) && span.contains(body_span) 627,249 ( 0.01%) => ???:::contains (6,006x) . { . return; . } 10,625 ( 0.00%) self.const_span = None; . } . } 32,224 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs -------------------------------------------------------------------------------- Ir -- line 35 ---------------------------------------- . pub SWAP_PTR_TO_REF, . suspicious, . "call to `mem::swap` using pointer derived references" . } . . declare_lint_pass!(SwapPtrToRef => [SWAP_PTR_TO_REF]); . . impl LateLintPass<'_> for SwapPtrToRef { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 142,500 ( 0.00%) if let ExprKind::Call(fn_expr, [arg1, arg2]) = e.kind . && fn_expr.basic_res().is_diag_item(cx, sym::mem_swap) . && let ctxt = e.span.ctxt() . && let (from_ptr1, arg1_span) = is_ptr_to_ref(cx, arg1, ctxt) . && let (from_ptr2, arg2_span) = is_ptr_to_ref(cx, arg2, ctxt) . && (from_ptr1 || from_ptr2) . { . span_lint_and_then( . cx, -- line 52 ---------------------------------------- -- line 63 ---------------------------------------- . "use ptr::swap", . format!("core::ptr::swap({snip1}, {snip2})"), . app, . ); . } . }, . ); . } 523,440 ( 0.01%) } . } . . /// Checks if the expression converts a mutable pointer to a mutable reference. If it is, also . /// returns the span of the pointer expression if it's suitable for making a suggestion. . fn is_ptr_to_ref(cx: &LateContext<'_>, e: &Expr<'_>, ctxt: SyntaxContext) -> (bool, Option) { . if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, borrowed_expr) = e.kind . && let ExprKind::Unary(UnOp::Deref, derefed_expr) = borrowed_expr.kind . && cx.typeck_results().expr_ty(derefed_expr).is_raw_ptr() -- line 79 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 98,224 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 29,292 ( 0.00%) if let ItemKind::Mod(_, _, ModKind::Loaded(_, Inline::No { .. }, mod_spans)) = &item.kind 5,219 ( 0.00%) && let FileName::Real(real) = cx.sess().source_map().span_to_filename(mod_spans.inner_span) 254,509 ( 0.00%) => ???:::span_to_filename (307x) 614 ( 0.00%) && let Some(local_path) = real.into_local_path() 2,763 ( 0.00%) && let Ok(absolute_path) = local_path.canonicalize() . { 3,377 ( 0.00%) let modules = self.modules.entry(absolute_path).or_insert(Modules { 2,249,801 ( 0.03%) => /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 (307x) 78,485 ( 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 (307x) 921 ( 0.00%) local_path, . spans: Vec::new(), . lint_level_specs: Vec::new(), . }); 921 ( 0.00%) modules.spans.push(item.span_with_attributes()); 35,094 ( 0.00%) => ???:::span_with_attributes (307x) 1,842 ( 0.00%) modules.lint_level_specs.push(cx.get_lint_level_spec(DUPLICATE_MOD)); 94,863 ( 0.00%) => ???:::get_lint_level_spec (307x) 307 ( 0.00%) } 112,256 ( 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() . { 614 ( 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%) } . } 2,764 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs -------------------------------------------------------------------------------- Ir -- line 91 ---------------------------------------- . DeriveHelper, . /// Single-segment custom attribute registered by a derive macro . /// but used before that derive macro was expanded (deprecated). . DeriveHelperCompat, . } . . /// What kind of definition something is; e.g., `mod` vs `struct`. . /// `enum DefPathData` may need to be updated if a new variant is added here. 107,245 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, StableHash)] . pub enum DefKind { . // Type namespace . Mod, . /// Refers to the struct itself, [`DefKind::Ctor`] refers to its constructor if it exists. . Struct, . Union, . Enum, . /// Refers to the variant itself, [`DefKind::Ctor`] refers to its constructor if it exists. -- line 107 ---------------------------------------- -- line 264 ---------------------------------------- . | DefKind::Use . | DefKind::ExternCrate => "an", . DefKind::Macro(kinds) => kinds.article(), . _ => "a", . } . } . . pub fn ns(&self) -> Option { 54 ( 0.00%) match self { . DefKind::Mod . | DefKind::Struct . | DefKind::Union . | DefKind::Enum . | DefKind::Variant . | DefKind::Trait . | DefKind::TyAlias . | DefKind::ForeignTy -- line 280 ---------------------------------------- -- line 467 ---------------------------------------- . /// - `String` will resolve to [`Res::Def`], and the `Res` will include the [`DefId`] . /// for `String` as defined in the standard library; . /// - `String::from` will also resolve to [`Res::Def`], with the [`DefId`] . /// pointing to `String::from`; . /// - `s` will resolve to [`Res::Local`]; . /// - the call to `str_to_string` will resolve to [`Res::Def`], with the [`DefId`] . /// pointing to the definition of `str_to_string` in the current crate. . // 56,529 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, StableHash)] . pub enum Res { . /// Definition having a unique ID (`DefId`), corresponds to something defined in user code. . /// . /// **Not bound to a specific namespace.** . Def(DefKind, DefId), . . // Type namespace . /// A primitive type such as `i32` or `str`. -- line 483 ---------------------------------------- -- line 634 ---------------------------------------- . #[inline] . pub fn expect_full_res(&self) -> Res { . self.full_res().expect("unexpected unresolved segments") . } . } . . /// Different kinds of symbols can coexist even if they share the same textual name. . /// Therefore, they each have a separate universe (known as a "namespace"). 12 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Encodable, Decodable)] . #[derive(StableHash)] . pub enum Namespace { . /// The type namespace includes `struct`s, `enum`s, `union`s, `trait`s, and `mod`s . /// (and, by extension, crates). . /// . /// Note that the type namespace includes other items; this is not an . /// exhaustive list. . TypeNS, -- line 650 ---------------------------------------- -- line 784 ---------------------------------------- . where . Id: Debug, . { . self.opt_def_id().unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {self:?}")) . } . . /// Return `Some(..)` with the `DefId` of this `Res` if it has a ID, else `None`. . pub fn opt_def_id(&self) -> Option { 389,883 ( 0.00%) match *self { 208,845 ( 0.00%) Res::Def(_, id) => Some(id), . . Res::Local(..) . | Res::PrimTy(..) . | Res::SelfTyParam { .. } . | Res::SelfTyAlias { .. } . | Res::SelfCtor(..) . | Res::ToolMod . | Res::OpenMod(..) -- line 801 ---------------------------------------- -- line 893 ---------------------------------------- . Res::Def(DefKind::Macro(kinds), _) => Some(kinds), . Res::NonMacroAttr(..) => Some(MacroKinds::ATTR), . _ => None, . } . } . . /// Returns `None` if this is `Res::Err` . pub fn ns(&self) -> Option { 30 ( 0.00%) match self { . Res::Def(kind, ..) => kind.ns(), . Res::PrimTy(..) . | Res::SelfTyParam { .. } . | Res::SelfTyAlias { .. } . | Res::ToolMod . | Res::OpenMod(..) => Some(Namespace::TypeNS), . Res::SelfCtor(..) | Res::Local(..) => Some(Namespace::ValueNS), . Res::NonMacroAttr(..) => Some(Namespace::MacroNS), -- line 909 ---------------------------------------- 95,288 ( 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/consts/int.rs -------------------------------------------------------------------------------- Ir -- line 141 ---------------------------------------- . /// . /// This is a packed struct in order to allow this type to be optimally embedded in enums . /// (like Scalar). . #[derive(Clone, Copy, Eq, PartialEq, Hash)] . #[repr(packed)] . pub struct ScalarInt { . /// The first `size` bytes of `data` are the value. . /// Do not try to read less or more bytes than that. The remaining bytes must be 0. 86,880 ( 0.00%) data: u128, . size: NonZero, . } . . // Cannot derive these, as the derives take references to the fields, and we . // can't take references to fields of packed structs. . impl StableHash for ScalarInt { . fn stable_hash( . &self, -- line 157 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . cx.typeck_results . .filter(|results| results.hir_owner == hir_ty.hir_id.owner) . .and_then(|results| results.node_type_opt(hir_ty.hir_id)) . .unwrap_or_else(|| lower_ty(cx.tcx, hir_ty)) . } . . /// Checks if the given type implements copy. . pub fn is_copy<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { 12 ( 0.00%) cx.type_is_copy_modulo_regions(ty) 741,779 ( 0.01%) => ???:::type_is_copy_modulo_regions (12x) . } . . /// This checks whether a given type is known to implement Debug. . pub fn has_debug_impl<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . cx.tcx . .get_diagnostic_item(sym::Debug) . .is_some_and(|debug| implements_trait(cx, ty, debug, &[])) . } -- line 63 ---------------------------------------- -- line 73 ---------------------------------------- . .all_fields() . .any(|f| !is_copy(cx, f.ty(cx.tcx, subs).skip_norm_wip())), . _ => true, . } . } . . /// Walks into `ty` and returns `true` if any inner type is an instance of the given adt . /// constructor. 282 ( 0.00%) pub fn contains_adt_constructor<'tcx>(ty: Ty<'tcx>, adt: AdtDef<'tcx>) -> bool { 94 ( 0.00%) ty.walk().any(|inner| match inner.kind() { 329 ( 0.00%) => ???:::walk (47x) . GenericArgKind::Type(inner_ty) => inner_ty.ty_adt_def() == Some(adt), . GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, . }) 188 ( 0.00%) } . . /// Walks into `ty` and returns `true` if any inner type is an instance of the given type, or adt . /// constructor of the same type. . /// . /// This method also recurses into opaque type predicates, so call it with `impl Trait` and `U` . /// will also return `true`. . pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, needle: Ty<'tcx>) -> bool { . fn contains_ty_adt_constructor_opaque_inner<'tcx>( -- line 94 ---------------------------------------- -- line 227 ---------------------------------------- . } . . /// Checks whether a type implements a trait. . /// The function returns false in case the type contains an inference variable. . /// . /// See [Common tools for writing lints] for an example how to use this function and other options. . /// . /// [Common tools for writing lints]: https://github.com/rust-lang/rust-clippy/blob/master/book/src/development/common_tools_writing_lints.md#checking-if-a-type-implements-a-specific-trait 312 ( 0.00%) pub fn implements_trait<'tcx>( . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . trait_id: DefId, . args: &[GenericArg<'tcx>], . ) -> bool { . implements_trait_with_env_from_iter( 48 ( 0.00%) cx.tcx, 24 ( 0.00%) cx.typing_env(), 711 ( 0.00%) => ???:::typing_env (24x) . ty, . trait_id, . None, . args.iter().map(|&x| Some(x)), . ) 192 ( 0.00%) } . . /// Same as `implements_trait` but allows using a `ParamEnv` different from the lint context. . /// . /// The `callee_id` argument is used to determine whether this is a function call in a `const fn` . /// environment, used for checking const traits. 47,663 ( 0.00%) pub fn implements_trait_with_env<'tcx>( . tcx: TyCtxt<'tcx>, . typing_env: ty::TypingEnv<'tcx>, . ty: Ty<'tcx>, . trait_id: DefId, . callee_id: Option, . args: &[GenericArg<'tcx>], . ) -> bool { . implements_trait_with_env_from_iter(tcx, typing_env, ty, trait_id, callee_id, args.iter().map(|&x| Some(x))) 54,472 ( 0.00%) } . . /// Same as `implements_trait_from_env` but takes the arguments as an iterator. . pub fn implements_trait_with_env_from_iter<'tcx>( . tcx: TyCtxt<'tcx>, . typing_env: ty::TypingEnv<'tcx>, . ty: Ty<'tcx>, . trait_id: DefId, . callee_id: Option, . args: impl IntoIterator>>>, . ) -> bool { . // Clippy shouldn't have infer types 6,833 ( 0.00%) assert!(!ty.has_infer()); . . // If a `callee_id` is passed, then we assert that it is a body owner . // through calling `body_owner_kind`, which would panic if the callee . // does not have a body. 13,618 ( 0.00%) if let Some(callee_id) = callee_id { 20,427 ( 0.00%) let _ = tcx.hir_body_owner_kind(callee_id); 695,369 ( 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:: (6,809x) . } . . let ty = tcx.erase_and_anonymize_regions(ty); 6,833 ( 0.00%) if ty.has_escaping_bound_vars() { . return false; . } . 61,449 ( 0.00%) let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); 3,000 ( 0.00%) => ???:0x0000000000173dc0 (24x) 2,688 ( 0.00%) => ???:::build_with_typing_env (24x) . let args = args . .into_iter() . .map(|arg| arg.into().unwrap_or_else(|| infcx.next_ty_var(DUMMY_SP).into())) . .collect::>(); . . let trait_ref = TraitRef::new(tcx, trait_id, [GenericArg::from(ty)].into_iter().chain(args)); . . debug_assert_matches!( . tcx.def_kind(trait_id), . DefKind::Trait | DefKind::TraitAlias, . "`DefId` must belong to a trait or trait alias" . ); . #[cfg(debug_assertions)] . assert_generic_args_match(tcx, trait_id, trait_ref.args); . 54,688 ( 0.00%) let obligation = Obligation { . cause: ObligationCause::dummy(), . param_env, . recursion_depth: 0, . predicate: trait_ref.upcast(tcx), . }; . infcx 6,833 ( 0.00%) .evaluate_obligation(&obligation) 105,748 ( 0.00%) => ???:::evaluate_obligation (24x) . .is_ok_and(EvaluationResult::must_apply_modulo_regions) 6,833 ( 0.00%) } 6,000 ( 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:: (24x) . . /// Checks whether this type implements `Drop`. . pub fn has_drop<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . match ty.ty_adt_def() { . Some(def) => def.has_dtor(cx.tcx), . None => false, . } . } . . /// Returns whether the `ty` has `#[must_use]` attribute, or acts like it does according to the . /// compiler determination. For example, if `ty` is a `Result`/`ControlFlow` whose `Err`/`Break` . /// payload is an uninhabited type, the `Ok`/`Continue` payload type will be used instead. . /// . /// The [`MustUsePath`] can be used to describe the type through [`describe_must_use_type`]. 14,574 ( 0.00%) pub fn opt_must_use_path<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option { . // `is_ty_must_use` requires an expression, whose `hir_id` will be used to determine whether . // certain types are visibly uninhabited from the module containing the expression. . // `cx.last_node_with_lint_attrs` is initialized to the crate/module `hir_id` when linting . // a new crate/module. If it is overriden, it is with an `hir_id` pertaining to the same . // create/module. We can use this in a dummy expression instead of asking all callers . // to provide a local `hir_id` which would not add more information. 29,148 ( 0.00%) let dummy_expr = Expr { 4,858 ( 0.00%) hir_id: cx.last_node_with_lint_attrs, . span: DUMMY_SP, . kind: ExprKind::Ret(None), . }; 14,574 ( 0.00%) match is_ty_must_use(cx, ty, &dummy_expr) { 4,489,268 ( 0.06%) => ???:rustc_lint::unused::must_use::is_ty_must_use (4,858x) . IsTyMustUse::Yes(path) => Some(path), 4,858 ( 0.00%) _ => None, . } 19,432 ( 0.00%) } . . /// Describe a [`MustUsePath`] returned by [`opt_must_use_path`]. . pub fn describe_must_use_type(cx: &LateContext<'_>, path: &MustUsePath) -> String { . describe_must_use_type_inner(cx, path, "", "", 1) . } . . // This is a rip-off from the compiler's `rustc_lint/src/unused/must_use.rs` . fn describe_must_use_type_inner( -- line 354 ---------------------------------------- -- line 449 ---------------------------------------- . ty::Array(inner_type, _) | ty::Slice(inner_type) => is_recursively_primitive_type(inner_type), . ty::Tuple(inner_types) => inner_types.iter().all(is_recursively_primitive_type), . _ => false, . } . } . . /// Return `true` if the passed `typ` is `isize` or `usize`. . pub fn is_isize_or_usize(typ: Ty<'_>) -> bool { 11,495 ( 0.00%) matches!(typ.kind(), ty::Int(IntTy::Isize) | ty::Uint(UintTy::Usize)) . } . . /// Checks if the drop order for a type matters. . /// . /// Some std types implement drop solely to deallocate memory. For these types, and composites . /// containing them, changing the drop order won't result in any observable side effects. . pub fn needs_ordered_drop<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . fn needs_ordered_drop_inner<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, seen: &mut FxHashSet>) -> bool { -- line 465 ---------------------------------------- -- line 510 ---------------------------------------- . /// Returns `true` if `ty` denotes an `unsafe fn`. . pub fn is_unsafe_fn<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . ty.is_fn() && ty.fn_sig(cx.tcx).safety().is_unsafe() . } . . /// Peels off all references on the type. Returns the underlying type, the number of references . /// removed, and, if there were any such references, whether the pointer is ultimately mutable or . /// not. 439 ( 0.00%) pub fn peel_and_count_ty_refs(mut ty: Ty<'_>) -> (Ty<'_>, usize, Option) { . let mut count = 0; . let mut mutbl = None; 878 ( 0.00%) while let ty::Ref(_, dest_ty, m) = ty.kind() { . ty = *dest_ty; . count += 1; . mutbl.replace(mutbl.map_or(*m, |mutbl: Mutability| mutbl.min(*m))); . } 1,317 ( 0.00%) (ty, count, mutbl) 439 ( 0.00%) } . . /// Peels off `n` references on the type. Returns the underlying type and, if any references . /// were removed, whether the pointer is ultimately mutable or not. . pub fn peel_n_ty_refs(mut ty: Ty<'_>, n: usize) -> (Ty<'_>, Option) { . let mut mutbl = None; . for _ in 0..n { . if let ty::Ref(_, dest_ty, m) = ty.kind() { . ty = *dest_ty; -- line 535 ---------------------------------------- -- line 547 ---------------------------------------- . /// For example, the function would return `true` for . /// - `u32` and `u32` . /// - `[u8; N]` and `[u8; M]`, if `N=M` . /// - `Option` and `Option`, if `same_type_modulo_regions(T, U)` holds . /// - `&'a str` and `&'b str` . /// . /// and `false` for: . /// - `Result` and `Result` 56 ( 0.00%) pub fn same_type_modulo_regions<'tcx>(a: Ty<'tcx>, b: Ty<'tcx>) -> bool { 32 ( 0.00%) match (a.kind(), b.kind()) { . (ty::Adt(did_a, args_a), ty::Adt(did_b, args_b)) => { . if did_a != did_b { . return false; . } . . iter::zip(*args_a, *args_b).all(|(arg_a, arg_b)| match (arg_a.kind(), arg_b.kind()) { . (GenericArgKind::Const(inner_a), GenericArgKind::Const(inner_b)) => inner_a == inner_b, . (GenericArgKind::Type(type_a), GenericArgKind::Type(type_b)) => { -- line 564 ---------------------------------------- -- line 567 ---------------------------------------- . _ => true, . }) . }, . (ty::Ref(_, a, mut_a), ty::Ref(_, b, mut_b)) => mut_a == mut_b && same_type_modulo_regions(*a, *b), . (ty::Tuple(as_), ty::Tuple(bs)) => over(as_, bs, |a, b| same_type_modulo_regions(*a, *b)), . (ty::Array(a, na), ty::Array(b, nb)) => na == nb && same_type_modulo_regions(*a, *b), . _ => a == b, . } 48 ( 0.00%) } . . /// Checks if a given type looks safe to be uninitialized. . pub fn is_uninit_value_valid_for_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . match cx.layout_of(ty) { . Ok(layout) => is_uninit_value_valid_for_layout(cx, layout), . // The type layout is either not concrete enough yet or too large, fall back to structural check instead . Err(LayoutError::TooGeneric(_) | LayoutError::SizeOverflow(_)) => is_uninit_value_valid_for_ty_fallback(cx, ty), . Err(_) => false, -- line 583 ---------------------------------------- -- line 713 ---------------------------------------- . Self::Closure(_, sig) => Some(sig.input(0).map_bound(|ty| ty.tuple_fields()[i])), . Self::Trait(inputs, _, _) => Some(inputs.map_bound(|ty| ty.tuple_fields()[i])), . } . } . . /// Gets the argument type at the given offset. For closures this will also get the type as . /// written. This will return `None` when the index is out of bounds only for variadic . /// functions, otherwise this will panic. 64 ( 0.00%) pub fn input_with_hir(self, i: usize) -> Option<(Option<&'tcx hir::Ty<'tcx>>, Binder<'tcx, Ty<'tcx>>)> { 40 ( 0.00%) match self { . Self::Sig(sig, _) => { . if sig.c_variadic() { . sig.inputs() . .map_bound(|inputs| inputs.get(i).copied()) . .transpose() . .map(|arg| (None, arg)) . } else { . Some((None, sig.input(i))) . } . }, . Self::Closure(decl, sig) => Some(( . decl.and_then(|decl| decl.inputs.get(i)), . sig.input(0).map_bound(|ty| ty.tuple_fields()[i]), . )), 64 ( 0.00%) Self::Trait(inputs, _, _) => Some((None, inputs.map_bound(|ty| ty.tuple_fields()[i]))), . } 64 ( 0.00%) } . . /// Gets the result type, if one could be found. Note that the result type of a trait may not be . /// specified. . pub fn output(self) -> Option>> { . match self { . Self::Sig(sig, _) | Self::Closure(_, sig) => Some(sig.output()), . Self::Trait(_, output, _) => output, . } . } . . pub fn predicates_id(&self) -> Option { 32 ( 0.00%) if let ExprFnSig::Sig(_, id) | ExprFnSig::Trait(_, _, id) = *self { . id . } else { . None . } . } . } . . /// If the expression is function like, get the signature for it. 64 ( 0.00%) pub fn expr_sig<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>) -> Option> { 24 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(_, CtorKind::Fn) | DefKind::AssocFn, id) = expr.res(cx) { . Some(ExprFnSig::Sig( . cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip(), . Some(id), . )) . } else { 48 ( 0.00%) ty_sig(cx, cx.typeck_results().expr_ty_adjusted(expr).peel_refs()) 5,224 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::ty_sig (8x) 552 ( 0.00%) => ???:::expr_ty_adjusted (8x) . } 64 ( 0.00%) } . . /// If the type is function like, get the signature for it. 88 ( 0.00%) pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option> { 32 ( 0.00%) if let Some(boxed_ty) = ty.boxed_ty() { 48 ( 0.00%) => ???:::boxed_ty (8x) . return ty_sig(cx, boxed_ty); . } 64 ( 0.00%) match *ty.kind() { . ty::Closure(id, subs) => { . let decl = id . .as_local() . .and_then(|id| cx.tcx.hir_fn_decl_by_hir_id(cx.tcx.local_def_id_to_hir_id(id))); . Some(ExprFnSig::Closure(decl, subs.as_closure().sig())) . }, . ty::FnDef(id, subs) => Some(ExprFnSig::Sig( . cx.tcx -- line 784 ---------------------------------------- -- line 823 ---------------------------------------- . }, . ty::Alias(_, alias) if let Some(proj) = alias.try_to_projection() => match cx . .tcx . .try_normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(ty)) . { . Ok(normalized_ty) if normalized_ty != ty => ty_sig(cx, normalized_ty), . _ => sig_for_projection(cx, proj).or_else(|| sig_from_bounds(cx, ty, cx.param_env.caller_bounds(), None)), . }, 24 ( 0.00%) ty::Param(_) => sig_from_bounds(cx, ty, cx.param_env.caller_bounds(), None), . _ => None, . } 80 ( 0.00%) } . 80 ( 0.00%) fn sig_from_bounds<'tcx>( . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . clauses: impl IntoIterator>, . predicates_id: Option, . ) -> Option> { . let mut inputs = None; . let mut output = None; 24 ( 0.00%) let lang_items = cx.tcx.lang_items(); 320 ( 0.00%) => ???:::lang_items (8x) . . for clause in clauses { 386 ( 0.00%) match clause.kind().skip_binder() { 1,036 ( 0.00%) => ???:::kind (74x) . ty::ClauseKind::Trait(p) . if (lang_items.fn_trait() == Some(p.def_id()) . || lang_items.fn_mut_trait() == Some(p.def_id()) 8 ( 0.00%) || lang_items.fn_once_trait() == Some(p.def_id())) 8 ( 0.00%) && p.self_ty() == ty => . { 24 ( 0.00%) let i = clause.kind().rebind(p.trait_ref.args.type_at(1)); 112 ( 0.00%) => ???:::kind (8x) . if inputs.is_some_and(|inputs| i != inputs) { . // Multiple different fn trait impls. Is this even allowed? . return None; . } . inputs = Some(i); . }, 80 ( 0.00%) ty::ClauseKind::Projection(p) . if Some(p.projection_term.expect_projection_def_id()) == lang_items.fn_once_output() . && p.projection_term.self_ty() == ty => . { 8 ( 0.00%) if output.is_some() { . // Multiple different fn trait impls. Is this even allowed? . return None; . } 48 ( 0.00%) output = Some(clause.kind().rebind(p.term.expect_type())); 112 ( 0.00%) => ???:::kind (8x) 40 ( 0.00%) => ???:::expect_type (8x) . }, . _ => (), . } . } . . inputs.map(|ty| ExprFnSig::Trait(ty, output, predicates_id)) 64 ( 0.00%) } . . fn sig_for_projection<'tcx>(cx: &LateContext<'tcx>, ty: ProjectionAliasTy<'tcx>) -> Option> { . let mut inputs = None; . let mut output = None; . let lang_items = cx.tcx.lang_items(); . . for (pred, _) in cx . .tcx -- line 884 ---------------------------------------- -- line 927 ---------------------------------------- . match self { . Self::Unsigned(x) => Self::Unsigned(x + u128::from(n)), . Self::Signed(x) => Self::Signed(x + i128::from(n)), . } . } . } . . /// Attempts to read the given constant as though it were an enum value. 17,688 ( 0.00%) pub fn read_explicit_enum_value(tcx: TyCtxt<'_>, id: DefId) -> Option { 8,844 ( 0.00%) if let Ok(ConstValue::Scalar(Scalar::Int(value))) = tcx.const_eval_poly(id) { 590,776 ( 0.01%) => ???:::const_eval_poly (1,474x) 5,726 ( 0.00%) match tcx.type_of(id).instantiate_identity().skip_norm_wip().kind() { 4,110 ( 0.00%) ty::Int(_) => Some(EnumValue::Signed(value.to_int(value.size()))), 4,564 ( 0.00%) ty::Uint(_) => Some(EnumValue::Unsigned(value.to_uint(value.size()))), . _ => None, . } . } else { . None . } 13,266 ( 0.00%) } . . /// Gets the value of the given variant. . pub fn get_discriminant_value(tcx: TyCtxt<'_>, adt: AdtDef<'_>, i: VariantIdx) -> EnumValue { . let variant = &adt.variant(i); . match variant.discr { . VariantDiscr::Explicit(id) => read_explicit_enum_value(tcx, id).unwrap(), . VariantDiscr::Relative(x) => match adt.variant((i.as_usize() - x as usize).into()).discr { . VariantDiscr::Explicit(id) => read_explicit_enum_value(tcx, id).unwrap() + x, -- line 953 ---------------------------------------- -- line 954 ---------------------------------------- . VariantDiscr::Relative(_) => EnumValue::Unsigned(x.into()), . }, . } . } . . /// Check if the given type is either `core::ffi::c_void`, `std::os::raw::c_void`, or one of the . /// platform specific `libc::::c_void` types in libc. . pub fn is_c_void(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { 24 ( 0.00%) if let ty::Adt(adt, _) = ty.kind() . && let &[krate, .., name] = &*cx.get_def_path(adt.did()) . && let sym::libc | sym::core | sym::std = krate . && name == sym::c_void . { . true . } else { . false . } 12 ( 0.00%) } . . pub fn for_each_top_level_late_bound_region<'cx, B>( . ty: Ty<'cx>, . f: impl FnMut(BoundRegion<'cx>) -> ControlFlow, . ) -> ControlFlow { . struct V { . index: u32, . f: F, -- line 979 ---------------------------------------- -- line 1004 ---------------------------------------- . pub size: u64, . . /// (ind, size) . pub fields_size: Vec<(usize, u64)>, . } . . impl AdtVariantInfo { . /// Returns ADT variants ordered by size 1,395 ( 0.00%) pub fn new<'tcx>(cx: &LateContext<'tcx>, adt: AdtDef<'tcx>, subst: GenericArgsRef<'tcx>) -> Vec { . let mut variants_size = adt . .variants() . .iter() . .enumerate() . .map(|(i, variant)| { . let mut fields_size = variant . .fields . .iter() -- line 1020 ---------------------------------------- -- line 1021 ---------------------------------------- . .enumerate() . .map(|(i, f)| (i, approx_ty_size(cx, f.ty(cx.tcx, subst).skip_norm_wip()))) . .collect::>(); . fields_size.sort_by_key(|(_, a_size)| *a_size); . . Self { . ind: i, . size: fields_size.iter().map(|(_, size)| size).sum(), 5,544 ( 0.00%) fields_size, . } . }) . .collect::>(); . variants_size.sort_by_key(|b| std::cmp::Reverse(b.size)); 1,860 ( 0.00%) variants_size 1,860 ( 0.00%) } . } . . /// Gets the struct or enum variant from the given `Res` . pub fn adt_and_variant_of_res<'tcx>(cx: &LateContext<'tcx>, res: Res) -> Option<(AdtDef<'tcx>, &'tcx VariantDef)> { . match res { . Res::Def(DefKind::Struct, id) => { . let adt = cx.tcx.adt_def(id); . Some((adt, adt.non_enum_variant())) -- line 1043 ---------------------------------------- -- line 1267 ---------------------------------------- . #[derive(Default, Debug)] . pub struct InteriorMut<'tcx> { . ignored_def_ids: FxHashSet, . ignore_pointers: bool, . tys: FxHashMap, Option<&'tcx ty::List>>>, . } . . impl<'tcx> InteriorMut<'tcx> { 4 ( 0.00%) pub fn new(tcx: TyCtxt<'tcx>, ignore_interior_mutability: &[String]) -> Self { . let ignored_def_ids = ignore_interior_mutability . .iter() 8 ( 0.00%) .flat_map(|ignored_ty| lookup_path_str(tcx, PathNS::Type, ignored_ty)) 16,318 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/paths.rs:clippy_utils::paths::lookup_path_str (2x) . .collect(); . 5 ( 0.00%) Self { . ignored_def_ids, . ..Self::default() . } 4 ( 0.00%) } . 4 ( 0.00%) pub fn without_pointers(tcx: TyCtxt<'tcx>, ignore_interior_mutability: &[String]) -> Self { 7 ( 0.00%) Self { . ignore_pointers: true, . ..Self::new(tcx, ignore_interior_mutability) . } 4 ( 0.00%) } . . /// Check if given type has interior mutability such as [`std::cell::Cell`] or . /// [`std::cell::RefCell`] etc. and if it does, returns a chain of types that causes . /// this type to be interior mutable. False negatives may be expected for infinitely recursive . /// types, and `None` will be returned there. . pub fn interior_mut_ty_chain(&mut self, cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<&'tcx ty::List>> { . self.interior_mut_ty_chain_inner(cx, ty, 0) . } -- line 1300 ---------------------------------------- -- line 1434 ---------------------------------------- . /// Checks if the type is `core::mem::ManuallyDrop<_>` . pub fn is_manually_drop(ty: Ty<'_>) -> bool { . ty.ty_adt_def().is_some_and(AdtDef::is_manually_drop) . } . . /// Returns the deref chain of a type, starting with the type itself. . pub fn deref_chain<'cx, 'tcx>(cx: &'cx LateContext<'tcx>, ty: Ty<'tcx>) -> impl Iterator> + 'cx { . iter::successors(Some(ty), |&ty| { 92 ( 0.00%) if let Some(deref_did) = cx.tcx.lang_items().deref_trait() 920 ( 0.00%) => ???:::lang_items (23x) 253 ( 0.00%) && implements_trait(cx, ty, deref_did, &[]) 78,095 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (23x) . { . make_normalized_projection(cx.tcx, cx.typing_env(), deref_did, sym::Target, [ty]) . } else { . None . } . }) . } . -- line 1451 ---------------------------------------- -- line 1473 ---------------------------------------- . .iter() . .find(|f| f.name == name) . .map(|f| f.ty(tcx, args).skip_norm_wip()), . ty::Tuple(args) => name.as_str().parse::().ok().and_then(|i| args.get(i).copied()), . _ => None, . } . } . 3,232 ( 0.00%) pub fn get_field_def_id_by_name(ty: Ty<'_>, name: Symbol) -> Option { 6,464 ( 0.00%) let ty::Adt(adt_def, ..) = ty.kind() else { return None }; 3,232 ( 0.00%) adt_def . .all_fields() . .find_map(|field| if field.name == name { Some(field.did) } else { None }) 3,232 ( 0.00%) } . . /// Check if `ty` is an `Option` and return its argument type if it is. . pub fn option_arg_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option> { 992 ( 0.00%) match *ty.kind() { . ty::Adt(adt, args) 1,488 ( 0.00%) if let [arg] = &**args 70 ( 0.00%) && let Some(arg) = arg.as_type() 210 ( 0.00%) && adt.is_diag_item(cx, sym::Option) => . { . Some(arg) . }, . _ => None, . } 496 ( 0.00%) } . . /// Check if `ty` is an `Option` or a `Result` and return its argument type (`T`) if it is. . pub fn option_or_result_arg_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option> { . match ty.kind() { . ty::Adt(adt, args) if matches!(adt.opt_diag_name(cx), Some(sym::Option | sym::Result)) => Some(args.type_at(0)), . _ => None, . } . } -- line 1508 ---------------------------------------- 65,290 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let (lint, msg) = match complete_infinite_iter(cx, expr) { . Infinite => (INFINITE_ITER, "infinite iteration detected"), . MaybeInfinite => (MAYBE_INFINITE_ITER, "possible infinite iteration detected"), . Finite => { . return; . }, . }; . span_lint(cx, lint, expr.span, msg); 392,580 ( 0.00%) } . } . . #[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 { 6,782 ( 0.00%) match (self, b) { . (Finite, _) | (_, Finite) => Finite, . (MaybeInfinite, _) | (_, MaybeInfinite) => MaybeInfinite, . _ => Infinite, . } . } . . #[must_use] . fn or(self, b: Self) -> Self { -- line 88 ---------------------------------------- -- 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), . ]; . 67,820 ( 0.00%) fn is_infinite(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness { 54,256 ( 0.00%) match expr.kind { . ExprKind::MethodCall(method, receiver, args, _) => { . for &(name, len, heuristic, cap) in &HEURISTICS { . 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])), -- line 155 ---------------------------------------- -- line 176 ---------------------------------------- . .into() . } else { . Finite . } . }, . ExprKind::Struct(..) => higher::Range::hir(cx, expr).is_some_and(|r| r.end.is_none()).into(), . _ => Finite, . } 47,474 ( 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 { 314,104 ( 0.00%) match expr.kind { 4,998 ( 0.00%) ExprKind::MethodCall(method, receiver, args, _) => { 1,666 ( 0.00%) let method_str = method.ident.name; . for &(name, len) in &COMPLETING_METHODS { 36,652 ( 0.00%) if method_str == name && args.len() == len { . return is_infinite(cx, receiver); . } . } . for &(name, len) in &POSSIBLY_COMPLETING_METHODS { 14,808 ( 0.00%) if method_str == name && args.len() == len { . return MaybeInfinite.and(is_infinite(cx, receiver)); . } . } 3,332 ( 0.00%) if method.ident.name == sym::last && args.is_empty() { . let not_double_ended = cx . .tcx . .get_diagnostic_item(sym::DoubleEndedIterator) . .is_some_and(|id| !implements_trait(cx, cx.typeck_results().expr_ty(receiver), id, &[])); . if not_double_ended { . return is_infinite(cx, receiver); . } 1,666 ( 0.00%) } else if method.ident.name == sym::collect { . let ty = cx.typeck_results().expr_ty(expr); . if matches!( . ty.opt_diag_name(cx), . Some( . sym::BinaryHeap . | sym::BTreeMap . | sym::BTreeSet . | sym::HashMap -- line 244 ---------------------------------------- -- line 247 ---------------------------------------- . | sym::Vec . | sym::VecDeque, . ) . ) { . return is_infinite(cx, receiver); . } . } . }, 6,782 ( 0.00%) ExprKind::Binary(op, l, r) if op.node.is_comparison() => { 20,346 ( 0.00%) return is_infinite(cx, l).and(is_infinite(cx, r)).and(MaybeInfinite); 169,550 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite (6,782x) . }, // TODO: ExprKind::Loop + Match . _ => (), . } . Finite . } 14,994 ( 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); 12,216 ( 0.00%) let mut preds = [Vec::new(), Vec::new(), Vec::new()]; . for (clause, _) in generics.clauses { . if let ClauseKind::Trait(poly_trait_pred) = clause.kind().skip_binder() { . let trait_pred = cx . .tcx . .instantiate_bound_regions_with_erased(clause.kind().rebind(poly_trait_pred)); . for (i, tid) in trait_ids.iter().enumerate() { . if let Some(tid) = tid . && *tid == trait_pred.trait_ref.def_id . { . preds[i].push(trait_pred); . } . } . } . } 21,378 ( 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, _)| { -- line 68 ---------------------------------------- -- line 80 ---------------------------------------- . 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(); 7,635 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 77,877 ( 0.00%) => ???:::type_dependent_def_id (1,527x) . let fn_sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . let generics = cx.tcx.clauses_of(def_id); 19,851 ( 0.00%) let [fn_mut_preds, ord_preds, partial_ord_preds] = 1,527 ( 0.00%) get_trait_predicates_for_trait_ids(cx, generics, &[Some(fn_mut_trait), ord_trait, partial_ord_trait]); 1,527 ( 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<'_>]` . let inputs_output = cx.tcx.instantiate_bound_regions_with_erased(fn_sig.inputs_and_output()); . inputs_output -- line 101 ---------------------------------------- -- line 153 ---------------------------------------- . Some((fn_decl_span, None)) . } . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for UnitReturnExpectingOrd { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 132,526 ( 0.00%) if let ExprKind::MethodCall(_, receiver, args, _) = expr.kind 3,208 ( 0.00%) && args.iter().any(|arg| { . matches!( . arg.peel_blocks().peel_borrows().peel_drop_temps().kind, . ExprKind::Path(_) | ExprKind::Closure(_) . ) . }) 7,635 ( 0.00%) && let Some(fn_mut_trait) = cx.tcx.lang_items().fn_mut_trait() 61,080 ( 0.00%) => ???:::lang_items (1,527x) . { 6,108 ( 0.00%) let ord_trait = cx.tcx.get_diagnostic_item(sym::Ord); 161,862 ( 0.00%) => ???:::get_diagnostic_item (1,527x) 3,054 ( 0.00%) let partial_ord_trait = cx.tcx.lang_items().partial_ord_trait(); 61,080 ( 0.00%) => ???:::lang_items (1,527x) . if (ord_trait, partial_ord_trait) == (None, None) { . return; . } . . let args = std::iter::once(receiver).chain(args.iter()).collect::>(); 3,054 ( 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"); . } . }, . ); . } . } . } 523,440 ( 0.01%) } . } 18,540 ( 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 { 409,568 ( 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 { 357,197 ( 0.00%) self.provider.get_lint_level_spec(lint, self.sess) 167 ( 0.00%) => ???:::get_lint_level_spec (1x) . } . . /// Used to emit a lint-related diagnostic based on the current state of . /// this lint context. . #[track_caller] . pub(crate) fn opt_span_lint( . &self, . lint: &'static Lint, . span: Option, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { . let level_spec = self.lint_level_spec(lint); 4,085 ( 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 ---------------------------------------- 92,364 ( 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; . 588,870 ( 0.01%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { 399 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 399 ( 0.00%) && let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) 4,959 ( 0.00%) => ???:::get_diagnostic_name (57x) . { . let result = match diag_name { 342 ( 0.00%) sym::assert_eq_macro | sym::debug_assert_eq_macro => "succeed", . sym::assert_ne_macro | sym::debug_assert_ne_macro => "fail", . _ => return, . }; . let Some((lhs, rhs, _)) = find_assert_eq_args(cx, expr, macro_call.expn) else { . return; . }; . if is_unit_expr(lhs) || is_unit_expr(rhs) { . return; -- line 23 ---------------------------------------- -- line 33 ---------------------------------------- . "`{}` of unit values detected. This will always {result}", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } . return; . } . 107,652 ( 0.00%) if let ExprKind::Binary(ref cmp, left, _) = expr.kind { 6,009 ( 0.00%) let op = cmp.node; 2,926 ( 0.00%) if op.is_comparison() && cx.typeck_results().expr_ty(left).is_unit() { 117,040 ( 0.00%) => ???:::expr_ty (2,926x) . 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() . ), . ); . } . } 523,440 ( 0.01%) } 3,097 ( 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) { 14,032 ( 0.00%) if self.automatically_derived_at.is_none() . && item . .attrs() . .iter() . .any(|attr| attr.has_name(sym::automatically_derived)) . { 6,638 ( 0.00%) 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); . } . 74,760 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 21,360 ( 0.00%) let FnKind::Fn(ctxt, _vis, f) = kind else { . return; . }; . . // Skip foreign functions (extern "C" etc.) 42,608 ( 0.00%) if !matches!(ctxt, FnCtxt::Free | FnCtxt::Assoc(..)) { . return; . } . . // Skip automatically derived functions . if self.automatically_derived_at.is_some() { . return; . } . 35,860 ( 0.00%) if f.sig.span.in_external_macro(cx.sess().source_map()) { . return; . } . . lint_fn(cx, f); 85,440 ( 0.00%) } . } . . fn lint_fn(cx: &EarlyContext<'_>, f: &Fn) { . let generics = &f.generics; . let offenders: Vec<&GenericParam> = generics . .params . .iter() . .filter(|param| { 3 ( 0.00%) !param.bounds.is_empty() && matches!(param.kind, GenericParamKind::Lifetime | GenericParamKind::Type { .. }) . }) . .collect(); 8,965 ( 0.00%) if offenders.is_empty() { . return; . } . . let predicates = offenders . .iter() . .map(|param| build_predicate_text(cx, param)) . .collect::>(); . -- line 105 ---------------------------------------- 8,965 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/double_parens.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . pub DOUBLE_PARENS, . complexity, . "Warn on unnecessary double parentheses" . } . . declare_lint_pass!(DoubleParens => [DOUBLE_PARENS]); . . impl EarlyLintPass for DoubleParens { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 498,285 ( 0.01%) match &expr.kind { . // ((..)) . // ^^^^^^ expr . // ^^^^ inner . ExprKind::Paren(inner) 18,966 ( 0.00%) if matches!(inner.kind, ExprKind::Paren(_) | ExprKind::Tup(_)) . && expr.span.eq_ctxt(inner.span) . && !expr.span.in_external_macro(cx.sess().source_map()) . && check_source(cx, inner) => . { . // suggest removing the outer parens . . let mut applicability = Applicability::MachineApplicable; . // We don't need to use `snippet_with_context` here, because: -- line 58 ---------------------------------------- -- line 69 ---------------------------------------- . applicability, . ); . }, . . // func((n)) . // ^^^^^^^^^ expr . // ^^^ arg . // ^ inner 1,666 ( 0.00%) ExprKind::Call(_, args) | ExprKind::MethodCall(MethodCall { args, .. }) 14,418 ( 0.00%) if let [arg] = &**args 19,767 ( 0.00%) && let ExprKind::Paren(inner) = &arg.kind . && expr.span.eq_ctxt(arg.span) . && !arg.span.in_external_macro(cx.sess().source_map()) . && check_source(cx, arg) => . { . // suggest removing the inner parens . . let mut applicability = Applicability::MachineApplicable; . let sugg = snippet_with_context(cx.sess(), inner.span, arg.span.ctxt(), "_", &mut applicability).0; -- line 87 ---------------------------------------- -- line 92 ---------------------------------------- . "unnecessary parentheses", . "remove them", . sugg.to_string(), . applicability, . ); . }, . _ => {}, . } 598,616 ( 0.01%) } . } . . /// Check that the span does indeed look like `( (..) )` . fn check_source(cx: &EarlyContext<'_>, inner: &Expr) -> bool { . if let Some(sfr) = inner.span.get_source_range(cx) . // this is the same as `SourceFileRange::as_str`, but doesn't apply the range right away, because . // we're interested in the source code outside it . && let Some(src) = sfr.sf.src.as_ref().map(|src| src.as_str()) -- line 108 ---------------------------------------- 6,589 ( 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<'_>) { 10 ( 0.00%) if let TraitItemKind::Fn(sig, trait_method) = &item.kind { . if matches!(trait_method, TraitFn::Provided(_)) { . // Handled by `check_body`. . return; . } . 4 ( 0.00%) mut_from_ref::check(cx, sig, None); 165 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (1x) 4 ( 0.00%) ptr_arg::check_trait_item(cx, item.owner_id, sig); 109 ( 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 (1x) . } . } . 127,539 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 42,513 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(body.value.hir_id); 42,286 ( 0.00%) let (item_id, sig, is_trait_item) = match parents.next() { . Some((_, Node::Item(i))) => { 6 ( 0.00%) if let ItemKind::Fn { sig, .. } = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::ImplItem(i))) => { 21,370 ( 0.00%) if !matches!(parents.next(), 32,055 ( 0.00%) Some((_, Node::Item(i))) if matches!(&i.kind, ItemKind::Impl(i) if i.of_trait.is_none()) . ) { . return; . } 13,748 ( 0.00%) if let ImplItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::TraitItem(i))) => { . if let TraitItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, true) . } else { . return; . } . }, . _ => return, . }; . 27,252 ( 0.00%) mut_from_ref::check(cx, sig, Some(body)); 8,491,170 ( 0.11%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (6,813x) 40,878 ( 0.00%) ptr_arg::check_body(cx, body, item_id, sig, is_trait_item); 2,902,368 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_body (6,813x) 120,181 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 26,092 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 16,437 ( 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" . )] 30,519 ( 0.00%) if !cmp_null::check(cx, expr, op.node, l, r) { 5,298,643 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/cmp_null.rs:clippy_lints::ptr::cmp_null::check (3,391x) 20,346 ( 0.00%) ptr_eq::check(cx, op.node, l, r, expr.span); 726,499 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_eq.rs:clippy_lints::ptr::ptr_eq::check (3,391x) . } . } . } . } 55,435 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_option_as_slice.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . . impl ManualOptionAsSlice { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualOptionAsSlice { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 327,150 ( 0.00%) let span = expr.span; . if span.from_expansion() { . return; . } 370,239 ( 0.00%) match expr.kind { 1,396 ( 0.00%) ExprKind::Match(scrutinee, [arm1, arm2], _) 4,040 ( 0.00%) if is_none_pattern(cx, arm2.pat) && check_arms(cx, arm2, arm1) 5,675 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (404x) 1,616 ( 0.00%) || is_none_pattern(cx, arm1.pat) && check_arms(cx, arm1, arm2) => 6,060 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (404x) . { . check_as_ref(cx, scrutinee, span, self.msrv); . }, 1 ( 0.00%) ExprKind::If(cond, then, Some(other)) => { 2 ( 0.00%) if let ExprKind::Let(let_expr) = cond.kind . && let Some(binding) = extract_ident_from_some_pat(cx, let_expr.pat) . && check_some_body(cx, binding, then) . && is_empty_slice(cx, other.peel_blocks()) . { . check_as_ref(cx, let_expr.init, span, self.msrv); . } . }, 8,180 ( 0.00%) ExprKind::MethodCall(seg, callee, [], _) if seg.ident.name == sym::unwrap_or_default => { . check_map(cx, callee, span, self.msrv); . }, 6,348 ( 0.00%) ExprKind::MethodCall(seg, callee, [or], _) => match seg.ident.name { 6,348 ( 0.00%) sym::unwrap_or if is_empty_slice(cx, or) => { . check_map(cx, callee, span, self.msrv); . }, . sym::unwrap_or_else if returns_empty_slice(cx, or) => { . check_map(cx, callee, span, self.msrv); . }, . _ => {}, . }, . ExprKind::MethodCall(seg, callee, [or_else, map], _) => match seg.ident.name { -- line 89 ---------------------------------------- -- line 92 ---------------------------------------- . }, . sym::map_or_else if returns_empty_slice(cx, or_else) && is_slice_from_ref(cx, map) => { . check_as_ref(cx, callee, span, self.msrv); . }, . _ => {}, . }, . _ => {}, . } 523,440 ( 0.01%) } . } . . fn check_map(cx: &LateContext<'_>, map: &Expr<'_>, span: Span, msrv: Msrv) { . if let ExprKind::MethodCall(seg, callee, [mapping], _) = map.kind . && seg.ident.name == sym::map . && is_slice_from_ref(cx, mapping) . { . check_as_ref(cx, callee, span, msrv); -- line 108 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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; . 108,731 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 108,731 ( 0.00%) if let PatKind::Ident(ann, ident, Some(ref right)) = pat.kind . && let PatKind::Wild = right.kind . && !pat.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( . cx, . REDUNDANT_PATTERN, . pat.span, . format!( -- line 17 ---------------------------------------- -- line 18 ---------------------------------------- . "the `{} @ _` pattern can be written as just `{}`", . ident.name, ident.name, . ), . "try", . format!("{}{}", ann.prefix_str(), ident.name), . Applicability::MachineApplicable, . ); . } 124,264 ( 0.00%) } -------------------------------------------------------------------------------- -- 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, . ) { 31,869 ( 0.00%) if let FnRetTy::Return(hir_ty) = decl.output . && is_unit_ty(hir_ty) . && !hir_ty.span.from_expansion() . && get_def(span) == get_def(hir_ty.span) . { . // The explicit `-> ()` in the closure signature might be necessary for multiple reasons: . // - Implicit types in closure signatures are forbidden when `for<...>` is present . // - If the closure body ends with a function call, and that function's return type is generic, the . // `-> ()` could be required for it to be inferred -- line 62 ---------------------------------------- -- line 75 ---------------------------------------- . && let Some(expr) = block.expr . && is_never_expr(cx, expr).is_some() . { . return; . } . . lint_unneeded_unit_return(cx, hir_ty.span, span); . } 10,625 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 327,150 ( 0.00%) if let ExprKind::Ret(Some(expr)) | ExprKind::Break(_, Some(expr)) = expr.kind . && is_unit_expr(expr) . && !expr.span.from_expansion() . { . span_lint_and_sugg( . cx, . UNUSED_UNIT, . expr.span, . "unneeded `()`", . "remove the `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 65,430 ( 0.00%) } . 768 ( 0.00%) fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { 510 ( 0.00%) if let [segment] = &poly.trait_ref.path.segments 504 ( 0.00%) && matches!(segment.ident.name, sym::Fn | sym::FnMut | sym::FnOnce) 9 ( 0.00%) && let Some(args) = segment.args 3 ( 0.00%) && args.parenthesized == GenericArgsParentheses::ParenSugar 9 ( 0.00%) && let [constraint] = &args.constraints 3 ( 0.00%) && constraint.ident.name == sym::Output 15 ( 0.00%) && let AssocItemConstraintKind::Equality { term: Term::Ty(hir_ty) } = constraint.kind 9 ( 0.00%) && args.span_ext.hi() != poly.span.hi() 6 ( 0.00%) && !hir_ty.span.from_expansion() 9 ( 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); . } 896 ( 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. 42,828 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . if let Some(stmt) = block.stmts.last() 21,412 ( 0.00%) && let StmtKind::Expr(expr) = &stmt.kind 32,109 ( 0.00%) && let rustc_ast::ExprKind::Tup(inner) = &expr.kind . && inner.is_empty() . && let ctxt = block.span.ctxt() . && stmt.span.ctxt() == ctxt . && expr.span.ctxt() == ctxt . && expr.attrs.is_empty() . { . let sp = expr.span; . span_lint_and_sugg( -- line 134 ---------------------------------------- -- line 136 ---------------------------------------- . UNUSED_UNIT, . sp, . "unneeded unit expression", . "remove the final `()`", . String::new(), . Applicability::MachineApplicable, . ); . } 53,535 ( 0.00%) } . } . . fn is_unit_ty(ty: &Ty<'_>) -> bool { 21,244 ( 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 ---------------------------------------- 170,087 ( 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%) } . 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 528,425 ( 0.01%) if let ExprKind::Call(fun, [arg]) = expr.kind 4,985 ( 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), . } 130,860 ( 0.00%) } else if let ExprKind::Loop(block, _, _, span) = expr.kind { . self.loop_stack.push((block.hir_id.owner, span)); . } 523,440 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 458,010 ( 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 ---------------------------------------- 4,986 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unwrap.rs -------------------------------------------------------------------------------- Ir -- line 244 ---------------------------------------- . (sym::Option, sym::is_some) => Some((UnwrappableKind::Option, true)), . (sym::Option, sym::is_none) => Some((UnwrappableKind::Option, false)), . (sym::Result, sym::is_ok) => Some((UnwrappableKind::Result, true)), . (sym::Result, sym::is_err) => Some((UnwrappableKind::Result, false)), . _ => None, . } . } . 28 ( 0.00%) fn inner<'tcx>( . cx: &LateContext<'tcx>, . if_expr: &'tcx Expr<'_>, . expr: &'tcx Expr<'_>, . branch: &'tcx Expr<'_>, . invert: bool, . is_entire_condition: bool, . out: &mut Vec>, . ) { 20 ( 0.00%) match expr.kind { . ExprKind::Binary(op, left, right) . if matches!( . (invert, op.node), . (false, BinOpKind::And | BinOpKind::BitAnd) | (true, BinOpKind::Or | BinOpKind::BitOr) . ) => . { . inner(cx, if_expr, left, branch, invert, false, out); . inner(cx, if_expr, right, branch, invert, false, out); -- line 269 ---------------------------------------- -- line 285 ---------------------------------------- . branch, . safe_to_unwrap, . kind, . is_entire_condition, . }); . }, . _ => {}, . } 16 ( 0.00%) } . . let mut out = vec![]; 8 ( 0.00%) inner(cx, if_expr, expr, branch, invert, is_entire_condition, &mut out); 64 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::collect_unwrap_info::inner (2x) 6 ( 0.00%) out . } . . /// Extracts either a local used by itself ([`Local::Pure`]), or (one or more levels of) field . /// access to a local ([`Local::WithFieldAccess`]) 13,088 ( 0.00%) fn extract_local(cx: &LateContext<'_>, mut expr: &Expr<'_>) -> Option { 1,636 ( 0.00%) let span = expr.span; . let mut field_indices = vec![]; 9,460 ( 0.00%) while let ExprKind::Field(recv, _) = expr.kind 1,792 ( 0.00%) && let Some(field_idx) = cx.typeck_results().opt_field_index(expr.hir_id) 9,984 ( 0.00%) => ???:::opt_field_index (256x) . { . field_indices.push(field_idx); . expr = recv; . } . let local_id = expr.res_local_id()?; 1,580 ( 0.00%) if field_indices.is_empty() { 3,972 ( 0.00%) Some(Local::Pure { local_id }) . } else { 1,024 ( 0.00%) Some(Local::WithFieldAccess { . local_id, 1,024 ( 0.00%) field_indices, . span, . }) . } 13,344 ( 0.00%) } . . /// A HIR visitor delegate that checks if a local variable of type `Option` or `Result` is mutated, . /// *except* for if `.as_mut()` is called. . /// The reason for why we allow that one specifically is that `.as_mut()` cannot change . /// the variant, and that is important because this lint relies on the fact that . /// `is_some` + `unwrap` is equivalent to `if let Some(..) = ..`, which it would not be if . /// the option is changed to None between `is_some` and `unwrap`, ditto for `Result`. . /// (And also `.as_mut()` is a somewhat common method that is still worth linting on.) -- line 329 ---------------------------------------- -- line 369 ---------------------------------------- . fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} . . fn use_cloned(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} . . fn fake_read(&mut self, _: &PlaceWithHirId<'tcx>, _: FakeReadCause, _: HirId) {} . } . . impl<'tcx> UnwrappableVariablesVisitor<'_, 'tcx> { 18 ( 0.00%) fn visit_branch( . &mut self, . if_expr: &'tcx Expr<'_>, . cond: &'tcx Expr<'_>, . branch: &'tcx Expr<'_>, . else_branch: bool, . ) { . let prev_len = self.unwrappables.len(); 14 ( 0.00%) for unwrap_info in collect_unwrap_info(self.cx, if_expr, cond, branch, else_branch, true) { . let mut delegate = MutationVisitor { . is_mutated: false, . local: &unwrap_info.local, . tcx: self.cx.tcx, . }; . . let vis = ExprUseVisitor::for_clippy(self.cx, cond.hir_id.owner.def_id, &mut delegate); . vis.walk_expr(cond).into_ok(); -- line 393 ---------------------------------------- -- line 395 ---------------------------------------- . . if delegate.is_mutated { . // if the variable is mutated, we don't know whether it can be unwrapped. . // it might have been changed to `None` in between `is_some` + `unwrap`. . continue; . } . self.unwrappables.push(unwrap_info); . } 6 ( 0.00%) walk_expr(self, branch); 564 ( 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 (2x) . self.unwrappables.truncate(prev_len); 16 ( 0.00%) } . } . . enum AsRefKind { . AsRef, . AsMut, . } . . /// Checks if the expression is a method call to `as_{ref,mut}` and returns the receiver of it. . /// If it isn't, the expression itself is returned. . fn consume_option_as_ref<'tcx>(expr: &'tcx Expr<'tcx>) -> (&'tcx Expr<'tcx>, Option) { 3,354 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = expr.kind { . match path.ident.name { . sym::as_ref => (recv, Some(AsRefKind::AsRef)), . sym::as_mut => (recv, Some(AsRefKind::AsMut)), . _ => (expr, None), . } . } else { . (expr, None) . } . } . . impl<'tcx> Visitor<'tcx> for UnwrappableVariablesVisitor<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . 466,884 ( 0.01%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { . // Skip checking inside closures since they are visited through `Unwrap::check_fn()` already. 356,586 ( 0.00%) if matches!(expr.kind, ExprKind::Closure(_)) { . return; . } . if let Some(higher::If { cond, then, r#else }) = higher::If::hir(expr) { 3 ( 0.00%) walk_expr(self, cond); 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/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 (1x) 6 ( 0.00%) self.visit_branch(expr, cond, then, false); 216 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch (1x) 2 ( 0.00%) if let Some(else_inner) = r#else { 13 ( 0.00%) self.visit_branch(expr, cond, else_inner, true); 528 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch (1x) . } . } else { . // find `unwrap[_err]()` or `expect("...")` calls: 1,636 ( 0.00%) if let ExprKind::MethodCall(method_name, self_arg, ..) = expr.kind 1,636 ( 0.00%) && let (self_arg, as_ref_kind) = consume_option_as_ref(self_arg) 17,772 ( 0.00%) && let Some(local) = extract_local(self.cx, self_arg) 105,207 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::extract_local (1,636x) 11,060 ( 0.00%) && matches!(method_name.ident.name, sym::unwrap | sym::expect | sym::unwrap_err) . && let call_to_unwrap = matches!(method_name.ident.name, sym::unwrap | sym::expect) . && let Some(unwrappable) = self.unwrappables.iter().find(|u| u.local == local) . // Span contexts should not differ with the conditional branch . && let span_ctxt = expr.span.ctxt() . && unwrappable.branch.span.ctxt() == span_ctxt . && unwrappable.check.span.ctxt() == span_ctxt . && !expr.span.in_external_macro(self.cx.tcx.sess.source_map()) . { -- line 454 ---------------------------------------- -- line 505 ---------------------------------------- . expr.span, . format!("this call to `{}()` will always panic", method_name.ident.name), . |diag| { . diag.span_label(unwrappable.check.span, "because of this check"); . }, . ); . } . } 155,622 ( 0.00%) walk_expr(self, expr); 3,823,356 ( 0.05%) => /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:: (10,588x) . } 415,000 ( 0.01%) } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 10,588 ( 0.00%) self.cx.tcx . } . } . . impl<'tcx> LateLintPass<'tcx> for Unwrap { 74,375 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . kind: FnKind<'tcx>, . decl: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . span: Span, . fn_id: LocalDefId, . ) { . if span.from_expansion() { . return; . } . 44,695 ( 0.00%) let mut v = UnwrappableVariablesVisitor { . unwrappables: Vec::new(), . cx, 8,939 ( 0.00%) msrv: self.msrv, . }; . 35,756 ( 0.00%) walk_fn(&mut v, kind, decl, body.id(), fn_id); 6,859,935 ( 0.09%) => /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:: (8,939x) 53,125 ( 0.00%) } . } 7,368 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{Impl, ImplItem, ImplItemKind, ItemKind, Node, TraitRef}; . use rustc_lint::LateContext; . use rustc_span::Span; . use rustc_span::symbol::{Ident, kw}; . use std::iter; . . use super::RENAMED_FUNCTION_PARAMS; . 83,951 ( 0.00%) pub(super) fn check_impl_item(cx: &LateContext<'_>, item: &ImplItem<'_>, ignored_traits: &DefIdSet) { 23,986 ( 0.00%) if !item.span.from_expansion() 38,458 ( 0.00%) && let ImplItemKind::Fn(_, body_id) = item.kind 44,690 ( 0.00%) && let parent_node = cx.tcx.parent_hir_node(item.hir_id()) 1,209,134 ( 0.02%) => ???:::parent_hir_node (8,938x) 26,814 ( 0.00%) && let Node::Item(parent_item) = parent_node 26,814 ( 0.00%) && let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. 8,938 ( 0.00%) }) = &parent_item.kind . && let Some(did) = cx.tcx.trait_item_of(item.owner_id) 6,453 ( 0.00%) && !is_from_ignored_trait(&of_trait.trait_ref, ignored_traits) . { 6,606 ( 0.00%) let mut param_idents_iter = cx.tcx.hir_body_param_idents(body_id); 79,302 ( 0.00%) => ???:::hir_body_param_idents (1,101x) . let mut default_param_idents_iter = cx.tcx.fn_arg_idents(did).iter().copied(); . 1,101 ( 0.00%) let renames = RenamedFnArgs::new(&mut default_param_idents_iter, &mut param_idents_iter); 156,454 ( 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}>> (1,101x) 1,101 ( 0.00%) if !renames.0.is_empty() { . let multi_span = renames.multi_span(); . let plural = if renames.0.len() == 1 { "" } else { "s" }; . span_lint_and_then( . cx, . RENAMED_FUNCTION_PARAMS, . multi_span, . format!("renamed function parameter{plural} of trait impl"), . |diag| { -- line 36 ---------------------------------------- -- line 37 ---------------------------------------- . diag.multipart_suggestion( . format!("consider using the default name{plural}"), . renames.0, . Applicability::Unspecified, . ); . }, . ); . } 1,101 ( 0.00%) } 20,919 ( 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,101x) 95,944 ( 0.00%) } . . struct RenamedFnArgs(Vec<(Span, String)>); . . impl RenamedFnArgs { . /// Comparing between an iterator of default names and one with current names, . /// then collect the ones that got renamed. 9,909 ( 0.00%) fn new(default_idents: &mut I1, current_idents: &mut I2) -> Self . where . I1: Iterator>, . I2: Iterator>, . { . let mut renamed: Vec<(Span, String)> = vec![]; . . debug_assert_eq!(default_idents.size_hint(), current_idents.size_hint()); . for (default_ident, current_ident) in iter::zip(default_idents, current_idents) { . let has_name_to_check = |ident: Option| { . ident . .filter(|ident| ident.name != kw::Underscore) . .filter(|ident| !ident.name.as_str().starts_with('_')) . }; . 1,748 ( 0.00%) if let Some(default_ident) = has_name_to_check(default_ident) . && let Some(current_ident) = has_name_to_check(current_ident) 874 ( 0.00%) && default_ident.name != current_ident.name . { . renamed.push((current_ident.span, default_ident.to_string())); . } . } . 7,707 ( 0.00%) Self(renamed) 8,808 ( 0.00%) } . . fn multi_span(&self) -> MultiSpan { . self.0 . .iter() . .map(|(span, _)| span) . .copied() . .collect::>() . .into() . } . } . . fn is_from_ignored_trait(of_trait: &TraitRef<'_>, ignored_traits: &DefIdSet) -> bool { . of_trait 2,151 ( 0.00%) .trait_def_id() 27,963 ( 0.00%) => ???:::trait_def_id (2,151x) . .is_some_and(|trait_did| ignored_traits.contains(&trait_did)) . } 24,431 ( 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 30 ( 0.00%) fn visit_type(ty: &Ty, cx: &EarlyContext<'_>, reason: &'static str) { 24 ( 0.00%) match ty.kind { . // Be careful of nested structures (arrays and tuples) . TyKind::Array(ref ty, _) | TyKind::Slice(ref ty) => { 1 ( 0.00%) Self::visit_type(ty, cx, reason); . }, . TyKind::Tup(ref tup) => { . for tup_ty in tup { . Self::visit_type(tup_ty, cx, reason); . } . }, . // This is what we are looking for ! . TyKind::Ref(ref optional_lifetime, ref borrow_type) => { -- line 63 ---------------------------------------- -- line 80 ---------------------------------------- . }, . _ => {}, . } . } . Self::visit_type(&borrow_type.ty, cx, reason); . }, . _ => {}, . } 24 ( 0.00%) } . } . . impl EarlyLintPass for RedundantStaticLifetimes { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 126,288 ( 0.00%) if !self.msrv.meets(msrvs::STATIC_IN_CONST) { 112,256 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (14,032x) . return; . } . . if !item.span.from_expansion() { 54,925 ( 0.00%) if let ItemKind::Const(ConstItem { ty: ref var_type, .. }) = item.kind { 4 ( 0.00%) 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) . } . 2 ( 0.00%) if let ItemKind::Static(StaticItem { ty: ref var_type, .. }) = item.kind { 6 ( 0.00%) Self::visit_type(var_type, cx, "statics have by default a `'static` lifetime"); . } . } . } . . extract_msrv_attr!(); . } 14,039 ( 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> { 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 342 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 342 ( 0.00%) && is_format_macro(cx, macro_call.def_id) 6,840 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro (57x) . && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) . { . let mut linter = FormatArgsExpr { . cx, . expr, . macro_call: ¯o_call, . format_args, . ignore_mixed: self.ignore_mixed, -- line 351 ---------------------------------------- -- line 357 ---------------------------------------- . . linter.check_trailing_comma(); . linter.check_templates(); . . if self.msrv.meets(cx, msrvs::FORMAT_ARGS_CAPTURE) { . linter.check_uninlined_args(); . } . } 523,440 ( 0.01%) } . } . . struct FormatArgsExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . macro_call: &'a MacroCall, . format_args: &'a rustc_ast::FormatArgs, . ignore_mixed: bool, -- line 373 ---------------------------------------- -- line 866 ---------------------------------------- . } . } . } . . fn make_ty_msrv_map(tcx: TyCtxt<'_>) -> FxHashMap, Option> { . [(sym::OsStr, Some(msrvs::OS_STR_DISPLAY)), (sym::Path, None)] . .into_iter() . .filter_map(|(name, feature)| { 6 ( 0.00%) tcx.get_diagnostic_item(name).map(|def_id| { 238,765 ( 0.00%) => ???:::get_diagnostic_item (2x) . let ty = Ty::new_adt(tcx, tcx.adt_def(def_id), List::empty()); . (ty, feature) . }) . }) . .collect() . } . . fn count_needed_derefs<'tcx, I>(mut ty: Ty<'tcx>, mut iter: I) -> (usize, Ty<'tcx>) -- line 882 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ptr/cmp_null.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::span_lint_and_sugg; . use clippy_utils::res::{MaybeDef as _, MaybeResPath as _}; . use clippy_utils::sugg::Sugg; . use clippy_utils::{is_lint_allowed, sym}; . use rustc_errors::Applicability; . use rustc_hir::{BinOpKind, Expr, ExprKind}; . use rustc_lint::LateContext; . 40,692 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . l: &Expr<'_>, . r: &Expr<'_>, . ) -> bool { 3,391 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 23,737 ( 0.00%) let non_null_path_snippet = match ( 13,564 ( 0.00%) is_lint_allowed(cx, CMP_NULL, expr.hir_id), 5,163,003 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (3,391x) 3,391 ( 0.00%) is_null_path(cx, l), . is_null_path(cx, r), . ) { . (false, true, false) => Sugg::hir_with_context(cx, r, expr.span.ctxt(), "..", &mut applicability).maybe_paren(), . (false, false, true) => Sugg::hir_with_context(cx, l, expr.span.ctxt(), "..", &mut applicability).maybe_paren(), . _ => return false, . }; . let invert = if op == BinOpKind::Eq { "" } else { "!" }; . -- line 28 ---------------------------------------- -- line 31 ---------------------------------------- . CMP_NULL, . expr.span, . "comparing with null is better expressed by the `.is_null()` method", . "try", . format!("{invert}{non_null_path_snippet}.is_null()"), . applicability, . ); . true 27,128 ( 0.00%) } . . fn is_null_path(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 13,564 ( 0.00%) if let ExprKind::Call(pathexp, []) = expr.kind { . matches!( . pathexp.basic_res().opt_diag_name(cx), . Some(sym::ptr_null | sym::ptr_null_mut) . ) . } else { . false . } . } -- line 50 ---------------------------------------- 6,782 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 85,000 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, span: Span, name: Symbol, attrs: &[Attribute], body: Option) { . if span.from_expansion() { . return; . } . 58,165 ( 0.00%) if let Some(span) = find_attr!(attrs, Inline(InlineAttr::Always, span) => *span) 97,845 ( 0.00%) && body.is_none_or(|body| is_relevant_expr(cx, cx.tcx.hir_body(body).value)) 777,443 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/utils.rs:clippy_lints::attrs::utils::is_relevant_expr (8,895x) 627,923 ( 0.01%) => ???:::hir_body (8,895x) . { . span_lint( . cx, . INLINE_ALWAYS, . span, 26,685 ( 0.00%) format!("you have declared `#[inline(always)]` on `{name}`. This is usually a bad idea"), . ); . } 53,125 ( 0.00%) } 8,895 ( 0.00%) -------------------------------------------------------------------------------- -- 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' 23,986 ( 0.00%) if let ImplItemKind::Fn(ref signature, _) = impl_item.kind . // #11201 21,248 ( 0.00%) && let header = signature.header . && header.is_safe() 72,646 ( 0.00%) && header.abi == ExternAbi::Rust 487,766 ( 0.01%) => ???:::eq (10,378x) . && impl_item.ident.name == sym::to_string . && let decl = signature.decl . && decl.implicit_self().has_implicit_self() . && decl.inputs.len() == 1 . && impl_item.generics.params.iter().all(|p| matches!(p.kind, GenericParamKind::Lifetime { .. })) . && !impl_item.span.from_expansion() . // Check if return type is String . && return_ty(cx, impl_item.owner_id).is_lang_item(cx, LangItem::String) . // Filters instances of to_string which are required by a trait . && trait_ref_of_method(cx, impl_item.owner_id).is_none() . { . show_lint(cx, impl_item); . } 11,993 ( 0.00%) } . } . . fn show_lint(cx: &LateContext<'_>, item: &ImplItem<'_>) { . let display_trait_id = cx . .tcx . .get_diagnostic_item(sym::Display) . .expect("Failed to get trait ID of `Display`!"); . -- line 125 ---------------------------------------- 138,112 ( 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/mod.rs -------------------------------------------------------------------------------- Ir -- line 129 ---------------------------------------- . /// assert!(b.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_is_empty", since = "1.39.0")] . #[rustc_no_implicit_autorefs] . #[inline] . #[must_use] . pub const fn is_empty(&self) -> bool { 26,179 ( 0.00%) self.len() == 0 . } . . /// Returns the first element of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let v = [10, 40, 30]; -- line 145 ---------------------------------------- -- line 148 ---------------------------------------- . /// let w: &[i32] = &[]; . /// assert_eq!(None, w.first()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn first(&self) -> Option<&T> { 558,460 ( 0.01%) if let [first, ..] = self { Some(first) } else { None } . } . . /// Returns a mutable reference to the first element of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 164 ---------------------------------------- -- line 191 ---------------------------------------- . /// assert_eq!(elements, &[1, 2]); . /// } . /// ``` . #[stable(feature = "slice_splits", since = "1.5.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn split_first(&self) -> Option<(&T, &[T])> { 5,203 ( 0.00%) if let [first, tail @ ..] = self { Some((first, tail)) } else { None } . } . . /// Returns the first and all the rest of the elements of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 207 ---------------------------------------- -- line 233 ---------------------------------------- . /// assert_eq!(elements, &[0, 1]); . /// } . /// ``` . #[stable(feature = "slice_splits", since = "1.5.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn split_last(&self) -> Option<(&T, &[T])> { 1,984 ( 0.00%) if let [init @ .., last] = self { Some((last, init)) } else { None } . } . . /// Returns the last and all the rest of the elements of the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 249 ---------------------------------------- -- line 274 ---------------------------------------- . /// let w: &[i32] = &[]; . /// assert_eq!(None, w.last()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] . #[inline] . #[must_use] . pub const fn last(&self) -> Option<&T> { 1,475,501 ( 0.02%) if let [.., last] = self { Some(last) } else { None } . } . . /// Returns a mutable reference to the last item in the slice, or `None` if it is empty. . /// . /// # Examples . /// . /// ``` . /// let x = &mut [0, 1, 2]; -- line 290 ---------------------------------------- -- line 297 ---------------------------------------- . /// let y: &mut [i32] = &mut []; . /// assert_eq!(None, y.last_mut()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_first_last", since = "1.83.0")] . #[inline] . #[must_use] . pub const fn last_mut(&mut self) -> Option<&mut T> { 21,506 ( 0.00%) if let [.., last] = self { Some(last) } else { None } . } . . /// Returns an array reference to the first `N` items in the slice. . /// . /// If the slice is not at least `N` in length, this will return `None`. . /// . /// # Examples . /// -- line 313 ---------------------------------------- -- line 320 ---------------------------------------- . /// . /// let w: &[i32] = &[]; . /// assert_eq!(Some(&[]), w.first_chunk::<0>()); . /// ``` . #[inline] . #[stable(feature = "slice_first_last_chunk", since = "1.77.0")] . #[rustc_const_stable(feature = "slice_first_last_chunk", since = "1.77.0")] . pub const fn first_chunk(&self) -> Option<&[T; N]> { 246,903 ( 0.00%) if self.len() < N { . None . } else { . // SAFETY: We explicitly check for the correct number of elements, . // and do not let the reference outlive the slice. . Some(unsafe { &*(self.as_ptr().cast_array()) }) . } . } . -- line 336 ---------------------------------------- -- line 846 ---------------------------------------- . /// Gets a reference to the underlying array. . /// . /// If `N` is not exactly equal to the length of `self`, then this method returns `None`. . #[stable(feature = "core_slice_as_array", since = "1.93.0")] . #[rustc_const_stable(feature = "core_slice_as_array", since = "1.93.0")] . #[inline] . #[must_use] . pub const fn as_array(&self) -> Option<&[T; N]> { 992 ( 0.00%) if self.len() == N { . let ptr = self.as_ptr().cast_array(); . . // SAFETY: The underlying array of a slice can be reinterpreted as an actual array `[T; N]` if `N` is not greater than the slice's length. . let me = unsafe { &*ptr }; . Some(me) . } else { . None . } -- line 862 ---------------------------------------- -- line 2155 ---------------------------------------- . /// . /// assert_eq!(None, v.split_at_checked(7)); . /// ``` . #[stable(feature = "split_at_checked", since = "1.80.0")] . #[rustc_const_stable(feature = "split_at_checked", since = "1.80.0")] . #[inline] . #[must_use] . pub const fn split_at_checked(&self, mid: usize) -> Option<(&[T], &[T])> { 186 ( 0.00%) if mid <= self.len() { . // SAFETY: `[ptr; mid]` and `[mid; len]` are inside `self`, which . // fulfills the requirements of `split_at_unchecked`. . Some(unsafe { self.split_at_unchecked(mid) }) . } else { . None . } . } . -- line 2171 ---------------------------------------- -- line 2596 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . #[must_use] . pub fn contains(&self, x: &T) -> bool . where . T: PartialEq, . { 177 ( 0.00%) cmp::SliceContains::slice_contains(x, self) 2,714 ( 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:<&str as core::slice::cmp::SliceContains>::slice_contains (59x) . } . . /// Returns `true` if `needle` is a prefix of the slice or equal to the slice. . /// . /// # Examples . /// . /// ``` . /// let v = [10, 40, 30]; -- line 2612 ---------------------------------------- -- line 2627 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub fn starts_with(&self, needle: &[T]) -> bool . where . T: PartialEq, . { . let n = needle.len(); 393,569 ( 0.00%) self.len() >= n && needle == &self[..n] . } . . /// Returns `true` if `needle` is a suffix of the slice or equal to the slice. . /// . /// # Examples . /// . /// ``` . /// let v = [10, 40, 30]; -- line 2643 ---------------------------------------- -- line 2658 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[must_use] . pub fn ends_with(&self, needle: &[T]) -> bool . where . T: PartialEq, . { . let (m, n) = (self.len(), needle.len()); 88,385 ( 0.00%) m >= n && needle == &self[m - n..] . } . . /// Returns a subslice with the prefix removed. . /// . /// If the slice starts with `prefix`, returns the subslice after the prefix, wrapped in `Some`. . /// If `prefix` is empty, simply returns the original slice. If `prefix` is equal to the . /// original slice, returns an empty slice. . /// -- line 2674 ---------------------------------------- 145,264 ( 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 { 123,971 ( 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. 16,478 ( 0.00%) if index == 0 { . return true; . } . 17,075 ( 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. 4 ( 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()] 863 ( 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)), 642 ( 0.00%) from_utf8_unchecked(slice::from_raw_parts(ptr.add(mid), len - mid)), . ) . } . } . . /// Divides one string slice into two at an index. . /// . /// # Safety . /// -- line 1013 ---------------------------------------- -- line 1375 ---------------------------------------- . /// let bananas = "bananas"; . /// . /// assert!(bananas.contains("nana")); . /// assert!(!bananas.contains("apples")); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn contains(&self, pat: P) -> bool { 22,734 ( 0.00%) pat.is_contained_in(self) 433,188 ( 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:<&str as core::str::pattern::Pattern>::is_contained_in (4,546x) . } . . /// 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 { 68,472 ( 0.00%) pat.into_searcher(self).next_match().map(|(i, _)| i) 3,371,829 ( 0.04%) => /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 (22,824x) . } . . /// 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> { 684 ( 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>, . { 94,339 ( 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] 23 ( 0.00%) pub fn split_once(&self, delimiter: P) -> Option<(&'_ str, &'_ str)> { 101 ( 0.00%) let (start, end) = delimiter.into_searcher(self).next_match()?; 119 ( 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 (1x) . // SAFETY: `Searcher` is known to return valid indices. 3 ( 0.00%) unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } 15 ( 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 { 355,613 ( 0.00%) self.trim_matches(char::is_whitespace) 2,309,181 ( 0.03%) => /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> (110,236x) . } . . /// 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 { 20,700 ( 0.00%) self.trim_start_matches(char::is_whitespace) 267,960 ( 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> (9,240x) . } . . /// 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")] 487,065 ( 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) } 487,065 ( 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")] 42,320 ( 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()) } 21,160 ( 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")] 496 ( 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) } 496 ( 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 { 11,412 ( 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 ---------------------------------------- 219,006 ( 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 161,858 ( 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<'_>) { 28,086 ( 0.00%) check_item(cx, item.hir_id()); 2,072,238 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (14,043x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 23,986 ( 0.00%) check_item(cx, item.hir_id()); 3,521,707 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (11,993x) . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 8 ( 0.00%) check_item(cx, item.hir_id()); 561 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (4x) . } . 25,857 ( 0.00%) fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) { 5,746 ( 0.00%) check_node(cx, arm.hir_id, |v| { . v.arm(&v.bind("arm", arm)); . }); 22,984 ( 0.00%) } . 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 130,860 ( 0.00%) check_node(cx, expr.hir_id, |v| { . v.expr(&v.bind("expr", expr)); . }); 523,440 ( 0.01%) } . 10,719 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 7,146 ( 0.00%) match stmt.kind { 1,040 ( 0.00%) StmtKind::Expr(e) | StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 2,382 ( 0.00%) check_node(cx, stmt.hir_id, |v| { . v.stmt(&v.bind("stmt", stmt)); . }); 9,528 ( 0.00%) } . } . 234,360 ( 0.00%) fn check_item(cx: &LateContext<'_>, hir_id: HirId) { 130,200 ( 0.00%) if let Some(body) = cx.tcx.hir_maybe_body_owned_by(hir_id.expect_owner().def_id) { 3,918,683 ( 0.05%) => ???:::hir_maybe_body_owned_by (26,040x) . check_node_with_body( . cx, . hir_id, 10,688 ( 0.00%) |v| { . v.expr(&v.bind("expr", body.value)); . }, . Some(body), . ); . } 208,320 ( 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<'_>>, . ) { 79,879 ( 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 { 113,957 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 98,157 ( 0.00%) => ???:::hir_attrs (1,451x) 42,580 ( 0.00%) get_builtin_attr(attrs, sym::author).count() > 0 . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . pub struct Gated

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

{ . #[inline] . pub fn new bool>(is_active: &F, pass: P) -> Self { 70 ( 0.00%) let active = is_active(&pass.get_lints()); 368 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint_defs/src/lib.rs:::get_lints (1x) 361 ( 0.00%) Gated { active, pass } 90 ( 0.00%) => ???:0x0000000000173dc0 (3x) . } . } . . /// Run one field's `check_*`, if that field is active. . /// . /// Fully qualified through [`rustc_lint::LateLintPass`] since some passes impl . /// both `EarlyLintPass` and `LateLintPass` with like-named methods, which would . /// be ambiguous on the concrete field type. The args arrive as one `tt` and are . /// re-parsed here so the per-field and per-argument repetitions never share a . /// nesting level. . #[macro_export] . macro_rules! run_combined_late_lint_pass_field { . ($self:ident, $field:ident, $name:ident, ($($arg:expr),* $(,)?)) => { 39,521,502 ( 0.50%) if $self.$field.active { 31,511,062 ( 0.40%) rustc_lint::LateLintPass::$name(&mut $self.$field.pass, $($arg),*); 1,162,079 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/items_after_test_module.rs:::check_mod (308x) . } . }; . } . . /// 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),*);)*]) => ( 4,789,289 ( 0.06%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::LateContext<'tcx>, $($param: $arg),*) { . $crate::expand_combined_late_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 2,921,405 ( 0.04%) })* . ) . } . . /// 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); . } . }; . } 571,995 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/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 { 338,326 ( 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 ---------------------------------------- -------------------------------------------------------------------------------- -- 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; . 72,108 ( 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) = { 9,298 ( 0.00%) let expr = peel_hir_expr_refs(left).0; 23,245 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (4,649x) 4,649 ( 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) = { 4,649 ( 0.00%) let expr = peel_hir_expr_refs(right).0; 23,245 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (4,649x) 4,649 ( 0.00%) let span = expr.span; . let is_coerced = expr_is_erased_ref(cx, expr); . (span, is_coerced) . }; . 18,596 ( 0.00%) let ctxt = expr.span.ctxt(); 18,547 ( 0.00%) match op { . BinOpKind::Add | BinOpKind::BitOr | BinOpKind::BitXor => { . if is_redundant_op(cx, left, 0, 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, 0, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } -- line 53 ---------------------------------------- -- line 65 ---------------------------------------- . 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) => { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . }, . BinOpKind::BitAnd => { 11,585 ( 0.00%) if is_redundant_op(cx, left, -1, ctxt) { 501,832 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (1,655x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); 4,965 ( 0.00%) } 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::Rem => check_remainder(cx, left, right, expr.span, left.span), . _ => (), . } 48,072 ( 0.00%) } . . fn expr_is_erased_ref(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 51,139 ( 0.00%) match cx.typeck_results().expr_ty(expr).kind() { 371,920 ( 0.00%) => ???:::expr_ty (9,298x) . 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. 66,099 ( 0.00%) if (is_assoc_fn_without_type_instance(cx, left) || is_assoc_fn_without_type_instance(cx, right)) 264,396 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_assoc_fn_without_type_instance (12,018x) . && !is_expr_used_with_type_annotation(cx, expr) . { . return false; . } . . // This lint applies to integers and their references 18,027 ( 0.00%) cx.typeck_results().expr_ty(left).peel_refs().is_integral() 240,360 ( 0.00%) => ???:::expr_ty (6,009x) 13,947 ( 0.00%) && cx.typeck_results().expr_ty(right).peel_refs().is_integral() 185,960 ( 0.00%) => ???:::expr_ty (4,649x) . // `1 << 0` is a common pattern in bit manipulation code 4,649 ( 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) { . let ecx = ConstEvalCtxt::new(cx); . let ctxt = span.ctxt(); . if match (ecx.eval_full_int(left, ctxt), ecx.eval_full_int(right, ctxt)) { -- line 194 ---------------------------------------- -- line 195 ---------------------------------------- . (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); . } . } . 56,856 ( 0.00%) fn is_redundant_op(cx: &LateContext<'_>, e: &Expr<'_>, m: i8, ctxt: SyntaxContext) -> bool { 51,664 ( 0.00%) if let Some(Constant::Int(v)) = ConstEvalCtxt::new(cx).eval_local(e, ctxt).map(Constant::peel_refs) { 877,219 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (4,738x) 265,328 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (4,738x) 9,249 ( 0.00%) let check = match *cx.typeck_results().expr_ty(e).peel_refs().kind() { 123,320 ( 0.00%) => ???:::expr_ty (3,083x) 7,140 ( 0.00%) ty::Int(ity) => unsext(cx.tcx, -1_i128, ity), 28,560 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (1,428x) 9,930 ( 0.00%) ty::Uint(uty) => clip(cx.tcx, !0, uty), 33,100 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (1,655x) . _ => return false, . }; 14,214 ( 0.00%) if match m { 1,428 ( 0.00%) 0 => v == 0, 4,965 ( 0.00%) -1 => v == check, . 1 => v == 1, . _ => unreachable!(), . } { . return true; . } . } . false 37,904 ( 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(); . /// } . /// ``` 72,108 ( 0.00%) fn is_assoc_fn_without_type_instance<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> bool { 48,072 ( 0.00%) if let ExprKind::Call(func, _) = peel_hir_expr_refs(expr).0.kind 60,090 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (12,018x) . && 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), . .. . }, . )) = func.kind -- line 285 ---------------------------------------- -- line 292 ---------------------------------------- . .output() . && let ty::Param(ty::ParamTy { . name: kw::SelfUpper, .. . }) = output_ty.kind() . { . return true; . } . false 72,108 ( 0.00%) } 64,478 ( 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)] 112,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 70,215 ( 0.00%) if cx.tcx.data_layout.pointer_size().bits() != 64 { . return; . } . if let ItemKind::Enum(_, _, def) = &item.kind { 553 ( 0.00%) for var in def.variants { 4,422 ( 0.00%) if let Some(anon_const) = &var.disr_expr { 5,896 ( 0.00%) let def_id = cx.tcx.hir_body_owner_def_id(anon_const.body); 191,620 ( 0.00%) => ???:::hir_body_owner_def_id (1,474x) . let mut ty = cx . .tcx . .type_of(def_id.to_def_id()) . .instantiate_identity() . .skip_norm_wip(); 7,370 ( 0.00%) let constant = cx.tcx.const_eval_poly(def_id.to_def_id()).ok(); 14,710,236 ( 0.18%) => ???:::const_eval_poly (1,474x) 17,688 ( 0.00%) if let Some(Constant::Int(val)) = constant.and_then(|c| mir_to_const(cx.tcx, c, ty)) { 63,382 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::mir_to_const (1,474x) 4,422 ( 0.00%) if let ty::Adt(adt, _) = ty.kind() . && adt.is_enum() . { . ty = adt.repr().discr_type().to_ty(cx.tcx); . } 7,200 ( 0.00%) match ty.kind() { . ty::Int(IntTy::Isize) => { 1,644 ( 0.00%) let val = ((val as i128) << 64) >> 64; . if i32::try_from(val).is_ok() { . continue; . } . }, . ty::Uint(UintTy::Usize) if val > u128::from(u32::MAX) => {}, . _ => continue, . } . span_lint( -- line 67 ---------------------------------------- -- line 69 ---------------------------------------- . ENUM_CLIKE_UNPORTABLE_VARIANT, . var.span, . "C-like enum variant discriminant is not portable to 32-bit targets", . ); . } . } . } . } 112,344 ( 0.00%) } . } 1,304 ( 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 { 13,211 ( 0.00%) if typeck.hir_owner == id.owner { 32,838 ( 0.00%) let def = typeck.type_dependent_def(id); 165 ( 0.00%) => ???:::type_dependent_def (3x) . 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)] 15,930 ( 0.00%) fn f(qpath: &QPath<'_>, id: HirId, typeck: &TypeckResults<'_>) -> Res { 31,876 ( 0.00%) match *qpath { 21,638 ( 0.00%) QPath::Resolved(_, p) => p.res, 127,644 ( 0.00%) QPath::TypeRelative(..) if let Some((kind, id)) = typeck.ty_based_def(id) => Res::Def(kind, id), . QPath::TypeRelative(..) => Res::Err, . } 39,138 ( 0.00%) } . match self.opt_qpath() { 42,805 ( 0.00%) Some((qpath, id)) if let Some(typeck) = typeck.typeck_res() => f(qpath, id, typeck), 284,049 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f (4,985x) . _ => Res::Err, . } . } . . /// If this is a path with the specified name as its final segment gets its . /// resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] -- line 123 ---------------------------------------- -- line 285 ---------------------------------------- . #[inline] . fn opt_qpath(self) -> Option> { . Some((self.0, self.1)) . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx Expr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { 87,028 ( 0.00%) match &self.kind { 47,790 ( 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() 167,384 ( 0.00%) && let Res::Local(id) = p.res . { . Some(id) . } else { . None . } . } . . /// If this node is a path to a local gets the local's `HirId` and identifier. -- line 382 ---------------------------------------- -- line 405 ---------------------------------------- . #[inline] . fn basic_res(self) -> &'a Res { . &self.res . } . } . impl<'a> MaybeResPath<'a> for &QPath<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 37,323 ( 0.00%) match *self { 68,197 ( 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> { 956,645 ( 0.01%) match &self.kind { . ExprKind::Path(qpath) => qpath.opt_res_path(), . _ => (None, None), . } . } . . #[inline] . fn opt_ty_rel_path(self) -> OptTyRelPath<'a> { . match &self.kind { -- line 438 ---------------------------------------- -- line 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> { 19,182 ( 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 { 13,020 ( 0.00%) self.opt_def_id().and_then(|id| tcx.tcx().get_diagnostic_name(id)) 295,881 ( 0.00%) => ???:::get_diagnostic_name (4,983x) . } . . /// 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() 63,200 ( 0.00%) .is_some_and(|id| tcx.tcx().is_diagnostic_item(name, id)) 309 ( 0.00%) => ???:::is_diagnostic_item (3x) . } . . /// 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() 9,340 ( 0.00%) .is_some_and(|id| tcx.tcx().lang_items().get(item) == Some(id)) 132,400 ( 0.00%) => ???:::lang_items (3,310x) . } . . /// If this definition is an impl block gets its type. . #[inline] . fn opt_impl_ty<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option>> { . match self.opt_def(tcx) { . Some((DefKind::Impl { .. }, id)) => Some(tcx.tcx().type_of(id)), . _ => None, . } . } . . /// Gets the parent of this definition if it has one. . #[inline] 6 ( 0.00%) fn opt_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { . self.opt_def_id().and_then(|id| tcx.tcx().opt_parent(id)) 12 ( 0.00%) } . . /// Checks if this definition is an impl block. . #[inline] . fn is_impl<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> bool { . 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 { 2,720 ( 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] -- line 575 ---------------------------------------- -- 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)> { 11,704 ( 0.00%) match self { . Res::Def(kind, id) => Some((kind, id)), . _ => None, . } . } . } . impl MaybeDef for Option { . #[inline] . fn opt_def_id(self) -> Option { -- line 658 ---------------------------------------- 282,726 ( 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)] 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . . let Some(higher::If { . cond: cond_expr, . then: then_expr, . r#else: else_expr, . }) = higher::If::hir(expr) -- line 75 ---------------------------------------- -- line 205 ---------------------------------------- . lint_msg, . None, . format!( . "consider using the `Entry` API: https://doc.rust-lang.org/std/collections/struct.{}.html#entry-api", . map_ty.name() . ), . ); . } 523,440 ( 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; 3 ( 0.00%) let expr = peel_hir_expr_while(expr, |e| match e.kind { . ExprKind::Unary(UnOp::Not, e) => { . negated = !negated; . Some(e) . }, . _ => None, . }); . 2 ( 0.00%) if let ExprKind::MethodCall(_, map, [arg], _) = expr.kind . && 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)?; -- line 279 ---------------------------------------- 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_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`]. 2,910 ( 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 { 92,078 ( 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. 2,569 ( 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 ---------------------------------------- 42,985 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs -------------------------------------------------------------------------------- Ir -- line 249 ---------------------------------------- . Infer, . . /// User wrote `'static` or nothing (which gets converted to `'_`). . Static, . } . . impl LifetimeKind { . fn is_elided(&self) -> bool { 9,894 ( 0.00%) match self { . LifetimeKind::ImplicitObjectLifetimeDefault | LifetimeKind::Infer => true, . . // It might seem surprising that `Fresh` counts as not *elided* . // -- but this is because, as far as the code in the compiler is . // concerned -- `Fresh` variants act equivalently to "some fresh name". . // They correspond to early-bound regions on an impl, in other words. . LifetimeKind::Error(..) | LifetimeKind::Param(..) | LifetimeKind::Static => false, . } -- line 265 ---------------------------------------- -- line 408 ---------------------------------------- . } . } . . pub fn invalid() -> Self { . Self::new(Ident::dummy(), HirId::INVALID, Res::Err) . } . . pub fn args(&self) -> &GenericArgs<'hir> { 594 ( 0.00%) if let Some(ref args) = self.args { args } else { GenericArgs::NONE } . } . } . . #[derive(Clone, Copy, Debug, StableHash)] . pub enum ConstItemRhs<'hir> { . Body(BodyId), . TypeConst(&'hir ConstArg<'hir>), . } -- line 424 ---------------------------------------- -- line 482 ---------------------------------------- . . impl<'hir> ConstArg<'hir> { . /// Converts a `ConstArg` in an unambiguous position to one in an ambiguous position. This is . /// fallible as the [`ConstArgKind::Infer`] variant is not present in ambiguous positions. . /// . /// Functions accepting ambiguous consts will not handle the [`ConstArgKind::Infer`] variant, if . /// infer consts are relevant to you then care should be taken to handle them separately. . pub fn try_as_ambig_ct(&self) -> Option<&ConstArg<'hir, AmbigArg>> { 78 ( 0.00%) if let ConstArgKind::Infer(()) = self.kind { . return None; . } . . // SAFETY: `ConstArg` is `repr(C)` and `ConstArgKind` is marked `repr(u8)` so that the layout is . // the same across different ZST type arguments. We also asserted that the `self` is . // not a `ConstArgKind::Infer` so there is no risk of transmuting a `()` to `AmbigArg`. . let ptr = self as *const ConstArg<'hir> as *const ConstArg<'hir, AmbigArg>; . Some(unsafe { &*ptr }) -- line 498 ---------------------------------------- -- line 746 ---------------------------------------- . Some(self.span_ext).filter(|span| !span.is_empty()) . } . . pub fn is_empty(&self) -> bool { . self.args.is_empty() . } . } . 171 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Debug, StableHash)] . pub enum GenericArgsParentheses { . No, . /// Bounds for `feature(return_type_notation)`, like `T: Trait`, . /// where the args are explicitly elided with `..` . ReturnTypeNotation, . /// parenthesized function-family traits, like `T: Fn(u32) -> i32` . ParenSugar, . } . . /// The modifiers on a trait bound. 92 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, StableHash)] . pub struct TraitBoundModifiers { . pub constness: BoundConstness, . pub polarity: BoundPolarity, . } . . impl TraitBoundModifiers { . pub const NONE: Self = . TraitBoundModifiers { constness: BoundConstness::Never, polarity: BoundPolarity::Positive }; -- line 773 ---------------------------------------- -- line 855 ---------------------------------------- . pub source: GenericParamSource, . } . . impl<'hir> GenericParam<'hir> { . /// Synthetic type-parameters are inserted after normal ones. . /// In order for normal parameters to be able to refer to synthetic ones, . /// scans them first. . pub fn is_impl_trait(&self) -> bool { 10,924 ( 0.00%) matches!(self.kind, GenericParamKind::Type { synthetic: true, .. }) . } . . /// This can happen for `async fn`, e.g. `async fn f<'_>(&'_ self)`. . /// . /// See `lifetime_to_generic_param` in `rustc_ast_lowering` for more information. . pub fn is_elided_lifetime(&self) -> bool { . matches!(self.kind, GenericParamKind::Lifetime { kind: LifetimeParamKind::Elided(_) }) . } -- line 871 ---------------------------------------- -- line 972 ---------------------------------------- . "" . } . } . . pub fn bounds_for_param( . &self, . param_def_id: LocalDefId, . ) -> impl Iterator> { 6 ( 0.00%) self.predicates.iter().filter_map(move |pred| match pred.kind { . WherePredicateKind::BoundPredicate(bp) 18 ( 0.00%) if bp.is_param_bound(param_def_id.to_def_id()) => 63 ( 0.00%) => ???:::is_param_bound (3x) . { . Some(bp) . } . _ => None, . }) . } . . pub fn outlives_for_param( -- line 990 ---------------------------------------- -- line 1221 ---------------------------------------- . pub fn bounds(&self) -> GenericBounds<'hir> { . match self { . WherePredicateKind::BoundPredicate(p) => p.bounds, . WherePredicateKind::RegionPredicate(p) => p.bounds, . } . } . } . 3 ( 0.00%) #[derive(Copy, Clone, Debug, StableHash, PartialEq, Eq)] . pub enum PredicateOrigin { . WhereClause, . GenericParam, . ImplTrait, . } . . /// A type bound (e.g., `for<'c> Foo: Send + Clone + 'c`). . #[derive(Debug, Clone, Copy, StableHash)] -- line 1237 ---------------------------------------- -- line 1437 ---------------------------------------- . #[inline] . fn value_span(&self) -> Option { . self.value_lit().map(|i| i.span) . } . . /// For a single-segment attribute, returns its name; otherwise, returns `None`. . #[inline] . fn name(&self) -> Option { 34,910 ( 0.00%) match &self { . Attribute::Unparsed(n) => { 12 ( 0.00%) if let [ident] = n.path.segments.as_ref() { . Some(*ident) . } else { . None . } . } . _ => None, . } . } -- line 1455 ---------------------------------------- -- line 1468 ---------------------------------------- . Some(*span) . } else { . None . } . } . . #[inline] . fn span(&self) -> Span { 141,021 ( 0.00%) match &self { . Attribute::Unparsed(u) => u.span, . // FIXME: should not be needed anymore when all attrs are parsed . Attribute::Parsed(AttributeKind::DocComment { span, .. }) => *span, . Attribute::Parsed(AttributeKind::Deprecated { span, .. }) => *span, . Attribute::Parsed(AttributeKind::CfgTrace(cfgs)) => cfgs[0].1, . a => panic!("can't get the span of an arbitrary parsed attribute: {a:?}"), . } . } -- line 1484 ---------------------------------------- -- line 1490 ---------------------------------------- . matches!(n.args, AttrArgs::Empty) . } . _ => false, . } . } . . #[inline] . fn symbol_path(&self) -> Option> { 339,083 ( 0.00%) match &self { 46 ( 0.00%) Attribute::Unparsed(n) => Some(n.path.segments.iter().copied().collect()), . _ => None, . } . } . . fn path_span(&self) -> Option { . match &self { . Attribute::Unparsed(attr) => Some(attr.path.span), . Attribute::Parsed(_) => None, -- line 1507 ---------------------------------------- -- line 1517 ---------------------------------------- . } . . fn is_automatically_derived_attr(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::AutomaticallyDerived)) . } . . #[inline] . fn doc_str_and_fragment_kind(&self) -> Option<(Symbol, DocFragmentKind)> { 58,336 ( 0.00%) match &self { . Attribute::Parsed(AttributeKind::DocComment { kind, comment, .. }) => { 125,352 ( 0.00%) Some((*comment, *kind)) . } . _ => None, . } . } . . fn doc_resolution_scope(&self) -> Option { . match self { . Attribute::Parsed(AttributeKind::DocComment { style, .. }) => Some(*style), -- line 1535 ---------------------------------------- -- line 1536 ---------------------------------------- . Attribute::Unparsed(attr) if self.has_name(sym::doc) && self.value_str().is_some() => { . Some(attr.style) . } . _ => None, . } . } . . fn is_proc_macro_attr(&self) -> bool { 34,886 ( 0.00%) matches!( . self, . Attribute::Parsed( . AttributeKind::ProcMacro . | AttributeKind::ProcMacroAttribute . | AttributeKind::ProcMacroDerive { .. } . ) . ) . } . . fn is_doc_hidden(&self) -> bool { 390,378 ( 0.00%) matches!(self, Attribute::Parsed(AttributeKind::Doc(d)) if d.hidden.is_some()) . } . . fn is_doc_keyword_or_attribute(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::Doc(d)) if d.attribute.is_some() || d.keyword.is_some()) . } . . fn is_rustc_doc_primitive(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::RustcDocPrimitive(..))) -- line 1563 ---------------------------------------- -- line 1870 ---------------------------------------- . pub kind: PatKind<'hir>, . pub span: Span, . /// Whether to use default binding modes. . /// At present, this is false only for destructuring assignment. . pub default_binding_modes: bool, . } . . impl<'hir> Pat<'hir> { 6,336 ( 0.00%) fn walk_short_(&self, it: &mut impl FnMut(&Pat<'hir>) -> bool) -> bool { 1,584 ( 0.00%) if !it(self) { . return false; . } . . use PatKind::*; 4,752 ( 0.00%) match self.kind { . Missing => unreachable!(), . Wild | Never | Expr(_) | Range(..) | Binding(.., None) | Err(_) => true, . Box(s) | Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => { . s.walk_short_(it) . } . Struct(_, fields, _) => fields.iter().all(|field| field.pat.walk_short_(it)), . TupleStruct(_, s, _) | Tuple(s, _) | Or(s) => s.iter().all(|p| p.walk_short_(it)), . Slice(before, slice, after) => { . before.iter().chain(slice).chain(after.iter()).all(|p| p.walk_short_(it)) . } . } 6,336 ( 0.00%) } . . /// Walk the pattern in left-to-right order, . /// short circuiting (with `.all(..)`) if `false` is returned. . /// . /// Note that when visiting e.g. `Tuple(ps)`, . /// if visiting `ps[0]` returns `false`, . /// then `ps[1]` will not be visited. . pub fn walk_short(&self, mut it: impl FnMut(&Pat<'hir>) -> bool) -> bool { 1,584 ( 0.00%) self.walk_short_(&mut it) 21,384 ( 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:::walk_short_:: (792x) . } . . fn walk_(&self, it: &mut impl FnMut(&Pat<'hir>) -> bool) { . if !it(self) { . return; . } . . use PatKind::*; -- line 1913 ---------------------------------------- -- line 2256 ---------------------------------------- . #[stable_hash(ignore)] . pub hir_id: HirId, . pub ident: Ident, . pub expr: &'hir Expr<'hir>, . pub span: Span, . pub is_shorthand: bool, . } . 2 ( 0.00%) #[derive(Copy, Clone, PartialEq, Debug, StableHash)] . pub enum BlockCheckMode { . DefaultBlock, . UnsafeBlock(UnsafeSource), . } . . #[derive(Copy, Clone, PartialEq, Debug, StableHash)] . pub enum UnsafeSource { . CompilerGenerated, -- line 2272 ---------------------------------------- -- line 2302 ---------------------------------------- . #[derive(Debug, Clone, Copy, StableHash)] . pub struct Body<'hir> { . pub params: &'hir [Param<'hir>], . pub value: &'hir Expr<'hir>, . } . . impl<'hir> Body<'hir> { . pub fn id(&self) -> BodyId { 181,063 ( 0.00%) BodyId { hir_id: self.value.hir_id } . } . } . . /// The type of source expression that caused this coroutine to be created. . #[derive(Clone, PartialEq, Eq, Debug, Copy, Hash, StableHash, Encodable, Decodable)] . pub enum CoroutineKind { . /// A coroutine that comes from a desugaring. . Desugared(CoroutineDesugaring, CoroutineSource), -- line 2318 ---------------------------------------- -- line 2719 ---------------------------------------- . . /// If `Self.kind` is `ExprKind::DropTemps(expr)`, drill down until we get a non-`DropTemps` . /// `Expr`. This is used in suggestions to ignore this `ExprKind` as it is semantically . /// silent, only signaling the ownership system. By doing this, suggestions that check the . /// `ExprKind` of any given `Expr` for presentation don't have to care about `DropTemps` . /// beyond remembering to call this function before doing analysis on it. . pub fn peel_drop_temps(&self) -> &Self { . let mut expr = self; 104,579 ( 0.00%) while let ExprKind::DropTemps(inner) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_blocks(&self) -> &Self { . let mut expr = self; 994,931 ( 0.01%) while let ExprKind::Block(Block { expr: Some(inner), .. }, _) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_borrows(&self) -> &Self { . let mut expr = self; 197,953 ( 0.00%) while let ExprKind::AddrOf(.., inner) = &expr.kind { 830 ( 0.00%) expr = inner; . } . expr . } . . pub fn can_have_side_effects(&self) -> bool { . match self.peel_drop_temps().kind { . ExprKind::Path(_) | ExprKind::Lit(_) | ExprKind::OffsetOf(..) | ExprKind::Use(..) => { . false -- line 2752 ---------------------------------------- -- line 3137 ---------------------------------------- . AwaitDesugar, . /// A desugared `expr = expr`, where the LHS is a tuple, struct, array or underscore expression. . AssignDesugar, . /// A contract `#[ensures(..)]` attribute injects a let binding for the check that runs at point of return. . Contract, . } . . /// Hints at the original code for a `match _ { .. }`. 992 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, StableHash, Encodable, Decodable)] . pub enum MatchSource { . /// A `match _ { .. }`. . Normal, . /// A `expr.match { .. }`. . Postfix, . /// A desugared `for _ in _ { .. }` loop. . ForLoopDesugar, . /// A desugared `?` operator. -- line 3153 ---------------------------------------- -- line 3316 ---------------------------------------- . fn expect_failed(ident: &'static str, found: T) -> ! { . panic!("{ident}: found {found:?}") . } . . impl<'hir> TraitItem<'hir> { . #[inline] . pub fn hir_id(&self) -> HirId { . // Items are always HIR owners. 10 ( 0.00%) HirId::make_owner(self.owner_id.def_id) . } . . pub fn trait_item_id(&self) -> TraitItemId { . TraitItemId { owner_id: self.owner_id } . } . . expect_methods_self_kind! { . expect_const, (&'hir Ty<'hir>, Option>), -- line 3332 ---------------------------------------- -- line 3402 ---------------------------------------- . trait_item_def_id: Result, . }, . } . . impl<'hir> ImplItem<'hir> { . #[inline] . pub fn hir_id(&self) -> HirId { . // Items are always HIR owners. 94,283 ( 0.00%) HirId::make_owner(self.owner_id.def_id) . } . . pub fn impl_item_id(&self) -> ImplItemId { . ImplItemId { owner_id: self.owner_id } . } . . pub fn vis_span(&self) -> Option { . match self.impl_kind { -- line 3418 ---------------------------------------- -- line 3559 ---------------------------------------- . . impl<'hir> Ty<'hir> { . /// Converts a `Ty` in an unambiguous position to one in an ambiguous position. This is . /// fallible as the [`TyKind::Infer`] variant is not present in ambiguous positions. . /// . /// Functions accepting ambiguous types will not handle the [`TyKind::Infer`] variant, if . /// infer types are relevant to you then care should be taken to handle them separately. . pub fn try_as_ambig_ty(&self) -> Option<&Ty<'hir, AmbigArg>> { 337,986 ( 0.00%) if let TyKind::Infer(()) = self.kind { . return None; . } . . // SAFETY: `Ty` is `repr(C)` and `TyKind` is marked `repr(u8)` so that the layout is . // the same across different ZST type arguments. We also asserted that the `self` is . // not a `TyKind::Infer` so there is no risk of transmuting a `()` to `AmbigArg`. . let ptr = self as *const Ty<'hir> as *const Ty<'hir, AmbigArg>; . Some(unsafe { &*ptr }) -- line 3575 ---------------------------------------- -- line 3592 ---------------------------------------- . while let TyKind::Ref(_, MutTy { ty, .. }) = &final_ty.kind { . final_ty = ty; . } . final_ty . } . . /// Returns `true` if `param_def_id` matches the `bounded_ty` of this predicate. . pub fn as_generic_param(&self) -> Option<(DefId, Ident)> { 1,158 ( 0.00%) let TyKind::Path(QPath::Resolved(None, path)) = self.kind else { . return None; . }; 405 ( 0.00%) let [segment] = &path.segments else { . return None; . }; 972 ( 0.00%) match path.res { 243 ( 0.00%) Res::Def(DefKind::TyParam, def_id) | Res::SelfTyParam { trait_: def_id } => { 324 ( 0.00%) Some((def_id, segment.ident)) . } . _ => None, . } . } . . pub fn find_self_aliases(&self) -> Vec { . use crate::intravisit::Visitor; . struct MyVisitor(Vec); -- line 3616 ---------------------------------------- -- line 3729 ---------------------------------------- . } . } . . /// Returns the matching `PrimTy` for a `Symbol` such as "str" or "i32". . /// Returns `None` if no matching type is found. . pub fn from_name(name: Symbol) -> Option { . let ty = match name { . // any changes here should also be reflected in `PrimTy::ALL` 1,269 ( 0.00%) sym::i8 => Self::Int(IntTy::I8), . sym::i16 => Self::Int(IntTy::I16), . sym::i32 => Self::Int(IntTy::I32), . sym::i64 => Self::Int(IntTy::I64), . sym::i128 => Self::Int(IntTy::I128), . sym::isize => Self::Int(IntTy::Isize), . sym::u8 => Self::Uint(UintTy::U8), . sym::u16 => Self::Uint(UintTy::U16), . sym::u32 => Self::Uint(UintTy::U32), -- line 3745 ---------------------------------------- -- line 3751 ---------------------------------------- . sym::f64 => Self::Float(FloatTy::F64), . sym::f128 => Self::Float(FloatTy::F128), . sym::bool => Self::Bool, . sym::char => Self::Char, . sym::str => Self::Str, . _ => return None, . }; . Some(ty) 141 ( 0.00%) } . } . . #[derive(Debug, Clone, Copy, StableHash)] . pub struct FnPtrTy<'hir> { . pub safety: Safety, . pub abi: ExternAbi, . pub generic_params: &'hir [GenericParam<'hir>], . pub decl: &'hir FnDecl<'hir>, -- line 3767 ---------------------------------------- -- line 4215 ---------------------------------------- . . /// Do the function arguments end with a C-style variadic argument? . pub fn c_variadic(self) -> bool { . self.flags & Self::C_VARIADIC_FLAG != 0 . } . . /// Is lifetime elision allowed? . pub fn lifetime_elision_allowed(self) -> bool { 17,878 ( 0.00%) self.flags & Self::LIFETIME_ELISION_ALLOWED_FLAG != 0 . } . . /// Get the splatted argument index, if any. . pub fn splatted(self) -> Option { . if self.splatted == Self::NO_SPLATTED_ARG_INDEX { None } else { Some(self.splatted) } . } . } . -- line 4231 ---------------------------------------- -- line 4266 ---------------------------------------- . self.fn_decl_kind.implicit_self() . } . . pub fn c_variadic(&self) -> bool { . self.fn_decl_kind.c_variadic() . } . . pub fn lifetime_elision_allowed(&self) -> bool { 8,939 ( 0.00%) self.fn_decl_kind.lifetime_elision_allowed() . } . . pub fn splatted(&self) -> Option { . self.fn_decl_kind.splatted() . } . . pub fn dummy(span: Span) -> Self { . Self { -- line 4282 ---------------------------------------- -- line 4301 ---------------------------------------- . /// Represents when a function does not have a self argument or . /// when a function has a `self: X` argument. . None, . } . . impl ImplicitSelfKind { . /// Does this represent an implicit self? . pub fn has_implicit_self(&self) -> bool { 49,592 ( 0.00%) !matches!(*self, ImplicitSelfKind::None) . } . } . . #[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, StableHash)] . pub enum IsAsync { . Async(Span), . NotAsync, . } . . impl IsAsync { . pub fn is_async(self) -> bool { 21,249 ( 0.00%) matches!(self, IsAsync::Async(_)) . } . } . . #[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, StableHash)] . #[derive(Default)] . pub enum Defaultness { . Default { . has_value: bool, -- line 4329 ---------------------------------------- -- line 4359 ---------------------------------------- . DefaultReturn(Span), . /// Everything else. . Return(&'hir Ty<'hir>), . } . . impl<'hir> FnRetTy<'hir> { . #[inline] . pub fn span(&self) -> Span { 65,951 ( 0.00%) match *self { 5 ( 0.00%) Self::DefaultReturn(span) => span, 31,866 ( 0.00%) Self::Return(ref ty) => ty.span, . } . } . . pub fn is_suggestable_infer_ty(&self) -> Option<&'hir Ty<'hir>> { . if let Self::Return(ty) = self . && ty.is_suggestable_infer_ty() . { . return Some(*ty); -- line 4377 ---------------------------------------- -- line 4523 ---------------------------------------- . /// . /// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`. . Unit(#[stable_hash(ignore)] HirId, LocalDefId), . } . . impl<'hir> VariantData<'hir> { . /// Return the fields of this variant. . pub fn fields(&self) -> &'hir [FieldDef<'hir>] { 1,722 ( 0.00%) match *self { . VariantData::Struct { fields, .. } | VariantData::Tuple(fields, ..) => fields, . _ => &[], . } . } . . pub fn ctor(&self) -> Option<(CtorKind, HirId, LocalDefId)> { . match *self { . VariantData::Tuple(_, hir_id, def_id) => Some((CtorKind::Fn, hir_id, def_id)), -- line 4539 ---------------------------------------- -- line 4594 ---------------------------------------- . /// either an `EiiImpls` or `EiiExternTarget` attribute . pub eii: bool, . } . . impl<'hir> Item<'hir> { . #[inline] . pub fn hir_id(&self) -> HirId { . // Items are always HIR owners. 91,585 ( 0.00%) HirId::make_owner(self.owner_id.def_id) . } . . #[inline] . pub fn item_id(&self) -> ItemId { . ItemId { owner_id: self.owner_id } . } . . /// Check if this is an [`ItemKind::Enum`], [`ItemKind::Struct`] or -- line 4610 ---------------------------------------- -- line 4789 ---------------------------------------- . pub safety: HeaderSafety, . pub constness: Constness, . pub asyncness: IsAsync, . pub abi: ExternAbi, . } . . impl FnHeader { . pub fn is_async(&self) -> bool { 6,818 ( 0.00%) matches!(self.asyncness, IsAsync::Async(_)) . } . . pub fn is_unsafe(&self) -> bool { . self.safety().is_unsafe() . } . . pub fn is_safe(&self) -> bool { . self.safety().is_safe() . } . . pub fn safety(&self) -> Safety { 61,341 ( 0.00%) match self.safety { . HeaderSafety::SafeTargetFeatures => Safety::Unsafe, . HeaderSafety::Normal(safety) => safety, . } . } . } . . #[derive(Debug, Clone, Copy, StableHash)] . pub enum ItemKind<'hir> { -- line 4817 ---------------------------------------- -- line 4905 ---------------------------------------- . // We do not put a `Span` in `Defaultness` because it breaks foreign crate metadata . // decoding as `Span`s cannot be decoded when a `Session` is not available. . pub defaultness_span: Option, . pub trait_ref: TraitRef<'hir>, . } . . impl ItemKind<'_> { . pub fn ident(&self) -> Option { 270 ( 0.00%) match *self { . ItemKind::ExternCrate(_, ident) . | ItemKind::Use(_, UseKind::Single(ident)) . | ItemKind::Static(_, ident, ..) . | ItemKind::Const(ident, ..) . | ItemKind::Fn { ident, .. } . | ItemKind::Macro(ident, ..) . | ItemKind::Mod(ident, ..) . | ItemKind::TyAlias(ident, ..) -- line 4921 ---------------------------------------- -- line 4925 ---------------------------------------- . | ItemKind::Trait { ident, .. } . | ItemKind::TraitAlias(_, ident, ..) => Some(ident), . . ItemKind::Use(_, UseKind::Glob | UseKind::ListStem) . | ItemKind::ForeignMod { .. } . | ItemKind::GlobalAsm { .. } . | ItemKind::Impl(_) => None, . } 6 ( 0.00%) } . . pub fn generics(&self) -> Option<&Generics<'_>> { . Some(match self { . ItemKind::Fn { generics, .. } . | ItemKind::TyAlias(_, generics, _) . | ItemKind::Const(_, generics, _, _) . | ItemKind::Enum(_, generics, _) . | ItemKind::Struct(_, generics, _) -- line 4941 ---------------------------------------- 632,345 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/literal_suffix.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_then; . use rustc_errors::Applicability; . use rustc_lint::EarlyContext; . use rustc_span::Span; . . use super::{SEPARATED_LITERAL_SUFFIX, UNSEPARATED_LITERAL_SUFFIX}; . 109,668 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, lit_span: Span, lit_snip: &str, suffix: &str, sugg_type: &str) { 18,278 ( 0.00%) let Some(maybe_last_sep_idx) = lit_snip.len().checked_sub(suffix.len() + 1) else { . return; // It's useless so shouldn't lint. . }; . // Do not lint when literal is unsuffixed. 18,278 ( 0.00%) if !suffix.is_empty() { 48 ( 0.00%) if lit_snip.as_bytes()[maybe_last_sep_idx] == b'_' { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . SEPARATED_LITERAL_SUFFIX, . lit_span, . format!("{sugg_type} type suffix should not be separated by an underscore"), . |diag| { . diag.span_suggestion( -- line 22 ---------------------------------------- -- line 24 ---------------------------------------- . "remove the underscore", . format!("{}{suffix}", &lit_snip[..maybe_last_sep_idx]), . Applicability::MachineApplicable, . ); . }, . ); . } else { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 24 ( 0.00%) span_lint_and_then( . cx, . UNSEPARATED_LITERAL_SUFFIX, . lit_span, 36 ( 0.00%) format!("{sugg_type} type suffix should be separated by an underscore"), . |diag| { . diag.span_suggestion( . lit_span, . "add an underscore", . format!("{}_{suffix}", &lit_snip[..=maybe_last_sep_idx]), . Applicability::MachineApplicable, . ); . }, . ); . } . } 73,112 ( 0.00%) } 60 ( 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, . ) { 107,800 ( 0.00%) if !check_private_items && !cx.effective_visibilities.is_exported(item.owner_id.def_id) { 767,910 ( 0.01%) => ???:::is_exported (13,475x) . 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/methods/mod.rs -------------------------------------------------------------------------------- Ir -- line 5094 ---------------------------------------- . allowed_dotfiles: FxHashSet<&'static str>, . format_args: FormatArgsStorage, . allow_unwrap_types: Vec, . unwrap_allowed_ids: FxHashSet, . unwrap_allowed_aliases: Vec, . } . . impl Methods { 10 ( 0.00%) pub fn new(conf: &'static Conf, format_args: FormatArgsStorage) -> Self { . let mut allowed_dotfiles: FxHashSet<_> = conf.allowed_dotfiles.iter().map(|s| &**s).collect(); . allowed_dotfiles.extend(DEFAULT_ALLOWED_DOTFILES); . 21 ( 0.00%) Self { 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, 1 ( 0.00%) msrv: conf.msrv.into(), . allow_expect_in_tests: conf.allow_expect_in_tests, . allow_unwrap_in_tests: conf.allow_unwrap_in_tests, 1 ( 0.00%) allow_expect_in_consts: conf.allow_expect_in_consts, 1 ( 0.00%) allow_unwrap_in_consts: conf.allow_unwrap_in_consts, 6 ( 0.00%) allowed_dotfiles, 1 ( 0.00%) format_args, 3 ( 0.00%) allow_unwrap_types: conf.allow_unwrap_types.clone(), 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone (1x) . unwrap_allowed_ids: FxHashSet::default(), . unwrap_allowed_aliases: Vec::new(), . } 9 ( 0.00%) } . } . . /// Extracts a method call name, args, and `Span` of the method name. . /// This ensures that neither the receiver nor any of the arguments . /// come from expansion. . pub fn method_call<'tcx>(recv: &'tcx Expr<'tcx>) -> Option<(Symbol, &'tcx Expr<'tcx>, &'tcx [Expr<'tcx>], Span, Span)> { 11,452 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, call_span) = recv.kind 7,935 ( 0.00%) && !args.iter().any(|e| e.range_span().unwrap_or(e.span).from_expansion()) 34,917 ( 0.00%) => ???:::range_span (1,587x) 6,544 ( 0.00%) && !receiver.range_span().unwrap_or(receiver.span).from_expansion() 35,992 ( 0.00%) => ???:::range_span (1,636x) . { 3,272 ( 0.00%) Some((path.ident.name, receiver, args, path.ident.span, call_span)) . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for Methods { 8 ( 0.00%) fn check_crate(&mut self, cx: &LateContext<'tcx>) { . for s in &self.allow_unwrap_types { . let def_ids = clippy_utils::paths::lookup_path_str(cx.tcx, clippy_utils::paths::PathNS::Type, s); . for def_id in def_ids { . if cx.tcx.def_kind(def_id) == rustc_hir::def::DefKind::TyAlias { . self.unwrap_allowed_aliases.push(def_id); . } else { . self.unwrap_allowed_ids.insert(def_id); . } . } . } 8 ( 0.00%) } . 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if expr.span.from_expansion() { . return; . } . 357,526 ( 0.00%) match expr.kind { 15,984 ( 0.00%) ExprKind::Call(func, args) => { 19,980 ( 0.00%) unnecessary_fallible_conversions::check_function(cx, expr, func); 947,369 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check_function (3,996x) 43,956 ( 0.00%) manual_c_str_literals::check(cx, expr, func, args, self.msrv); 281,360 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs:clippy_lints::methods::manual_c_str_literals::check (3,996x) 31,968 ( 0.00%) useless_nonzero_new_unchecked::check(cx, expr, func, args, self.msrv); 92,507 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/useless_nonzero_new_unchecked.rs:clippy_lints::methods::useless_nonzero_new_unchecked::check (3,996x) 31,968 ( 0.00%) io_other_error::check(cx, expr, func, args, self.msrv); 12,009 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/io_other_error.rs:clippy_lints::methods::io_other_error::check (3,996x) 39,960 ( 0.00%) swap_with_temporary::check(cx, expr, func, args); 131,163 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:clippy_lints::methods::swap_with_temporary::check (3,996x) 23,976 ( 0.00%) ip_constant::check(cx, expr, func, args); 327,538 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs:clippy_lints::methods::ip_constant::check (3,996x) 11,988 ( 0.00%) clone_on_copy::check_function(cx, expr); 1,150,156 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_function (3,996x) 43,956 ( 0.00%) unwrap_expect_used::check_call( 570,746 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check_call (3,996x) . cx, . expr, . func, . args, 3,996 ( 0.00%) self.allow_unwrap_in_tests, 3,996 ( 0.00%) self.allow_expect_in_tests, 3,996 ( 0.00%) self.allow_unwrap_in_consts, 3,996 ( 0.00%) self.allow_expect_in_consts, 3,996 ( 0.00%) &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . ); . }, . ExprKind::MethodCall(..) => { 14,724 ( 0.00%) self.check_methods(cx, expr); 1,253,550 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_methods (1,636x) . }, 26,913 ( 0.00%) ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne => { 11,704 ( 0.00%) let mut info = BinaryExprInfo { . expr, . chain: lhs, . other: rhs, . eq: op.node == hir::BinOpKind::Eq, . }; . lint_binary_expr_with_method_call(cx, &mut info); . }, . ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Or => { . manual_is_variant_and::check_or(cx, expr, lhs, rhs, self.msrv); . }, . _ => (), . } 510,352 ( 0.01%) } . 119,930 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx hir::ImplItem<'_>) { 35,979 ( 0.00%) if impl_item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 47,558 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, id) = impl_item.kind { 44,820 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 1,299,774 ( 0.02%) => ???:::hir_get_parent_item (8,964x) 35,856 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 600,585 ( 0.01%) => ???:::hir_expect_item (8,964x) 26,892 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 35,856 ( 0.00%) let implements_trait = matches!(item.kind, hir::ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })); . . let method_sig = cx.tcx.fn_sig(impl_item.owner_id).instantiate_identity().skip_norm_wip(); 17,928 ( 0.00%) let method_sig = cx.tcx.instantiate_bound_regions_with_erased(method_sig); 8,939,478 ( 0.11%) => /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::> (8,964x) 8,964 ( 0.00%) let first_arg_ty_opt = method_sig.inputs().iter().next().copied(); 71,712 ( 0.00%) should_implement_trait::check_impl_item(cx, impl_item, self_ty, implements_trait, first_arg_ty_opt, sig); 749,147 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/should_implement_trait.rs:clippy_lints::methods::should_implement_trait::check_impl_item (8,964x) . 35,856 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() 71,712 ( 0.00%) => ???:::implicit_self (8,964x) 15,192 ( 0.00%) && !(self.avoid_breaking_exported_api 37,980 ( 0.00%) && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id)) 432,972 ( 0.01%) => ???:::is_exported (7,596x) . && let Some(first_arg) = iter_input_pats(sig.decl, cx.tcx.hir_body(id)).next() . && let Some(first_arg_ty) = first_arg_ty_opt . { . wrong_self_convention::check( . cx, . impl_item.ident.name, . self_ty, . first_arg_ty, -- line 5222 ---------------------------------------- -- line 5223 ---------------------------------------- . first_arg.pat.span, . implements_trait, . false, . ); . } . . new_ret_no_self::check_impl_item(cx, impl_item, self_ty, implements_trait); . } 95,944 ( 0.00%) } . 28 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 8 ( 0.00%) if let TraitItemKind::Fn(ref sig, _) = item.kind 5 ( 0.00%) && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { 4 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() 8 ( 0.00%) => ???:::implicit_self (1x) . && let Some(first_arg_hir_ty) = sig.decl.inputs.first() . && let Some(&first_arg_ty) = cx . .tcx . .fn_sig(item.owner_id) . .instantiate_identity() . .skip_norm_wip() . .inputs() . .skip_binder() -- line 5245 ---------------------------------------- -- line 5252 ---------------------------------------- . self_ty, . first_arg_ty, . first_arg_hir_ty.span, . false, . true, . ); . } . 3 ( 0.00%) new_ret_no_self::check_trait_item(cx, item); 17 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/new_ret_no_self.rs:clippy_lints::methods::new_ret_no_self::check_trait_item (1x) . } 32 ( 0.00%) } . } . . impl Methods { . #[expect(clippy::too_many_lines)] 11,452 ( 0.00%) fn check_methods<'tcx>(&self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Handle method calls whose receiver and arguments may not come from expansion . if let Some((name, recv, args, span, call_span)) = method_call(expr) { . match (name, args) { 24,952 ( 0.00%) (sym::add | sym::sub | sym::wrapping_add | sym::wrapping_sub, [_arg]) => { 24 ( 0.00%) zst_offset::check(cx, expr, recv); 2,664 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/zst_offset.rs:clippy_lints::methods::zst_offset::check (12x) . }, . (sym::all, [arg]) => { . needless_character_iteration::check(cx, expr, recv, arg, true); . match method_call(recv) { . Some((sym::cloned, recv2, [], _, _)) => { . iter_overeager_cloned::check( . cx, . expr, -- line 5280 ---------------------------------------- -- line 5331 ---------------------------------------- . manual_contains::check(cx, expr, iter_recv, arg); . }, . _ => {}, . } . }, . (sym::arg, [arg]) => { . suspicious_command_arg_space::check(cx, recv, arg, span); . }, 456 ( 0.00%) (sym::as_deref | sym::as_deref_mut, []) => { . needless_option_as_deref::check(cx, expr, recv, name); . }, . (sym::as_bytes, []) => { . if let Some((sym::as_str, recv, [], as_str_span, _)) = method_call(recv) { . redundant_as_str::check(cx, expr, recv, as_str_span, span); . } . sliced_string_as_bytes::check(cx, expr, recv); . }, . (sym::as_mut | sym::as_ref, []) => useless_asref::check(cx, expr, name, recv), 5 ( 0.00%) (sym::as_ptr, []) => manual_c_str_literals::check_as_ptr(cx, expr, recv, self.msrv), 17 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs:clippy_lints::methods::manual_c_str_literals::check_as_ptr (1x) . (sym::assume_init, []) => uninit_assumed_init::check(cx, expr, recv), . (sym::bytes, []) => unbuffered_bytes::check(cx, expr, recv), . (sym::cloned, []) => { . cloned_instead_of_copied::check(cx, expr, recv, span, self.msrv); . if let Some((method @ (sym::as_ref | sym::as_mut), as_ref_recv, [], as_ref_ident_span, _)) = . method_call(recv) . { . option_as_ref_cloned::check(cx, span, method, as_ref_recv, as_ref_ident_span); -- line 5357 ---------------------------------------- -- line 5778 ---------------------------------------- . str_splitn::check(cx, name, expr, recv, pat_arg, count, self.msrv); . } . }, . (sym::splitn_mut | sym::rsplitn_mut, [count_arg, _]) => { . if let Some(Constant::Int(count)) = ConstEvalCtxt::new(cx).eval(count_arg) { . suspicious_splitn::check(cx, name, expr, recv, count); . } . }, 8,115 ( 0.00%) (sym::step_by, [arg]) => iterator_step_by_zero::check(cx, expr, arg), . (sym::take, [arg]) => { . iter_out_of_bounds::check_take(cx, expr, recv, arg); . manual_repeat_n::check(cx, expr, recv, arg, self.msrv); . if let Some((sym::cloned, recv2, [], _span2, _)) = method_call(recv) { . iter_overeager_cloned::check( . cx, . expr, . recv, -- line 5794 ---------------------------------------- -- line 5808 ---------------------------------------- . (sym::try_into, []) if cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::TryInto) => { . unnecessary_fallible_conversions::check_method(cx, expr); . }, . (sym::to_owned, []) => { . if !suspicious_to_owned::check(cx, expr, span) { . implicit_clone::check(cx, name, expr, recv); . } . }, 3,670 ( 0.00%) (sym::to_os_string | sym::to_path_buf | sym::to_string | sym::to_vec, []) => { . implicit_clone::check(cx, name, expr, recv); . }, . (sym::type_id, []) => { . type_id_on_box::check(cx, recv, expr.span); . }, . (sym::unwrap, []) => { . match method_call(recv) { . Some((sym::get, recv, [get_arg], _, _)) => { -- line 5824 ---------------------------------------- -- line 5829 ---------------------------------------- . }, . Some((sym::or, recv, [or_arg], or_span, _)) => { . or_then_unwrap::check(cx, expr, recv, or_arg, or_span); . }, . _ => {}, . } . unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, 7,875 ( 0.00%) (sym::unwrap_or, [u_arg]) => { . match method_call(recv) { . Some((arith @ (sym::checked_add | sym::checked_sub | sym::checked_mul), lhs, [rhs], _, _)) => { . manual_saturating_arithmetic::check_unwrap_or(cx, expr, lhs, rhs, u_arg, arith); . }, . Some((sym::map, m_recv, [m_arg], span, _)) => { . map_unwrap_or::check(cx, expr, m_recv, m_arg, recv, u_arg, span, self.msrv); . }, . Some((then_method @ (sym::then | sym::then_some), t_recv, [t_arg], _, _)) => { -- line 5845 ---------------------------------------- -- line 5899 ---------------------------------------- . unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, . (sym::wake, []) => { . waker_clone_wake::check(cx, expr, recv); . }, . (sym::write, []) => { . readonly_write_lock::check(cx, expr, recv); . }, 6,300 ( 0.00%) (sym::zip, [arg]) => { 1 ( 0.00%) if let ExprKind::MethodCall(name, iter_recv, [], _) = recv.kind . && name.ident.name == sym::iter . { . range_zip_with_len::check(cx, expr, iter_recv, arg); . } . }, . _ => {}, . } . } . // Handle method calls whose receiver and arguments may come from expansion . if let ExprKind::MethodCall(path, recv, args, call_span) = expr.kind { 1,636 ( 0.00%) let method_span = path.ident.span; . . // Those methods do their own method name checking as they deal with multiple methods. 24,540 ( 0.00%) or_fun_call::check(cx, expr, method_span, path.ident.name, recv, args, self.msrv); 22,558 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check (1,636x) 14,724 ( 0.00%) unnecessary_to_owned::check(cx, expr, path.ident.name, recv, args, self.msrv); 910,890 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::check (1,636x) . 1,636 ( 0.00%) match (path.ident.name, args) { 15,838 ( 0.00%) (sym::clone, []) => { . clone_on_ref_ptr::check(cx, expr, recv); . clone_on_copy::check(cx, expr, recv); . }, . (sym::expect, [arg]) => { . unwrap_expect_used::check( . cx, . expr, . recv, -- line 5934 ---------------------------------------- -- line 5994 ---------------------------------------- . &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . unwrap_expect_used::Variant::Unwrap, . ); . }, . _ => {}, . } . } 13,088 ( 0.00%) } . } . . fn check_is_some_is_none<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . recv: &'tcx Expr<'tcx>, . call_span: Span, . is_some: bool, -- line 6010 ---------------------------------------- -- line 6035 ---------------------------------------- . other: &'a Expr<'a>, . eq: bool, . } . . /// Checks for the `CHARS_NEXT_CMP` and `CHARS_LAST_CMP` lints. . fn lint_binary_expr_with_method_call(cx: &LateContext<'_>, info: &mut BinaryExprInfo<'_>) { . macro_rules! lint_with_both_lhs_and_rhs { . ($func:expr, $cx:expr, $info:ident) => { 23,408 ( 0.00%) if !$func($cx, $info) { . ::std::mem::swap(&mut $info.chain, &mut $info.other); 26,334 ( 0.00%) if $func($cx, $info) { 1,056,289 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/chars_last_cmp_with_unwrap.rs:clippy_lints::methods::chars_last_cmp_with_unwrap::check (2,926x) . return; . } . } . }; . } . . lint_with_both_lhs_and_rhs!(chars_next_cmp::check, cx, info); . lint_with_both_lhs_and_rhs!(chars_last_cmp::check, cx, info); -- line 6053 ---------------------------------------- 102,478 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs -------------------------------------------------------------------------------- Ir -- line 20 ---------------------------------------- . rhs: &'tcx Expr<'_>, . span: Span, . ) { . let normalized = comparisons::normalize_comparison(cmp, lhs, rhs); . let Some((rel, normalized_lhs, normalized_rhs)) = normalized else { . return; . }; . 14,630 ( 0.00%) let lhs_bounds = numeric_cast_precast_bounds(cx, normalized_lhs); 58,520 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::numeric_cast_precast_bounds (2,926x) 8,778 ( 0.00%) let rhs_bounds = numeric_cast_precast_bounds(cx, normalized_rhs); 4,369,623 ( 0.05%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::numeric_cast_precast_bounds (2,926x) . 26,334 ( 0.00%) upcast_comparison_bounds_err(cx, span, rel, lhs_bounds, normalized_lhs, normalized_rhs, false); 52,668 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (2,926x) 23,408 ( 0.00%) upcast_comparison_bounds_err(cx, span, rel, rhs_bounds, normalized_rhs, normalized_lhs, true); 52,668 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (2,926x) . } . 46,816 ( 0.00%) fn numeric_cast_precast_bounds(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<(FullInt, FullInt)> { 12,155 ( 0.00%) if let ExprKind::Cast(cast_exp, _) = expr.kind { 2,255 ( 0.00%) let pre_cast_ty = cx.typeck_results().expr_ty(cast_exp); 18,040 ( 0.00%) => ???:::expr_ty (451x) 1,804 ( 0.00%) let cast_ty = cx.typeck_results().expr_ty(expr); 18,040 ( 0.00%) => ???:::expr_ty (451x) . // if it's a cast from i32 to u32 wrapping will invalidate all these checks 902 ( 0.00%) if cx.layout_of(pre_cast_ty).ok().map(|l| l.size) == cx.layout_of(cast_ty).ok().map(|l| l.size) { . return None; . } 400 ( 0.00%) match pre_cast_ty.kind() { . ty::Int(int_ty) => Some(match int_ty { . IntTy::I8 => (FullInt::S(i128::from(i8::MIN)), FullInt::S(i128::from(i8::MAX))), . IntTy::I16 => (FullInt::S(i128::from(i16::MIN)), FullInt::S(i128::from(i16::MAX))), . IntTy::I32 => (FullInt::S(i128::from(i32::MIN)), FullInt::S(i128::from(i32::MAX))), . IntTy::I64 => (FullInt::S(i128::from(i64::MIN)), FullInt::S(i128::from(i64::MAX))), . IntTy::I128 => (FullInt::S(i128::MIN), FullInt::S(i128::MAX)), . IntTy::Isize => (FullInt::S(isize::MIN as i128), FullInt::S(isize::MAX as i128)), . }), -- line 51 ---------------------------------------- -- line 57 ---------------------------------------- . UintTy::U128 => (FullInt::U(u128::MIN), FullInt::U(u128::MAX)), . UintTy::Usize => (FullInt::U(usize::MIN as u128), FullInt::U(usize::MAX as u128)), . }), . _ => None, . } . } else { . None . } 46,816 ( 0.00%) } . 35,112 ( 0.00%) fn upcast_comparison_bounds_err<'tcx>( . cx: &LateContext<'tcx>, . span: Span, . rel: Rel, . lhs_bounds: Option<(FullInt, FullInt)>, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . invert: bool, . ) { 29,260 ( 0.00%) if let Some((lb, ub)) = lhs_bounds . && let Some(norm_rhs_val) = ConstEvalCtxt::new(cx).eval_full_int(rhs, span.ctxt()) . { . match rel { . Rel::Eq => { . if norm_rhs_val < lb || ub < norm_rhs_val { . err_upcast_comparison(cx, span, lhs, false); . } . }, -- line 84 ---------------------------------------- -- line 98 ---------------------------------------- . if (invert && norm_rhs_val <= lb) || (!invert && ub <= norm_rhs_val) { . err_upcast_comparison(cx, span, lhs, true); . } else if (!invert && norm_rhs_val < lb) || (invert && ub < norm_rhs_val) { . err_upcast_comparison(cx, span, lhs, false); . } . }, . } . } 40,964 ( 0.00%) } . . fn err_upcast_comparison(cx: &LateContext<'_>, span: Span, expr: &Expr<'_>, always: bool) { . if let ExprKind::Cast(cast_val, _) = expr.kind { . let mut applicability = Applicability::MachineApplicable; . let (cast_val_snip, _) = snippet_with_context( . cx, . cast_val.span, . expr.span.ctxt(), -- line 114 ---------------------------------------- 13,057 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/chars_last_cmp.rs -------------------------------------------------------------------------------- Ir . use crate::methods::chars_cmp; . use clippy_utils::sym; . use rustc_lint::LateContext; . . use super::CHARS_LAST_CMP; . . /// Checks for the `CHARS_LAST_CMP` lint. . pub(super) fn check(cx: &LateContext<'_>, info: &crate::methods::BinaryExprInfo<'_>) -> bool { 58,520 ( 0.00%) if chars_cmp::check(cx, info, &[sym::chars, sym::last], CHARS_LAST_CMP, "ends_with") { 972,024 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp.rs:clippy_lints::methods::chars_cmp::check (5,852x) . true . } else { 46,816 ( 0.00%) chars_cmp::check(cx, info, &[sym::chars, sym::next_back], CHARS_LAST_CMP, "ends_with") 971,432 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp.rs:clippy_lints::methods::chars_cmp::check (5,852x) . } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/borrow_deref_ref.rs -------------------------------------------------------------------------------- Ir -- line 46 ---------------------------------------- . pub BORROW_DEREF_REF, . complexity, . "deref on an immutable reference returns the same type as itself" . } . . declare_lint_pass!(BorrowDerefRef => [BORROW_DEREF_REF]); . . impl<'tcx> LateLintPass<'tcx> for BorrowDerefRef { 392,580 ( 0.00%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) { 134,746 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, addrof_target) = e.kind 1,315 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, deref_target) = addrof_target.kind 106 ( 0.00%) && !matches!(deref_target.kind, ExprKind::Unary(UnOp::Deref, ..)) 106 ( 0.00%) && !e.span.from_expansion() 106 ( 0.00%) && !deref_target.span.from_expansion() 106 ( 0.00%) && !addrof_target.span.from_expansion() 159 ( 0.00%) && let ref_ty = cx.typeck_results().expr_ty(deref_target) 2,120 ( 0.00%) => ???:::expr_ty (53x) 106 ( 0.00%) && let ty::Ref(_, inner_ty, Mutability::Not) = ref_ty.kind() . && get_parent_expr(cx, e).is_none_or(|parent| { . match parent.kind { . // `*&*foo` should lint `deref_addrof` instead. . ExprKind::Unary(UnOp::Deref, _) => is_lint_allowed(cx, DEREF_ADDROF, parent.hir_id), . // `&*foo` creates a distinct temporary from `foo` . ExprKind::AddrOf(_, Mutability::Mut, _) => !matches!( . deref_target.kind, . ExprKind::Path(..) -- line 70 ---------------------------------------- -- line 119 ---------------------------------------- . e.span, . "if you would like to deref, try using `&**`", . format!("&**{deref_text}"), . Applicability::MaybeIncorrect, . ); . }, . ); . } 458,010 ( 0.01%) } . } . . /// Checks if `expr` is used as part of a `let` statement containing a `ref mut` binding. . fn potentially_bound_to_mutable_ref<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> bool { . matches!(cx.tcx.parent_hir_node(expr.hir_id), Node::LetStmt(let_stmt) . if let_stmt.pat.contains_explicit_ref_binding() == Some(Mutability::Mut)) . } 880 ( 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. 46,408 ( 0.00%) if let ItemKind::Use(path, kind @ (UseKind::Single(_) | UseKind::Glob)) = item.kind 9,160 ( 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 32,046 ( 0.00%) && let Some(res) = path.res.present_items().next() 4,578 ( 0.00%) && let Some(def_id) = res.opt_def_id() 11,445 ( 0.00%) && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) 34,335 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2,289x) . { . let module = if is_integer_module(cx, def_id) { . true 13,734 ( 0.00%) } else if is_numeric_const(cx, def_id) { 148,873 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (2,289x) . 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") . ); . } . }, . ); . } 14,043 ( 0.00%) } . 654,300 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { . // `std::::` check 278,024 ( 0.00%) let (sugg, msg) = if let ExprKind::Path(qpath) = &expr.kind . && let QPath::Resolved(None, path) = qpath 18,449 ( 0.00%) && let Some(def_id) = path.res.opt_def_id() 41,090 ( 0.00%) && is_numeric_const(cx, def_id) 416,191 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (5,870x) . && 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 105,048 ( 0.00%) } else if let ExprKind::Call(func, []) = &expr.kind 8 ( 0.00%) && let ExprKind::Path(qpath) = &func.kind 8 ( 0.00%) && let QPath::TypeRelative(ty, last_segment) = qpath 20 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, func.hir_id).opt_def_id() 312 ( 0.00%) => ???:::qpath_res (4x) 4 ( 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, . ); . }); . } 523,440 ( 0.01%) } . } . . fn is_integer_module(cx: &LateContext<'_>, did: DefId) -> bool { 11,445 ( 0.00%) matches!( 11,445 ( 0.00%) cx.tcx.get_diagnostic_name(did), 121,405 ( 0.00%) => ???:::get_diagnostic_name (2,289x) . 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 . ) . ) . } . 8,159 ( 0.00%) fn is_numeric_const(cx: &LateContext<'_>, did: DefId) -> bool { 48,954 ( 0.00%) matches!( 24,477 ( 0.00%) cx.tcx.get_diagnostic_name(did), 467,156 ( 0.01%) => ???:::get_diagnostic_name (8,159x) . 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 . ) . ) 16,318 ( 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 { 12 ( 0.00%) matches!( 8 ( 0.00%) cx.tcx.get_diagnostic_name(did), 246 ( 0.00%) => ???:::get_diagnostic_name (4x) . 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 ---------------------------------------- 111,234 ( 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) { 146,322 ( 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) { 42,096 ( 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/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 { 112,344 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 35,926 ( 0.00%) let ItemKind::Impl(imp) = item.kind else { return }; 15,680 ( 0.00%) let Some(of_trait) = imp.of_trait else { return }; 18,843 ( 0.00%) let Some(trait_def_id) = of_trait.trait_ref.trait_def_id() else { 81,653 ( 0.00%) => ???:::trait_def_id (6,281x) . return; . }; 43,967 ( 0.00%) if !cx.tcx.is_diagnostic_item(sym::TryFrom, trait_def_id) { 580,214 ( 0.01%) => ???:::is_diagnostic_item (6,281x) . 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", . ); . } . } 112,344 ( 0.00%) } . } 20,402 ( 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)> { 149,654 ( 0.00%) if let ExprKind::MethodCall(MethodCall { . seg: name_ident, . receiver, . .. . }) = &expr.kind 1,666 ( 0.00%) && let method_name = name_ident.ident.name 9,996 ( 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 { 523,789 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 1,666 ( 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, . ); . } 598,616 ( 0.01%) } . } 1,666 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . . impl ManualBits { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualBits { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 130,860 ( 0.00%) if let ExprKind::Binary(bin_op, left_expr, right_expr) = expr.kind 13,046 ( 0.00%) && let BinOpKind::Mul = &bin_op.node . && !expr.span.from_expansion() . && let ctxt = expr.span.ctxt() . && left_expr.span.ctxt() == ctxt . && right_expr.span.ctxt() == ctxt . && let Some((real_ty_span, resolved_ty, other_expr)) = get_one_size_of_ty(cx, left_expr, right_expr) . && matches!(resolved_ty.kind(), ty::Int(_) | ty::Uint(_)) . && let ExprKind::Lit(lit) = &other_expr.kind . && let LitKind::Int(Pu128(8), _) = lit.node -- line 60 ---------------------------------------- -- line 69 ---------------------------------------- . MANUAL_BITS, . expr.span, . "usage of `size_of::()` to obtain the size of `T` in bits", . "consider using", . sugg, . app, . ); . } 523,440 ( 0.01%) } . } . . fn get_one_size_of_ty<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'_>, . expr2: &'tcx Expr<'_>, . ) -> Option<(Span, Ty<'tcx>, &'tcx Expr<'tcx>)> { . match (get_size_of_ty(cx, expr1), get_size_of_ty(cx, expr2)) { -- line 85 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,290 ( 0.00%) if let Some((outer_max, outer_c, oe)) = min_max(cx, expr) 2,153,965 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/minmax.rs:clippy_lints::minmax::min_max (65,430x) . && 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", . ); . } 392,580 ( 0.00%) } . } . . #[derive(PartialEq, Eq, Debug, Clone, Copy)] . enum MinMax { . Min, . Max, . } . 458,010 ( 0.01%) fn min_max<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option<(MinMax, Constant, &'a Expr<'a>)> { 316,064 ( 0.00%) match expr.kind { 5,543 ( 0.00%) ExprKind::Call(path, args) => { 16,629 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind { . cx.typeck_results() 22,172 ( 0.00%) .qpath_res(qpath, path.hir_id) 284,853 ( 0.00%) => ???:::qpath_res (5,543x) . .opt_def_id() 33,240 ( 0.00%) .and_then(|def_id| match cx.tcx.get_diagnostic_name(def_id) { 340,367 ( 0.00%) => ???:::get_diagnostic_name (5,540x) . 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,144 ( 0.00%) ExprKind::MethodCall(path, receiver, args @ [_], _) => { 1,604 ( 0.00%) let m = match path.ident.name { 6,416 ( 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, . } 523,440 ( 0.01%) } . . fn fetch_const<'a>( . cx: &LateContext<'_>, . ctxt: SyntaxContext, . receiver: Option<&'a Expr<'a>>, . args: &'a [Expr<'a>], . m: MinMax, . ) -> Option<(MinMax, Constant, &'a Expr<'a>)> { -- line 105 ---------------------------------------- 5,543 ( 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; . 600,794 ( 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). 300,397 ( 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 ---------------------------------------- 1,376 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/disallowed_names.rs -------------------------------------------------------------------------------- Ir -- line 37 ---------------------------------------- . Self { . disallow: conf.disallowed_names.iter().map(|x| Symbol::intern(x)).collect(), . } . } . } . . impl<'tcx> LateLintPass<'tcx> for DisallowedNames { . fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 81,702 ( 0.00%) if let PatKind::Binding(.., ident, _) = pat.kind 12,659 ( 0.00%) && !ident.span.from_expansion() . && self.disallow.contains(&ident.name) . && !is_in_test(cx.tcx, pat.hir_id) . && !is_from_proc_macro(cx, &ident) . { . span_lint( . cx, . DISALLOWED_NAMES, . ident.span, . format!("use of a disallowed/placeholder name `{}`", ident.name), . ); . } 15,533 ( 0.00%) } . } 63,295 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/rc_clone_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 44 ---------------------------------------- . pub RC_CLONE_IN_VEC_INIT, . suspicious, . "initializing reference-counted pointer in `vec![elem; len]`" . } . . declare_lint_pass!(RcCloneInVecInit => [RC_CLONE_IN_VEC_INIT]); . . impl LateLintPass<'_> for RcCloneInVecInit { 588,870 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 171 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 285 ( 0.00%) let Some(VecArgs::Repeat(elem, len)) = VecArgs::hir(cx, expr) else { 17,328 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (57x) . return; . }; . let Some((symbol, func_span)) = ref_init(cx, elem) else { . return; . }; . . emit_lint(cx, symbol, macro_call.span, elem, len, func_span); 523,440 ( 0.01%) } . } . . fn loop_init_suggestion(elem: &str, len: &str, indent: &str) -> String { . format!( . r"{{ . {indent} let mut v = Vec::with_capacity({len}); . {indent} (0..{len}).for_each(|_| v.push({elem})); . {indent} v -- line 72 ---------------------------------------- 57 ( 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 { 458,010 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // If the expression is a call (`Box::new(...)`) 146,931 ( 0.00%) if let ExprKind::Call(box_new, [arg]) = expr.kind . // And call is of the form `::something` . // Here, it would be `::new` 26,572 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_new.kind . // And that method is `new` 3,322 ( 0.00%) && seg.ident.name == sym::new . // And the call is that of a `Box` method 6,620 ( 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())` . && let ExprKind::Call(arg_path, _) = arg.kind . // And we are not in a foreign crate's macro . && !expr.span.in_external_macro(cx.sess().source_map()) . // And the argument expression has the same context as the outer call expression . // or that we are inside a `vec!` macro expansion . && (expr.span.eq_ctxt(arg.span) || is_local_vec_expn(cx, arg, expr)) -- line 56 ---------------------------------------- -- line 62 ---------------------------------------- . BOX_DEFAULT, . expr.span, . "`Box::new(_)` of default value", . "try", . "Box::default()".into(), . Applicability::MachineApplicable, . ); . } 523,440 ( 0.01%) } . } . . fn is_plain_default(cx: &LateContext<'_>, arg_path: &Expr<'_>) -> bool { . // we need to match the actual path so we don't match e.g. "u8::default" . if let ExprKind::Path(QPath::Resolved(None, path)) = &arg_path.kind . && let Res::Def(_, def_id) = path.res . { . // avoid generic parameters -- line 78 ---------------------------------------- 3,310 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs -------------------------------------------------------------------------------- Ir -- line 41 ---------------------------------------- . . declare_lint_pass!(ManualIgnoreCaseCmp => [MANUAL_IGNORE_CASE_CMP]); . . enum MatchType<'a> { . ToAscii(bool, Ty<'a>), . Literal(LitKind), . } . 27,128 ( 0.00%) fn get_ascii_type<'a>(cx: &LateContext<'a>, kind: rustc_hir::ExprKind<'_>) -> Option<(Span, MatchType<'a>)> { 16,955 ( 0.00%) if let MethodCall(path, expr, _, _) = kind { . let is_lower = match path.ident.name { . sym::to_ascii_lowercase => true, . sym::to_ascii_uppercase => false, . _ => return None, . }; . let ty_raw = cx.typeck_results().expr_ty(expr); . let ty = ty_raw.peel_refs(); . if needs_ref_to_cmp(cx, ty) -- line 58 ---------------------------------------- -- line 61 ---------------------------------------- . || matches!(ty.opt_diag_name(cx), Some(sym::OsStr | sym::OsString)) . { . return Some((expr.span, ToAscii(is_lower, ty_raw))); . } . } else if let Lit(expr) = kind { . return Some((expr.span, Literal(expr.node))); . } . None 27,128 ( 0.00%) } . . /// Returns true if the type needs to be dereferenced to be compared . fn needs_ref_to_cmp(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { . ty.is_char() . || *ty.kind() == ty::Uint(UintTy::U8) . || ty.is_diag_item(cx, sym::Vec) . || ty.is_lang_item(cx, LangItem::String) . } . . impl LateLintPass<'_> for ManualIgnoreCaseCmp { 523,440 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { . // check if expression represents a comparison of two strings . // using .to_ascii_lowercase() or .to_ascii_uppercase() methods, . // or one of the sides is a literal . // Offer to replace it with .eq_ignore_ascii_case() method 130,860 ( 0.00%) if let Binary(op, left, right) = &expr.kind 15,919 ( 0.00%) && (op.node == BinOpKind::Eq || op.node == BinOpKind::Ne) 57,647 ( 0.00%) && let Some((left_span, left_val)) = get_ascii_type(cx, left.kind) 77,993 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:clippy_lints::manual_ignore_case_cmp::get_ascii_type (3,391x) . && let Some((right_span, right_val)) = get_ascii_type(cx, right.kind) . && match (&left_val, &right_val) { . (ToAscii(l_lower, ..), ToAscii(r_lower, ..)) if l_lower == r_lower => true, . (ToAscii(..), Literal(..)) | (Literal(..), ToAscii(..)) => true, . _ => false, . } . { . let deref = match right_val { -- line 95 ---------------------------------------- -- line 117 ---------------------------------------- . expr.span, . "consider using `.eq_ignore_ascii_case()` instead", . format!("{neg}{left_snip}.eq_ignore_ascii_case({deref}{right_snip})"), . app, . ); . }, . ); . } 523,440 ( 0.01%) } . } 16,696 ( 0.00%) -------------------------------------------------------------------------------- The following files chosen for auto-annotation could not be found: -------------------------------------------------------------------------------- /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/rustc_entry.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/scanners.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/tcache.c include/jemalloc/internal/arena_inlines_b.h include/jemalloc/internal/atomic.h include/jemalloc/internal/bit_util.h include/jemalloc/internal/bitmap.h include/jemalloc/internal/cache_bin.h include/jemalloc/internal/div.h include/jemalloc/internal/edata.h include/jemalloc/internal/emap.h include/jemalloc/internal/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/ph.h include/jemalloc/internal/rtree.h include/jemalloc/internal/sz.h include/jemalloc/internal/tcache_inlines.h include/jemalloc/internal/thread_event.h include/jemalloc/internal/ticker.h include/jemalloc/internal/tsd.h include/jemalloc/internal/tsd_tls.h include/jemalloc/internal/util.h src/arena.c src/base.c src/bitmap.c src/decay.c src/emap.c src/eset.c src/extent.c src/hook.c src/pac.c src/sz.c src/tcache.c src/thread_event.c -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 673,870,703 ( 8.45%) events annotated